ports/binutils: Fix compilation when zstd is installed

binutils uses pkg-config to find zstd for the host when building. If our
zstd port is installed, it finds it instead and ends up including our
own sysroot which is incompatible with host's.

unsetting pkg-config related variables fixes this and allows binutils to
build fine even when zstd is installed. We can now make it a dependency.
This commit is contained in:
Bananymous 2025-08-07 20:57:58 +03:00
parent 0dbfd8ac66
commit 06015d006d
1 changed files with 8 additions and 1 deletions

View File

@ -3,7 +3,7 @@
NAME='binutils' NAME='binutils'
VERSION='2.44' VERSION='2.44'
DOWNLOAD_URL="https://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.gz#0cdd76777a0dfd3dd3a63f215f030208ddb91c2361d2bcc02acec0f1c16b6a2e" DOWNLOAD_URL="https://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.gz#0cdd76777a0dfd3dd3a63f215f030208ddb91c2361d2bcc02acec0f1c16b6a2e"
DEPENDENCIES=('zlib') DEPENDENCIES=('zlib' 'zstd')
MAKE_INSTALL_TARGETS=('install-strip') MAKE_INSTALL_TARGETS=('install-strip')
CONFIGURE_OPTIONS=( CONFIGURE_OPTIONS=(
"--target=$BANAN_TOOLCHAIN_TRIPLE" "--target=$BANAN_TOOLCHAIN_TRIPLE"
@ -16,6 +16,13 @@ CONFIGURE_OPTIONS=(
'--disable-werror' '--disable-werror'
) )
pre_configure() {
unset PKG_CONFIG_DIR
unset PKG_CONFIG_SYSROOT_DIR
unset PKG_CONFIG_LIBDIR
unset PKG_CONFIG_PATH
}
post_install() { post_install() {
# remove libtool files # remove libtool files
rm -f $BANAN_SYSROOT/usr/lib/libbfd.la rm -f $BANAN_SYSROOT/usr/lib/libbfd.la