* [PR PATCH] R-cran-Rcpp: fix usage on musl without R-cran build style
@ 2022-01-29 18:45 Chocimier
2022-01-29 18:51 ` [PR PATCH] [Merged]: " Chocimier
0 siblings, 1 reply; 2+ messages in thread
From: Chocimier @ 2022-01-29 18:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 357 bytes --]
There is a new pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org R-__MUSL__
https://github.com/void-linux/void-packages/pull/35301
R-cran-Rcpp: fix usage on musl without R-cran build style
None
A patch file from https://github.com/void-linux/void-packages/pull/35301.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-R-__MUSL__-35301.patch --]
[-- Type: text/x-diff, Size: 7230 bytes --]
From 929a812bd85aca1ea594c7dbc3d9c3ec1f210fd3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 29 Jan 2022 18:35:33 +0100
Subject: [PATCH 1/5] build-style/R-cran: allow to override distfiles
---
common/environment/build-style/R-cran.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/common/environment/build-style/R-cran.sh b/common/environment/build-style/R-cran.sh
index d60f914f5f7a..ded66793396b 100644
--- a/common/environment/build-style/R-cran.sh
+++ b/common/environment/build-style/R-cran.sh
@@ -1,4 +1,8 @@
makedepends+=" R"
depends+=" R"
-distfiles="https://cran.r-project.org/src/contrib/${pkgname#R-cran-}_${version//r/-}.tar.gz"
wrksrc="${XBPS_BUILDDIR}/${pkgname#R-cran-}"
+
+# default to cran
+if [ -z "$distfiles" ]; then
+ distfiles="https://cran.r-project.org/src/contrib/${pkgname#R-cran-}_${version//r/-}.tar.gz"
+fi
From c74192ef58916235f18bd79c4bf459fc7c7ae5cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 29 Jan 2022 18:34:29 +0100
Subject: [PATCH 2/5] R-cran-Rcpp: update to 1.0.8.
Removing -D__MUSL__, as it is defined by R globally
cf. 626e5eb25
---
srcpkgs/R-cran-Rcpp/patches/1.0.5--musl.patch | 28 +++++++++++++++++++
srcpkgs/R-cran-Rcpp/template | 13 +++------
2 files changed, 32 insertions(+), 9 deletions(-)
create mode 100644 srcpkgs/R-cran-Rcpp/patches/1.0.5--musl.patch
diff --git a/srcpkgs/R-cran-Rcpp/patches/1.0.5--musl.patch b/srcpkgs/R-cran-Rcpp/patches/1.0.5--musl.patch
new file mode 100644
index 000000000000..f6cb9e6872b9
--- /dev/null
+++ b/srcpkgs/R-cran-Rcpp/patches/1.0.5--musl.patch
@@ -0,0 +1,28 @@
+From f78a62797de3d02b2ca841e3aa240bab961912cf Mon Sep 17 00:00:00 2001
+From: Piotr Wójcik <chocimier@tlen.pl>
+Date: Sat, 29 Jan 2022 17:51:20 +0100
+Subject: musl
+
+Relying on __MUSL__ being defined worked with R-cran build style,
+as R template exports it. With other build styles things failed.
+Detect glibc instead.
+---
+ inst/include/Rcpp/exceptions_impl.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/inst/include/Rcpp/exceptions_impl.h b/inst/include/Rcpp/exceptions_impl.h
+index 8f45028..74763d9 100644
+--- a/inst/include/Rcpp/exceptions_impl.h
++++ b/inst/include/Rcpp/exceptions_impl.h
+@@ -34,7 +34,7 @@
+ defined(__HAIKU__) || \
+ defined(__ANDROID__)
+ # define RCPP_DEMANGLER_ENABLED 0
+-# elif defined(__GNUC__) || defined(__clang__)
++# elif defined(__GLIBC__)
+ # include <execinfo.h>
+ # define RCPP_DEMANGLER_ENABLED 1
+ # else
+--
+2.35.0
+
diff --git a/srcpkgs/R-cran-Rcpp/template b/srcpkgs/R-cran-Rcpp/template
index e19cd395809b..d72e63c52111 100644
--- a/srcpkgs/R-cran-Rcpp/template
+++ b/srcpkgs/R-cran-Rcpp/template
@@ -1,16 +1,11 @@
# Template file for 'R-cran-Rcpp'
pkgname=R-cran-Rcpp
-version=1.0.5
-revision=2
+version=1.0.8
+revision=1
build_style=R-cran
short_desc="Seamless R and C++ Integration"
maintainer="Florian Wagner <florian@wagner-flo.net>"
license="GPL-2.0-or-later"
homepage="http://www.rcpp.org/"
-checksum=b8462c643bcc6fe3b0e9caee9e0cd76c5f7f0e34ee2e7397f93c4c43885c5c04
-
-pre_install() {
- case "$XBPS_TARGET_MACHINE" in
- *-musl) export PKG_CXXFLAGS+=" -D__MUSL__";;
- esac
-}
+changelog="https://raw.githubusercontent.com/RcppCore/Rcpp/master/ChangeLog"
+checksum=879f9296bc045ac4ed464578723bd37fcabbbdaa30aaaf070cf953e329f678ee
From 8240d7ea19f4c8a1980c066871ee4b556b401af2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 29 Jan 2022 17:59:10 +0100
Subject: [PATCH 3/5] R-cran-lubridate: rebuild for R-cran-Rcpp-1.0.8
---
srcpkgs/R-cran-lubridate/template | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/srcpkgs/R-cran-lubridate/template b/srcpkgs/R-cran-lubridate/template
index 76601e943c2b..f7ddaa3c4c6f 100644
--- a/srcpkgs/R-cran-lubridate/template
+++ b/srcpkgs/R-cran-lubridate/template
@@ -1,7 +1,7 @@
# Template file for 'R-cran-lubridate'
pkgname=R-cran-lubridate
version=1.7.9
-revision=2
+revision=3
build_style=R-cran
makedepends="R-cran-generics R-cran-Rcpp"
depends="R-cran-generics R-cran-Rcpp>=0.12.13"
@@ -9,10 +9,6 @@ short_desc="Make Dealing with Dates a Little Easier"
maintainer="Florian Wagner <florian@wagner-flo.net>"
license="GPL-2.0-or-later"
homepage="https://github.com/tidyverse/lubridate"
+changelog="https://raw.githubusercontent.com/tidyverse/lubridate/main/NEWS.md"
+distfiles="https://src.fedoraproject.org/repo/pkgs/R-lubridate/lubridate_${version}.tar.gz/sha512/344cb68f9943f9cec50a191fa7d6527d5f5c5dbb6d967f5d90088bda8d2997fbfe3e729d06afa95cfdb634dbf396c1c7b0a60338bd417f34741e30f60087daec/lubridate_${version}.tar.gz"
checksum=cbf95ee07323f3912a98f3cfdae04258d7ce1edb259787f284e2be3cddfed272
-
-pre_install() {
- case "$XBPS_TARGET_MACHINE" in
- *-musl) export PKG_CXXFLAGS+=" -D__MUSL__";;
- esac
-}
From aa04fdd1443de1d123af52374c977c9eddebcdae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 29 Jan 2022 17:59:11 +0100
Subject: [PATCH 4/5] R-cran-plyr: rebuild for R-cran-Rcpp-1.0.8
---
srcpkgs/R-cran-plyr/template | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/srcpkgs/R-cran-plyr/template b/srcpkgs/R-cran-plyr/template
index c046ee5601ca..937f116241a8 100644
--- a/srcpkgs/R-cran-plyr/template
+++ b/srcpkgs/R-cran-plyr/template
@@ -1,7 +1,7 @@
# Template file for 'R-cran-plyr'
pkgname=R-cran-plyr
version=1.8.6
-revision=2
+revision=3
build_style=R-cran
makedepends="R-cran-Rcpp"
depends="R-cran-Rcpp>=0.11.0"
@@ -11,12 +11,6 @@ license="MIT"
homepage="http://had.co.nz/plyr/"
checksum=ea55d26f155443e9774769531daa5d4c20a0697bb53abd832e891b126c935287
-pre_install() {
- case "$XBPS_TARGET_MACHINE" in
- *-musl) export PKG_CXXFLAGS+=" -D__MUSL__";;
- esac
-}
-
post_install() {
vlicense LICENSE
}
From 4cb2ab87cddf973ba7b8599f45c32287c90509f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 29 Jan 2022 17:59:11 +0100
Subject: [PATCH 5/5] R-cran-reshape2: rebuild for R-cran-Rcpp-1.0.8
---
srcpkgs/R-cran-reshape2/template | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/srcpkgs/R-cran-reshape2/template b/srcpkgs/R-cran-reshape2/template
index fbc8a6b6aa93..4972487a6714 100644
--- a/srcpkgs/R-cran-reshape2/template
+++ b/srcpkgs/R-cran-reshape2/template
@@ -1,7 +1,7 @@
# Template file for 'R-cran-reshape2'
pkgname=R-cran-reshape2
version=1.4.4
-revision=2
+revision=3
build_style=R-cran
makedepends="R-cran-plyr R-cran-stringr R-cran-Rcpp"
depends="R-cran-plyr>=1.8.1 R-cran-stringr R-cran-Rcpp"
@@ -9,14 +9,9 @@ short_desc="Flexibly Reshape Data: A Reboot of the Reshape Package"
maintainer="Florian Wagner <florian@wagner-flo.net>"
license="MIT"
homepage="https://github.com/hadley/reshape"
+changelog="https://raw.githubusercontent.com/hadley/reshape/master/NEWS.md"
checksum=d88dcf9e2530fa9695fc57d0c78adfc5e361305fe8919fe09410b17da5ca12d8
-pre_install() {
- case "$XBPS_TARGET_MACHINE" in
- *-musl) export PKG_CXXFLAGS+=" -D__MUSL__";;
- esac
-}
-
post_install() {
vlicense LICENSE
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-29 18:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-29 18:45 [PR PATCH] R-cran-Rcpp: fix usage on musl without R-cran build style Chocimier
2022-01-29 18:51 ` [PR PATCH] [Merged]: " Chocimier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).