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>
This commit is contained in:
parent
ec3fb334b0
commit
5fb8a05021
1
external/python3/ExternalProject_python3.mk
vendored
1
external/python3/ExternalProject_python3.mk
vendored
@ -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)) \
|
||||
|
6
external/python3/UnpackedTarball_python3.mk
vendored
6
external/python3/UnpackedTarball_python3.mk
vendored
@ -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:
|
||||
|
46
external/python3/internal-zlib.patch.0
vendored
Normal file
46
external/python3/internal-zlib.patch.0
vendored
Normal file
@ -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 = []
|
Loading…
x
Reference in New Issue
Block a user