[vlc-commits] contribs: zlib: Simplify build

Hugo Beauzée-Luyssen git at videolan.org
Tue Sep 6 15:06:50 CEST 2016


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Aug 30 18:36:43 2016 +0200| [6d443e78aaced8d0dec06a995c0f1be2573b3529] | committer: Hugo Beauzée-Luyssen

contribs: zlib: Simplify build

This will not build the shared library, which drops the requirement for windres,
which we don't have when cross compiling using clang

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6d443e78aaced8d0dec06a995c0f1be2573b3529
---

 contrib/src/zlib/no-shared.patch | 12 ++++++++++++
 contrib/src/zlib/rules.mak       |  4 ++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/contrib/src/zlib/no-shared.patch b/contrib/src/zlib/no-shared.patch
new file mode 100644
index 0000000..a7361ec
--- /dev/null
+++ b/contrib/src/zlib/no-shared.patch
@@ -0,0 +1,12 @@
+--- zlib/win32/Makefile.gcc.orig	2016-08-30 16:03:24.458949860 +0000
++++ zlib/win32/Makefile.gcc	2016-08-30 16:03:29.598983275 +0000
+@@ -90,7 +90,8 @@
+ $(STATICLIB): $(OBJS) $(OBJA)
+ 	$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
+ 
+-$(IMPLIB): $(SHAREDLIB)
++$(IMPLIB):
++	touch $@
+ 
+ $(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
+ 	$(CC) -shared -Wl,--out-implib,$(IMPLIB) $(LDFLAGS) \
diff --git a/contrib/src/zlib/rules.mak b/contrib/src/zlib/rules.mak
index 5d20a1f..4da54ac 100644
--- a/contrib/src/zlib/rules.mak
+++ b/contrib/src/zlib/rules.mak
@@ -20,12 +20,12 @@ $(TARBALLS)/zlib-$(ZLIB_VERSION).tar.gz:
 
 zlib: zlib-$(ZLIB_VERSION).tar.gz .sum-zlib
 	$(UNPACK)
+	$(APPLY) $(SRC)/zlib/no-shared.patch
 	$(MOVE)
 
 .zlib: zlib
 ifdef HAVE_WIN32
-	cd $< && $(HOSTVARS) $(MAKE) -fwin32/Makefile.gcc $(HOSTVARS) $(ZLIB_CONFIG_VARS) RC="$(HOST)-windres" LD="$(CC)"
-	cd $< && $(MAKE) -fwin32/Makefile.gcc install INCLUDE_PATH="$(PREFIX)/include" LIBRARY_PATH="$(PREFIX)/lib" BINARY_PATH="$(PREFIX)/bin"
+	cd $< && $(HOSTVARS) $(MAKE) -fwin32/Makefile.gcc install $(HOSTVARS) $(ZLIB_CONFIG_VARS) LD="$(CC)" INCLUDE_PATH="$(PREFIX)/include" LIBRARY_PATH="$(PREFIX)/lib" BINARY_PATH="$(PREFIX)/bin"
 else
 	cd $< && $(HOSTVARS_PIC) $(ZLIB_CONFIG_VARS) ./configure --prefix=$(PREFIX) --static
 	cd $< && $(MAKE) install



More information about the vlc-commits mailing list