[Libreoffice-commits] core.git: external/python3

2023-11-09 Thread Michael Stahl (via logerrit)
 external/python3/ExternalPackage_python3.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a2fabc78a4ba12ad8df6b040783be0fa22aefa54
Author: Michael Stahl 
AuthorDate: Wed Nov 8 11:55:51 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 9 16:54:08 2023 +0100

python3: name gdb pretty-printer after .so, not .bin

So it works not only with instdir/program/python but also with
soffice in-process python.

Change-Id: I5c3643ef4a7ca0f25df3c6f51d11ff98c27f4bd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159148
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 0a6d2f8bff8a..907b0b530c46 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -49,7 +49,7 @@ else
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 
$(ENABLE_DBGUTIL),d).so,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d).so))
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 
$(ENABLE_DBGUTIL),d).so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d).so))
-$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin-gdb.py,Tools/gdb/libpython.py))
+$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d).so.1.0-gdb.py,Tools/gdb/libpython.py))
 
 # Unfortunately the python build system does not allow to explicitly enable or
 # disable these, it just tries to build them and then prints which did not


[Libreoffice-commits] core.git: external/python3

2023-10-22 Thread Taichi Haradaguchi (via logerrit)
 external/python3/python-3.8-msvc-libffi.patch.1 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f1cb3bb7739b2917a2ba2bce45885bd20f6f7fba
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sun Oct 22 01:21:23 2023 +0900
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Sun Oct 22 14:45:16 2023 +0200

Replace a tab with spaces

Change-Id: I06805f3c07b5baedfd492d701cb6f46da5ea913f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158322
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/external/python3/python-3.8-msvc-libffi.patch.1 
b/external/python3/python-3.8-msvc-libffi.patch.1
index 7a4490cd2f34..674043a7dca6 100644
--- a/external/python3/python-3.8-msvc-libffi.patch.1
+++ b/external/python3/python-3.8-msvc-libffi.patch.1
@@ -10,7 +10,7 @@


 -<_LIBFFIDLL Include="$(libffiOutDir)\libffi-7.dll" />
-+<_LIBFFIDLL Include="$(libffiOutDir)\libffi-8.dll" />
++<_LIBFFIDLL Include="$(libffiOutDir)\libffi-8.dll" />


  


[Libreoffice-commits] core.git: external/python3

2023-10-15 Thread Julien Nabet (via logerrit)
 external/python3/ExternalProject_python3.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8797ba5e5d63151837ba443e1aea9d0997b6b7ab
Author: Julien Nabet 
AuthorDate: Sun Oct 15 19:42:06 2023 +0200
Commit: Julien Nabet 
CommitDate: Sun Oct 15 20:48:34 2023 +0200

Typo: Unfortuantely->Unfortunately (python3/ExternalProject_python3.mk)

Change-Id: I80d316c76196d8cdda4b2ad509d2d1b53b5c414a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157991
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index a9e75bac4efc..0f95cc36563c 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -60,7 +60,7 @@ else
 
 # libffi is not all that stable, with 3 different SONAMEs currently, so we
 # have to bundle it; --without-system-ffi does not work any more on Linux.
-# Unfortuantely (as of 3.7) pkg-config is used to locate libffi so we do some
+# Unfortunately (as of 3.7) pkg-config is used to locate libffi so we do some
 # hacks to find the libffi.pc in workdir by overriding PKG_CONFIG_LIBDIR.
 # Also, pkg-config is only used to find the headers, the libdir needs to be
 # passed extra.


[Libreoffice-commits] core.git: external/python3

2023-08-06 Thread Taichi Haradaguchi (via logerrit)
 external/python3/ExternalPackage_python3.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit f454a774053d2f631009612c78713822f6afdbd2
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sun Aug 6 07:51:24 2023 +0200
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Sun Aug 6 08:41:49 2023 +0200

Revert "external/python3: fix Windows build"

This reverts commit 219bef04b7084eef49e1001312e186f390f4f735.

Reason for revert: occured build error at 
https://ci.libreoffice.org/view/tb%20platform%20status/job/lo_daily_tb_win_arm64/972/

Change-Id: I26bb1a790ffddd7cb2f102f09cfb46b9327bb94b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155309
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 7d7ff7d04c2c..5b67765bc930 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -27,7 +27,6 @@ $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYT
 endif
 python3_EXTENSION_MODULES= \
PCbuild/$(python_arch_subdir)_asyncio$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
-   PCbuild/$(python_arch_subdir)_bz2$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd 
\
PCbuild/$(python_arch_subdir)_ctypes$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_decimal$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_elementtree$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \


[Libreoffice-commits] core.git: external/python3

2023-08-05 Thread Taichi Haradaguchi (via logerrit)
 external/python3/ExternalPackage_python3.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 219bef04b7084eef49e1001312e186f390f4f735
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sat Aug 5 17:13:54 2023 +0900
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Sun Aug 6 04:29:29 2023 +0200

external/python3: fix Windows build

...after commit 5e3510dbb62229cfb01da371d39ecc27b0d44880
(tdf#116412: include bz2 in internal python)

add _bz2*.pyd modules.

Change-Id: Icae5971fd766af738287d34f7abc4187a7a1fcca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155367
Tested-by: Taichi Haradaguchi <20001...@ymail.ne.jp>
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 5b67765bc930..7d7ff7d04c2c 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -27,6 +27,7 @@ $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYT
 endif
 python3_EXTENSION_MODULES= \
PCbuild/$(python_arch_subdir)_asyncio$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
+   PCbuild/$(python_arch_subdir)_bz2$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd 
\
PCbuild/$(python_arch_subdir)_ctypes$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_decimal$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_elementtree$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \


[Libreoffice-commits] core.git: external/python3

2023-02-09 Thread Andras Timar (via logerrit)
 external/python3/ExternalPackage_python3.mk |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 86c53eb59a6ada104358c9dbe3b50dac71af2dcc
Author: Andras Timar 
AuthorDate: Tue May 31 07:37:20 2022 +
Commit: Andras Timar 
CommitDate: Thu Feb 9 12:08:24 2023 +

fix internal python build on powerpc64le-unknown-linux-gnu

Change-Id: I49c1368542a1af5dbbf377dbd8cb0cad8c6e2a38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135174
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146689
Tested-by: Jenkins

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index ee97cb341505..1f29c9efbebb 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -141,6 +141,11 @@ endif
 endif
 
 # that one is generated...
+ifeq ($(HOST_PLATFORM),powerpc64le-unknown-linux-gnu)
+$(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
+LO_lib/_sysconfigdata_$(if 
$(ENABLE_DBGUTIL),d)_linux_powerpc64le-linux-gnu.py \
+))
+else
 # note: python configure overrides config.guess with something that doesn't
 # put -pc in its linux platform triplets, so filter that...
 ifneq ($(OS),WNT)
@@ -154,6 +159,7 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
 ))
 endif
 endif
+endif
 
 
 # packages not shipped:


[Libreoffice-commits] core.git: external/python3

2023-01-15 Thread Taichi Haradaguchi (via logerrit)
 external/python3/internal-zlib.patch.0 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 67c6e66c5b0da351ef48bad0ddced17340df33ab
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Mon Jan 2 02:54:58 2023 +0900
Commit: Thorsten Behrens 
CommitDate: Mon Jan 16 07:37:22 2023 +

external/python3: fix line offsets in internal-zlib.patch.0

"@@ -11607,13 +11607,13 @@" -> "@@ -12333,13 +12333,13 @@"

Change-Id: I03542ad3171814f6869bccab4dde77673eaa90f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144982
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/external/python3/internal-zlib.patch.0 
b/external/python3/internal-zlib.patch.0
index 27bb737db0c7..d4305c6df95d 100644
--- a/external/python3/internal-zlib.patch.0
+++ b/external/python3/internal-zlib.patch.0
@@ -1,6 +1,6 @@
 --- configure
 +++ configure
-@@ -11607,13 +11607,13 @@
+@@ -12333,13 +12333,13 @@
;;
  esac
  


[Libreoffice-commits] core.git: external/python3

2022-09-07 Thread Stephan Bergmann (via logerrit)
 external/python3/UnpackedTarball_python3.mk |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 3b98992ce119610d0d173939201dee1a331638f6
Author: Stephan Bergmann 
AuthorDate: Wed Sep 7 18:13:01 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Sep 7 20:22:23 2022 +0200

Remove obsolete comment

...after c8fd50f9ec02a131fd4c99e80f7252b49015653a "python3: upgrade to 
release
3.8.13"

Change-Id: I43428485e7cdffec7b3a7a575334bd886e2f26c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139609
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index 06c64d7d5688..127dea4a8ee4 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -15,9 +15,6 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
PCbuild/pcbuild.sln \
 ))
 
-# For the configure part of external/python3/darwin.patch.0, see
-#  "'configure: error: internal configure 
error for the platform
-# triplet' on macOS with Clang supporting --print-multiarch:"
 $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/i100492-freebsd.patch.1 \
external/python3/python-3.3.0-darwin.patch.1 \


[Libreoffice-commits] core.git: external/python3

2022-02-23 Thread Stephan Bergmann (via logerrit)
 external/python3/ExternalPackage_python3.mk |   14 ++
 external/python3/ExternalProject_python3.mk |4 
 2 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 5931638fdabb033c2f957c90ae27d075477b1261
Author: Stephan Bergmann 
AuthorDate: Tue Feb 22 16:26:45 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 23 11:12:10 2022 +0100

external/python3: Explicitly check that all extension modules got built

...to avoid issues like we now experienced on Jenkins box tb76, where e.g.
 failed 
with
just an unhelpful

> 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/external/python3/ExternalPackage_python3.mk:46:
 *** file 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/UnpackedTarball/python3/LO_lib/_elementtree.cpython-3.8d.so
 does not exist in the tarball.  Stop.
> make[1]: *** Waiting for unfinished jobs
> Makefile:299: recipe for target 'build' failed
> make: *** [build] Error 2

after ExternalProject_python3 had been built successfully, outputting just

> [build PRJ] python3

even though its workdir/UnpackedTarball/python3/build.log states

> *** WARNING: renaming "_elementtree" since importing it failed: pyexpat 
version is incompatible

and

> Following modules built successfully but were removed because they could 
not be imported:
> _elementtree

(but which got hidden by gbuild)

Change-Id: I28904ef41cb823e308bb8e15cbe969872702cb55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130355
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index faddf06fc36a..9987ab138792 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -25,7 +25,7 @@ $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYT
 ifeq ($(MSVC_USE_DEBUG_RUNTIME),)
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYTHON_VERSION_MAJOR).dll,PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR).dll))
 endif
-$(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
+python3_EXTENSION_MODULES= \
PCbuild/$(python_arch_subdir)_asyncio$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_ctypes$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_decimal$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
@@ -40,6 +40,9 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
PCbuild/$(python_arch_subdir)select$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)unicodedata$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)winsound$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
+
+$(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
+   $(python3_EXTENSION_MODULES) \
 ))
 else
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
@@ -49,14 +52,14 @@ $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin-
 
 # Unfortunately the python build system does not allow to explicitly enable or
 # disable these, it just tries to build them and then prints which did not
-# build successfully without stopping; so the build will break on delivering if
-# one of these failed to build.
+# build successfully without stopping; that's why ExternalProject_python3 
explicitly checks for the
+# existence of all the files on the python3_EXTENSION_MODULES list at the end 
of the build.
 # Obviously this list should not contain stuff with external dependencies
 # that may not be available on baseline systems.
 
 ifneq ($(OS),AIX)
 
python3_EXTENSION_MODULE_SUFFIX=cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d)
-$(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/lib-dynload,\
+python3_EXTENSION_MODULES= \
LO_lib/array.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_asyncio.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/audioop.$(python3_EXTENSION_MODULE_SUFFIX).so \
@@ -121,6 +124,9 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
LO_lib/_xxsubinterpreters.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_xxtestfuzz.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/zlib.$(python3_EXTENSION_MODULE_SUFFIX).so \
+
+$(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/lib-dynload,\
+   $(python3_EXTENSION_MODULES) \
 ))
 endif
 endif
diff --git 

[Libreoffice-commits] core.git: external/python3

2021-12-23 Thread Aron Budea (via logerrit)
 external/python3/UnpackedTarball_python3.mk  |1 
 external/python3/python-3.8-msvc-sdk.patch.1 |  173 +++
 2 files changed, 174 insertions(+)

New commits:
commit fa9ab05d78bb398efa3c09148e9d6d717f6168d1
Author: Aron Budea 
AuthorDate: Fri Dec 24 06:36:09 2021 +0100
Commit: Mike Kaganski 
CommitDate: Fri Dec 24 08:02:11 2021 +0100

python3: fix build on Win 10

With Windows 11 SDK (10.0.22000.0).

Error message is:
fatal error RC1116: RC terminating after preprocessor errors

https://bugs.python.org/issue45220

Applied fixing patches to 3.8.

Change-Id: I0860b05fd963ea81b493a4b9df7f39db86598dd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127395
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index af514446fff2..31b6a166e6ae 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
 $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/i100492-freebsd.patch.1 \
external/python3/python-3.3.0-darwin.patch.1 \
+   external/python3/python-3.8-msvc-sdk.patch.1 \
external/python3/python-3.7.6-msvc-ssl.patch.1 \
external/python3/python-3.5.4-msvc-disable.patch.1 \
external/python3/ubsan.patch.0 \
diff --git a/external/python3/python-3.8-msvc-sdk.patch.1 
b/external/python3/python-3.8-msvc-sdk.patch.1
new file mode 100644
index ..fabdbb53ea63
--- /dev/null
+++ b/external/python3/python-3.8-msvc-sdk.patch.1
@@ -0,0 +1,173 @@
+diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc
+index 92987af713..d21f9b6e9d 100644
+--- a/PC/pylauncher.rc
 b/PC/pylauncher.rc
+@@ -4,7 +4,6 @@
+ 
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include 
+ 1 RT_MANIFEST "python.manifest"
+ 
+ #if defined(PY_ICON)
+diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc
+index e5924a42da..fc607e9784 100644
+--- a/PC/pyshellext.rc
 b/PC/pyshellext.rc
+@@ -4,7 +4,6 @@
+ 
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include 
+ 1 RT_MANIFEST "python.manifest"
+ 
+ /
+diff --git a/PC/python_exe.rc b/PC/python_exe.rc
+index ae0b029b80..5eba89962b 100644
+--- a/PC/python_exe.rc
 b/PC/python_exe.rc
+@@ -4,7 +4,6 @@
+ 
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include 
+ 1 RT_MANIFEST "python.manifest"
+ 
+ 1 ICON DISCARDABLE "icons\python.ico" 
+diff --git a/PC/python_nt.rc b/PC/python_nt.rc
+index fac6105d8a..33cee42cb7 100644
+--- a/PC/python_nt.rc
 b/PC/python_nt.rc
+@@ -4,7 +4,6 @@
+ 
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include 
+ 2 RT_MANIFEST "python.manifest"
+ 
+ // String Tables
+diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc
+index 88bf3592e1..562652be18 100644
+--- a/PC/pythonw_exe.rc
 b/PC/pythonw_exe.rc
+@@ -4,7 +4,6 @@
+ 
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include 
+ 1 RT_MANIFEST "python.manifest"
+ 
+ 1 ICON DISCARDABLE "icons\pythonw.ico" 
+diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc
+index 84bd87d9d5..d2c18f8add 100644
+--- a/PC/sqlite3.rc
 b/PC/sqlite3.rc
+@@ -4,7 +4,6 @@
+ 
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include 
+ 2 RT_MANIFEST "python.manifest"
+ 
+ /
+diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc
+index d21f9b6e9d..ff7e71e0fd 100644
+--- a/PC/pylauncher.rc
 b/PC/pylauncher.rc
