summaryrefslogtreecommitdiffstats
path: root/l/zlib
diff options
context:
space:
mode:
authorAdrien Nader <adrien@notk.org>2014-08-13 22:40:04 +0200
committerAdrien Nader <adrien@notk.org>2014-08-13 22:40:04 +0200
commiteee878256f2e44ab002a9de26ab58c235af91a00 (patch)
tree2ed5a3aca97ba7a9bc22644ffcb9959b4a00ad48 /l/zlib
parent354abf7f0c96c40e092198bb2453c026a34aa1c6 (diff)
zlib: support static builds ("yypkg" variant).
Diffstat (limited to 'l/zlib')
-rw-r--r--l/zlib/Makefile.yypkg5
-rw-r--r--l/zlib/config-regular2
-rw-r--r--l/zlib/config-yypkg2
-rwxr-xr-xl/zlib/zlib.SlackBuild17
4 files changed, 14 insertions, 12 deletions
diff --git a/l/zlib/Makefile.yypkg b/l/zlib/Makefile.yypkg
index db69a88..b7eed2e 100644
--- a/l/zlib/Makefile.yypkg
+++ b/l/zlib/Makefile.yypkg
@@ -29,11 +29,6 @@ STATICLIB = libz.a
SHAREDLIB = libz-1.dll
IMPLIB = libz.dll.a
-#
-# Set to 1 if shared object needs to be installed
-#
-SHARED_MODE=1
-
#LOC = -DASMV
#LOC = -DDEBUG -g
diff --git a/l/zlib/config-regular b/l/zlib/config-regular
new file mode 100644
index 0000000..4810991
--- /dev/null
+++ b/l/zlib/config-regular
@@ -0,0 +1,2 @@
+export SHARED="--shared"
+export TARGETS="libz-1.dll libz.dll.a example_d.exe minigzip_d.exe"
diff --git a/l/zlib/config-yypkg b/l/zlib/config-yypkg
new file mode 100644
index 0000000..801c8fb
--- /dev/null
+++ b/l/zlib/config-yypkg
@@ -0,0 +1,2 @@
+export SHARED="--static"
+export TARGETS="libz.a example.exe minigzip.exe"
diff --git a/l/zlib/zlib.SlackBuild b/l/zlib/zlib.SlackBuild
index 6b8dd75..4eca589 100755
--- a/l/zlib/zlib.SlackBuild
+++ b/l/zlib/zlib.SlackBuild
@@ -61,7 +61,7 @@ CFLAGS="-O3" \
./configure \
--prefix=/${PREFIX} \
--libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
- --shared
+ ${SHARED}
CC=${HOST_TRIPLET}-gcc \
CFLAGS="-O3 -Wall" \
@@ -70,16 +70,19 @@ CC=${HOST_TRIPLET}-gcc \
AR="${HOST_TRIPLET}-ar" \
RC="${HOST_TRIPLET}-windres" \
STRIP="${HOST_STRIP}" \
- make -j8 -f $CWD/Makefile.yypkg || exit 1
+ make -j8 -f $CWD/Makefile.yypkg ${TARGETS} || exit 1
+FIND_1f="find . -maxdepth 1 -type f"
mkdir -p $PKG/${PREFIX}/include
cp -a zlib.h zconf.h $PKG/${PREFIX}/include
chmod 644 $PKG/${PREFIX}/include/*
-mkdir -p $PKG/${PREFIX}/bin
-cp -a libz*.dll $PKG/${PREFIX}/bin
-mkdir -p $PKG/${PREFIX}/lib${LIBDIRSUFFIX}
-cp -a libz*.dll.a $PKG/${PREFIX}/lib${LIBDIRSUFFIX}
-chmod 755 $PKG/${PREFIX}/bin/*
+
+mkdir -p $PKG/${PREFIX}/bin $PKG/${PREFIX}/lib${LIBDIRSUFFIX}
+${FIND_1f} -name 'libz*.dll' | \
+ xargs -I '{}' install -m 755 '{}' $PKG/${PREFIX}/bin
+${FIND_1f} -a \( -name 'libz*.dll.a' -o -name 'libz.a' \) | \
+ xargs -I '{}' install -m 755 '{}' $PKG/${PREFIX}/lib${LIBDIRSUFFIX}
+
mkdir -p $PKG/${PREFIX}/man/man3
cat zlib.3 | gzip -9c > $PKG/${PREFIX}/man/man3/zlib.3.gz