[vlc-devel] [PATCH] contrib: fix building zlib under mingw

Steve Lhomme robux4 at videolabs.io
Fri Feb 26 09:29:30 CET 2016


Otherwise we just get the error message "Please use win32/Makefile.gcc instead."
---
 contrib/src/zlib/mingw.patch | 11 +++++++++++
 contrib/src/zlib/rules.mak   |  3 +++
 2 files changed, 14 insertions(+)
 create mode 100644 contrib/src/zlib/mingw.patch

diff --git a/contrib/src/zlib/mingw.patch b/contrib/src/zlib/mingw.patch
new file mode 100644
index 0000000..3439d99
--- /dev/null
+++ b/contrib/src/zlib/mingw.patch
@@ -0,0 +1,11 @@
+--- zlib/configure	2016-02-25 16:35:50.228444200 +0100
++++ zlib/configure.mingw	2016-02-25 16:34:19.725510100 +0100
+@@ -194,7 +194,7 @@ if test "$gcc" -eq 1 && ($cc -c $test.c)
+ # temporary bypass
+         rm -f $test.[co] $test $test$shared_ext
+         echo "Please use win32/Makefile.gcc instead." | tee -a configure.log
+-        leave 1
++#        leave 1
+         LDSHARED=${LDSHARED-"$cc -shared"}
+         LDSHAREDLIBC=""
+         EXE='.exe' ;;
diff --git a/contrib/src/zlib/rules.mak b/contrib/src/zlib/rules.mak
index d5f1e9e..5728d58 100644
--- a/contrib/src/zlib/rules.mak
+++ b/contrib/src/zlib/rules.mak
@@ -24,6 +24,9 @@ $(TARBALLS)/zlib-$(ZLIB_VERSION).tar.gz:
 
 zlib: zlib-$(ZLIB_VERSION).tar.gz .sum-zlib
 	$(UNPACK)
+ifdef HAVE_WIN32
+	$(APPLY) $(SRC)/zlib/mingw.patch
+endif
 	$(MOVE)
 
 .zlib: zlib
-- 
2.6.1.windows.1



More information about the vlc-devel mailing list