configure.in | 54 ++++++++++++++------------------ python/Python-2.6.1-dylib_dynload.patch | 14 -------- python/makefile.mk | 2 - 3 files changed, 26 insertions(+), 44 deletions(-)
New commits: commit 2484811c3a004d531a6c216c0cd8ff34f6fad68c Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Feb 22 09:58:16 2012 +0100 Revert "add dylib to the list of native python modules for Mac (for pyuno.dylib)" This reverts those parts of commit f892f979ce17c70ccff5c802db17f24129628504 that add .dylib as an extension for native Python modules, which in turn was obsoleted by 2ea723e8ce4077c7efa957d278637c4d9f32cf14 "Revert 'Mac OS X uses .dylib and not .so for python modules.'" (and I verified on Mac OS X 10.6.8 that both LO's internal Pyton 2.6.1 and MacPort's python3.2 indeed import a pyuno.so just fine). There were additional modifications regarding pyversion stuff in the original commit f892f979ce17c70ccff5c802db17f24129628504 that appear unrelated and which I left intact. diff --git a/python/Python-2.6.1-dylib_dynload.patch b/python/Python-2.6.1-dylib_dynload.patch deleted file mode 100644 index 3e44502..0000000 --- a/python/Python-2.6.1-dylib_dynload.patch +++ /dev/null @@ -1,14 +0,0 @@ -add dylib to the extensions, to be able to load pyuno.dylib via "import pyuno" ---- misc/Python-2.6.1/Python/dynload_shlib.c 2006-01-04 02:30:17.000000000 +0100 -+++ misc/build/Python-2.6.1/Python/dynload_shlib.c 2011-06-11 19:42:09.000000000 +0200 -@@ -46,6 +46,10 @@ - {"module.exe", "rb", C_EXTENSION}, - {"MODULE.EXE", "rb", C_EXTENSION}, - #else -+#ifdef __APPLE__ -+ {".dylib", "rb", C_EXTENSION}, -+ {"module.dylib", "rb", C_EXTENSION}, -+#endif - {".so", "rb", C_EXTENSION}, - {"module.so", "rb", C_EXTENSION}, - #endif diff --git a/python/makefile.mk b/python/makefile.mk index 4f50ed3..be7fcbb 100644 --- a/python/makefile.mk +++ b/python/makefile.mk @@ -90,7 +90,7 @@ CONFIGURE_ACTION += --disable-ipv6 .ENDIF .IF "$(OS)" == "MACOSX" -PATCH_FILES+=Python-2.6.1-py8067.patch Python-2.6.1-dylib_dynload.patch +PATCH_FILES+=Python-2.6.1-py8067.patch # don't build dual-arch version as OOo itself is not universal binary either PATCH_FILES+=Python-2.6.1-arch_$(eq,$(CPU),I i386 ppc).patch commit b96b5aff2bfb4b0c4545e0a7f52679301dfcdb52 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Feb 22 09:55:24 2012 +0100 Allow to override --with-python=system withh $PYTHON on Mac OS X diff --git a/configure.in b/configure.in index 22f6945..32186ac 100644 --- a/configure.in +++ b/configure.in @@ -5938,7 +5938,7 @@ internal) AC_MSG_RESULT([internal]) ;; system) - if test $_os = Darwin -a \( "$with_macosx_version_min_required" = 10.4 -o "$with_macosx_version_min_required" = 10.5 \); then + if test $_os = Darwin -a -z "$PYTHON" -a \( "$with_macosx_version_min_required" = 10.4 -o "$with_macosx_version_min_required" = 10.5 \); then AC_MSG_ERROR([Cannot use "system" Python, the Python in Mac OS X $with_macosx_version_min_required is incompatible with Python3-ified pyuno]) fi AC_MSG_RESULT([system]) @@ -5963,13 +5963,29 @@ if test "$cross_compiling" = yes; then enable_python=system fi else - if test $enable_python = system; then - # This causes an error if no python command is found - # Note that this takes the system python called just "python", - # which isn't actually what we want on MacOSX when building - # against the 10.6 SDK. But that shouldn't matter, we - # select the correct python command manually below anyway. - AM_PATH_PYTHON([2.6]) + if test $enable_python = system -a -z "$PYTHON"; then + if test $_os = Darwin; then + # We already have logic above to make sure the system Python + # is used only when building against SDK 10.6 or newer. + + # Make sure we use the 2.6 Python when building against the + # 10.6 SDK. + case $with_macosx_sdk in + 10.6) + python_version=2.6;; + 10.7) + python_version=2.7;; + *) + # ??? + python_version=2.7;; + esac + PYTHON=python$python_version + PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX${with_macosx_sdk}.sdk/System/Library/Frameworks/Python.framework/Versions/${python_version}/include/python${python_version}" + PYTHON_LIBS="-framework Python" + else + # This causes an error if no python command is found + AM_PATH_PYTHON([2.6]) + fi elif test $enable_python = auto; then dnl This allows lack of system Python AM_PATH_PYTHON([2.6],, [:]) @@ -5983,26 +5999,6 @@ else fi if test $enable_python = system; then - if test $_os = Darwin; then - # We already have logic above to make sure the system Python - # is used only when building against SDK 10.6 or newer. - - # Make sure we use the 2.6 Python when building against the - # 10.6 SDK. - case $with_macosx_sdk in - 10.6) - python_version=2.6;; - 10.7) - python_version=2.7;; - *) - # ??? - python_version=2.7;; - esac - PYTHON=python$python_version - - PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX${with_macosx_sdk}.sdk/System/Library/Frameworks/Python.framework/Versions/${python_version}/include/python${python_version}" - PYTHON_LIBS="-framework Python" - fi if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then # Fallback: Accept these in the environment, or as set above # for MacOSX. @@ -6019,7 +6015,7 @@ if test $enable_python = system; then PYTHON_CFLAGS="-I$python_include" PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs" fi - elif test "$cross_compiling" = yes; then + else dnl How to find out the cross-compilation Python installation path? dnl Let's hardocode what we know for different distributions for now... _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits