diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-09-16 16:07:47 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-09-16 16:02:10 +0000 |
commit | 5fb8a050210a7cabf49daac0da8f80b94d60de2c (patch) | |
tree | 222889a32747ed67257037fedffb365305f41b74 /external | |
parent | ec3fb334b00c1790de2bff4444f15fe1aa5bec88 (diff) |
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.)
Change-Id: I9286975917ddf643a22803561677af035e66fb98
Reviewed-on: https://gerrit.libreoffice.org/28964
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/python3/ExternalProject_python3.mk | 1 | ||||
-rw-r--r-- | external/python3/UnpackedTarball_python3.mk | 6 | ||||
-rw-r--r-- | external/python3/internal-zlib.patch.0 | 46 |
3 files changed, 53 insertions, 0 deletions
diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk index 757d782ba47c..ef9246e49b6b 100644 --- a/external/python3/ExternalProject_python3.mk +++ b/external/python3/ExternalProject_python3.mk @@ -91,6 +91,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/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk index 0e706d79ce92..0c471f031d7e 100644 --- a/external/python3/UnpackedTarball_python3.mk +++ b/external/python3/UnpackedTarball_python3.mk @@ -52,4 +52,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\ endif endif +ifneq ($(SYSTEM_ZLIB),TRUE) +$(eval $(call gb_UnpackedTarball_add_patches,python3, \ + external/python3/internal-zlib.patch.0 \ +)) +endif + # vim: set noet sw=4 ts=4: 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 = [] |