summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaichi Haradaguchi <20001722@ymail.ne.jp>2023-08-06 11:32:18 +0200
committerTaichi Haradaguchi <20001722@ymail.ne.jp>2023-08-07 05:59:22 +0200
commit5cd48b4969d25400cc6634fb64706a763528ec65 (patch)
treec0a30ff3efeb2b09606ff68a4293fc4f22e913ef
parent6e12b7f296930c6f37e036407e9fb832d9a9f027 (diff)
Revert "tdf#116412: include bz2 in internal python"
This reverts commit 5e3510dbb62229cfb01da371d39ecc27b0d44880. Reason for revert: occured build error at https://ci.libreoffice.org/view/tb%20platform%20status/job/lo_daily_tb_win_arm64/966/ Change-Id: I9f9087964f7a85c03bca6be4eff5717d6d274c89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155391 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
-rw-r--r--RepositoryExternal.mk4
-rw-r--r--configure.ac16
-rw-r--r--external/bzip2/ExternalProject_bzip2.mk1
-rw-r--r--external/python3/ExternalPackage_python3.mk1
-rw-r--r--external/python3/ExternalProject_python3.mk4
-rw-r--r--external/python3/python-3.5.4-msvc-disable.patch.112
6 files changed, 17 insertions, 21 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index e272cf7e991e..0d70c7e966fb 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4136,6 +4136,7 @@ endef
endif
+ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
ifneq ($(SYSTEM_BZIP2),)
define gb_LinkTarget__use_bzip2
@@ -4174,7 +4175,8 @@ define gb_ExternalProject__use_bzip2
$(call gb_ExternalProject_use_external_project,$(1),bzip2)
endef
-endif # SYSTEM_BZIP2
+endif
+endif
define gb_LinkTarget__use_clew
$(call gb_LinkTarget_set_include,$(1), \
diff --git a/configure.ac b/configure.ac
index 9596d04b117f..7f5c0ff66430 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2192,8 +2192,7 @@ AC_ARG_WITH(system-libs,
AC_ARG_WITH(system-bzip2,
AS_HELP_STRING([--with-system-bzip2],
- [Use bzip2 already on system. Used when --enable-online-update=mar
- or --enable-python=internal]),,
+ [Use bzip2 already on system. Used only when --enable-online-update=mar]),,
[with_system_bzip2="$with_system_libs"])
AC_ARG_WITH(system-headers,
@@ -13551,16 +13550,17 @@ AC_SUBST(PRIVACY_POLICY_URL)
dnl ===================================================================
dnl Test whether we need bzip2
dnl ===================================================================
-if test "$ENABLE_ONLINE_UPDATE_MAR" = "TRUE" -o "$enable_python" = "internal"; then
+SYSTEM_BZIP2=
+if test "$ENABLE_ONLINE_UPDATE_MAR" = "TRUE"; then
AC_MSG_CHECKING([whether to use system bzip2])
if test "$with_system_bzip2" = yes; then
- AC_MSG_RESULT([external])
SYSTEM_BZIP2=TRUE
- AC_CHECK_HEADER(bzlib.h, [], [AC_MSG_ERROR(bzlib.h not found. please install bzip2.)], [])
- AC_CHECK_LIB([bz2], [BZ2_bzDecompressInit], [:], [AC_MSG_ERROR(libbz2 not found or functional.)], [])
+ AC_MSG_RESULT([yes])
+ PKG_CHECK_MODULES(BZIP2, bzip2)
+ FilterLibs "${BZIP2_LIBS}"
+ BZIP2_LIBS="${filteredlibs}"
else
- AC_MSG_RESULT([internal])
- SYSTEM_BZIP2=
+ AC_MSG_RESULT([no])
BUILD_TYPE="$BUILD_TYPE BZIP2"
fi
fi
diff --git a/external/bzip2/ExternalProject_bzip2.mk b/external/bzip2/ExternalProject_bzip2.mk
index b4c93a356ccc..8b37bcd27151 100644
--- a/external/bzip2/ExternalProject_bzip2.mk
+++ b/external/bzip2/ExternalProject_bzip2.mk
@@ -27,7 +27,6 @@ $(call gb_ExternalProject_get_state_target,bzip2,build):
$(call gb_Trace_StartRange,bzip2,EXTERNAL)
$(call gb_ExternalProject_run,build,\
$(MAKE) \
- CC="$(CC) -fPIC" \
)
$(call gb_Trace_EndRange,bzip2,EXTERNAL)
endif
diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk
index 5b67765bc930..1f29c9efbebb 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -65,7 +65,6 @@ python3_EXTENSION_MODULES= \
LO_lib/binascii.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_bisect.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_blake2.$(python3_EXTENSION_MODULE_SUFFIX).so \
- LO_lib/_bz2.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/cmath.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_codecs_cn.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_codecs_hk.$(python3_EXTENSION_MODULE_SUFFIX).so \
diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk
index 0b91f0774886..f1c5f6d9b4a5 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -10,7 +10,6 @@
$(eval $(call gb_ExternalProject_ExternalProject,python3))
$(eval $(call gb_ExternalProject_use_externals,python3,\
- bzip2 \
expat \
$(if $(filter WNT LINUX,$(OS)),libffi) \
openssl \
@@ -37,7 +36,6 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
$(call gb_Trace_StartRange,python3,EXTERNAL)
$(call gb_ExternalProject_run,build,\
MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build $(gb_MSBUILD_CONFIG_AND_PLATFORM) \
- /p:bz2Dir=$(call gb_UnpackedTarball_get_dir,bzip2) \
/p:opensslIncludeDir=$(call gb_UnpackedTarball_get_dir,openssl)/include \
/p:opensslOutDir=$(call gb_UnpackedTarball_get_dir,openssl) \
/p:zlibDir=$(call gb_UnpackedTarball_get_dir,zlib) \
@@ -108,7 +106,6 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
PKG_CONFIG_LIBDIR="$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)$${PKG_CONFIG_LIBDIR:+:$$PKG_CONFIG_LIBDIR}" \
) \
CC="$(strip $(CC) \
- $(if $(SYSTEM_BZIP2),,-I$(call gb_UnpackedTarball_get_dir,bzip2)) \
$(if $(SYSTEM_EXPAT),,-I$(call gb_UnpackedTarball_get_dir,expat)/lib) \
$(if $(SYSBASE), -I$(SYSBASE)/usr/include) \
)" \
@@ -116,7 +113,6 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
$(if $(filter -fsanitize=%,$(CC)),LINKCC="$(CXX) -pthread") \
LDFLAGS="$(strip $(LDFLAGS) \
$(if $(filter LINUX,$(OS)),-L$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)/.libs) \
- $(if $(SYSTEM_BZIP2),,-L$(call gb_UnpackedTarball_get_dir,bzip2)) \
$(if $(SYSTEM_EXPAT),,-L$(gb_StaticLibrary_WORKDIR)) \
$(if $(SYSTEM_ZLIB),,-L$(gb_StaticLibrary_WORKDIR)) \
$(if $(SYSBASE), -L$(SYSBASE)/usr/lib) \
diff --git a/external/python3/python-3.5.4-msvc-disable.patch.1 b/external/python3/python-3.5.4-msvc-disable.patch.1
index 92dcaa23ac5d..d5b4e3f6264b 100644
--- a/external/python3/python-3.5.4-msvc-disable.patch.1
+++ b/external/python3/python-3.5.4-msvc-disable.patch.1
@@ -1,8 +1,8 @@
Disable some stuff LO does not need, especially stuff with external dependencies
diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
---- python3.orig/PCbuild/pcbuild.sln 2023-06-06 22:32:21.000000000 +0900
-+++ python3/PCbuild/pcbuild.sln 2023-07-10 16:10:59.112359419 +0900
+--- python3.orig/PCbuild/pcbuild.sln 2017-08-10 00:04:44.359879894 +0200
++++ python3/PCbuild/pcbuild.sln 2017-08-10 00:13:51.179873748 +0200
@@ -15,8 +15,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"
@@ -12,7 +12,7 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_decimal", "_decimal.vcxproj", "{0E9791DB-593A-465F-98BC-681011311617}"
-@@ -31,34 +29,22 @@
+@@ -31,34 +29,20 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}"
EndProject
@@ -28,8 +28,8 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"
-EndProject
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bz2", "_bz2.vcxproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"
- EndProject
+-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bz2", "_bz2.vcxproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"
+-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcxproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_lzma", "_lzma.vcxproj", "{F9D71780-F393-11E0-BE50-0800200C9A66}"
@@ -47,7 +47,7 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
-@@ -93,8 +79,6 @@
+@@ -93,8 +77,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_queue", "_queue.vcxproj", "{78D80A15-BD8C-44E2-B49E-1F05B0A0A687}"
EndProject