+@@ -2,6 +2,11 @@
+ 
+ #include "python_ver_rc.h"
+ 
++#ifndef RT_MANIFEST
++// bpo-45220: Cannot reliably #include RT_MANIFEST from
++// anywhere, so we hardcode it
++#define RT_MANIFEST 24
++#endif
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+ 1 RT_MANIFEST "python.manifest"
+diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc
+index fc607e9784..af797ce95d 100644
+--- a/PC/pyshellext.rc
 b/PC/pyshellext.rc
+@@ -2,6 +2,12 @@
+ 
+ #include "python_ver_rc.h"
+ 
++#ifndef RT_MANIFEST
++// bpo-45220: Cannot reliably #include RT_MANIFEST from
++// anywhere, so we hardcode it
++#define RT_MANIFEST 24
++#endif
++
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+ 1 RT_MANIFEST "python.manifest"
+diff --git a/PC/python_exe.rc b/PC/python_exe.rc
+index 5eba89962b..c3d3bff019 100644
+--- a/PC/python_exe.rc
 b/PC/python_exe.rc
+@@ -2,6 +2,12 @@
+ 
+ #include "python_ver_rc.h"
+ 
++#ifndef RT_MANIFEST
++// bpo-45220: Cannot reliably 

[Libreoffice-commits] core.git: external/python3

2021-05-07 Thread Stephan Bergmann (via logerrit)
 external/python3/UnpackedTarball_python3.mk |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d0b343a781ff792f5acbfafc671970cd48a18da8
Author: Stephan Bergmann 
AuthorDate: Fri May 7 08:53:36 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 7 10:18:10 2021 +0200

external/python3: Mark configure part of darwin.patch.0 as reported upstream

Change-Id: Ibf9fb088eb1d7e11582518aeafa233dfa7c56bf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115223
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index ea54b630f752..af514446fff2 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -15,6 +15,9 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
PCbuild/pcbuild.sln \
 ))
 
+# For the configure part of external/python3/darwin.patch.0, see
+#  "'configure: error: internal configure 
error for the platform
+# triplet' on macOS with Clang supporting --print-multiarch:"
 $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/i100492-freebsd.patch.1 \
external/python3/python-3.3.0-darwin.patch.1 \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2021-05-07 Thread Stephan Bergmann (via logerrit)
 external/python3/darwin.patch.0 |   12 
 1 file changed, 12 insertions(+)

New commits:
commit b0a4b49a88aacfbc127965c0c6fe50a065eb3a0f
Author: Stephan Bergmann 
AuthorDate: Thu May 6 21:59:02 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 7 08:26:03 2021 +0200

external/python3: Clang 13 trunk implements --print-multiarch now

...since


"[Driver] Add -print-multiarch", which causes an issue when building
ExternalProject_python3 on macOS:

> checking build system type... x86_64-apple-darwin19.6.0
> checking host system type... x86_64-apple-darwin19.6.0
[...]
> checking for the platform triplet based on compiler characteristics... 
darwin
configure: error: internal configure error for the platform triplet, please 
file a bug report
> make[1]: *** 
[/Users/stephan/Software/lo/core/external/python3/ExternalProject_python3.mk:80:
 /Users/stephan/Software/lo/core/workdir/ExternalProject/python3/build] Error 1

as workdir/UnpackedTarball/python3/configure.ac computes PLATFORM_TRIPLET as
"darwin", and instead of computing MULTIARCH as empty (as `$CC
--print-multiarch` used to just print

> clang: error: unsupported option '--print-multiarch'
> clang: error: no input files

to stderr), it now computes it as e.g. "x86_64-apple-darwin19.6.0" (or 
whatever
-target is explicitly set to in $CC), so the check that they have equal 
values
if they are bot nonempty fails now when building against Clang 13 trunk.  
(This
is not yet an issue with any Apple Clang version, though.)

Until this is eventually fixed upstream at 
,
just keep pretending that `clang --print-multiarch` would cause no stdout 
output
on macOS when determining MULTIARCH.

Change-Id: Ic1b27c6791b327d5709a9d61a6d675c3fa8989bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115219
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/python3/darwin.patch.0 b/external/python3/darwin.patch.0
index 139cdc9780bb..30d20ed57578 100644
--- a/external/python3/darwin.patch.0
+++ b/external/python3/darwin.patch.0
@@ -8,3 +8,15 @@
  .text
  
  /* ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags,
+--- configure
 configure
+@@ -5167,7 +5167,9 @@
+ fi
+ 
+ 
++if test "$(uname -s)" = Darwin; then MULTIARCH=; else
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
++fi
+ 
+ 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet 
based on compiler characteristics" >&5
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2021-05-07 Thread Stephan Bergmann (via logerrit)
 external/python3/ExternalProject_python3.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 30b6b43bcb8fb772f535be9fd6538465b080fe7a
Author: Stephan Bergmann 
AuthorDate: Thu May 6 21:56:07 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 7 08:22:35 2021 +0200

external/python3: First removeunnecessarystuff, then fixinstallnames

otherwise, we could get issues like

> error: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
 can't open file: 
/Users/stephan/Software/lo/core/workdir/UnpackedTarball/python3/python-inst/@__OOO/LibreOfficePython.framework/Versions/3.8/lib/python3.8/lib-dynload/_curses_panel.cpython-3.8.so
 (No such file or directory)
> error: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
 can't open file: 
/Users/stephan/Software/lo/core/workdir/UnpackedTarball/python3/python-inst/@__OOO/LibreOfficePython.framework/Versions/3.8/lib/python3.8/lib-dynload/_curses.cpython-3.8.so
 (No such file or directory)
> error: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
 can't open file: 
/Users/stephan/Software/lo/core/workdir/UnpackedTarball/python3/python-inst/@__OOO/LibreOfficePython.framework/Versions/3.8/lib/python3.8/lib-dynload/_testinternalcapi.cpython-3.8.so
 (No such file or directory)
> error: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
 can't open file: 
/Users/stephan/Software/lo/core/workdir/UnpackedTarball/python3/python-inst/@__OOO/LibreOfficePython.framework/Versions/3.8/lib/python3.8/lib-dynload/_dbm.cpython-3.8.so
 (No such file or directory)

when the two jobs run in parallel

Change-Id: I6db18d7a6fa0ce177e88f8f714434acf9afe3ea5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115218
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 8766b1e3e9cb..807b3875d8b2 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -165,7 +165,8 @@ cd \"$$origpath\"\n\
chmod +x "../Resources/$$file" && ln -s "../Resources/$$file" ; done
touch $@
 
-$(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call 
gb_ExternalProject_get_state_target,python3,build)
+$(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call 
gb_ExternalProject_get_state_target,python3,build) \
+| $(call 
gb_ExternalProject_get_state_target,python3,removeunnecessarystuff)
$(INSTALL_NAME_TOOL) -change \

$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython
 \
@executable_path/../../../../LibreOfficePython \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2021-04-21 Thread Tor Lillqvist (via logerrit)
 external/python3/ExternalProject_python3.mk |   28 +---
 1 file changed, 13 insertions(+), 15 deletions(-)

New commits:
commit 6e62c9df969fdf3a599e4f7b0e46a70e8f0780e5
Author: Tor Lillqvist 
AuthorDate: Tue Apr 20 20:55:11 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Apr 21 08:25:21 2021 +0200

Python .so files names have changed on macOS at least for some reason

There is no longer any "m" in the name suffix. Adapt the names of the
ones we want to remove for macOS.

The idlelib and tkinter dylibs are no longer there at all.

Don't use the -f flag to the rm commands. Thus we will notice the next
time something we want to remove isn't actually there or has been
renamed. But sadly for some unknown reason we do need to use a *
wildcard in the .so names.

Fixes a problem caught by App Store review where the Python curses
module had not been removed as it should have been. (It uses
non-public APIs and can thus not be included.)

Change-Id: I51b9728cc9ca0a962908d3994e3a0ff8e4fa7f60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114372
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 36fc917168d3..680da9352638 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -188,22 +188,20 @@ $(call 
gb_ExternalProject_get_state_target,python3,executables) : $(call gb_Exte
 
 $(call gb_ExternalProject_get_state_target,python3,removeunnecessarystuff) : 
$(call gb_ExternalProject_get_state_target,python3,build)
$(call gb_Output_announce,python3 - remove the stuff we don't need to 
ship,build,CUS,5)
-   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/dbm
-   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/sqlite3
-   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/curses
-   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/idlelib
-   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/tkinter
-   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/turtledemo
-   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test
-   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/venv
+   rm -r 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/dbm
+   rm -r 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/sqlite3
+   rm -r 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/curses
+   rm -r 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/idlelib
+   rm -r 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/tkinter
+   rm -r 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/turtledemo
+   rm -r 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test
+   rm -r 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/venv
# Then the binary libraries
-   rm -f 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_dbm.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
-   rm -f 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_sqlite3.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
-   rm -f 

[Libreoffice-commits] core.git: external/python3

2021-01-02 Thread Julien Nabet (via logerrit)
 external/python3/ExternalPackage_python3.mk |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 8aae3b37a6553d645bfc94855adbbd1859e07692
Author: Julien Nabet 
AuthorDate: Sat Jan 2 16:40:01 2021 +0100
Commit: Julien Nabet 
CommitDate: Sat Jan 2 22:09:52 2021 +0100

Fix build error in Python3 for Raspberry pi4b

/home/pi/lo/libreoffice/external/python3/ExternalPackage_python3.mk:48:
*** file 
/home/pi/lo/libreoffice/workdir/UnpackedTarball/python3/LO_lib/_sysconfigdata__linux_armv7l-unknown-linux-gnueabihf.py
does not exist in the tarball. Arrêt.

Change-Id: If348c9f55883c1afcc37ff38e84361786bef1845
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108595
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 5f1fd5ae70ea..8448d24db3b0 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -140,10 +140,17 @@ endif
 # note: python configure overrides config.guess with something that doesn't
 # put -pc in its linux platform triplets, so filter that...
 ifneq ($(OS),WNT)
+ifeq ($(CPUNAME),ARM)
+$(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
+   LO_lib/_sysconfigdata_$(if 
$(ENABLE_DBGUTIL),d)_$(python3_MACHDEP)_$(subst i686,i386,$(subst 
v7l-unknown,,$(HOST_PLATFORM))).py \
+))
+else
 $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
LO_lib/_sysconfigdata_$(if 
$(ENABLE_DBGUTIL),d)_$(python3_MACHDEP)_$(subst i686,i386,$(subst 
-pc,,$(HOST_PLATFORM))).py \
 ))
 endif
+endif
+
 
 # packages not shipped:
 # dbm, sqlite3 - need some database stuff
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-12-03 Thread Tor Lillqvist (via logerrit)
 external/python3/ExternalProject_python3.mk |   21 +++--
 1 file changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 8b8c420dc56da6b01aa29cbf433e98b9d36e2dd6
Author: Tor Lillqvist 
AuthorDate: Wed Dec 2 12:21:36 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Dec 3 11:05:52 2020 +0100

Drop Python modules we don't want on macOS, too, like on other platforms

On macOS, for various reasons, we use a different approach than on
other platforms to construct the bundled Python.

Instead of explicitly listing what to include (out of what Python
contains and builds) (in ExternalPackage_python3.mk), after Python is
built, we remove stuff we don't want (in ExternalProject_python3.mk)
and then include everything left in the LibreOfficePython.framework
(in GeneratedPackage_python3.mk).

This fixes a problem in App Store review: For some reason the review
said that the setcchar() function from the ncurses library, used by
Python's curses module, is non-public. No idea why the (automated)
review picked on that function. As far as I see from the ncurses
header in the SDK, that function is no less public than the other
ncurses functions that the Python module uses.

But oh well, we don't actually ship the curses module anyway on other
platforms, so just drop it on macOS, too. And while at it, drop the
other unwanted ones, too. And any binary shared libraries for them.

Change-Id: Idecaf10a6fb1c59e8711095927f5699b8d2ec98e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107055
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107141
Tested-by: Tor Lillqvist 

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 6fa919b7cb3c..63f7e0ca5b45 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -1,4 +1,4 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 
100 -*-
 #
 # This file is part of the LibreOffice project.
 #
@@ -178,10 +178,27 @@ $(call 
gb_ExternalProject_get_state_target,python3,executables) : $(call gb_Exte
@executable_path/../LibreOfficePython 
python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)
touch $@
 
-# also delete binaries that are symlinked in scp2
+# Remove modules (both Python and binary bits) of questionable usefulness that 
we don't ship on
+# other platforms either. See the "packages not shipped" comment in 
ExternalPackage_python3.mk.
+
 $(call gb_ExternalProject_get_state_target,python3,removeunnecessarystuff) : 
$(call gb_ExternalProject_get_state_target,python3,build)
$(call gb_Output_announce,python3 - remove the stuff we don't need to 
ship,build,CUS,5)
+   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/dbm
+   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/sqlite3
+   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/curses
+   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/idlelib
+   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/tkinter
+   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/turtledemo
rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test
+   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/venv
+   # Then the binary libraries
+   rm -f 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_dbm.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
+   rm -f 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_sqlite3.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
+   rm -f 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_curses.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
+   rm -f 

[Libreoffice-commits] core.git: external/python3

2020-12-01 Thread Tor Lillqvist (via logerrit)
 external/python3/macos-11.patch.0 |   20 
 1 file changed, 20 insertions(+)

New commits:
commit ff270d936d1d0209d9036aaa9149a8ee489aaebf
Author: Tor Lillqvist 
AuthorDate: Tue Dec 1 21:36:05 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Wed Dec 2 08:44:08 2020 +0100

Guard against sysconf(_SC_OPEN_MAX) returning LONG_MAX

That seems to happen in a sandboxed process on macOS, at least. This
caused an apparent hang when invoking Python, for instance simply
through Tools > Macros > Run Macro... .

Change-Id: I6bc055b44f298251ed596084538b98442c215fce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107013
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/external/python3/macos-11.patch.0 
b/external/python3/macos-11.patch.0
index 23fc5f9760c5..3c42d515f6bd 100644
--- a/external/python3/macos-11.patch.0
+++ b/external/python3/macos-11.patch.0
@@ -48,3 +48,23 @@
#else
  #error "unknown architecture for universal build."
#endif
+--- Modules/_posixsubprocess.c
 Modules/_posixsubprocess.c
+@@ -31,6 +31,8 @@
+ # define SYS_getdents64  __NR_getdents64
+ #endif
+ 
++#include 
++
+ #if defined(__sun) && defined(__SVR4)
+ /* readdir64 is used to work around Solaris 9 bug 6395699. */
+ # define readdir readdir64
+@@ -202,7 +202,7 @@
+ #endif
+ #ifdef _SC_OPEN_MAX
+ local_max_fd = sysconf(_SC_OPEN_MAX);
+-if (local_max_fd == -1)
++if (local_max_fd == -1 || local_max_fd == LONG_MAX)
+ #endif
+ local_max_fd = 256;  /* Matches legacy Lib/subprocess.py behavior. */
+ return local_max_fd;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-12-01 Thread Stephan Bergmann (via logerrit)
 external/python3/ubsan.patch.0 |   23 +++
 1 file changed, 23 insertions(+)

New commits:
commit 1657639d5e405c6e1e988d51a1f267c378c74b53
Author: Stephan Bergmann 
AuthorDate: Tue Dec 1 14:44:01 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Dec 2 08:16:50 2020 +0100

external/python3: Silence UBSan errors with --with-pydebug

...that happen when building ExternalProject_python3 itself after
12142490cd43f8568ab29e0ddfa75b334d6d39d5 "Enable Python Py_DEBUG setting 
when
built with --enable-dbgutil on Linux":

