From: Logarithmus <Logarithmus@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] common/build-helper/rust.sh: dynamic linking to libpcre2 on musl
Date: Mon, 05 Oct 2020 16:33:04 +0200 [thread overview]
Message-ID: <20201005143304.9fXmHASWxyz20UKhBfVV7qgz_7kzZXiQmcY0iKyinzg@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-25182@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 545 bytes --]
There is an updated pull request by Logarithmus against master on the void-packages repository
https://github.com/Logarithmus/void-packages rust-pcre-sys
https://github.com/void-linux/void-packages/pull/25182
common/build-helper/rust.sh: dynamic linking to libpcre2 on musl
By default, `pcre2-sys` crate use static linking on `musl` targets. This patch fixes such behavior and all Rust crates will automatically use system-provided `libpcre2` on musl.
A patch file from https://github.com/void-linux/void-packages/pull/25182.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rust-pcre-sys-25182.patch --]
[-- Type: text/x-diff, Size: 4414 bytes --]
From 6a9ca72eb0f1c1a903e5ad5da7f31c4cf099b796 Mon Sep 17 00:00:00 2001
From: Artur Sinila <personal@logarithmus.dev>
Date: Mon, 28 Sep 2020 08:51:45 +0300
Subject: [PATCH 1/3] New package: cross-avr-gdb
---
srcpkgs/cross-avr-gdb/template | 80 ++++++++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
create mode 100644 srcpkgs/cross-avr-gdb/template
diff --git a/srcpkgs/cross-avr-gdb/template b/srcpkgs/cross-avr-gdb/template
new file mode 100644
index 00000000000..e01a4bf6bfa
--- /dev/null
+++ b/srcpkgs/cross-avr-gdb/template
@@ -0,0 +1,80 @@
+# Template file for 'cross-${_triplet}-${_pkgname}'
+_triplet=avr
+_pkgname=gdb
+pkgname=cross-${_triplet}-${_pkgname}
+version=9.2
+revision=1
+wrksrc=${_pkgname}-${version}
+build_style=gnu-configure
+pycompile_dirs="/usr/share/gdb/python"
+configure_args="\
+ --target=${_triplet} \
+ --program-prefix=${_triplet}- \
+ --disable-werror \
+ --disable-nls \
+ --with-system-readline \
+ --with-system-gdbinit=/etc/gdb/gdbinit \
+ --with-system-zlib $(vopt_enable gdbserver) \
+ $(vopt_if static 'CFLAGS=-static CXXFLAGS=-static LDFLAGS=-static') \
+ $(vopt_if python --with-python=/usr/bin/python3)"
+hostmakedepends="texinfo perl $(vopt_if python python3-devel)"
+makedepends="ncurses-devel zlib-devel readline-devel expat-devel
+ $(vopt_if python 'python3-devel gettext-libs')"
+depends=gdb
+short_desc="GNU Debugger for AVR"
+maintainer="Artur Sinila <opensource@logarithmus.dev>"
+license="GPL-3.0-or-later"
+homepage="https://www.gnu.org/software/gdb/"
+distfiles="${GNU_SITE}/${_pkgname}/${_pkgname}-${version}.tar.xz"
+checksum=360cd7ae79b776988e89d8f9a01c985d0b1fa21c767a4295e5f88cb49175c555
+python_version=3
+
+if [ "${CROSS_BUILD}" ]; then
+ # Make python3.x detection work in cross builds
+ CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
+ CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
+fi
+CFLAGS+=" -fcommon"
+CXXFLAGS+=" -fcommon"
+# Package build options
+build_options="gdbserver static python"
+desc_option_gdbserver="Enable support for building GDB server"
+# By default, don't enable any of build options
+#build_options_default="gdbserver"
+# Both options cannot be enabled at the same time
+vopt_conflict gdbserver static
+
+post_extract() {
+ vsed -i 's,sgidefs.h,asm/sgidefs.h,' gdb/mips-linux-nat.c
+ mkdir -p build
+}
+
+do_configure() {
+ cd build
+ ../configure ${configure_args/with-sysroot/with-build-sysroot} \
+ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD} -fcommon"
+ export gl_cv_func_gettimeofday_clobber=no
+ export gl_cv_func_working_strerror=yes
+ export gl_cv_func_strerror_0_works=yes
+}
+
+do_build() {
+ cd build
+ make ${makejobs} all
+}
+
+do_install() {
+ cd build
+ make DESTDIR=${DESTDIR} ${makejobs} install
+ # resolve conflicts with binutils
+ rm -rf ${DESTDIR}/usr/include ${DESTDIR}/usr/lib
+ rm -rf ${DESTDIR}/usr/lib64
+ for f in bfd configure standards; do
+ rm -f ${DESTDIR}/usr/share/info/${f}.info*
+ done
+}
+
+post_install() {
+ # resolve conflicts with binutils and native gdb
+ rm -fr usr/{share/{locale,gdb,info},include}
+}
From 9eabf45824138638c9eb57ff1fe35dbaab520608 Mon Sep 17 00:00:00 2001
From: Artur Sinila <personal@logarithmus.dev>
Date: Tue, 29 Sep 2020 02:55:05 +0300
Subject: [PATCH 2/3] common/build-helper/rust.sh: dynamic linking to libpcre2
on musl
---
common/build-helper/rust.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/common/build-helper/rust.sh b/common/build-helper/rust.sh
index a62503583f3..6fcd3bd7d9e 100644
--- a/common/build-helper/rust.sh
+++ b/common/build-helper/rust.sh
@@ -38,3 +38,6 @@ export SODIUM_INC_DIR="${XBPS_CROSS_BASE}/usr/lib"
# openssl-sys
export OPENSSL_NO_VENDOR=1
+
+# pcre2-sys, only necessary for musl targets
+export PCRE2_SYS_STATIC=0
From b2a73cc81bb205560259c4b931b5a057859c8516 Mon Sep 17 00:00:00 2001
From: Artur Sinila <personal@logarithmus.dev>
Date: Tue, 29 Sep 2020 03:32:25 +0300
Subject: [PATCH 3/3] ripgrep: revbump to use system-provided libpcre2 on musl
---
srcpkgs/ripgrep/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/ripgrep/template b/srcpkgs/ripgrep/template
index 339d2de3a39..b2ec6ad3d34 100644
--- a/srcpkgs/ripgrep/template
+++ b/srcpkgs/ripgrep/template
@@ -1,7 +1,7 @@
# Template file for 'ripgrep'
pkgname=ripgrep
version=12.1.1
-revision=1
+revision=2
build_style=cargo
configure_args="--features=pcre2"
hostmakedepends="ruby-asciidoctor pkg-config"
next prev parent reply other threads:[~2020-10-05 14:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 0:13 [PR PATCH] common/build-helper/rust.sh: dynamic linking to libpcre2 even " Logarithmus
2020-09-29 0:25 ` [PR REVIEW] " ericonr
2020-09-29 0:29 ` [PR PATCH] [Updated] " Logarithmus
2020-09-29 0:32 ` Logarithmus
2020-09-29 2:34 ` ericonr
2020-10-05 14:33 ` Logarithmus [this message]
2020-10-05 15:25 ` [PR PATCH] [Updated] common/build-helper/rust.sh: dynamic linking to libpcre2 " Logarithmus
2020-10-05 15:27 ` Logarithmus
2020-10-05 15:41 ` Logarithmus
2020-10-05 18:49 ` Logarithmus
2020-10-05 18:57 ` ericonr
2020-10-06 14:30 ` sgn
2020-10-06 17:15 ` Logarithmus
2020-10-06 17:15 ` Logarithmus
2020-10-06 17:20 ` Logarithmus
2020-10-09 20:11 ` ericonr
2020-10-15 6:09 ` [PR PATCH] [Merged]: " ericonr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201005143304.9fXmHASWxyz20UKhBfVV7qgz_7kzZXiQmcY0iKyinzg@z \
--to=logarithmus@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).