summaryrefslogtreecommitdiff
path: root/mkwinbins.sh
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-25 00:42:42 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-25 00:42:42 +0100
commit71a9110c1001427453f05fcc8f8d05b66633efca (patch)
tree619166516980a314bf518c510d8f115aa249b428 /mkwinbins.sh
parentcad65de2a9a9b7d29b98f0d2997772c057f92e29 (diff)
Add bzip2 dependency to windows build
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkwinbins.sh')
-rwxr-xr-xmkwinbins.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/mkwinbins.sh b/mkwinbins.sh
index a80860b..6d674be 100755
--- a/mkwinbins.sh
+++ b/mkwinbins.sh
@@ -60,6 +60,41 @@ make -j
make install-strip
popd
+################################# get bzip2 ##################################
+
+PKG_DIR="bzip2-1.0.8"
+PKG_TAR="${PKG_DIR}.tar.gz"
+PKG_HASH="ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
+
+download
+
+pushd "$PKG_DIR"
+${W32_PREFIX}-gcc -O2 -c blocksort.c
+${W32_PREFIX}-gcc -O2 -c huffman.c
+${W32_PREFIX}-gcc -O2 -c crctable.c
+${W32_PREFIX}-gcc -O2 -c randtable.c
+${W32_PREFIX}-gcc -O2 -c compress.c
+${W32_PREFIX}-gcc -O2 -c decompress.c
+${W32_PREFIX}-gcc -O2 -c bzlib.c
+${W32_PREFIX}-ar cq libbz2.a *.o
+${W32_PREFIX}-ranlib libbz2.a
+cp libbz2.a "$W32_DIR/lib"
+cp bzlib.h "$W32_DIR/include"
+
+rm *.o *.a
+${W64_PREFIX}-gcc -O2 -c blocksort.c
+${W64_PREFIX}-gcc -O2 -c huffman.c
+${W64_PREFIX}-gcc -O2 -c crctable.c
+${W64_PREFIX}-gcc -O2 -c randtable.c
+${W64_PREFIX}-gcc -O2 -c compress.c
+${W64_PREFIX}-gcc -O2 -c decompress.c
+${W64_PREFIX}-gcc -O2 -c bzlib.c
+${W64_PREFIX}-ar cq libbz2.a *.o
+${W64_PREFIX}-ranlib libbz2.a
+cp libbz2.a "$W64_DIR/lib"
+cp bzlib.h "$W64_DIR/include"
+popd
+
################################## get lzo ###################################
PKG_DIR="lzo-2.10"
@@ -134,6 +169,8 @@ export PKG_CONFIG_PATH="$W32_DIR/lib/pkgconfig"
./autogen.sh
./configure CFLAGS="-O2" LZO_CFLAGS="-I$W32_DIR/include" \
LZO_LIBS="-L$W32_DIR/lib -llzo2" \
+ BZIP2_CFLAGS="-I$W32_DIR/include" \
+ BZIP2_LIBS="-L$W32_DIR/lib -lbz2" \
--prefix="$W32_DIR" --host="$W32_PREFIX" --with-builtin-lz4 \
--with-builtin-zlib
cp "$W32_DIR/bin/"*.dll .
@@ -142,6 +179,8 @@ rm *.dll
./configure CFLAGS="-O2 -DNDEBUG" LZO_CFLAGS="-I$W32_DIR/include" \
LZO_LIBS="-L$W32_DIR/lib -llzo2" \
+ BZIP2_CFLAGS="-I$W32_DIR/include" \
+ BZIP2_LIBS="-L$W32_DIR/lib -lbz2" \
--prefix="$W32_DIR" --host="$W32_PREFIX" --with-builtin-lz4 \
--with-builtin-zlib
make clean
@@ -154,6 +193,8 @@ export PKG_CONFIG_PATH="$W64_DIR/lib/pkgconfig"
./configure CFLAGS="-O2" LZO_CFLAGS="-I$W64_DIR/include" \
LZO_LIBS="-L$W64_DIR/lib -llzo2" \
+ BZIP2_CFLAGS="-I$W64_DIR/include" \
+ BZIP2_LIBS="-L$W64_DIR/lib -lbz2" \
--prefix="$W64_DIR" --host="$W64_PREFIX" --with-builtin-lz4 \
--with-builtin-zlib
make clean
@@ -163,6 +204,8 @@ rm *.dll
./configure CFLAGS="-O2 -DNDEBUG" LZO_CFLAGS="-I$W64_DIR/include" \
LZO_LIBS="-L$W64_DIR/lib -llzo2" \
+ BZIP2_CFLAGS="-I$W64_DIR/include" \
+ BZIP2_LIBS="-L$W64_DIR/lib -lbz2" \
--prefix="$W64_DIR" --host="$W64_PREFIX" --with-builtin-lz4 \
--with-builtin-zlib
make clean