For one, silence

> Modules/posixmodule.c:14395:9: runtime error: left shift of 34 by 26 
places cannot be represented in type 'int'
>  #0 in all_ins at 
workdir/UnpackedTarball/python3/./Modules/posixmodule.c:14395:9

where at least my kernel-headers-5.9.9-200.fc33.x86_64
/usr/include/linux/memfd.h has

> #define MFD_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB

and /usr/include/asm-generic/hugetlb_encode.h has

> #define HUGETLB_FLAG_ENCODE_16GB  (34 << HUGETLB_FLAG_ENCODE_SHIFT)

For another (and as predicted in 29d47d22c43e6adc1850b7db5880028dcd07d1b3 
"Fix
passing --disable-optimized into external/python3": "in a Linux UBsan build,
making ExternalProject_python3 would have started to cause some 'applying 
zero
offset to null pointer' failures, but which would have been easy to fix"),
silence

> Objects/listobject.c:551:24: runtime error: applying zero offset to null 
pointer
>  #0 in list_concat at 
workdir/UnpackedTarball/python3/Objects/listobject.c:551:24

Change-Id: I0523cd35e393000c8e67629a0522b2db1d8c16f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106984
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index 938acc1f1725..9f458b1e0f95 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -18,3 +18,26 @@
  
/*  Set the carry bit if the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp.  */
+--- Modules/posixmodule.c
 Modules/posixmodule.c
+@@ -23,6 +23,9 @@
+ };
+ 
+ static int
++#if defined __clang__
++__attribute__((no_sanitize("shift-base"))) // MFD_HUGE_16GB in 
/usr/include/linux/memfd.h
++#endif
+ all_ins(PyObject *m)
+ {
+ #ifdef F_OK
+--- Objects/listobject.c
 Objects/listobject.c
+@@ -548,7 +548,7 @@
+ dest[i] = v;
+ }
+ src = b->ob_item;
+-dest = np->ob_item + Py_SIZE(a);
++dest = Py_SIZE(a) == 0 ? np->ob_item : np->ob_item + Py_SIZE(a);
+ for (i = 0; i < Py_SIZE(b); i++) {
+ PyObject *v = src[i];
+ Py_INCREF(v);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3 RepositoryExternal.mk

2020-12-01 Thread Thomas Viehmann (via logerrit)
 RepositoryExternal.mk   |2 
 external/python3/ExternalPackage_python3.mk |  125 ++--
 external/python3/ExternalProject_python3.mk |1 
 3 files changed, 66 insertions(+), 62 deletions(-)

New commits:
commit 12142490cd43f8568ab29e0ddfa75b334d6d39d5
Author: Thomas Viehmann 
AuthorDate: Fri Nov 27 23:08:08 2020 +0100
Commit: Michael Stahl 
CommitDate: Tue Dec 1 10:16:17 2020 +0100

Enable Python Py_DEBUG setting when built with --enable-dbgutil on Linux

This has been suggested on IRC for testing fixes/avoiding regressions
when working on the GIL locking in PyUNO.

Change-Id: Ifda21a867b3c0c7db636a9ec950050012e4742de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106791
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index f0cad01beb49..99dfcea22b40 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3200,7 +3200,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
 else
 $(call gb_LinkTarget_add_libs,$(1),\
-L$(call gb_UnpackedTarball_get_dir,python3) \
-   -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
+   -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if 
$(ENABLE_DBGUTIL),d) \
 )
 endif
 
diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 4886b123cab4..5f1fd5ae70ea 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -43,8 +43,8 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
 ))
 else
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
-$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).so,libpython$(PYTHON_VERSION_MAJOR).so))
-$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so))
+$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 
$(ENABLE_DBGUTIL),d).so,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d).so))
+$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 
$(ENABLE_DBGUTIL),d).so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d).so))
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin-gdb.py,Tools/gdb/libpython.py))
 
 # Unfortunately the python build system does not allow to explicitly enable or
@@ -55,69 +55,72 @@ $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin-
 # that may not be available on baseline systems.
 
 ifneq ($(OS),AIX)
+python3_EXTENSION_MODULE_SUFFIX=cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d)
 $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/lib-dynload,\
-   LO_lib/array.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so 
\
-   
LO_lib/_asyncio.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/audioop.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/binascii.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_bisect.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_blake2.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   LO_lib/cmath.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so 
\
-   
LO_lib/_codecs_cn.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_codecs_hk.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_codecs_iso2022.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so
 \
-   
LO_lib/_codecs_jp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_codecs_kr.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_codecs_tw.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_contextvars.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_crypt.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   LO_lib/_csv.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_ctypes.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_datetime.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_decimal.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_elementtree.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   

[Libreoffice-commits] core.git: external/python3

2020-11-19 Thread Tor Lillqvist (via logerrit)
 external/python3/ExternalProject_python3.mk |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit a6a2855818585740d8291a669c3552a7c4e77480
Author: Tor Lillqvist 
AuthorDate: Thu Nov 19 19:21:08 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Nov 19 21:14:42 2020 +0100

Add comment on how to run Python's own unit tests

Change-Id: Id62a688d2ddf7493d419a00a9fd0dfc6a6f13f0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106173
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index ad110bbbc817..0591d2468ec6 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -127,6 +127,12 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
 
 endif
 
+# If you want to run Python's own unit tests, add this to the chain of 
commands above:
+#  && MAKEFLAGS= $(MAKE) \
+#  $(if $(filter 
MACOSX,$(OS)),DESTDIR=$(EXTERNAL_WORKDIR)/python-inst) \
+#  $(if 
$(SYSTEM_ZLIB),,ZLIB_INCDIR=$(WORKDIR)/UnpackedTarball/zlib) \
+#  test \
+
 ifeq ($(OS),MACOSX)
 
 python3_fw_prefix=$(call 
gb_UnpackedTarball_get_dir,python3)/python-inst/@__OOO/LibreOfficePython.framework
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-11-15 Thread Tor Lillqvist (via logerrit)
 external/python3/macos-11.patch.0 |   12 
 1 file changed, 12 insertions(+)

New commits:
commit 631974dd958fe4ca1d1f2164266e1e2c81b325ce
Author: Tor Lillqvist 
AuthorDate: Sun Nov 15 21:22:49 2020 +
Commit: Tor Lillqvist 
CommitDate: Sun Nov 15 23:53:17 2020 +0100

Make one more thing in Python compile for macOS on arm64

Change-Id: I6716048f0b58eb502b9d1ade8a13b8e33e4aaf2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105905
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/external/python3/macos-11.patch.0 
b/external/python3/macos-11.patch.0
index d6bc4e539d12..23fc5f9760c5 100644
--- a/external/python3/macos-11.patch.0
+++ b/external/python3/macos-11.patch.0
@@ -36,3 +36,15 @@
  system_include_dirs = ['/usr/include']
  # lib_dirs and inc_dirs are used to search for files;
  # if a file is found in one of those directories, it can
+--- Modules/_decimal/libmpdec/mpdecimal.h
 Modules/_decimal/libmpdec/mpdecimal.h
+@@ -135,6 +135,9 @@
+   #elif defined(__x86_64__)
+ #define CONFIG_64
+ #define ASM
++  #elif defined(__arm64__)
++#define CONFIG_64
++#define ANSI
+   #else
+ #error "unknown architecture for universal build."
+   #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-11-15 Thread Tor Lillqvist (via logerrit)
 external/python3/UnpackedTarball_python3.mk |1 
 external/python3/macos-11.patch.0   |   38 
 2 files changed, 39 insertions(+)

New commits:
commit 0b95a5f9d50db5ac6c09ce5dbfb49b76e292b96f
Author: Tor Lillqvist 
AuthorDate: Sun Nov 15 13:30:34 2020 +
Commit: Tor Lillqvist 
CommitDate: Sun Nov 15 16:54:02 2020 +0100

Make python3 build on macOS 11, including for arm64

There is no /usr/lib/libz.dylib any longer in macOS 11.

No idea whether it works (especially on arm64), but that is another
issue.

Change-Id: I92ac0c500388730eca0be4766f07b1af2d2808e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105897
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index 94950537386c..ea54b630f752 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/ubsan.patch.0 \
external/python3/python-3.5.tweak.strip.soabi.patch \
external/python3/darwin.patch.0 \
+   external/python3/macos-11.patch.0 \
 ))
 
 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
diff --git a/external/python3/macos-11.patch.0 
b/external/python3/macos-11.patch.0
new file mode 100644
index ..d6bc4e539d12
--- /dev/null
+++ b/external/python3/macos-11.patch.0
@@ -0,0 +1,38 @@
+-*- Mode: diff -*-
+--- configure
 configure
+@@ -9372,6 +9275,9 @@
+   esac
+ else
+   case `/usr/bin/arch` in
++  arm64)
++  MACOSX_DEFAULT_ARCH="arm64"
++  ;;
+   i386)
+   MACOSX_DEFAULT_ARCH="x86_64"
+   ;;
+--- Mac/Tools/pythonw.c
 Mac/Tools/pythonw.c
+@@ -121,6 +121,8 @@
+ cpu_types[0] = CPU_TYPE_POWERPC;
+ #elif defined(__i386__)
+ cpu_types[0] = CPU_TYPE_X86;
++#elif defined(__arm64__)
++cpu_types[0] = CPU_TYPE_ARM64;
+ #else
+ #   error "Unknown CPU"
+ #endif
+--- setup.py
 setup.py
+@@ -670,7 +670,10 @@
+ add_dir_to_list(self.compiler.include_dirs,
+ sysconfig.get_config_var("INCLUDEDIR"))
+ 
+-system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
++if MACOS:
++system_lib_dirs = ['/usr/lib', macosx_sdk_root()+'/usr/lib']
++else:
++system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
+ system_include_dirs = ['/usr/include']
+ # lib_dirs and inc_dirs are used to search for files;
+ # if a file is found in one of those directories, it can
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3 RepositoryExternal.mk

2020-09-16 Thread Jan-Marek Glogowski (via logerrit)
 RepositoryExternal.mk   |9 -
 external/python3/ExternalPackage_python3.mk |3 +++
 2 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit bd066a17a22826ceb10e7763074704289f838f74
Author: Jan-Marek Glogowski 
AuthorDate: Sat Jul 18 03:57:20 2020 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Thu Sep 17 06:39:06 2020 +0200

python3: fix Windows Arm64 build

Change-Id: I2e9f9ca5fcf40a3ff53c036ebc51a75b882d91f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102854
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index d396cc5b5190..1a4acbb80437 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3183,8 +3183,15 @@ $(call gb_LinkTarget_use_package,$(1),python3)
 endif
 
 ifeq ($(OS),WNT)
+ifeq ($(CPUNAME),X86_64)
+python_arch_subdir=amd64
+else ifeq ($(CPUNAME),ARM64)
+python_arch_subdir=arm64
+else
+python_arch_subdir=win32
+endif
 $(call gb_LinkTarget_add_libs,$(1),\
-   $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(if $(filter 
X86_64,$(CPUNAME)),amd64,win32)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if
 $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
+   $(call 
gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if
 $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
 )
 else ifeq ($(OS),MACOSX)
 $(call gb_LinkTarget_add_libs,$(1),\
diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 692b2793bd37..4886b123cab4 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -14,9 +14,12 @@ $(eval $(call 
gb_ExternalPackage_use_external_project,python3,python3))
 ifeq ($(OS),WNT)
 ifeq ($(CPUNAME),X86_64)
 python_arch_subdir=amd64/
+else ifeq ($(CPUNAME),ARM64)
+python_arch_subdir=arm64/
 else
 python_arch_subdir=win32/
 endif
+
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/bin/python.exe,PCbuild/$(python_arch_subdir)python$(if
 $(MSVC_USE_DEBUG_RUNTIME),_d).exe))
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if
 
$(MSVC_USE_DEBUG_RUNTIME),_d).dll,PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if
 $(MSVC_USE_DEBUG_RUNTIME),_d).dll))
 ifeq ($(MSVC_USE_DEBUG_RUNTIME),)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-07-24 Thread Stephan Bergmann (via logerrit)
 external/python3/ExternalPackage_python3.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ee5408d025765762ab3c7f342cd9b5330ed8b425
Author: Stephan Bergmann 
AuthorDate: Fri Jul 24 13:53:58 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jul 24 15:28:54 2020 +0200

Name of python.bin-gdb.py must match name of python.bin executable

...for gdb to autoload it

Change-Id: I9a65a03fe18623181d5791b4596b4416228c6c8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99372
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index f7b8d67f25b2..692b2793bd37 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -42,7 +42,7 @@ else
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).so,libpython$(PYTHON_VERSION_MAJOR).so))
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so))
-$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python-gdb.py,Tools/gdb/libpython.py))
+$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin-gdb.py,Tools/gdb/libpython.py))
 
 # Unfortunately the python build system does not allow to explicitly enable or
 # disable these, it just tries to build them and then prints which did not
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-04-29 Thread Stephan Bergmann (via logerrit)
 external/python3/ExternalProject_python3.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 2919bc15867a53a6db79f482d9ccb86ac2663b35
Author: Stephan Bergmann 
AuthorDate: Wed Apr 29 09:36:32 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Apr 29 10:54:08 2020 +0200

Fix gb_ExternalProject_get_state_target,python3,removeunnecessarystuff

...which had been introduced with 0f2f719ccd5544eb37d1aacb0a50c317ae963e50
"tdf#106324: Remove unnecessary test folder from LibreOfficePython 
framework",
but had apparently forgotten to touch the target file when done, so any make
target that would (indirectly) depend on it would keep rebuilding python3 
et al.

Change-Id: I0ac3611383c82c4e91a1eaa02e4cf5db28d326fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93117
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 7e320caf9bc7..91c6c1948c95 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -177,6 +177,7 @@ $(call 
gb_ExternalProject_get_state_target,python3,executables) : $(call gb_Exte
 $(call gb_ExternalProject_get_state_target,python3,removeunnecessarystuff) : 
$(call gb_ExternalProject_get_state_target,python3,build)
$(call gb_Output_announce,python3 - remove the stuff we don't need to 
ship,build,CUS,5)
rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test
+   touch $@
 
 endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-04-16 Thread Stephan Bergmann (via logerrit)
 external/python3/ExternalProject_python3.mk |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 29d47d22c43e6adc1850b7db5880028dcd07d1b3
Author: Stephan Bergmann 
AuthorDate: Thu Apr 16 13:58:49 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 16 16:04:05 2020 +0200

Fix passing --disable-optimized into external/python3

This had originally been covered by dccf47b7f61e088622747539d1487590080da3b8
"Build python3 with debug flags if --enable-debug", which got broken by
c33ada5923f1f534334b22c15d6e2c6f1d35 "merge --enable-selective-debuginfo
into --enable-symbols" (which removed the definition of
gb_Module_CURRENTMODULE_DEBUG_ENABLED without adapting its use here).

But looking again, setting OPT for 
workdir/UnpackedTarball/python3/configure.ac
based on our various flags doesn't seem to be such a good idea anyway:  It 
is
used to specify a mixture of debuginfo (-g; which is set rather 
unconditionally,
so no need for us to cater for --enable-symbols here), optimization 
(-fwrapv,
-O*), and warning (-Wall) flags.  So better let
workdir/UnpackedTarball/python3/configure.ac keep deciding for itself what 
flags
to set in OPT, and then just override via CFLAGS those that do not suite us.
(Where it appears to be a happy coincidence that the Python build system 
puts
CFLAGS after OPT, so the former can override the latter.)

