From c94243e1075f02e6336e9dea33c75c3cc881078c Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 28 Jun 2025 20:47:12 +0300 Subject: [PATCH] ports: Update some ports to new syntax --- ports/curl/build.sh | 4 +--- ports/libjpeg/build.sh | 4 +--- ports/libpng/build.sh | 4 +--- ports/libtiff/build.sh | 4 +--- ports/libwebp/build.sh | 4 +--- ports/ncurses/build.sh | 4 +--- ports/openssl/build.sh | 6 +----- ports/tcc/build.sh | 11 ++++------- ports/tcc/patches/0005-dont-include-ucontext.patch | 12 ++++++++++++ 9 files changed, 23 insertions(+), 30 deletions(-) create mode 100644 ports/tcc/patches/0005-dont-include-ucontext.patch diff --git a/ports/curl/build.sh b/ports/curl/build.sh index 549abbf5..8eb1c8f4 100755 --- a/ports/curl/build.sh +++ b/ports/curl/build.sh @@ -18,9 +18,7 @@ CONFIGURE_OPTIONS=( '--without-ca-path' ) -install() { - make install DESTDIR="$BANAN_SYSROOT" || exit 1 - +post_install() { # remove libtool file rm -f $BANAN_SYSROOT/usr/lib/libcurl.la } diff --git a/ports/libjpeg/build.sh b/ports/libjpeg/build.sh index 635aa432..e0ffaec8 100755 --- a/ports/libjpeg/build.sh +++ b/ports/libjpeg/build.sh @@ -5,9 +5,7 @@ VERSION='9f' DOWNLOAD_URL="https://www.ijg.org/files/jpegsrc.v9f.tar.gz#04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b" TAR_CONTENT="jpeg-$VERSION" -install() { - make install DESTDIR="$BANAN_SYSROOT" || exit 1 - +post_install() { # remove libtool files rm -f $BANAN_SYSROOT/usr/lib/libjpeg.la } diff --git a/ports/libpng/build.sh b/ports/libpng/build.sh index 222e9f7e..80a2b95e 100755 --- a/ports/libpng/build.sh +++ b/ports/libpng/build.sh @@ -5,9 +5,7 @@ VERSION='1.6.48' DOWNLOAD_URL="https://download.sourceforge.net/libpng/libpng-$VERSION.tar.gz#68f3d83a79d81dfcb0a439d62b411aa257bb4973d7c67cd1ff8bdf8d011538cd" DEPENDENCIES=('zlib') -install() { - make install DESTDIR="$BANAN_SYSROOT" || exit 1 - +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/libtiff/build.sh b/ports/libtiff/build.sh index a3b81b3f..d69ec4c0 100755 --- a/ports/libtiff/build.sh +++ b/ports/libtiff/build.sh @@ -6,9 +6,7 @@ DOWNLOAD_URL="https://download.osgeo.org/libtiff/tiff-$VERSION.tar.gz#67160e3457 TAR_CONTENT="tiff-$VERSION" DEPENDENCIES=('zlib' 'zstd' 'libjpeg') -install() { - make install "DESTDIR=$BANAN_SYSROOT" || exit 1 - +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/libwebp/build.sh b/ports/libwebp/build.sh index 5be41f5b..729f835f 100755 --- a/ports/libwebp/build.sh +++ b/ports/libwebp/build.sh @@ -9,9 +9,7 @@ CONFIGURE_OPTIONS=( "--with-pnglibdir=$BANAN_SYSROOT/usr/lib" ) -install() { - make install DESTDIR="$BANAN_SYSROOT" || exit 1 - +post_install() { # remove libtool files rm -f $BANAN_SYSROOT/usr/lib/libwebp.la rm -f $BANAN_SYSROOT/usr/lib/libwebpdemux.la diff --git a/ports/ncurses/build.sh b/ports/ncurses/build.sh index 1f64cdd7..b4e83b66 100755 --- a/ports/ncurses/build.sh +++ b/ports/ncurses/build.sh @@ -16,9 +16,7 @@ CONFIGURE_OPTIONS=( '--without-cxx-binding' ) -install() { - make install "DESTDIR=$BANAN_SYSROOT" || exit 1 - +post_install() { shellrc="$BANAN_SYSROOT/home/user/.shellrc" grep -q 'export NCURSES_NO_UTF8_ACS=' "$shellrc" || echo 'export NCURSES_NO_UTF8_ACS=1' >> "$shellrc" } diff --git a/ports/openssl/build.sh b/ports/openssl/build.sh index 5563df00..1505716a 100755 --- a/ports/openssl/build.sh +++ b/ports/openssl/build.sh @@ -4,12 +4,8 @@ NAME='openssl' VERSION='3.3.1' DOWNLOAD_URL="https://github.com/openssl/openssl/releases/download/openssl-$VERSION/openssl-$VERSION.tar.gz#777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e" DEPENDENCIES=('zlib') +MAKE_INSTALL_TARGETS=('install_sw' 'install_ssldirs') configure() { ./Configure --prefix=/usr --openssldir=/etc/ssl -DOPENSSL_USE_IPV6=0 no-asm no-tests banan_os-generic threads zlib } - -install() { - make install_sw "DESTDIR=$BANAN_SYSROOT" || exit 1 - make install_ssldirs "DESTDIR=$BANAN_SYSROOT" || exit 1 -} diff --git a/ports/tcc/build.sh b/ports/tcc/build.sh index cfc604ca..9743070c 100755 --- a/ports/tcc/build.sh +++ b/ports/tcc/build.sh @@ -9,6 +9,9 @@ if [ $tcc_arch = 'i686' ]; then tcc_arch='i386' fi +MAKE_BUILD_TARGETS=("cross-$tcc_arch $tcc_arch-libtcc1-usegcc=yes") +MAKE_INSTALL_TARGETS=("install-unx") + configure() { ./configure \ --prefix=/usr \ @@ -22,12 +25,6 @@ configure() { --elfinterp=/usr/lib/DynamicLoader.so } -build() { - touch $BANAN_SYSROOT/usr/include/sys/ucontext.h - make -j$(nproc) cross-$tcc_arch $tcc_arch-libtcc1-usegcc=yes || exit 1 -} - -install() { - make install-unx DESTDIR=$BANAN_SYSROOT || exit 1 +post_install() { ln -sf $tcc_arch-tcc $BANAN_SYSROOT/usr/bin/tcc } diff --git a/ports/tcc/patches/0005-dont-include-ucontext.patch b/ports/tcc/patches/0005-dont-include-ucontext.patch new file mode 100644 index 00000000..127da61f --- /dev/null +++ b/ports/tcc/patches/0005-dont-include-ucontext.patch @@ -0,0 +1,12 @@ +diff -ruN tcc-0.9.27/tccrun.c tcc-0.9.27-banan_os/tccrun.c +--- tcc-0.9.27/tccrun.c 2017-12-17 10:27:05.000000000 +0200 ++++ tcc-0.9.27-banan_os/tccrun.c 2025-06-28 20:30:00.914206003 +0300 +@@ -30,7 +30,7 @@ + #ifdef CONFIG_TCC_BACKTRACE + # ifndef _WIN32 + # include +-# ifndef __OpenBSD__ ++# if !defined(__OpenBSD__) && !defined(__banan_os__) + # include + # endif + # else