From 15efc4fca9a9aa219fa74e5990ace87fb8051b8a Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Tue, 23 Jan 2024 18:58:56 +0000 Subject: [PATCH] unzip was not building with bzip2 support This appears to have begun at the point that we stopped shipping the static libbz2.a. Fixes: https://github.com/omniosorg/omnios-build/issues/3448 --- build/unzip/build.sh | 12 +++++++++--- build/unzip/patches/configure.patch | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 build/unzip/patches/configure.patch diff --git a/build/unzip/build.sh b/build/unzip/build.sh index 4efd44eb74..9e1241b44e 100755 --- a/build/unzip/build.sh +++ b/build/unzip/build.sh @@ -31,8 +31,13 @@ HARDLINK_TARGETS=" " SKIP_LICENCES="*" -# Copied from upstream's pkg makefile -export LOCAL_UNZIP="-DUNICODE_SUPPORT -DNO_WORKING_ISPRINT -DUNICODE_WCHAR" +CONFIGURE_OPTS=" + -DNO_LCHMOD + -DUNICODE_SUPPORT + -DUNICODE_WCHAR + -DWILD_STOP_AT_DIR +" +export LOCAL_UNZIP="${CONFIGURE_OPTS[0]//$'\n'/}" configure_amd64() { export i386 @@ -48,6 +53,7 @@ configure_aarch64() { } pre_install() { + ldd $PROG | $EGREP -s libbz2 || logerr "unzip was built without bzip2" save_variable MAKE_INSTALL_ARGS MAKE_INSTALL_ARGS+=" prefix=$DESTDIR$PREFIX" } @@ -58,7 +64,7 @@ post_install() { BASE_MAKE_ARGS="-f unix/Makefile" -MAKE_ARGS="$BASE_MAKE_ARGS generic IZ_BZIP2=bzip2" +MAKE_ARGS="$BASE_MAKE_ARGS generic" MAKE_INSTALL_ARGS="$BASE_MAKE_ARGS install" init diff --git a/build/unzip/patches/configure.patch b/build/unzip/patches/configure.patch new file mode 100644 index 0000000000..8b3c92e010 --- /dev/null +++ b/build/unzip/patches/configure.patch @@ -0,0 +1,14 @@ +--- a/unix/configure~ 2024-01-23 18:53:07.146124861 +0000 ++++ a/unix/configure 2024-01-23 18:53:51.665682899 +0000 +@@ -588,9 +588,9 @@ + # bzip2 + + echo "Check bzip2 support" +-D_USE_BZ2="" ++D_USE_BZ2="-DUSE_BZIP2" + LIBBZ2="" +-L_BZ2="" ++L_BZ2="-lbz2" + CC_BZ="${CC}" + + if test -n "${IZ_BZIP2}" -a "${IZ_BZIP2}" != "bzip2" ; then