(An alternative approach could have been to pass --with-pydebug based on 
e.g.
--enable-dbgutil, as the former (a) causes OPT to include -O0 rather than 
-O3,
and (b) is documented to change the ABI (see
workdir/UnpackedTarball/python3/configure.ac: "Py_DEBUG implies assertions, 
but
also changes the ABI."), so probably best fits --enable-dbgutil.  However, 
at
least on Linux, --with-pydebug produces
workdir/UnpackedTarball/python3/libpython3.7dm.so rather than
workdir/UnpackedTarball/python3/libpython3.so, so would have required 
further
modifications.  Also, in a Linux UBsan build, making ExternalProject_python3
would have started to cause some "applying zero offset to null pointer"
failures, but which would have been easy to fix.)

(I noticed the missing -O0 when I attached gdb to an 
instdir/program/python.bin
process and `py-bt` only showed "(frame information optimized out)" frames,
which this change fixes for --disable-optimized builds.)

Change-Id: I9583e60692ae7130377422062f3c6df9334d693f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92362
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 816315981a56..7e320caf9bc7 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -69,6 +69,12 @@ ifneq (,$(ENABLE_VALGRIND))
 python3_cflags += $(VALGRIND_CFLAGS)
 endif
 
+# This happens to override the -O3 in the default OPT set in
+# workdir/UnpackedTarball/python3/configure.ac while keeping the other content 
of that OPT intact:
+ifeq ($(ENABLE_OPTIMIZED),)
+python3_cflags += $(gb_COMPILERNOOPTFLAGS)
+endif
+
 $(call gb_ExternalProject_get_state_target,python3,build) :
$(call gb_Trace_StartRange,python3,EXTERNAL)
$(call gb_ExternalProject_run,build,\
@@ -84,9 +90,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
--prefix=/python-inst \
--with-system-expat \
$(if $(filter AIX,$(OS)), \
-   --disable-ipv6 --with-threads OPT="-g0 -fwrapv -O3 
-Wall", \
-   $(if $(gb_Module_CURRENTMODULE_DEBUG_ENABLED), \
-   OPT="$(gb_COMPILERNOOPTFLAGS) 
$(gb_DEBUGINFO_FLAGS)")) \
+   --disable-ipv6 --with-threads OPT="-g0 -fwrapv -O3 
-Wall") \
$(if $(filter MACOSX,$(OS)), \
$(if $(filter 
INTEL,$(CPUNAME)),--enable-universalsdk=$(MACOSX_SDK_PATH) \
 --with-universal-archs=intel \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-02-19 Thread Michael Stahl (via logerrit)
 external/python3/ExternalPackage_python3.mk |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit e62b9937ed33388055560ca0710990742b530aec
Author: Michael Stahl 
AuthorDate: Tue Feb 18 18:33:19 2020 +0100
Commit: Michael Stahl 
CommitDate: Wed Feb 19 10:24:11 2020 +0100

tdf#130404 python3: add new windows .pyd modules for 3.7

Unfortunately forgot that in b10be5d48433076f0b7238d818020f708553e114

Change-Id: I59043a576c45f9329a3fad9a5d50e7fefa901934
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88977
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index bdec26108144..4dfc3b196f82 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -23,16 +23,19 @@ ifeq ($(MSVC_USE_DEBUG_RUNTIME),)
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYTHON_VERSION_MAJOR).dll,PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR).dll))
 endif
 $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
+   PCbuild/$(python_arch_subdir)_asyncio$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_ctypes$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_ctypes_test$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_decimal$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_elementtree$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_msi$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd 
\
PCbuild/$(python_arch_subdir)_multiprocessing$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
+   PCbuild/$(python_arch_subdir)_queue$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_socket$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_ssl$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd 
\
PCbuild/$(python_arch_subdir)_testbuffer$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_testcapi$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
+   PCbuild/$(python_arch_subdir)_testconsole$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)pyexpat$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)select$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)unicodedata$(if 
$(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-01-24 Thread Jan-Marek Glogowski (via logerrit)
 external/python3/python-3.7.6-msvc-ssl.patch.1 |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit 4ff12ba6f4639c73587f2bb58afcc3ca6fb30105
Author: Jan-Marek Glogowski 
AuthorDate: Fri Jan 24 13:33:37 2020 +
Commit: Jan-Marek Glogowski 
CommitDate: Fri Jan 24 21:14:48 2020 +0100

python3+WIN: don't fail copy of openssl DLLs+PDBs

The LO python3 target fails for me on Windows with:
  
C:\lode\dev\core\workdir\UnpackedTarball\python3\PCBuild\openssl.props(24,5):
error MSB3030: Datei 
"C:/lode/dev/core/workdir/UnpackedTarball/openssl/out32dll\libcrypto-1_1.dll"
konnte nicht kopiert werden, da die Datei nicht gefunden wurde.
[C:\lode\dev\core\workdir\UnpackedTarball\python3\PCBuild\_ssl.vcxproj]

Same for
  "C:/lode/dev/core/workdir/UnpackedTarball/openssl/out32dll\libssl-1_1.pdb"
  
"C:/lode/dev/core/workdir/UnpackedTarball/openssl/out32dll\libcrypto-1_1.pdb"
  "C:/lode/dev/core/workdir/UnpackedTarball/openssl/out32dll\libssl-1_1.dll"

Other files were also renamed in a previous hunk of this patch.

For other people these failures are silently ignored, but they
show up in their python3 build.log. But my msbuild version
15.9.21+g9802d43bc3 from VS2017 fails hard on these errors.

So this just adapt the pdb and dll names to match the previous
renames, which passes the copy calls, so the build continues.

Change-Id: Iffc848c334caec534f6e99f8bf83a42da570bbb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87358
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

diff --git a/external/python3/python-3.7.6-msvc-ssl.patch.1 
b/external/python3/python-3.7.6-msvc-ssl.patch.1
index 14e7cca0a8ce..e8e94f674c1f 100644
--- a/external/python3/python-3.7.6-msvc-ssl.patch.1
+++ b/external/python3/python-3.7.6-msvc-ssl.patch.1
@@ -23,3 +23,18 @@ No use for applink.c OPENSSL_Applink, everything is compiled 
with the same MSVC
  


+@@ -15,10 +15,10 @@
+ <_DLLSuffix Condition="$(Platform) == 
'ARM64'">$(_DLLSuffix)-arm64
+   
+   
+-<_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" />
+-<_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).pdb" />
+-<_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).dll" />
+-<_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).pdb" />
++<_SSLDLL Include="$(opensslOutDir)\libeay32.dll" />
++<_SSLDLL Include="$(opensslOutDir)\libeay32.pdb" />
++<_SSLDLL Include="$(opensslOutDir)\ssleay32.dll" />
++<_SSLDLL Include="$(opensslOutDir)\ssleay32.pdb" />
+   
+   
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-01-09 Thread Michael Stahl (via logerrit)
 external/python3/ExternalPackage_python3.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit db75ec187051090e2eb1b13745fe11a2a5bb1dd0
Author: Michael Stahl 
AuthorDate: Thu Jan 9 11:01:15 2020 +0100
Commit: Michael Stahl 
CommitDate: Thu Jan 9 13:36:28 2020 +0100

python3: fix 32-bit x86 build

The reinvented wheel needs another subst.

Change-Id: I5bc01b0213f00d383cf971d34f0dc2a9e6817ab9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86480
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 87361941fa88..bdec26108144 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -137,7 +137,7 @@ endif
 # put -pc in its linux platform triplets, so filter that...
 ifneq ($(OS),WNT)
 $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
-   LO_lib/_sysconfigdata_m_$(python3_MACHDEP)_$(subst 
-pc,,$(HOST_PLATFORM)).py \
+   LO_lib/_sysconfigdata_m_$(python3_MACHDEP)_$(subst i686,i386,$(subst 
-pc,,$(HOST_PLATFORM))).py \
 ))
 endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-01-08 Thread Michael Stahl (via logerrit)
 external/python3/ExternalPackage_python3.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit ebb6c2576af8d883ddf8eb09e3969c50d9ac07c9
Author: Michael Stahl 
AuthorDate: Wed Jan 8 15:05:34 2020 +0100
Commit: Michael Stahl 
CommitDate: Wed Jan 8 18:22:06 2020 +0100

python3: remove _uuid module

Of course the autotetection in setup.py strikes again, the build will
fail if the user doesn't have libuuid-devel installed; we'd need to add
a check to LO's configure.ac for libuuid.

Let's just not ship it, not sure if anybody needs it.

Change-Id: I9079309da7d9c16e666fbab30542365124f97860
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86433
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 60eeb022160c..87361941fa88 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -114,7 +114,6 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor

LO_lib/_testimportmultiple.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
 \

LO_lib/_testmultiphase.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
 \

LO_lib/unicodedata.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
-   
LO_lib/_uuid.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/xxlimited.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/_xxtestfuzz.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
LO_lib/zlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so 
\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2018-08-14 Thread Libreoffice Gerrit user
 external/python3/ExternalProject_python3.mk |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 0f2f719ccd5544eb37d1aacb0a50c317ae963e50
Author: Tor Lillqvist 
AuthorDate: Tue Aug 14 21:23:02 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Aug 15 07:52:55 2018 +0200

tdf#106324: Remove unnecessary test folder from LibreOfficePython framework

No need to distribute that, apparently. We don't ship it on Windows,
either.

Change-Id: I76bf77311caceccd07afb0afa2f097b63f58bf54
Reviewed-on: https://gerrit.libreoffice.org/59034
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 69a82c3f6011..7e9952ac6cc7 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_ExternalProject_register_targets,python3,\
fixscripts \
fixinstallnames \
executables \
+   removeunnecessarystuff \
) \
 ))
 
@@ -149,6 +150,10 @@ $(call 
gb_ExternalProject_get_state_target,python3,executables) : $(call gb_Exte
@executable_path/../LibreOfficePython $$file ; done
touch $@
 
+$(call gb_ExternalProject_get_state_target,python3,removeunnecessarystuff) : 
$(call gb_ExternalProject_get_state_target,python3,build)
+   $(call gb_Output_announce,python3 - remove the stuff we don't need to 
ship,build,CUS,5)
+   rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test
+
 endif
 
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2018-06-05 Thread Noel Grandin
 external/python3/ExternalProject_python3.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 92c745f95e2105104da7f0749d72e6cf761c1b58
Author: Noel Grandin 
Date:   Sat Jun 2 16:35:54 2018 +0200

try building python in parallel on windows

Change-Id: Ib920ae6d6a3ced06ffe9f1fc4adba67d95f99a17
Reviewed-on: https://gerrit.libreoffice.org/55207
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 09edc2a099f2..69a82c3f6011 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -35,6 +35,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build \
/p:Configuration=$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
+   /maxcpucount \
$(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 
/p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 
/p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
$(if $(filter 
150-10,$(VCVER)-$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION))
 \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2018-04-07 Thread Stephan Bergmann
 external/python3/ExternalPackage_python3.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 93e6a823bd8543d30621769c7b34d6261ea5cb01
Author: Stephan Bergmann 
Date:   Sat Apr 7 12:19:43 2018 +0200

external/python3: Drop nis.cpython-*m.so

At least Fedora 28 glibc-2.27-8.fc28 no longer provides the nis development
headers and libraries.  (It only still contains some binaries for backwards
compatibility, in the libnsl sub-package: "This package provides the legacy
version of libnsl library, for accessing NIS services.")

There is probably no real need to have nis.cpython-*m.so contained in
external/python3/ExternalPackage_python3.mk (it probably just happened to 
build
fine when that list was originally created, so was included).

Change-Id: Ic6128fd872432005c0ded76640c5b56781ca69a1
Reviewed-on: https://gerrit.libreoffice.org/52535
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 8617e0efb34f..dc3d739c295b 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -83,7 +83,6 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
LO_lib/mmap.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so 
\

LO_lib/_multibytecodec.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
 \

LO_lib/_multiprocessing.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
 \
-   LO_lib/nis.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/_opcode.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/ossaudiodev.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/parser.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2018-01-30 Thread Mike Kaganski
 external/python3/python-msvc-disable-sse2.patch.1 |   23 --
 1 file changed, 23 deletions(-)

New commits:
commit 37070fc8dae87e0649da056d96a9a9bca810cca5
Author: Mike Kaganski 
Date:   Tue Jan 30 08:28:29 2018 +0100

Remove obsolete patch

A leftover from commit 147cb6a2ae63debed3dd500e19b2776cebbc0031

Change-Id: I1744f87dfe508aea6cb17b4411594dad5771b028
Reviewed-on: https://gerrit.libreoffice.org/48877
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/external/python3/python-msvc-disable-sse2.patch.1 
b/external/python3/python-msvc-disable-sse2.patch.1
deleted file mode 100644
index 399aa6016dfc..
--- a/external/python3/python-msvc-disable-sse2.patch.1
+++ /dev/null
@@ -1,23 +0,0 @@
-fdo#82430 disable SSE2 default of MSVC2012
-
 python3/PCbuild/release.props.old  2014-10-01 23:47:33.348095403 +0200
-+++ python3/PCbuild/release.props  2014-10-01 23:48:05.051092945 +0200
-@@ -9,6 +9,7 @@
-   
- 
-   
NDEBUG;%(PreprocessorDefinitions)
-+  
StreamingSIMDExtensions
- 
-   
-   
 python3/PCbuild/make_buildinfo.c.orig  2014-11-03 00:48:58.84100 
+0100
-+++ python3/PCbuild/make_buildinfo.c   2014-11-03 00:49:16.26620 +0100
-@@ -109,7 +109,7 @@
- 
- int main(int argc, char*argv[])
- {
--char command[CMD_SIZE] = "cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS 
-DWIN32 -D_WINDLL ";
-+char command[CMD_SIZE] = "cl.exe -arch:SSE -c -D_WIN32 -DUSE_DL_EXPORT 
-D_WINDOWS -DWIN32 -D_WINDLL ";
- char tmppath[CMD_SIZE] = "";
- int do_unlink, result;
- char *tmpdir = NULL;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2017-09-19 Thread Tor Lillqvist
 external/python3/UnpackedTarball_python3.mk  |8 ++
 external/python3/python3-osx-avoid-new-10.13.patch.1 |   61 +++
 2 files changed, 69 insertions(+)

New commits:
commit 018f875cb03aadd6fbb56cad463fef3ab932e274
Author: Tor Lillqvist 
Date:   Wed Sep 20 00:18:01 2017 +0300

Avoid API present from macOS 10.13 if building to run on older

utimensat() and futimens() are new in 10.13.

Change-Id: I03448adb17b40a646771c37179bd70c787547ca3

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index ce2087497db8..35d6e643a1b0 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -46,4 +46,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3, \
 ))
 endif
 
+ifeq ($(OS),MACOSX)
+ifneq ($(filter 1090 101000 101100 101200,$(MAC_OS_X_VERSION_MIN_REQUIRED)),)
+$(eval $(call gb_UnpackedTarball_add_patches,python3,\
+   external/python3/python3-osx-avoid-new-10.13.patch.1 \
+))
+endif
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/python3/python3-osx-avoid-new-10.13.patch.1 
b/external/python3/python3-osx-avoid-new-10.13.patch.1
new file mode 100644
index ..93bf5a078e01
--- /dev/null
+++ b/external/python3/python3-osx-avoid-new-10.13.patch.1
@@ -0,0 +1,61 @@
+-*- Mode: Diff -*-
+
+--- python3/Modules/posixmodule.c
 python3/Modules/posixmodule.c
+@@ -4565,12 +4565,12 @@
+ } \
+ 
+ 
+-#if defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMENSAT)
++#if defined(HAVE_FUTIMESAT)
+ 
+ static int
+ utime_dir_fd(utime_t *ut, int dir_fd, char *path, int follow_symlinks)
+ {
+-#ifdef HAVE_UTIMENSAT
++#if 0
+ int flags = follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW;
+ UTIME_TO_TIMESPEC;
+ return utimensat(dir_fd, path, time, flags);
+@@ -4591,12 +4591,12 @@
+ #define FUTIMENSAT_DIR_FD_CONVERTER dir_fd_unavailable
+ #endif
+ 
+-#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMENS)
++#if defined(HAVE_FUTIMES)
+ 
+ static int
+ utime_fd(utime_t *ut, int fd)
+ {
+-#ifdef HAVE_FUTIMENS
++#if 0
+ UTIME_TO_TIMESPEC;
+ return futimens(fd, time);
+ #else
+@@ -4619,7 +4619,7 @@
+ static int
+ utime_nofollow_symlinks(utime_t *ut, char *path)
+ {
+-#ifdef HAVE_UTIMENSAT
++#if 0
+ UTIME_TO_TIMESPEC;
+ return utimensat(DEFAULT_DIR_FD, path, time, AT_SYMLINK_NOFOLLOW);
+ #else
+@@ -4635,7 +4635,7 @@
+ static int
+ utime_default(utime_t *ut, char *path)
+ {
+-#ifdef HAVE_UTIMENSAT
++#if 0
+ UTIME_TO_TIMESPEC;
+ return utimensat(DEFAULT_DIR_FD, path, time, 0);
+ #elif defined(HAVE_UTIMES)
+@@ -4836,7 +4836,7 @@
+ else
+ #endif
+ 
+-#if defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMENSAT)
++#if defined(HAVE_FUTIMESAT)
+ if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks))
+ result = utime_dir_fd(, dir_fd, path->narrow, follow_symlinks);
+ else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2017-01-17 Thread Stephan Bergmann
 external/python3/ubsan.patch.0 |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit d0f3363aa8db533ba6fe356053caaf79a1507d14
Author: Stephan Bergmann 
Date:   Tue Jan 17 21:07:01 2017 +0100

Fix patch

The original patch caused compilation of x86-ffi64.c to fail, but that
failure was silently ignored by the build.

Change-Id: I93a0cde041b8f9546873d6cc30c1b690da098642

diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index ab2acd3..936a8ac 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -43,15 +43,15 @@
tramp[0] = 0xbb49;  /* mov , %r11 */
 -  *(void* volatile*)[1] = ffi_closure_unix64;
 +  tramp[1] = (unsigned short) ffi_closure_unix64;
-+  tramp[2] = (unsigned short) (ffi_closure_unix64 >> 16);
-+  tramp[3] = (unsigned short) (ffi_closure_unix64 >> 32);
-+  tramp[4] = (unsigned short) (ffi_closure_unix64 >> 48);
++  tramp[2] = (unsigned short) (((unsigned long)ffi_closure_unix64) >> 16);
++  tramp[3] = (unsigned short) (((unsigned long)ffi_closure_unix64) >> 32);
++  tramp[4] = (unsigned short) (((unsigned long)ffi_closure_unix64) >> 48);
tramp[5] = 0xba49;  /* mov , %r10 */
 -  *(void* volatile*)[6] = closure;
 +  tramp[6] = (unsigned short) closure;
-+  tramp[7] = (unsigned short) (closure >> 16);
-+  tramp[8] = (unsigned short) (closure >> 32);
-+  tramp[9] = (unsigned short) (closure >> 48);
++  tramp[7] = (unsigned short) (((unsigned long)closure) >> 16);
++  tramp[8] = (unsigned short) (((unsigned long)closure) >> 32);
++  tramp[9] = (unsigned short) (((unsigned long)closure) >> 48);
  
/*  Set the carry bit if the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp.  */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3 external/python33 scripting/source

2016-12-18 Thread Julien Nabet
 external/python3/ExternalPackage_python3.mk  |1 +
 external/python33/ExternalPackage_python3.mk |1 +
 scripting/source/pyprov/mailmerge.py |1 +
 3 files changed, 3 insertions(+)

New commits:
commit 486efbfc74890582b16f858b8e937d4ae9b66f64
Author: Julien Nabet 
Date:   Sun Dec 18 19:17:53 2016 +0100

tdf#103363: add unicodedata and import idna encoding for mailmerge

Thank you Moggi for your help on how to add unicodedata module to Python!

Change-Id: I071e9279d1de4748f9443ac2d624fe925288e408
Reviewed-on: https://gerrit.libreoffice.org/32140
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 045b4c1..6cd766f 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -112,6 +112,7 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor

LO_lib/_testcapi.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/_testimportmultiple.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
 \

LO_lib/_testmultiphase.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
 \
+   
LO_lib/unicodedata.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/xxlimited.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
LO_lib/zlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so 
\
 ))
diff --git a/external/python33/ExternalPackage_python3.mk 
b/external/python33/ExternalPackage_python3.mk
index a2f51c1..9341e9c 100644
--- a/external/python33/ExternalPackage_python3.mk
+++ b/external/python33/ExternalPackage_python3.mk
@@ -106,6 +106,7 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor

LO_lib/_testbuffer.cpython-$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)m.so \

