From f6868eaade72ca7162fc979c3123fccf70f18132 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sun, 17 Dec 2023 21:17:21 +0000 Subject: 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 --- dev-libs/libtomcrypt/libtomcrypt-1.18.2-r4.ebuild | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'dev-libs/libtomcrypt') 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[*]}" \ -- cgit v1.2.3-65-gdbad