summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2017-07-10 18:29:04 -0400
committerBradley Sepos <[email protected]>2017-07-22 14:08:11 -0400
commit2cd0a830b6330293a2212318a72b4f0e8808a72b (patch)
treefe0babb7687154e0d4806bad4033e6434ffc077e /contrib
parent19b8f1100b5b0045dc9c83b5cfad00d5b199b8e6 (diff)
contrib: Update to zlib 1.2.11.
Add patch to fix cross-compiling (win32/Makefile.gcc doesn't work). See: https://github.com/madler/zlib/commit/a72bcd5607a6b7f48a78c1485783c55389d18f55 https://github.com/madler/zlib/commit/148b8f630ced4e84264201fc94f07568dff6b3a2 ...for what not to do. There's more of course. *sigh*
Diffstat (limited to 'contrib')
-rw-r--r--contrib/zlib/P00-mingw-configure.patch102
-rw-r--r--contrib/zlib/module.defs23
2 files changed, 109 insertions, 16 deletions
diff --git a/contrib/zlib/P00-mingw-configure.patch b/contrib/zlib/P00-mingw-configure.patch
new file mode 100644
index 000000000..ea15129e4
--- /dev/null
+++ b/contrib/zlib/P00-mingw-configure.patch
@@ -0,0 +1,102 @@
+--- zlib-1.2.11/configure.orig 2016-12-31 13:06:40.000000000 -0500
++++ zlib-1.2.11/configure 2017-07-22 11:25:12.000000000 -0400
+@@ -30,12 +30,6 @@
+ SRCDIR="$SRCDIR/"
+ fi
+
+-# set command prefix for cross-compilation
+-if [ -n "${CHOST}" ]; then
+- uname="`echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/'`"
+- CROSS_PREFIX="${CHOST}-"
+-fi
+-
+ # destination name for static library
+ STATICLIB=libz.a
+
+@@ -45,28 +39,6 @@
+ VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
+ VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
+
+-# establish commands for library building
+-if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- AR=${AR-"${CROSS_PREFIX}ar"}
+- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
+-else
+- AR=${AR-"ar"}
+- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
+-fi
+-ARFLAGS=${ARFLAGS-"rc"}
+-if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
+- test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
+-else
+- RANLIB=${RANLIB-"ranlib"}
+-fi
+-if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- NM=${NM-"${CROSS_PREFIX}nm"}
+- test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
+-else
+- NM=${NM-"nm"}
+-fi
+-
+ # set defaults before processing command line options
+ LDCONFIG=${LDCONFIG-"ldconfig"}
+ LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
+@@ -206,49 +178,7 @@
+ if test -z "$uname"; then
+ uname=`(uname -s || echo unknown) 2>/dev/null`
+ fi
+- case "$uname" in
+- Linux* | linux* | GNU | GNU/* | solaris*)
+- LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;;
+- *BSD | *bsd* | DragonFly)
+- LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
+- LDCONFIG="ldconfig -m" ;;
+- CYGWIN* | Cygwin* | cygwin* | OS/2*)
+- EXE='.exe' ;;
+- MINGW* | mingw*)
+-# temporary bypass
+- rm -f $test.[co] $test $test$shared_ext
+- echo "Please use win32/Makefile.gcc instead." | tee -a configure.log
+- leave 1
+- LDSHARED=${LDSHARED-"$cc -shared"}
+- LDSHAREDLIBC=""
+- EXE='.exe' ;;
+- QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
+- LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
+- HP-UX*)
+- LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
+- case `(uname -m || echo unknown) 2>/dev/null` in
+- ia64)
+- shared_ext='.so'
+- SHAREDLIB='libz.so' ;;
+- *)
+- shared_ext='.sl'
+- SHAREDLIB='libz.sl' ;;
+- esac ;;
+- Darwin* | darwin*)
+- shared_ext='.dylib'
+- SHAREDLIB=libz$shared_ext
+- SHAREDLIBV=libz.$VER$shared_ext
+- SHAREDLIBM=libz.$VER1$shared_ext
+- LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"}
+- if libtool -V 2>&1 | grep Apple > /dev/null; then
+- AR="libtool"
+- else
+- AR="/usr/bin/libtool"
+- fi
+- ARFLAGS="-o" ;;
+- *) LDSHARED=${LDSHARED-"$cc -shared"} ;;
+- esac
++ LDSHARED=${LDSHARED-"$cc"}
+ else
+ # find system name and corresponding cc options
+ CC=${CC-cc}
+@@ -918,4 +848,4 @@
+ " > zlib.pc
+
+ # done
+-leave 0
++leave 0
+\ No newline at end of file
diff --git a/contrib/zlib/module.defs b/contrib/zlib/module.defs
index 0f4c605af..f973bcfec 100644
--- a/contrib/zlib/module.defs
+++ b/contrib/zlib/module.defs
@@ -1,24 +1,15 @@
$(eval $(call import.MODULE.defs,ZLIB,zlib))
$(eval $(call import.CONTRIB.defs,ZLIB))
-ZLIB.FETCH.url = https://download.handbrake.fr/handbrake/contrib/zlib-1.2.3.tar.gz
-ZLIB.FETCH.sha256 = 18d648555e4fc6f64aad462e4ebb5a00a205617a2292c99a30fe157c1cec1e65
-ZLIB.EXTRACT.tarbase = zlib
-
-# TODO: Upstream archive differs
-#ZLIB.FETCH.url += https://sourceforge.net/projects/libpng/files/zlib/1.2.3/zlib-1.2.3.tar.gz
-#ZLIB.FETCH.md5 = debc62758716a169df9f62e6ab2bc634
-#ZLIB.EXTRACT.tarbase = zlib
-#
-# TODO: zlib >= 1.2.8
-#ZLIB.FETCH.url += https://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz
-#ZLIB.FETCH.sha256 = 36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d
-#ZLIB.EXTRACT.tarbase = zlib
+ZLIB.FETCH.url = https://download.handbrake.fr/handbrake/contrib/zlib-1.2.11.tar.gz
+ZLIB.FETCH.url += https://sourceforge.net/projects/libpng/files/zlib/1.2.11/zlib-1.2.11.tar.gz
+ZLIB.FETCH.sha256 = c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
ZLIB.CONFIGURE.args = !sete @dir !env !exe @prefix !extra
ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
- ZLIB.CONFIGURE.env.AR = AR="$(AR.exe) rc"
- ZLIB.CONFIGURE.env.RANLIB = RANLIB="$(RANLIB.exe)"
- ZLIB.CONFIGURE.env.args += !AR !RANLIB
+ ZLIB.CONFIGURE.env.AR = AR="$(AR.exe)"
+ ZLIB.CONFIGURE.env.ARFLAGS = ARFLAGS="rc"
+ ZLIB.CONFIGURE.env.RANLIB = RANLIB="$(RANLIB.exe)"
+ ZLIB.CONFIGURE.env.args += !AR !ARFLAGS !RANLIB
endif