LO_lib/_testcapi.cpython-$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)m.so \
LO_lib/time.cpython-$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)m.so \
+   
LO_lib/unicodedata.cpython-$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)m.so \
LO_lib/zlib.cpython-$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)m.so \
 ))
 endif
diff --git a/scripting/source/pyprov/mailmerge.py 
b/scripting/source/pyprov/mailmerge.py
index c8867aa..235472b 100644
--- a/scripting/source/pyprov/mailmerge.py
+++ b/scripting/source/pyprov/mailmerge.py
@@ -17,6 +17,7 @@ import unohelper
 import uno
 import re
 import os
+import encodings.idna
 
 #to implement com::sun::star::mail::XMailServiceProvider
 #and
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2016-09-16 Thread Stephan Bergmann
 external/python3/ExternalProject_python3.mk |1 
 external/python3/UnpackedTarball_python3.mk |6 +++
 external/python3/internal-zlib.patch.0  |   46 
 3 files changed, 53 insertions(+)

New commits:
commit 5fb8a050210a7cabf49daac0da8f80b94d60de2c
Author: Stephan Bergmann 
Date:   Fri Sep 16 16:07:47 2016 +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.)

Change-Id: I9286975917ddf643a22803561677af035e66fb98
Reviewed-on: https://gerrit.libreoffice.org/28964
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 757d782..ef9246e 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 0e706d7..0c471f0 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 000..d045f46
--- /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


[Libreoffice-commits] core.git: external/python3

2016-08-04 Thread Tor Lillqvist
 external/python3/ExternalProject_python3.mk |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 55a4fd60b1df233ad0b35ed302f4dd0e308d3551
Author: Tor Lillqvist 
Date:   Thu Aug 4 23:09:43 2016 +0300

Don't use functions introduced in 10.12 when building to run on older

getentropy() and clock_gettime() are new in macOS Sierra (10.12).

Change-Id: I93640bbf20056d925c3116df336aeaebaaffda18

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index e81166f..757d782 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -57,6 +57,12 @@ endif
 
 $(call gb_ExternalProject_get_state_target,python3,build) :
$(call gb_ExternalProject_run,build,\
+   $(if $(filter MACOSX,$(OS)), \
+   $(if $(filter 10.8 10.9 10.10 
10.11,$(MACOSX_DEPLOYMENT_TARGET)), \
+   ac_cv_func_getentropy=no \
+   ac_cv_func_clock_gettime=no \
+   ) \
+   ) \
./configure \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)) \
$(if $(ENABLE_VALGRIND),--with-valgrind) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2016-02-22 Thread David Ostrovsky
 external/python3/ExternalPackage_python3.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 761053abd83155d5333e098bfa114624437ae553
Author: David Ostrovsky 
Date:   Mon Feb 22 21:29:05 2016 +0100

Fix python packaging on MSVC 14.0, 32bit

Change-Id: I5604aa21981c216e992cbefae043acfd0ab07bbd
Reviewed-on: https://gerrit.libreoffice.org/22626
Tested-by: Jenkins 
Reviewed-by: David Ostrovsky 

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 4f03524..07a875c 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -14,6 +14,8 @@ $(eval $(call 
gb_ExternalPackage_use_external_project,python3,python3))
 ifeq ($(OS)-$(COM),WNT-MSC)
 ifeq ($(CPUNAME),X86_64)
 python_arch_subdir=amd64/
+else
+python_arch_subdir=win32/
 endif
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/bin/python.exe,PCbuild/$(python_arch_subdir)python$(if
 $(MSVC_USE_DEBUG_RUNTIME),_d).exe))
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if
 
$(MSVC_USE_DEBUG_RUNTIME),_d).dll,PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if
 $(MSVC_USE_DEBUG_RUNTIME),_d).dll))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2016-02-22 Thread Michael Stahl
 external/python3/UnpackedTarball_python3.mk  |1 -
 external/python3/python-3.3.5-vs2013.patch.1 |   14 --
 2 files changed, 15 deletions(-)

New commits:
commit eea5cb158e907fa1318f0689025bafce3caf8ae1
Author: Michael Stahl 
Date:   Mon Feb 22 18:22:13 2016 +0100

python3: drop obsolete patch, cannot build 3.5 with MSVC 2013

Change-Id: I1a6b41bb95bf4edb8e81f2db54624a0892c79bc5

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index c3a4ef6..0e706d7 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -26,7 +26,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/python-3.3.0-pythreadstate.patch.1 \
external/python3/python-3.3.0-clang.patch.1 \
external/python3/python-3.3.5-pyexpat-symbols.patch.1 \
-   $(if $(filter 120,$(VCVER)), 
external/python3/python-3.3.5-vs2013.patch.1) \
external/python3/python-lsan.patch.0 \
external/python3/ubsan.patch.0 \
external/python3/python-3.5.tweak.strip.soabi.patch \
diff --git a/external/python3/python-3.3.5-vs2013.patch.1 
b/external/python3/python-3.3.5-vs2013.patch.1
deleted file mode 100644
index 5540ea1..000
--- a/external/python3/python-3.3.5-vs2013.patch.1
+++ /dev/null
@@ -1,14 +0,0 @@
--*- Mode:Diff -*-
 python3/PC/pyconfig.h
-+++ python3/PC/pyconfig.h
-@@ -602,6 +602,10 @@
- /* Define if you have readlink.  */
- /* #undef HAVE_READLINK */
- 
-+#if defined(_MSC_VER) && _MSC_VER >= 1800
-+#define HAVE_ROUND
-+#endif
-+
- /* Define if you have select.  */
- /* #undef HAVE_SELECT */
- 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2016-02-21 Thread Norbert Thiebaud
 external/python3/UnpackedTarball_python3.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3e1782f05b9217d941eeff821df98df5f3e8da76
Author: Norbert Thiebaud 
Date:   Sun Feb 21 16:26:55 2016 -0600

WaE vs2015 double define

Change-Id: I279b5df3f9705ca266f2f4efb1e93e59cbbdabd7
Reviewed-on: https://gerrit.libreoffice.org/22603
Tested-by: Jenkins 
Reviewed-by: Norbert Thiebaud 

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index 37b05c9..c3a4ef6 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -26,7 +26,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/python-3.3.0-pythreadstate.patch.1 \
external/python3/python-3.3.0-clang.patch.1 \
external/python3/python-3.3.5-pyexpat-symbols.patch.1 \
-   external/python3/python-3.3.5-vs2013.patch.1 \
+   $(if $(filter 120,$(VCVER)), 
external/python3/python-3.3.5-vs2013.patch.1) \
external/python3/python-lsan.patch.0 \
external/python3/ubsan.patch.0 \
external/python3/python-3.5.tweak.strip.soabi.patch \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2015-10-27 Thread David Ostrovsky
 external/python3/ExternalProject_python3.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit cd15605876bb0bfa8921a8c1779feed49189d165
Author: David Ostrovsky 
Date:   Mon Jul 27 08:13:21 2015 +0200

Fix python3 on MSVC 14.0

Change-Id: I2882a97d0e078bd3217170e7906cd41680fbc4a4
Reviewed-on: https://gerrit.libreoffice.org/17360
Tested-by: Jenkins 
Reviewed-by: David Ostrovsky 

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
old mode 100644
new mode 100755
index 72afab7..200588f
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -37,6 +37,8 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
$(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 \
/p:VisualStudioVersion=12.0 /ToolsVersion:12.0) 
\
+   $(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 \
+   /p:VisualStudioVersion=14.0 /ToolsVersion:14.0) 
\
,PCBuild)
 
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2015-10-27 Thread Stephan Bergmann
 external/python3/python-3.3.3-disable-obmalloc.patch.0 |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 67466a19752d73540e13697b91ca58429f6a64ac
Author: Stephan Bergmann 
Date:   Tue Oct 27 10:06:36 2015 +0100

Fix Python 3.5 sizeof(PyGC_Head) for UBSan

...by again using 'long double' instead of 'double' to "force worst-case
alignment," just like Python 3.3 used to do.  This fixes 
-fsanitize=alignment
failures like

> workdir/UnpackedTarball/python3/Modules/_ctypes/_ctypes.c:2923:10: 
runtime error: member access within misaligned address 0x6110007af498 for type 
'CDataObject' (aka 'struct tagCDataObject'), which requires 16 byte alignment
> 0x6110007af498: note: pointer points here
>  ff ff ff ff  01 00 00 00 00 00 00 00  98 98 17 00 90 61 00 00  00 00 00 
00 00 00 00 00  00 00 00 00
>   ^
>  GenericPyCData_new 
workdir/UnpackedTarball/python3/Modules/_ctypes/_ctypes.c:2923:10
>  PyCFuncPtr_new 
workdir/UnpackedTarball/python3/Modules/_ctypes/_ctypes.c:3385:29
>  type_call workdir/UnpackedTarball/python3/Objects/typeobject.c:908:11
>  [...]

during PythonTest_dbaccess_python.

Change-Id: I8cc65823e1bc65807ec30c97a9099462e55c996d

diff --git a/external/python3/python-3.3.3-disable-obmalloc.patch.0 
b/external/python3/python-3.3.3-disable-obmalloc.patch.0
index 3b3abd0..a162298 100644
--- a/external/python3/python-3.3.3-disable-obmalloc.patch.0
+++ b/external/python3/python-3.3.3-disable-obmalloc.patch.0
@@ -1,3 +1,14 @@
+--- Include/objimpl.h
 Include/objimpl.h
+@@ -250,7 +250,7 @@
+ union _gc_head *gc_prev;
+ Py_ssize_t gc_refs;
+ } gc;
+-double dummy;  /* force worst-case alignment */
++long double dummy;  /* force worst-case alignment */
+ } PyGC_Head;
+ 
+ extern PyGC_Head *_PyGC_generation0;
 --- Objects/obmalloc.c
 +++ Objects/obmalloc.c
 @@ -413,8 +413,8 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2015-10-26 Thread Stephan Bergmann
 external/python3/python-3.3.3-disable-obmalloc.patch.0 |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 429876d12bba23491ca3b69b02b5ce4c6d2311ab
Author: Stephan Bergmann 
Date:   Mon Oct 26 10:42:09 2015 +0100

Adapt patch

Change-Id: I7945eed053a671ad0c755284a372d16083e596b2

diff --git a/external/python3/python-3.3.3-disable-obmalloc.patch.0 
b/external/python3/python-3.3.3-disable-obmalloc.patch.0
index 639cff6..3b3abd0 100644
--- a/external/python3/python-3.3.3-disable-obmalloc.patch.0
+++ b/external/python3/python-3.3.3-disable-obmalloc.patch.0
@@ -1,8 +1,8 @@
 --- Objects/obmalloc.c
 +++ Objects/obmalloc.c
