fix(main/zlib): enable shared library support again and fix relocation issues for static lib
Fixes 2 issues: 1. libz.so.* now available again in zlib package 2. Linking with libz.a works properly
This commit is contained in:
parent
284bddc630
commit
a321371759
|
@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Compression library implementing the deflate compression
|
|||
TERMUX_PKG_LICENSE="ZLIB"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.3
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://www.zlib.net/zlib-$TERMUX_PKG_VERSION.tar.xz
|
||||
TERMUX_PKG_SHA256=8a9ba2898e1d0d774eca6ba5b4627a11e5588ba85c8851336eb38de4683050a7
|
||||
TERMUX_PKG_BREAKS="ndk-sysroot (<< 19b-3), zlib-dev"
|
||||
|
@ -14,8 +14,15 @@ termux_step_pre_configure() {
|
|||
CFLAGS+=" -march=armv8-a+crc"
|
||||
CXXFLAGS+=" -march=armv8-a+crc"
|
||||
fi
|
||||
|
||||
# Fix relocation issues when linking with libz.a
|
||||
CFLAGS+=" -fPIC"
|
||||
CXXFLAGS+=" -fPIC"
|
||||
|
||||
# Fix linker script error for zlib 1.3
|
||||
LDFLAGS+=" -Wl,--undefined-version"
|
||||
}
|
||||
|
||||
termux_step_configure() {
|
||||
"$TERMUX_PKG_SRCDIR/configure" --prefix=$TERMUX_PREFIX
|
||||
"$TERMUX_PKG_SRCDIR/configure" --prefix=$TERMUX_PREFIX --shared
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
diff -uNr zlib-1.3/configure zlib-1.3.mod/configure
|
||||
--- zlib-1.3/configure 2023-08-18 11:45:36.000000000 +0300
|
||||
+++ zlib-1.3.mod/configure 2023-11-29 01:51:17.924387123 +0200
|
||||
@@ -438,7 +438,7 @@
|
||||
extern int getchar();
|
||||
int hello() {return getchar();}
|
||||
EOF
|
||||
-if test $shared -eq 1; then
|
||||
+if false; then
|
||||
echo Checking for shared library support... | tee -a configure.log
|
||||
# we must test in two steps (cc then ld), required at least on SunOS 4.x
|
||||
if try $CC -w -c $SFLAGS $test.c &&
|
Loading…
Reference in New Issue