From 2dd8b76289df0c46d6dd196764f4a004bc60da94 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 13 Nov 2025 20:37:10 +0200 Subject: [PATCH] BuildSystem: Automatically delete libtool files Half of the ports had a manual post_install step to delete libtool files this is now done automatically and there is no need for it! Libtool files have to be deleted as libtool doesn't work while cross-compiling (at least out of the box) --- ports/binutils/build.sh | 9 --------- ports/curl/build.sh | 5 ----- ports/expat/build.sh | 5 ----- ports/freetype/build.sh | 6 ------ ports/gcc/build.sh | 7 ------- ports/gmp/build.sh | 5 ----- ports/install.sh | 1 + ports/libffi/build.sh | 5 ----- ports/libiconv/build.sh | 6 ------ ports/libjpeg/build.sh | 5 ----- ports/libogg/build.sh | 5 ----- ports/libpng/build.sh | 6 ------ ports/libsndfile/build.sh | 5 ----- ports/libtiff/build.sh | 6 ------ ports/libvorbis/build.sh | 7 ------- ports/libwebp/build.sh | 7 ------- ports/mpc/build.sh | 5 ----- ports/mpfr/build.sh | 5 ----- ports/pcre2/build.sh | 6 ------ 19 files changed, 1 insertion(+), 105 deletions(-) diff --git a/ports/binutils/build.sh b/ports/binutils/build.sh index 6ea8f70c..9235516a 100755 --- a/ports/binutils/build.sh +++ b/ports/binutils/build.sh @@ -22,12 +22,3 @@ pre_configure() { unset PKG_CONFIG_LIBDIR unset PKG_CONFIG_PATH } - -post_install() { - # remove libtool files - rm -f $BANAN_SYSROOT/usr/lib/libbfd.la - rm -f $BANAN_SYSROOT/usr/lib/libctf.la - rm -f $BANAN_SYSROOT/usr/lib/libctf-nobfd.la - rm -f $BANAN_SYSROOT/usr/lib/libopcodes.la - rm -f $BANAN_SYSROOT/usr/lib/libsframe.la -} diff --git a/ports/curl/build.sh b/ports/curl/build.sh index b68053dc..e9318ea7 100755 --- a/ports/curl/build.sh +++ b/ports/curl/build.sh @@ -18,8 +18,3 @@ CONFIGURE_OPTIONS=( '--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt' '--without-ca-path' ) - -post_install() { - # remove libtool file - rm -f $BANAN_SYSROOT/usr/lib/libcurl.la -} diff --git a/ports/expat/build.sh b/ports/expat/build.sh index a0c449e4..a58d285c 100755 --- a/ports/expat/build.sh +++ b/ports/expat/build.sh @@ -4,8 +4,3 @@ NAME='expat' VERSION='2.7.1' DOWNLOAD_URL="https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-$VERSION.tar.gz#0cce2e6e69b327fc607b8ff264f4b66bdf71ead55a87ffd5f3143f535f15cfa2" CONFIG_SUB=('conftools/config.sub') - -post_install() { - # remove libtool file - rm -f $BANAN_SYSROOT/usr/lib/libexpat.la -} diff --git a/ports/freetype/build.sh b/ports/freetype/build.sh index c3dda65b..0957be38 100755 --- a/ports/freetype/build.sh +++ b/ports/freetype/build.sh @@ -5,12 +5,6 @@ VERSION='2.13.3' DOWNLOAD_URL="https://download.savannah.gnu.org/releases/freetype/freetype-$VERSION.tar.gz#5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747" DEPENDENCIES=('zlib' 'libpng') CONFIG_SUB=('builds/unix/config.sub') - CONFIGURE_OPTIONS=( 'lt_cv_deplibs_check_method=pass_all' ) - -post_install() { - # remove libtool file - rm -f $BANAN_SYSROOT/usr/lib/libfreetype.la -} diff --git a/ports/gcc/build.sh b/ports/gcc/build.sh index 3415da17..20bc8435 100755 --- a/ports/gcc/build.sh +++ b/ports/gcc/build.sh @@ -27,10 +27,3 @@ build() { make -j$(nproc) all-target-libgcc CFLAGS_FOR_TARGET="$xcflags" || exit 1 make -j$(nproc) all-target-libstdc++-v3 || exit 1 } - -post_install() { - # remove libtool files - rm -f $BANAN_SYSROOT/usr/lib/libstdc++.la - rm -f $BANAN_SYSROOT/usr/lib/libstdc++exp.la - rm -f $BANAN_SYSROOT/usr/lib/libsupc++.la -} diff --git a/ports/gmp/build.sh b/ports/gmp/build.sh index 72ea2758..bd78b264 100755 --- a/ports/gmp/build.sh +++ b/ports/gmp/build.sh @@ -7,8 +7,3 @@ CONFIG_SUB=('configfsf.sub') CONFIGURE_OPTIONS=( 'CFLAGS=-std=c17' ) - -post_install() { - # remove libtool file - rm -f $BANAN_SYSROOT/usr/lib/libgmp.la -} diff --git a/ports/install.sh b/ports/install.sh index 3741b28c..1b335e42 100755 --- a/ports/install.sh +++ b/ports/install.sh @@ -254,3 +254,4 @@ pre_install install grep -qsxF "$NAME-$VERSION" "$installed_file" || echo "$NAME-$VERSION" >> "$installed_file" post_install +find "$BANAN_SYSROOT/usr/lib" -name '*.la' -delete diff --git a/ports/libffi/build.sh b/ports/libffi/build.sh index 5daaca9a..6678fc7a 100755 --- a/ports/libffi/build.sh +++ b/ports/libffi/build.sh @@ -4,8 +4,3 @@ NAME='libffi' VERSION='3.5.2' DOWNLOAD_URL="https://github.com/libffi/libffi/releases/download/v$VERSION/libffi-$VERSION.tar.gz#f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc" CONFIG_SUB=('config.sub') - -post_install() { - # remove libtool file - rm -f $BANAN_SYSROOT/usr/lib/libffi.la -} diff --git a/ports/libiconv/build.sh b/ports/libiconv/build.sh index 8522ec53..23b4112c 100755 --- a/ports/libiconv/build.sh +++ b/ports/libiconv/build.sh @@ -12,9 +12,3 @@ CONFIGURE_OPTIONS=( pre_configure() { echo '#include_next ' > srclib/sys_types.in.h } - -post_install() { - # remove libtool file - rm -f $BANAN_SYSROOT/usr/lib/libcharset.la - rm -f $BANAN_SYSROOT/usr/lib/libiconv.la -} diff --git a/ports/libjpeg/build.sh b/ports/libjpeg/build.sh index 4fb636ac..dff1dc31 100755 --- a/ports/libjpeg/build.sh +++ b/ports/libjpeg/build.sh @@ -5,8 +5,3 @@ VERSION='9f' DOWNLOAD_URL="https://www.ijg.org/files/jpegsrc.v9f.tar.gz#04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b" TAR_CONTENT="jpeg-$VERSION" CONFIG_SUB=('config.sub') - -post_install() { - # remove libtool files - rm -f $BANAN_SYSROOT/usr/lib/libjpeg.la -} diff --git a/ports/libogg/build.sh b/ports/libogg/build.sh index 45fe07f5..84c4c726 100755 --- a/ports/libogg/build.sh +++ b/ports/libogg/build.sh @@ -4,8 +4,3 @@ NAME='libogg' VERSION='1.3.6' DOWNLOAD_URL="https://github.com/xiph/ogg/releases/download/v$VERSION/libogg-$VERSION.tar.gz#83e6704730683d004d20e21b8f7f55dcb3383cdf84c0daedf30bde175f774638" CONFIG_SUB=('config.sub') - -post_install() { - # remove libtool file - rm -f $BANAN_SYSROOT/usr/lib/libogg.la -} diff --git a/ports/libpng/build.sh b/ports/libpng/build.sh index ba39e54b..3ef11358 100755 --- a/ports/libpng/build.sh +++ b/ports/libpng/build.sh @@ -5,9 +5,3 @@ VERSION='1.6.48' DOWNLOAD_URL="https://download.sourceforge.net/libpng/libpng-$VERSION.tar.gz#68f3d83a79d81dfcb0a439d62b411aa257bb4973d7c67cd1ff8bdf8d011538cd" DEPENDENCIES=('zlib') CONFIG_SUB=('config.sub') - -post_install() { - # remove libtool files - rm -f $BANAN_SYSROOT/usr/lib/libpng.la - rm -f $BANAN_SYSROOT/usr/lib/libpng16.la -} diff --git a/ports/libsndfile/build.sh b/ports/libsndfile/build.sh index 94c25b81..9a7a9a22 100755 --- a/ports/libsndfile/build.sh +++ b/ports/libsndfile/build.sh @@ -8,8 +8,3 @@ CONFIG_SUB=('build-aux/config.sub') CONFIGURE_OPTIONS=( 'CFLAGS=-std=c11' ) - -post_install() { - # remove libtool file - rm -f $BANAN_SYSROOT/usr/lib/libsndfile.la -} diff --git a/ports/libtiff/build.sh b/ports/libtiff/build.sh index 66abf9d3..a2c3efff 100755 --- a/ports/libtiff/build.sh +++ b/ports/libtiff/build.sh @@ -6,9 +6,3 @@ DOWNLOAD_URL="https://download.osgeo.org/libtiff/tiff-$VERSION.tar.gz#67160e3457 TAR_CONTENT="tiff-$VERSION" DEPENDENCIES=('zlib' 'zstd' 'libjpeg') CONFIG_SUB=('config/config.sub') - -post_install() { - # remove libtool files - rm -f $BANAN_SYSROOT/usr/lib/libtiff.la - rm -f $BANAN_SYSROOT/usr/lib/libtiffxx.la -} diff --git a/ports/libvorbis/build.sh b/ports/libvorbis/build.sh index 0b1c9d1e..ee14a4a9 100755 --- a/ports/libvorbis/build.sh +++ b/ports/libvorbis/build.sh @@ -5,10 +5,3 @@ VERSION='1.3.7' DOWNLOAD_URL="https://github.com/xiph/vorbis/releases/download/v$VERSION/libvorbis-$VERSION.tar.gz#0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab" DEPENDENCIES=('libogg') CONFIG_SUB=('config.sub') - -post_install() { - # remove libtool files - rm -f $BANAN_SYSROOT/usr/lib/libvorbis.la - rm -f $BANAN_SYSROOT/usr/lib/libvorbisenc.la - rm -f $BANAN_SYSROOT/usr/lib/libvorbisfile.la -} diff --git a/ports/libwebp/build.sh b/ports/libwebp/build.sh index 893279c3..d82ba114 100755 --- a/ports/libwebp/build.sh +++ b/ports/libwebp/build.sh @@ -9,10 +9,3 @@ CONFIGURE_OPTIONS=( "--with-pngincludedir=$BANAN_SYSROOT/usr/include" "--with-pnglibdir=$BANAN_SYSROOT/usr/lib" ) - -post_install() { - # remove libtool files - rm -f $BANAN_SYSROOT/usr/lib/libwebp.la - rm -f $BANAN_SYSROOT/usr/lib/libwebpdemux.la - rm -f $BANAN_SYSROOT/usr/lib/libwebpmux.la -} diff --git a/ports/mpc/build.sh b/ports/mpc/build.sh index 95fa1b7e..f97f3b6f 100755 --- a/ports/mpc/build.sh +++ b/ports/mpc/build.sh @@ -9,8 +9,3 @@ CONFIGURE_OPTIONS=( "--target=$BANAN_TOOLCHAIN_TRIPLE" "--with-sysroot=$BANAN_SYSROOT" ) - -post_install() { - # remove libtool file - rm -f $BANAN_SYSROOT/usr/lib/libmpc.la -} diff --git a/ports/mpfr/build.sh b/ports/mpfr/build.sh index 41149bbe..c258f20c 100755 --- a/ports/mpfr/build.sh +++ b/ports/mpfr/build.sh @@ -9,8 +9,3 @@ CONFIGURE_OPTIONS=( "--target=$BANAN_TOOLCHAIN_TRIPLE" '--with-sysroot=/' ) - -post_install() { - # remove libtool file - rm -f $BANAN_SYSROOT/usr/lib/libmpfr.la -} diff --git a/ports/pcre2/build.sh b/ports/pcre2/build.sh index 3a446ed6..6c940024 100755 --- a/ports/pcre2/build.sh +++ b/ports/pcre2/build.sh @@ -4,9 +4,3 @@ NAME='pcre2' VERSION='10.45' DOWNLOAD_URL="https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$VERSION/pcre2-$VERSION.tar.gz#0e138387df7835d7403b8351e2226c1377da804e0737db0e071b48f07c9d12ee" CONFIG_SUB=('config.sub') - -post_install() { - # remove libtool files - rm -f $BANAN_SYSROOT/usr/lib/libpcre2-8.la - rm -f $BANAN_SYSROOT/usr/lib/libpcre2-posix.la -}