-@@ -9,8 +9,8 @@
-  #endif
- #endif
+@@ -413,8 +413,8 @@
+ 
+ #ifdef WITH_PYMALLOC
  
 +#define WITH_VALGRIND
  #ifdef WITH_VALGRIND
@@ -10,7 +10,7 @@
  
  /* If we're using GCC, use __builtin_expect() to reduce overhead of
 the valgrind checks */
-@@ -771,7 +771,7 @@
+@@ -1181,7 +1181,7 @@
  
  #ifdef WITH_VALGRIND
  if (UNLIKELY(running_on_valgrind == -1))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2015-10-25 Thread David Ostrovsky
 external/python3/ExternalPackage_python3.mk |2 --
 1 file changed, 2 deletions(-)

New commits:
commit c2e4e74138c0a816f6aace4d336c7d8cb611d4fa
Author: David Ostrovsky 
Date:   Sun Oct 25 11:17:30 2015 +0100

Python3.5: Remove external dependencies: readline and lzma

Change-Id: Ie5cd1c0e186920f3b34d3986aa995a5c3be9c58a

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index e132aab..4f03524 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -82,7 +82,6 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor

LO_lib/_heapq.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/_json.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/_lsprof.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
-   
LO_lib/_lzma.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
LO_lib/math.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so 
\
LO_lib/mmap.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so 
\

LO_lib/_multibytecodec.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
 \
@@ -95,7 +94,6 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor

LO_lib/_posixsubprocess.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
 \

LO_lib/pyexpat.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/_random.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
-   
LO_lib/readline.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/resource.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/select.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \

LO_lib/_sha1.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2015-10-22 Thread Caolán McNamara
 external/python3/ubsan.patch.0 |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit 02effc8ef62ba30fc6bd8a57281105e3aecc29ce
Author: Caolán McNamara 
Date:   Thu Oct 22 09:56:47 2015 +0100

ubsan failure on bootstrapping crashtesting

Change-Id: Ie2b338bdd75f26953c758b64711e60b6f5ce9c83

diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index 32a079e..e379817 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -62,3 +62,18 @@
  Py_INCREF(v);
  #ifdef COUNT_ALLOCS
  if (ival >= 0)
+--- Modules/_ctypes/_ctypes.c
 Modules/_ctypes/_ctypes.c
+@@ -1328,8 +1328,10 @@
+ if (stgdict->shape == NULL)
+ goto error;
+ stgdict->shape[0] = length;
+-memmove(>shape[1], itemdict->shape,
+-sizeof(Py_ssize_t) * (stgdict->ndim - 1));
++if (itemdict->shape) {
++memmove(>shape[1], itemdict->shape,
++sizeof(Py_ssize_t) * (stgdict->ndim - 1));
++}
+ 
+ itemsize = itemdict->size;
+ if (length * itemsize < 0) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2015-06-02 Thread Stephan Bergmann
 external/python3/ubsan.patch.0 |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 6d46d37685e845ae1bf26016bcb447f9ec7803ae
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Jun 2 15:21:41 2015 +0200

external/python3: -fsanitize=nonnull-attribute

Change-Id: I447d1f01c24a934e643077dc271872e850b204bc

diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index 39717d2..020f4bf 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -22,6 +22,15 @@
   This is clc or stc, together with the first byte of the jmp.  */
 --- Objects/listobject.c
 +++ Objects/listobject.c
+@@ -641,7 +641,7 @@
+ goto Error;
+ }
+ }
+-memcpy(recycle, item[ilow], s);
++if (s != 0) memcpy(recycle, item[ilow], s);
+ 
+ if (d  0) { /* Delete -d items */
+ memmove(item[ihigh+d], item[ihigh],
 @@ -2036,7 +2036,7 @@
  if (keys != NULL) {
  for (i = 0; i  saved_ob_size; i++)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2015-02-23 Thread Stephan Bergmann
 external/python3/ExternalProject_python3.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6a150d772f6192579af95bef314cae7fca592d5b
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Feb 23 18:06:32 2015 +0100

Clang -fsanitize=vptr: ensure __ubsan_vptr_type_cache in python.bin

Change-Id: I7b08b7b6376db29b392243f24f6ad3ccf2ee8655

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 12a88c1..29179d5 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -81,7 +81,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
$(if $(SYSBASE), -I$(SYSBASE)/usr/include) \
) \
$(if $(python3_cflags),CFLAGS='$(python3_cflags)') \
-   $(if $(filter -fsanitize=address,$(CC)),LINKCC=$(CXX)) \
+   $(if $(filter -fsanitize=%,$(CC)),LINKCC=$(CXX)) \
LDFLAGS=$(strip $(LDFLAGS) \
$(if $(SYSTEM_OPENSSL),,-L$(call 
gb_UnpackedTarball_get_dir,openssl)) \
$(if $(SYSTEM_EXPAT),,-L$(gb_StaticLibrary_WORKDIR)) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2015-02-02 Thread Robert Antoni Buj i Gelonch
 external/python3/ExternalProject_python3.mk |4 
 1 file changed, 4 insertions(+)

New commits:
commit 40432ac6caa478474d73786f95b808c14e106ff2
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Sun Nov 2 16:42:47 2014 +0100

pyhon: add lib-dynload libs to fixinstallnames (OS X)

Change-Id: Iab76060952ae8c1b64d3ff32e5ae8f5212e016b0
Signed-off-by: Stephan Bergmann sberg...@redhat.com

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 045892e..12a88c1 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -128,6 +128,10 @@ $(call 
gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_

$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython
 \
@executable_path/../../../../LibreOfficePython \

$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/Resources/Python.app/Contents/MacOS/LibreOfficePython
+   for file in $(shell find 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload
 -name *.so) ; do \
+   $(INSTALL_NAME_TOOL) -change \
+   
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython
 \
+   @loader_path/../../../LibreOfficePython $$file ; done
touch $@
 
 # also delete binaries that are symlinked in scp2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2015-01-13 Thread Stephan Bergmann
 external/python3/ubsan.patch.0 |   22 ++
 1 file changed, 22 insertions(+)

New commits:
commit e376bc04dc426ff3470647fa1abd4e28d263f00e
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Jan 13 16:12:55 2015 +0100

external/python3: Work around -fsanitize=alignment

Change-Id: I33976bc96fc78dd0210d9aec6d1ec925f514c7f2

diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index acfd189..39717d2 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -1,3 +1,25 @@
+--- Modules/_ctypes/libffi/src/x86/ffi64.c
 Modules/_ctypes/libffi/src/x86/ffi64.c
+@@ -545,11 +545,15 @@
+   tramp = (volatile unsigned short *) closure-tramp[0];
+ 
+   tramp[0] = 0xbb49;  /* mov code, %r11 */
+-  *((unsigned long long * volatile) tramp[1])
+-= (unsigned long) ffi_closure_unix64;
++  tramp[1] = (unsigned long) ffi_closure_unix64;
++  tramp[2] = ((unsigned long) ffi_closure_unix64)  16;
++  tramp[3] = ((unsigned long) ffi_closure_unix64)  32;
++  tramp[4] = ((unsigned long) ffi_closure_unix64)  48;
+   tramp[5] = 0xba49;  /* mov data, %r10 */
+-  *((unsigned long long * volatile) tramp[6])
+-= (unsigned long) codeloc;
++  tramp[6] = (unsigned long) codeloc;
++  tramp[7] = ((unsigned long) codeloc)  16;
++  tramp[8] = ((unsigned long) codeloc)  32;
++  tramp[9] = ((unsigned long) codeloc)  48;
+ 
+   /* Set the carry bit iff the function uses any sse registers.
+  This is clc or stc, together with the first byte of the jmp.  */
 --- Objects/listobject.c
 +++ Objects/listobject.c
 @@ -2036,7 +2036,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2015-01-11 Thread David Ostrovsky
 external/python3/python-3.3.0-msvc-x64.patch.1 |   40 +
 1 file changed, 40 insertions(+)

New commits:
commit 5ae245a8894dbda2915a1bf695e25ef8bb17096f
Author: David Ostrovsky da...@ostrovsky.org
Date:   Sun Jan 11 22:36:04 2015 +0100

Fix Python build in debug mode on x86_64 platform on windows

8a6c5b2f fixed Python build in release mode for x64, but missed to do the
same for the debug mode.

Change-Id: I9762b4089ec95fbd8af12e581fbe8577be5f802a
Reviewed-on: https://gerrit.libreoffice.org/13089
Reviewed-by: David Ostrovsky da...@ostrovsky.org
Tested-by: David Ostrovsky da...@ostrovsky.org

diff --git a/external/python3/python-3.3.0-msvc-x64.patch.1 
b/external/python3/python-3.3.0-msvc-x64.patch.1
index 8882a1c..a92acc7 100644
--- a/external/python3/python-3.3.0-msvc-x64.patch.1
+++ b/external/python3/python-3.3.0-msvc-x64.patch.1
@@ -208,6 +208,35 @@ diff -ru python3/PCbuild/pcbuild.sln 
python3.new/PCbuild/pcbuild.sln
  /PostBuildEvent
/ItemDefinitionGroup
ItemDefinitionGroup 
Condition='$(Configuration)|$(Platform)'=='Debug|Win32'
+@@ -172,9 +172,9 @@
+   ItemDefinitionGroup 
Condition='$(Configuration)|$(Platform)'=='Debug|x64'
+ CustomBuildStep
+   MessageBuild PC/pythonnt_rc(_d).h/Message
+   Commandcd $(SolutionDir)
+-make_versioninfo_d.exe gt; ..\PC\pythonnt_rc_d.h
++amd64\make_versioninfo_d.exe gt; ..\PC\pythonnt_rc_d.h
+ /Command
+   Outputs$(SolutionDir)..\PC\pythonnt_rc_d.h;%(Outputs)/Outputs
+ /CustomBuildStep
+ Midl
+@@ -186,14 +186,15 @@
+   IntrinsicFunctionsfalse/IntrinsicFunctions
+   
PreprocessorDefinitions_CONSOLE;%(PreprocessorDefinitions)/PreprocessorDefinitions
+ /ClCompile
+ Link
+-  OutputFile$(SolutionDir)make_versioninfo_d.exe/OutputFile
++  OutputFile$(SolutionDir)amd64\make_versioninfo_d.exe/OutputFile
++  SubSystemConsole/SubSystem
+   TargetMachineMachineX64/TargetMachine
+ /Link
+ PostBuildEvent
+   Commandcd $(SolutionDir)
+-make_versioninfo_d.exe gt; ..\PC\python_nt_d.h
++amd64\make_versioninfo_d.exe gt; ..\PC\python_nt_d.h
+ /Command
+ /PostBuildEvent
+   /ItemDefinitionGroup
+   ItemGroup
 --- python3/PCbuild/pythoncore.vcxproj
 +++ python3/PCbuild/pythoncore.vcxproj
 @@ -195,35 +195,35 @@
@@ -247,3 +276,14 @@ diff -ru python3/PCbuild/pcbuild.sln 
python3.new/PCbuild/pcbuild.sln
MessageKilling any running $(PythonExe) instances.../Message
  /PreBuildEvent
/ItemDefinitionGroup
+@@ -289,9 +289,9 @@
+   
AdditionalIncludeDirectories..\Include;%(AdditionalIncludeDirectories)/AdditionalIncludeDirectories
+ /ResourceCompile
+ PreLinkEvent
+   MessageGenerate build information.../Message
+-  Command$(SolutionDir)make_buildinfo.exe Debug $(IntDir)/Command
++  Command$(SolutionDir)amd64\make_buildinfo.exe Debug 
$(IntDir)/Command
+ /PreLinkEvent
+ Link
+   
AdditionalDependencies$(IntDir)getbuildinfo.o;%(AdditionalDependencies)/AdditionalDependencies
+   
IgnoreSpecificDefaultLibrarieslibc;%(IgnoreSpecificDefaultLibraries)/IgnoreSpecificDefaultLibraries
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2014-09-19 Thread Tor Lillqvist
 external/python3/python-3.3.0-darwin.patch.1 |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 24d1a89285caeaaa0289a06c6be909160ee57583
Author: Tor Lillqvist t...@collabora.com
Date:   Fri Sep 19 17:10:15 2014 +0300

Use correct CFBundleExecutable for the LibreOfficePython framework

It should be the basename of the framework. The Python
configury already provides that as @PYTHONFRAMEWORK@.

Change-Id: I116a34c3bcc8f661abe16b2b5cc1b9268ecd2780

diff --git a/external/python3/python-3.3.0-darwin.patch.1 
b/external/python3/python-3.3.0-darwin.patch.1
index ec4f45f..8e14381 100644
--- a/external/python3/python-3.3.0-darwin.patch.1
+++ b/external/python3/python-3.3.0-darwin.patch.1
@@ -61,3 +61,14 @@ no /usr/include.
  CPMAC=CpMac
  
  APPTEMPLATE=$(srcdir)/Resources/app
+--- python3/Mac/Resources/framework/Info.plist.in
 python3/Mac/Resources/framework/Info.plist.in
+@@ -5,7 +5,7 @@
+   keyCFBundleDevelopmentRegion/key
+   stringEnglish/string
+   keyCFBundleExecutable/key
+-  stringPython/string
++  string@PYTHONFRAMEWORK@/string
+   keyCFBundleGetInfoString/key
+   stringPython Runtime and Library/string
+   keyCFBundleIdentifier/key
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2014-09-19 Thread Tor Lillqvist
 external/python3/python-3.3.0-darwin.patch.1 |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 5e2492b9c4715e286c92c84ffb18333c94e25710
Author: Tor Lillqvist t...@collabora.com
Date:   Fri Sep 19 18:56:05 2014 +0300

Use correct CFBundleExecutable in the Info.plist for Python.app

The Python build machinery apparently does not use proper autoconfigury to
expand this Info.plist.in file, so can't use @PYTHONFRAMEWORK@ as for the
Info.plist for the framework itself, but have to hardcode LibreOfficePython.

As such I am not sure that Python's way of including an app bundle
inside a framework's Resources subtree is acceptable in the stricter
code signing and Gatekeeper rules that soon will be in effect. Will
see.

Change-Id: I1ef9e7b748d41ec4b32d80e721d5fba5e7a90d18

diff --git a/external/python3/python-3.3.0-darwin.patch.1 
b/external/python3/python-3.3.0-darwin.patch.1
index 8e14381..2a737c3 100644
--- a/external/python3/python-3.3.0-darwin.patch.1
+++ b/external/python3/python-3.3.0-darwin.patch.1
@@ -72,3 +72,14 @@ no /usr/include.
keyCFBundleGetInfoString/key
stringPython Runtime and Library/string
keyCFBundleIdentifier/key
+--- python3/Mac/Resources/app/Info.plist.in
 python3/Mac/Resources/app/Info.plist.in
+@@ -18,7 +18,7 @@
+   /dict
+   /array
+   keyCFBundleExecutable/key
+-  stringPython/string
++  stringLibreOfficePython/string
+   keyCFBundleGetInfoString/key
+   string%version%, (c) 2004-2013 Python Software Foundation./string
+   keyCFBundleHelpBookFolder/key
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2014-09-19 Thread Tor Lillqvist
 external/python3/python-3.3.0-darwin.patch.1 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 280efe54ee7d9edd54ce550965e1d4ace34af803
Author: Tor Lillqvist t...@collabora.com
Date:   Fri Sep 19 19:59:16 2014 +0300

Make the patch apply

Change-Id: Ic773b86a1ebaa66a1b0ae236429276f35776deb8

diff --git a/external/python3/python-3.3.0-darwin.patch.1 
b/external/python3/python-3.3.0-darwin.patch.1
index 2a737c3..a709473 100644
--- a/external/python3/python-3.3.0-darwin.patch.1
+++ b/external/python3/python-3.3.0-darwin.patch.1
@@ -81,5 +81,5 @@ no /usr/include.
 -  stringPython/string
 +  stringLibreOfficePython/string
keyCFBundleGetInfoString/key
-   string%version%, (c) 2004-2013 Python Software Foundation./string
+   string%version%, (c) 2004-2014 Python Software Foundation./string
keyCFBundleHelpBookFolder/key
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2014-09-11 Thread Stephan Bergmann
 external/python3/ExternalProject_python3.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e9778073e37fb75f1b65a8d38b41feb584060705
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Sep 11 15:18:29 2014 +0200

For ASAN __cxa_throw interception to work, link python.bin to libstdc++

...where the intercepted __cxa_throw is found, as otherwise 
PythonTest_sw_python
fails with

AddressSanitizer CHECK failed: 
projects/compiler-rt/lib/asan/asan_interceptors.cc:293 
((IndirectExternCall(__interception::real___cxa_throw))) != (0) (0x0, 0x0)
 #0 in __asan::AsanCheckFailed(char const*, int, char const*, unsigned long 
long, unsigned long long) projects/compiler-rt/lib/asan/asan_rtl.cc:70:3
 #1 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned 
long long, unsigned long long) 
projects/compiler-rt/lib/sanitizer_common/sanitizer_common.cc:76:5
 #2 0x48c3ac in __cxa_throw 
projects/compiler-rt/lib/asan/asan_interceptors.cc:293:3
 #3 0x7f67faec0ef5 in pyuno::createClass(rtl::OUString const, 
pyuno::Runtime const) pyuno/source/module/pyuno_except.cxx:92:9
...

Change-Id: I0cb364eacab49644b426fb62f49bf9d7c8b5090c

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 21a3f11..b0548f6 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -83,6 +83,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
$(if $(SYSBASE), -I$(SYSBASE)/usr/include) \
) \
$(if $(python3_cflags),CFLAGS='$(python3_cflags)') \
+   $(if $(filter -fsanitize=address,$(CC)),LINKCC=$(CXX)) \
LDFLAGS=$(strip $(LDFLAGS) \
$(if $(SYSTEM_OPENSSL),,-L$(call 
gb_UnpackedTarball_get_dir,openssl)) \
$(if $(SYSTEM_EXPAT),,-L$(gb_StaticLibrary_WORKDIR)) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2014-07-14 Thread rbuj
 external/python3/ExternalProject_python3.mk |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 38d0bde62bd5fe8022ac45c5657226761fcdaa30
Author: rbuj robert@gmail.com
Date:   Sat Jul 12 11:33:57 2014 +0200

ExternalProject_python3.mk: MACOSX

To build a universal binary in Mac OS X 10.6+ with an Intel processor, it 
is better to set --with-universal-archs=intel, remember that Rosetta is not 
installed by default in Mac OS X v10.6 and it is neither included nor supported 
in Mac OS X v10.7 or later.

If we don't use --with-universal-archs then the configure.ac sets the 
architectures:

...
UNIVERSAL_ARCHS=32-bit
if test `uname -s` = Darwin
then
if test -n ${UNIVERSALSDK}
then
if test -z `/usr/bin/file 
${UNIVERSALSDK}/usr/lib/libSystem.dylib | grep ppc`
then
UNIVERSAL_ARCHS=intel
fi
fi
fi
...

In Snow Leopard (Mac OS 10.6):

/usr/bin/file /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib: Mach-O universal 
binary with 4 architectures
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib (for architecture 
ppc7400):  Mach-O dynamically linked shared library stub ppc
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib (for architecture 
ppc64):Mach-O 64-bit dynamically linked shared library stub ppc64
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib (for architecture 
i386): Mach-O dynamically linked shared library stub i386
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib (for architecture 
x86_64):   Mach-O 64-bit dynamically linked shared library stub x86_64

/usr/bin/file /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libSystem.dylib
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libSystem.dylib: Mach-O universal 
binary with 3 architectures
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libSystem.dylib (for architecture 
x86_64):   Mach-O 64-bit dynamically linked shared library stub x86_64
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libSystem.dylib (for architecture 
i386): Mach-O dynamically linked shared library stub i386
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libSystem.dylib (for architecture 
ppc7400):  Mach-O dynamically linked shared library stub ppc

If x86_64 (for OS X 10.8+) or PPC (for OS X 10.5) is only desired then a 
universal binary is not useful and we don't have to use 
--enable-universalsdk=${UNIVERSALSDK}.

Change-Id: Ib0578cfdb912fed5a803df3d2e04d2b037cfe13f
Reviewed-on: https://gerrit.libreoffice.org/10249
Tested-by: LibreOffice gerrit bot ger...@libreoffice.org
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 0d958bc..cabff00 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -70,7 +70,9 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
OPT=$(gb_COMPILERNOOPTFLAGS) 
$(gb_DEBUG_CFLAGS))) \
$(if $(filter WNT-GCC,$(OS)-$(COM)),--with-threads 
ac_cv_printf_zd_format=no) \
$(if $(filter MACOSX,$(OS)), \
-   $(if $(filter 
INTEL,$(CPUNAME)),--enable-universalsdk=$(MACOSX_SDK_PATH) 
--with-universal-archs=32-bit) \
+   $(if $(filter 
INTEL,$(CPUNAME)),--enable-universalsdk=$(MACOSX_SDK_PATH) \
+$(if $(filter 
1050,$(MAC_OS_X_VERSION_MIN_REQUIRED)),--with-universal-archs=32-bit,--with-universal-archs=intel)
 \
+) \

--enable-framework=/@__OOO 
--with-framework-name=LibreOfficePython, \
--enable-shared \
) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2014-07-11 Thread David Ostrovsky
 external/python3/ExternalProject_python3.mk |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 5a03dad45290a92941aab61ef03247c04b78154f
