summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2023-12-17 21:17:21 +0000
committerJames Le Cuirot <chewi@gentoo.org>2023-12-27 15:42:41 +0000
commitf6868eaade72ca7162fc979c3123fccf70f18132 (patch)
tree62640274daf837f2252aad90bf5d136af47a33af /dev-libs/libtomcrypt/libtomcrypt-1.18.2-r4.ebuild
parentsci-geosciences/folium: depend on xyzservice (diff)
downloadgentoo-f6868eaade72ca7162fc979c3123fccf70f18132.tar.gz
gentoo-f6868eaade72ca7162fc979c3123fccf70f18132.tar.bz2
gentoo-f6868eaade72ca7162fc979c3123fccf70f18132.zip
dev-libs/libtomcrypt: Fix cross-compiling by using libtool from SYSROOT
libtool is normally generated by configure with the right toolchain settings, but this package does not use autoconf, so it executes the build host libtool with the wrong settings. CC seems to be respected for compiling but not linking for some reason. As much as I hate executing something from SYSROOT, hell will freeze over before libtool stops being a shell script. This seems far easier than any alternative. ${BASH} at least ensures that it is not executed using some prefixed shebang. We'll still allow ${LIBTOOL} to be manually overridden because slibtool does not suffer from this issue. Closes: https://github.com/gentoo/gentoo/pull/34334 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'dev-libs/libtomcrypt/libtomcrypt-1.18.2-r4.ebuild')
-rw-r--r--dev-libs/libtomcrypt/libtomcrypt-1.18.2-r4.ebuild10
1 files changed, 8 insertions, 2 deletions
diff --git a/dev-libs/libtomcrypt/libtomcrypt-1.18.2-r4.ebuild b/dev-libs/libtomcrypt/libtomcrypt-1.18.2-r4.ebuild
index da71154a8a6b..a42911b32ece 100644
--- a/dev-libs/libtomcrypt/libtomcrypt-1.18.2-r4.ebuild
+++ b/dev-libs/libtomcrypt/libtomcrypt-1.18.2-r4.ebuild
@@ -28,12 +28,15 @@ BDEPEND="
sys-devel/libtool
virtual/pkgconfig
"
-DEPEND="
+RDEPEND="
gmp? ( dev-libs/gmp:= )
libtommath? ( dev-libs/libtommath:= )
tomsfastmath? ( dev-libs/tomsfastmath:= )
"
-RDEPEND="${DEPEND}"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/libtool
+"
PATCHES=(
"${FILESDIR}"/${P}-slibtool.patch
@@ -73,6 +76,9 @@ mymake() {
enabled_features+=( -DUSE_TFM=1 )
fi
+ # Fix cross-compiling, but allow manual overrides for slibtool, which works.
+ [[ -z ${LIBTOOL} ]] && declare -x LIBTOOL="${BASH} ${ESYSROOT}/usr/bin/libtool"
+
# IGNORE_SPEED=1 is needed to respect CFLAGS
EXTRALIBS="${extra_libs[*]}" emake \
CFLAGS="${CFLAGS} ${enabled_features[*]}" \