xbps: add patch to fix cross compilation with base-chroot-v2.
This commit is contained in:
parent
bee88d3b64
commit
8907a284fb
1 changed files with 70 additions and 0 deletions
70
srcpkgs/xbps/patches/pkg-config-cross.patch
Normal file
70
srcpkgs/xbps/patches/pkg-config-cross.patch
Normal file
|
@ -0,0 +1,70 @@
|
|||
We only care if the `pkg-config` bin is there, don't override
|
||||
it with the result from _which(). In the xbps-src world,
|
||||
pkg-config is a wrapper, that makes it cross compile easily.
|
||||
--xtraeme
|
||||
|
||||
--- configure.orig 2019-12-26 14:48:59.160477429 +0100
|
||||
+++ configure 2019-12-26 14:50:45.476628591 +0100
|
||||
@@ -683,14 +683,14 @@ fi
|
||||
LIBARCHIVE_REQVER=3.3.3
|
||||
|
||||
printf "Checking for libarchive >= ${LIBARCHIVE_REQVER} via pkg-config ... "
|
||||
-if ! $PKGCONFIG_BIN --atleast-version=${LIBARCHIVE_REQVER} libarchive; then
|
||||
+if ! pkg-config --atleast-version=${LIBARCHIVE_REQVER} libarchive; then
|
||||
echo "libarchive.pc file not found, exiting."
|
||||
exit 1
|
||||
else
|
||||
- echo "found version $($PKGCONFIG_BIN --modversion libarchive)."
|
||||
- echo "CFLAGS += $($PKGCONFIG_BIN --cflags libarchive)" >>$CONFIG_MK
|
||||
- echo "LDFLAGS += $($PKGCONFIG_BIN --libs libarchive)" >>$CONFIG_MK
|
||||
- echo "STATIC_LIBS += $($PKGCONFIG_BIN --libs --static libarchive)" \
|
||||
+ echo "found version $(pkg-config --modversion libarchive)."
|
||||
+ echo "CFLAGS += $(pkg-config --cflags libarchive)" >>$CONFIG_MK
|
||||
+ echo "LDFLAGS += $(pkg-config --libs libarchive)" >>$CONFIG_MK
|
||||
+ echo "STATIC_LIBS += $(pkg-config --libs --static libarchive)" \
|
||||
>>$CONFIG_MK
|
||||
fi
|
||||
|
||||
@@ -698,17 +698,17 @@ fi
|
||||
# libssl with pkg-config support is required.
|
||||
#
|
||||
printf "Checking for libssl via pkg-config ... "
|
||||
-if $PKGCONFIG_BIN --exists 'libssl < 1.2' && ! $PKGCONFIG_BIN --exists libtls ; then
|
||||
- echo "found OpenSSL version $($PKGCONFIG_BIN --modversion libssl)."
|
||||
-elif $PKGCONFIG_BIN --exists libssl libtls; then
|
||||
- echo "found LibreSSL version $($PKGCONFIG_BIN --modversion libssl)."
|
||||
+if pkg-config --exists 'libssl < 1.2' && ! pkg-config --exists libtls ; then
|
||||
+ echo "found OpenSSL version $(pkg-config --modversion libssl)."
|
||||
+elif pkg-config --exists libssl libtls; then
|
||||
+ echo "found LibreSSL version $(pkg-config --modversion libssl)."
|
||||
else
|
||||
echo "libssl.pc file not found or incompatible version detected, exiting."
|
||||
exit 1
|
||||
fi
|
||||
-echo "CFLAGS += $($PKGCONFIG_BIN --cflags libssl)" >>$CONFIG_MK
|
||||
-echo "LDFLAGS += $($PKGCONFIG_BIN --libs libssl)" >>$CONFIG_MK
|
||||
-echo "STATIC_LIBS += $($PKGCONFIG_BIN --libs --static libssl)" \
|
||||
+echo "CFLAGS += $(pkg-config --cflags libssl)" >>$CONFIG_MK
|
||||
+echo "LDFLAGS += $(pkg-config --libs libssl)" >>$CONFIG_MK
|
||||
+echo "STATIC_LIBS += $(pkg-config --libs --static libssl)" \
|
||||
>>$CONFIG_MK
|
||||
|
||||
#
|
||||
@@ -726,13 +726,13 @@ fi
|
||||
#
|
||||
if [ "$BUILD_TESTS" = "yes" ]; then
|
||||
printf "Checking for ATF via pkg-config ... "
|
||||
- if ! $PKGCONFIG_BIN --atleast-version=0.15 atf-c; then
|
||||
+ if ! pkg-config --atleast-version=0.15 atf-c; then
|
||||
echo "ATF >= 0.15 not found in PKG_CONFIG_LIBDIR, exiting."
|
||||
exit 1
|
||||
fi
|
||||
- echo "found version $($PKGCONFIG_BIN --modversion atf-c)."
|
||||
- echo "TEST_CFLAGS += $($PKGCONFIG_BIN --cflags atf-c)" >>$CONFIG_MK
|
||||
- echo "TEST_LDFLAGS += $($PKGCONFIG_BIN --libs atf-c)" >>$CONFIG_MK
|
||||
+ echo "found version $(pkg-config --modversion atf-c)."
|
||||
+ echo "TEST_CFLAGS += $(pkg-config --cflags atf-c)" >>$CONFIG_MK
|
||||
+ echo "TEST_LDFLAGS += $(pkg-config --libs atf-c)" >>$CONFIG_MK
|
||||
echo "BUILD_TESTS = yes" >>$CONFIG_MK
|
||||
BUILD_TESTS_VALUE=yes
|
||||
else
|
Loading…
Reference in a new issue