Author: David Ostrovsky da...@ostrovsky.org
Date:   Tue Jul 8 23:46:25 2014 +0200

VS2013: Adjust python3 to 12.0 vcproj version

Change-Id: Ic4566e8a199d3f31d6d4cb2d3fd41ad7b762c02a
Reviewed-on: https://gerrit.libreoffice.org/10162
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index f0b65ed..3eda350 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -35,10 +35,12 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build \
/p:Configuration=$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
-   $(if $(filter 100,$(VCVER)), \
-   /ToolsVersion:4.0, \
-   /p:PlatformToolset=$(if $(filter 
80,$(WINDOWS_SDK_VERSION)),v110,v110_xp) \
+   $(if $(filter 100,$(VCVER)),/p:PlatformToolset=v100 \
+   /p:VisualStudioVersion=10.0) \
+   $(if $(filter 110,$(VCVER)),/p:PlatformToolset=$(if 
$(filter 80,$(WINDOWS_SDK_VERSION)),v110,v110_xp) \
/p:VisualStudioVersion=11.0) \
+   $(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 \
+   /p:VisualStudioVersion=12.0) \
,PCBuild)
 
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2014-07-07 Thread Tor Lillqvist
 external/python3/UnpackedTarball_python3.mk  |1 +
 external/python3/python-3.3.5-vs2013.patch.1 |   14 ++
 2 files changed, 15 insertions(+)

New commits:
commit 502246c3a8f70239df9c4003e2ff779b573c3db6
Author: Tor Lillqvist t...@collabora.com
Date:   Tue Jul 8 03:01:01 2014 +0300

VS 2013 has round()

Change-Id: I1cc91bccd288543162b1169ce5621a91a5d4f991

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index 49a56e0..41725c3 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/python-3.3.3-py17797.patch.1 \
external/python3/python-3.3.3-msvc2012-winxp.patch.1 \
external/python3/python-3.3.5-pyexpat-symbols.patch.1 \
+   external/python3/python-3.3.5-vs2013.patch.1 \
external/python3/python-lsan.patch.0 \
 ))
 
diff --git a/external/python3/python-3.3.5-vs2013.patch.1 
b/external/python3/python-3.3.5-vs2013.patch.1
new file mode 100644
index 000..5540ea1
--- /dev/null
+++ b/external/python3/python-3.3.5-vs2013.patch.1
@@ -0,0 +1,14 @@
+-*- Mode:Diff -*-
+--- python3/PC/pyconfig.h
 python3/PC/pyconfig.h
+@@ -602,6 +602,10 @@
+ /* Define if you have readlink.  */
+ /* #undef HAVE_READLINK */
+ 
++#if defined(_MSC_VER)  _MSC_VER = 1800
++#define HAVE_ROUND
++#endif
++
+ /* Define if you have select.  */
+ /* #undef HAVE_SELECT */
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2014-05-24 Thread Christian Lohmaier
 external/python3/python-3.3.3-py17797.patch.1 |   34 +++---
 1 file changed, 26 insertions(+), 8 deletions(-)

New commits:
commit 788228e4aec06501a0e73193ba85fcdeef7efb69
Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com
Date:   Sat May 24 23:50:36 2014 +0200

fdo#77891 unconditionally disable console streams for WinXP

as the functions to check for a valid filehandle don't work according to
the documentation. Python in LO-Context is run from GUI anyway, and thus
won't have those hooked up.

Change-Id: I8bc048463b0dc1a25c1b6ba7422623dda110eddc

diff --git a/external/python3/python-3.3.3-py17797.patch.1 
b/external/python3/python-3.3.3-py17797.patch.1
index 3c43fb1..d4f7ab8 100644
--- a/external/python3/python-3.3.3-py17797.patch.1
+++ b/external/python3/python-3.3.3-py17797.patch.1
@@ -3,39 +3,57 @@ 
http://connect.microsoft.com/VisualStudio/feedback/details/785119/
 
 Visual Studio 2012 changed return value for fileno function that breaks
 when python tries to check/setup stdin/out/err
+GetStdHandle on Windows XP behaves contrary to the documentation...
 diff -ur python3.org/Python/pythonrun.c python3/Python/pythonrun.c
 python3.org/Python/pythonrun.c 2014-05-19 19:06:01.305362400 +0200
-+++ python3/Python/pythonrun.c 2014-05-19 19:07:13.649079800 +0200
-@@ -1083,7 +1083,11 @@
+--- python3.org/Python/pythonrun.c 2014-05-24 16:36:20.361672900 +0200
 python3/Python/pythonrun.c 2014-05-24 16:37:38.424159100 +0200
