external/python3/ExternalProject_python3.mk | 2 + external/python3/internal-zlib.patch.0 | 55 ++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+)
New commits: commit c65e855d381bcc1e048252624009eeba09163e22 Author: David Tardon <dtar...@redhat.com> AuthorDate: Thu Nov 3 17:16:29 2016 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Mon Jul 23 15:08:16 2018 +0200 fix build of bundled python3 with bundled zlib Change-Id: I383a04ea926187263b1d7e11c548817fa9ca3fb6 (cherry picked from commit b2c16b3563a4a8e4b54f6fc0cb1be597e7c5b27d) diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk index ee4c90243462..f91399c0af52 100755 --- a/external/python3/ExternalProject_python3.mk +++ b/external/python3/ExternalProject_python3.mk @@ -93,6 +93,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) : )" \ && MAKEFLAGS= $(MAKE) \ $(if $(filter MACOSX,$(OS)),DESTDIR=$(EXTERNAL_WORKDIR)/python-inst install) \ + $(if $(SYSTEM_ZLIB),,ZLIB_INCDIR=$(WORKDIR)/UnpackedTarball/zlib) \ && ln -s build/lib.* LO_lib \ ) diff --git a/external/python3/internal-zlib.patch.0 b/external/python3/internal-zlib.patch.0 index d045f468231c..abe2630bd2e7 100644 --- a/external/python3/internal-zlib.patch.0 +++ b/external/python3/internal-zlib.patch.0 @@ -19,6 +19,15 @@ --- setup.py +++ setup.py +@@ -1362,7 +1362,7 @@ + # + # You can upgrade zlib to version 1.1.4 yourself by going to + # http://www.gzip.org/zlib/ +- zlib_inc = find_file('zlib.h', [], inc_dirs) ++ zlib_inc = [os.environ.get('ZLIB_INCDIR')] + have_zlib = False + if zlib_inc is not None: + zlib_h = zlib_inc[0] + '/zlib.h' @@ -1379,13 +1379,13 @@ version = line.split()[2] break commit 4fd6effb6e85398d4143f09897cc6215d75686dc Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Sep 16 16:07:47 2016 +0200 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Mon Jul 23 15:08:16 2018 +0200 external/python3: Fix building against external/zlib ...whose (static) library is called "zlib" instead of just "z". (I ran into this when trying to do a 32-bit Linux build in a 64-bit environment, with only very limited 32-bit support installed in the system.) Reviewed-on: https://gerrit.libreoffice.org/28964 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit 5fb8a050210a7cabf49daac0da8f80b94d60de2c) Conflicts: external/python3/ExternalProject_python3.mk Change-Id: I9286975917ddf643a22803561677af035e66fb98 diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk index 38ed6700435e..ee4c90243462 100755 --- a/external/python3/ExternalProject_python3.mk +++ b/external/python3/ExternalProject_python3.mk @@ -85,6 +85,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) : LDFLAGS="$(strip $(LDFLAGS) \ $(if $(SYSTEM_OPENSSL),,-L$(call gb_UnpackedTarball_get_dir,openssl)) \ $(if $(SYSTEM_EXPAT),,-L$(gb_StaticLibrary_WORKDIR)) \ + $(if $(SYSTEM_ZLIB),,-L$(gb_StaticLibrary_WORKDIR)) \ $(if $(SYSBASE), -L$(SYSBASE)/usr/lib) \ $(if $(filter WNT-GCC,$(OS)-$(COM)), -shared-libgcc \ $(if $(MINGW_SHARED_GCCLIB),-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 -Wl$(COMMA)--export-all-symbols)) \ diff --git a/external/python3/internal-zlib.patch.0 b/external/python3/internal-zlib.patch.0 new file mode 100644 index 000000000000..d045f468231c --- /dev/null +++ b/external/python3/internal-zlib.patch.0 @@ -0,0 +1,46 @@ +--- configure ++++ configure +@@ -11607,13 +11607,13 @@ + ;; + esac + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 +-$as_echo_n "checking for inflateCopy in -lz... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lzlib" >&5 ++$as_echo_n "checking for inflateCopy in -lzlib... " >&6; } + if ${ac_cv_lib_z_inflateCopy+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lz $LIBS" ++LIBS="-lzlib $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +--- setup.py ++++ setup.py +@@ -1379,13 +1379,13 @@ + version = line.split()[2] + break + if version >= version_req: +- if (self.compiler.find_library_file(lib_dirs, 'z')): ++ if (self.compiler.find_library_file(lib_dirs, 'zlib')): + if host_platform == "darwin": + zlib_extra_link_args = ('-Wl,-search_paths_first',) + else: + zlib_extra_link_args = () + exts.append( Extension('zlib', ['zlibmodule.c'], +- libraries = ['z'], ++ libraries = ['zlib'], + extra_link_args = zlib_extra_link_args)) + have_zlib = True + else: +@@ -1399,7 +1399,7 @@ + # crc32 if we have it. Otherwise binascii uses its own. + if have_zlib: + extra_compile_args = ['-DUSE_ZLIB_CRC32'] +- libraries = ['z'] ++ libraries = ['zlib'] + extra_link_args = zlib_extra_link_args + else: + extra_compile_args = [] _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits