Skip to content

Commit

Permalink
unzip was not building with bzip2 support
Browse files Browse the repository at this point in the history
This appears to have begun at the point that we stopped
shipping the static libbz2.a.

Fixes: #3448
  • Loading branch information
citrus-it committed Jan 23, 2024
1 parent 49cdc82 commit 15efc4f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
12 changes: 9 additions & 3 deletions build/unzip/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
}
Expand All @@ -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
Expand Down
14 changes: 14 additions & 0 deletions build/unzip/patches/configure.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 15efc4f

Please sign in to comment.