+@@ -1036,7 +1036,15 @@
+ int status = 0, fd;
+ PyObject * encoding_attr;
+ char *encoding = NULL, *errors;
+-
++#ifdef MS_WINDOWS
++OSVERSIONINFOEX osvi;
++BOOL bIsWindowsXP;
++
++ZeroMemory(osvi, sizeof(osvi));
++osvi.dwOSVersionInfoSize = sizeof(osvi);
++GetVersionEx(osvi);
++bIsWindowsXP = (osvi.dwMajorVersion  6);
++#endif
+ /* Hack to avoid a nasty recursion issue when Python is invoked
+in verbose mode: pre-import the Latin-1 and UTF-8 codecs */
+ if ((m = PyImport_ImportModule(encodings.utf_8)) == NULL) {
+@@ -1084,7 +1092,11 @@
   * and fileno() may point to an invalid file descriptor. For example
   * GUI apps don't have valid standard streams by default.
   */
 +#ifdef MS_WINDOWS
-+if (!is_valid_fd(fd) || GetStdHandle(STD_INPUT_HANDLE) == NULL) {
++if (!is_valid_fd(fd) || GetStdHandle(STD_INPUT_HANDLE) == NULL || 
bIsWindowsXP) {
 +#else
  if (!is_valid_fd(fd)) {
 +#endif
  std = Py_None;
  Py_INCREF(std);
  }
-@@ -1098,7 +1102,11 @@
+@@ -1099,7 +,11 @@
  
  /* Set sys.stdout */
  fd = fileno(stdout);
 +#ifdef MS_WINDOWS
-+if (!is_valid_fd(fd) || GetStdHandle(STD_OUTPUT_HANDLE) == NULL) {
++if (!is_valid_fd(fd) || GetStdHandle(STD_OUTPUT_HANDLE) == NULL || 
bIsWindowsXP) {
 +#else
  if (!is_valid_fd(fd)) {
 +#endif
  std = Py_None;
  Py_INCREF(std);
  }
-@@ -1114,7 +1122,11 @@
+@@ -1115,7 +1131,11 @@
  #if 1 /* Disable this if you have trouble debugging bootstrap stuff */
  /* Set sys.stderr, replaces the preliminary stderr */
  fd = fileno(stderr);
 +#ifdef MS_WINDOWS
-+if (!is_valid_fd(fd) || GetStdHandle(STD_ERROR_HANDLE) == NULL) {
++if (!is_valid_fd(fd) || GetStdHandle(STD_ERROR_HANDLE) == NULL || 
bIsWindowsXP) {
 +#else
  if (!is_valid_fd(fd)) {
 +#endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3 postprocess/CustomTarget_registry.mk solenv/gbuild sysui/CustomTarget_deb.mk

2014-05-22 Thread Christian Lohmaier
 external/python3/ExternalProject_python3.mk |2 +-
 postprocess/CustomTarget_registry.mk|8 
 solenv/gbuild/Output.mk |4 ++--
 sysui/CustomTarget_deb.mk   |2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 87c1aa16a95dcff9247ae12a4bb5ea2d866b1772
Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com
Date:   Thu May 22 16:58:22 2014 +0200

use $(gb_AWK) instead of awk

Change-Id: Ia00d7e52de5edfce09c3a0a8aa4390e3e1582a01

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 1f7be7f..0bbd9b5 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -109,7 +109,7 @@ $(call 
gb_ExternalProject_get_state_target,python3,fixscripts) : $(call gb_Exter

$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)-config
 \

$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m-config
 \

$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pyvenv-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)
 ; do \
-   { rm $$file  awk '\
+   { rm $$file  $(gb_AWK) '\
BEGIN {print #!/bin/bash\n\
 origpath=$$(pwd)\n\
 bindir=$$(cd $$(dirname \$$0\) ; pwd)\n\
diff --git a/postprocess/CustomTarget_registry.mk 
b/postprocess/CustomTarget_registry.mk
index 0bc71a9..2ae4ab6 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -594,17 +594,17 @@ $(call 
gb_CustomTarget_get_workdir,postprocess/registry)/Langpack-%.list :
 # zero-sized org/openoffice/TypeDectection/Filter.xcu; filter them out in the
 # find shell command below (see issue 110041):
 $(call gb_CustomTarget_get_workdir,postprocess/registry)/fcfg_langpack_%.list :
-   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,2)
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),AWK,2)
$(call gb_Helper_abbreviate_dirs,\
find $(call gb_XcuResTarget_get_target,fcfg_langpack/$*/)\
 -name *.xcu -size +0c \
-   | awk 'BEGIN{print list} \
+   | $(gb_AWK) 'BEGIN{print list} \
{print filename$$0/filename} \
   END  {print /list}'  $@ \
)
 
 $(call gb_CustomTarget_get_workdir,postprocess/registry)/registry_%.list :
-   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,2)
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),AWK,2)
$(call gb_Helper_abbreviate_dirs,\
find $(call gb_XcuResTarget_get_target,registry/$*/)\
 $(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)),\
@@ -613,7 +613,7 @@ $(call 
gb_CustomTarget_get_workdir,postprocess/registry)/registry_%.list :
 $(if $(filter TRUE,$(ENABLE_ONLINE_UPDATE)),\
 $(call gb_XcuResTarget_get_target,updchk/$*/))\
 -name *.xcu \
-   | awk 'BEGIN{print list} \
+   | $(gb_AWK) 'BEGIN{print list} \
{print filename$$0/filename} \
   END  {print /list}'  $@ \
)
diff --git a/solenv/gbuild/Output.mk b/solenv/gbuild/Output.mk
index ca3da3b..01e9ad2 100644
--- a/solenv/gbuild/Output.mk
+++ b/solenv/gbuild/Output.mk
@@ -45,8 +45,8 @@ define gb_Output_warn
 $(warning $(NEWLINE)[WARN  $(2)] !!!$(NEWLINE)[WARN  $(2)] !!! 
$(1)$(NEWLINE)[WARN  $(2)] !!!)
 endef
 
-gb_Output_ESCAPE := $(shell echo|awk 'BEGIN { printf %c, 27 }' -)
-gb_Output_BELL := $(shell echo|awk 'BEGIN { printf %c, 7 }' -)
+gb_Output_ESCAPE := $(shell echo|$(gb_AWK) 'BEGIN { printf %c, 27 }' -)
+gb_Output_BELL := $(shell echo|$(gb_AWK) 'BEGIN { printf %c, 7 }' -)
 
 # only enable colorized output if
 # - gb_COLOR is set
diff --git a/sysui/CustomTarget_deb.mk b/sysui/CustomTarget_deb.mk
index 82acd32..ea68e2f 100644
--- a/sysui/CustomTarget_deb.mk
+++ b/sysui/CustomTarget_deb.mk
@@ -57,7 +57,7 @@ $(deb_WORKDIR)/%/DEBIAN/control: $(deb_SRCDIR)/control $(call 
gb_CustomTarget_ge
sed 's/%productname/$(PRODUCTNAME.$*) $(PRODUCTVERSION)/' \
 $@
echo Version: $(PKGVERSION)-$(LIBO_VERSION_PATCH) $@
-   du -k -s $(deb_WORKDIR)/$* | awk -F ' ' '{ printf Installed-Size: 
%s\n, $$1 ; }' $@
+   du -k -s $(deb_WORKDIR)/$* | $(gb_AWK) -F ' ' '{ printf 
Installed-Size: %s\n, $$1 ; }' $@
 
 
$(deb_WORKDIR)/%$(PKGVERSIONSHORT)-debian-menus_$(PKGVERSION)-$(LIBO_VERSION_PATCH)_all.deb:
 $(deb_WORKDIR)/%/DEBIAN/postrm $(deb_WORKDIR)/%/DEBIAN/postinst 
$(deb_WORKDIR)/%/DEBIAN/prerm $(deb_WORKDIR)/%/DEBIAN/control $(call 
gb_Library_get_target,getuid)
 

[Libreoffice-commits] core.git: external/python3

2014-05-08 Thread Stephan Bergmann
 external/python3/UnpackedTarball_python3.mk|6 
 external/python3/python-3.3.3-disable-obmalloc.patch.0 |   21 +
 2 files changed, 27 insertions(+)

New commits:
commit de386effc0532451c193c9c824d58006645e9c8f
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu May 8 17:49:57 2014 +0200

Make external/python3 play well with -fsanitize=address

Change-Id: I72a9ec9569bcd74e212ad98456a76869ac213221

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index 9ca68d5..15ca76a 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -37,4 +37,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
 ))
 endif
 
+ifneq ($(ENABLE_RUNTIME_OPTIMIZATIONS),TRUE)
+$(eval $(call gb_UnpackedTarball_add_patches,python3,\
+   external/python3/python-3.3.3-disable-obmalloc.patch.0 \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/python3/python-3.3.3-disable-obmalloc.patch.0 
b/external/python3/python-3.3.3-disable-obmalloc.patch.0
new file mode 100644
index 000..639cff6
--- /dev/null
+++ b/external/python3/python-3.3.3-disable-obmalloc.patch.0
@@ -0,0 +1,21 @@
+--- Objects/obmalloc.c
 Objects/obmalloc.c
+@@ -9,8 +9,8 @@
+  #endif
+ #endif
+ 
++#define WITH_VALGRIND
+ #ifdef WITH_VALGRIND
+-#include valgrind/valgrind.h
+ 
+ /* If we're using GCC, use __builtin_expect() to reduce overhead of
+the valgrind checks */
+@@ -771,7 +771,7 @@
+ 
+ #ifdef WITH_VALGRIND
+ if (UNLIKELY(running_on_valgrind == -1))
+-running_on_valgrind = RUNNING_ON_VALGRIND;
++running_on_valgrind = 1;
+ if (UNLIKELY(running_on_valgrind))
+ goto redirect;
+ #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2014-04-15 Thread Michael Stahl
 external/python3/UnpackedTarball_python3.mk|4 
 external/python3/python-3.3.0-msvc-disable.patch.1 |   76 -
 external/python3/python-3.3.0-msvc-x64.patch.1 |  113 --
 external/python3/python-3.3.0-ssl.patch.1  |  162 -
 4 files changed, 355 deletions(-)

New commits:
commit 4ce1cec2a4c98451b8b686f6f7a114a6927f0cae
Author: Michael Stahl mst...@redhat.com
Date:   Tue Apr 15 16:48:59 2014 +0200

python3: remove obsolete MSVC2008 patches

Change-Id: Ie514017dc186fea4c3f2699e92bfe46706eb6413

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index 1de6b11..9ca68d5 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -13,10 +13,6 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,python3,$(PYTHON_TARBALL),,python3)
 
 $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
PCbuild/pcbuild.sln \
-   PC/VS9.0/pcbuild.sln \
-   PC/VS9.0/make_versioninfo.vcproj \
-   PC/VS9.0/x64.vsprops \
-   PC/VS9.0/_ssl.vcproj \
 ))
 
 $(eval $(call gb_UnpackedTarball_add_patches,python3,\
diff --git a/external/python3/python-3.3.0-msvc-disable.patch.1 
b/external/python3/python-3.3.0-msvc-disable.patch.1
index e9cbef5..6a6a950 100644
--- a/external/python3/python-3.3.0-msvc-disable.patch.1
+++ b/external/python3/python-3.3.0-msvc-disable.patch.1
@@ -1,81 +1,5 @@
 Disable some stuff LO does not need, especially stuff with external 
dependencies
 
-diff -ru python3/PC/VS9.0/pcbuild.sln python3.new/PC/VS9.0/pcbuild.sln
 python3/PC/VS9.0/pcbuild.sln   2012-09-29 10:00:47.0 +0200
-+++ python3.new/PC/VS9.0/pcbuild.sln   2012-11-12 22:34:55.365289858 +0100
-@@ -15,16 +15,6 @@
-   {C73F0EC1-358B-4177-940F-0846AC8B04CD} = 
{C73F0EC1-358B-4177-940F-0846AC8B04CD}
-   EndProjectSection
- EndProject
--Project({8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}) = pythonw, 
pythonw.vcproj, {F4229CC3-873C-49AE-9729-DD308ED4CD4A}
--  ProjectSection(ProjectDependencies) = postProject
--  {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = 
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
--  EndProjectSection
--EndProject
--Project({8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}) = w9xpopen, 
w9xpopen.vcproj, {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}
--  ProjectSection(ProjectDependencies) = postProject
--  {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = 
{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}
--  EndProjectSection
--EndProject
- Project({8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}) = make_buildinfo, 
make_buildinfo.vcproj, {C73F0EC1-358B-4177-940F-0846AC8B04CD}
- EndProject
- Project({2150E333-8FDC-42A3-9474-1A3956D46DE8}) = Solution Items, 
Solution Items, {553EC33E-9816-4996-A660-5D6186A0B0B3}
-@@ -68,12 +58,6 @@
-   {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = 
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
-   EndProjectSection
- EndProject
--Project({8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}) = _sqlite3, 
_sqlite3.vcproj, {13CECB97-4119-4316-9D42-8534019A5A44}
--  ProjectSection(ProjectDependencies) = postProject
--  {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = 
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
--  {A1A295E5-463C-437F-81CA-1F32367685DA} = 
{A1A295E5-463C-437F-81CA-1F32367685DA}
--  EndProjectSection
--EndProject
- Project({8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}) = _ssl, _ssl.vcproj, 
{C6E20F84-3247-4AD6-B051-B073268F73BA}
-   ProjectSection(ProjectDependencies) = postProject
-   {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = 
{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}
-@@ -87,21 +71,6 @@
-   {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = 
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
-   EndProjectSection
- EndProject
--Project({8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}) = _tkinter, 
_tkinter.vcproj, {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}
--  ProjectSection(ProjectDependencies) = postProject
--  {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = 
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
--  EndProjectSection
--EndProject
--Project({8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}) = _bz2, _bz2.vcproj, 
{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}
--  ProjectSection(ProjectDependencies) = postProject
--  {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = 
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
--  EndProjectSection
--EndProject
--Project({8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}) = _lzma, _lzma.vcproj, 
{F9D71780-F393-11E0-BE50-0800200C9A66}
--  ProjectSection(ProjectDependencies) = postProject
--  {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = 
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
--  EndProjectSection
--EndProject
- Project({8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}) = select, 
select.vcproj, {18CAE28C-B454-46C1-87A0-493D91D97F03}
-   ProjectSection(ProjectDependencies) = postProject
-   {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = 

[Libreoffice-commits] core.git: external/python3

2014-02-21 Thread Matúš Kukan
 external/python3/ExternalProject_python3.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c84a79f095aeef527cbea7eaf09777047cee6c1c
Author: Matúš Kukan matus.ku...@collabora.com
Date:   Fri Feb 21 19:30:45 2014 +0100

Use gb_LTOFLAGS for python3 too.

Change-Id: Ida2dee3b66dd7fbc7942d47a13ce38dda82db866

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 6254cda..8cce5cb 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -51,7 +51,7 @@ else
 # create a symlink LO_lib because the .so are in a directory with platform
 # specific name like build/lib.linux-x86_64-3.3
 
-python3_cflags = $(ZLIB_CFLAGS)
+python3_cflags = $(ZLIB_CFLAGS) $(gb_LTOFLAGS)
 ifneq (,$(ENABLE_VALGRIND))
 python3_cflags += $(VALGRIND_CFLAGS)
 endif
@@ -85,6 +85,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
$(if $(SYSBASE), -L$(SYSBASE)/usr/lib) \
$(if $(filter WNT-GCC,$(OS)-$(COM)), -shared-libgcc \
$(if $(filter 
YES,$(MINGW_SHARED_GCCLIB)),-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 
-Wl$(COMMA)--export-all-symbols)) \
+   $(gb_LTOFLAGS) \
) \
 MAKEFLAGS= $(MAKE) \
$(if $(filter 
MACOSX,$(OS)),DESTDIR=$(EXTERNAL_WORKDIR)/python-inst install) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2014-01-15 Thread Andras Timar
 external/python3/UnpackedTarball_python3.mk|1 
 external/python3/python-3.3.3-quoted-printable.patch.1 |  201 +
 2 files changed, 202 insertions(+)

New commits:
commit 65be22476b586637e6b96fab187e5933cd00
Author: Andras Timar andras.ti...@collabora.com
Date:   Wed Jan 15 09:44:40 2014 +0100

fdo#70796 fix quoted printable encoding bug in internal Python

Change-Id: I4e5563c47df83c50df75ccf330fbd38ec6da9170

diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index 200a9e13..1de6b11 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/python-3.3.0-gcc-4.8.patch.1 \
external/python3/python-3.3.0-pythreadstate.patch.1 \
external/python3/python-3.3.0-clang.patch.1 \
+   external/python3/python-3.3.3-quoted-printable.patch.1 \
 ))
 
 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
diff --git a/external/python3/python-3.3.3-quoted-printable.patch.1 
b/external/python3/python-3.3.3-quoted-printable.patch.1
new file mode 100644
index 000..30c065d
--- /dev/null
+++ b/external/python3/python-3.3.3-quoted-printable.patch.1
@@ -0,0 +1,201 @@
+
+# HG changeset patch
+# User R David Murray rdmur...@bitdance.com
+# Date 1389637161 18000
+# Node ID 4c5b1932354bc4707ef182cf0fa61b2e8ccfaa5e
+# Parent  0ce2396a134bebca11b17337734d5e9966e2a95f
+#20206, #5803: more efficient algorithm that doesn't truncate output.
+
+This fixes an edge case (20206) where if the input ended in a character
+needing encoding but there was no newline on the string, the last byte
+of the encoded character would be dropped.  The fix is to use a more
+efficient algorithm, provided by Serhiy Storchaka (5803), that does not
+have the bug.
+
+diff --git a/Lib/email/quoprimime.py b/Lib/email/quoprimime.py
+--- a/Lib/email/quoprimime.py
 b/Lib/email/quoprimime.py
+@@ -53,8 +53,9 @@ EMPTYSTRING = ''
+ # space-wise.  Remember that headers and bodies have different sets of safe
+ # characters.  Initialize both maps with the full expansion, and then override
+ # the safe bytes with the more compact form.
+-_QUOPRI_HEADER_MAP = dict((c, '=%02X' % c) for c in range(256))
+-_QUOPRI_BODY_MAP = _QUOPRI_HEADER_MAP.copy()
++_QUOPRI_MAP = ['=%02X' % c for c in range(256)]
++_QUOPRI_HEADER_MAP = _QUOPRI_MAP[:]
++_QUOPRI_BODY_MAP = _QUOPRI_MAP[:]
+
+ # Safe header bytes which need no encoding.
+ for c in b'-!*+/' + ascii_letters.encode('ascii') + digits.encode('ascii'):
+@@ -121,8 +122,7 @@ def unquote(s):
+
+
+ def quote(c):
+-return '=%02X' % ord(c)
+-
++return _QUOPRI_MAP[ord(c)]
+
+
+ def header_encode(header_bytes, charset='iso-8859-1'):
+@@ -140,67 +140,15 @@ def header_encode(header_bytes, charset=
+ if not header_bytes:
+ return ''
+ # Iterate over every byte, encoding if necessary.
+-encoded = []
+-for octet in header_bytes:
+-encoded.append(_QUOPRI_HEADER_MAP[octet])
++encoded = header_bytes.decode('latin1').translate(_QUOPRI_HEADER_MAP)
+ # Now add the RFC chrome to each encoded chunk and glue the chunks
+ # together.
+-return '=?%s?q?%s?=' % (charset, EMPTYSTRING.join(encoded))
++return '=?%s?q?%s?=' % (charset, encoded)
+
+
+-class _body_accumulator(io.StringIO):
+-
+-def __init__(self, maxlinelen, eol, *args, **kw):
+-super().__init__(*args, **kw)
+-self.eol = eol
+-self.maxlinelen = self.room = maxlinelen
+-
+-def write_str(self, s):
+-Add string s to the accumulated body.
+-self.write(s)
+-self.room -= len(s)
+-
+-def newline(self):
+-Write eol, then start new line.
+-self.write_str(self.eol)
+-self.room = self.maxlinelen
+-
+-def write_soft_break(self):
+-Write a soft break, then start a new line.
+-self.write_str('=')
+-self.newline()
+-
+-def write_wrapped(self, s, extra_room=0):
+-Add a soft line break if needed, then write s.
+-if self.room  len(s) + extra_room:
+-self.write_soft_break()
+-self.write_str(s)
+-
+-def write_char(self, c, is_last_char):
+-if not is_last_char:
+-# Another character follows on this line, so we must leave
+-# extra room, either for it or a soft break, and whitespace
+-# need not be quoted.
+-self.write_wrapped(c, extra_room=1)
+-elif c not in ' \t':
+-# For this and remaining cases, no more characters follow,
+-# so there is no need to reserve extra room (since a hard
+-# break will immediately follow).
+-self.write_wrapped(c)
+-elif self.room = 3:
+-# It's a whitespace character at end-of-line, and we have room
+-# for the three-character quoted encoding.
+-