summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2011-06-11 20:19:03 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2011-06-11 20:19:03 +0200
commitf892f979ce17c70ccff5c802db17f24129628504 (patch)
treeb9c5c815b96898c4e32320b60cb7b5010b7ee880
parentadb552574038ca62db0f3d1ccf0e80d75cb09f5e (diff)
add dylib to the list of native python modules for Mac (for pyuno.dylib)
-rw-r--r--python/Python-2.6.1-dylib_dynload.patch14
-rw-r--r--python/makefile.mk5
-rw-r--r--python/pyversion.mk2
3 files changed, 16 insertions, 5 deletions
diff --git a/python/Python-2.6.1-dylib_dynload.patch b/python/Python-2.6.1-dylib_dynload.patch
new file mode 100644
index 000000000000..3e44502e389c
--- /dev/null
+++ b/python/Python-2.6.1-dylib_dynload.patch
@@ -0,0 +1,14 @@
+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 b43147dd3943..d91660a3d350 100644
--- a/python/makefile.mk
+++ b/python/makefile.mk
@@ -88,7 +88,7 @@ CONFIGURE_ACTION += --disable-ipv6
.ENDIF
.IF "$(OS)" == "MACOSX"
-PATCH_FILES+=Python-2.6.1-py8067.patch
+PATCH_FILES+=Python-2.6.1-py8067.patch Python-2.6.1-dylib_dynload.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
@@ -235,7 +235,6 @@ $(MISC)/OOoPython.framework.zip: $(PACKAGE_DIR)/fixinstallnames $(PACKAGE_DIR)/f
$(PYVERSIONFILE) : pyversion.mk $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE)
@-rm -f $@
- @echo process $@
- $(COMMAND_ECHO)sed 's#%%replaceme%%#$(MYCWD)/python-inst#g' < pyversion.mk > $@
+ $(COMMAND_ECHO)$(COPY) pyversion.mk $@
.ENDIF # DISABLE_PYTHON != TRUE
diff --git a/python/pyversion.mk b/python/pyversion.mk
index baba53838d3f..97c904f2ab79 100644
--- a/python/pyversion.mk
+++ b/python/pyversion.mk
@@ -10,8 +10,6 @@ PYVERSION=$(PYMAJOR).$(PYMINOR).$(PYMICRO)
PY_FULL_DLL_NAME=libpython$(PYMAJOR).$(PYMINOR).a
PYTHONLIB=-F$(SOLARLIBDIR) -framework OOoPython
CFLAGS+=-I$(SOLARLIBDIR)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/include/python$(PYMAJOR).$(PYMINOR)
-# needed to fix install_name in pyuno
-PYTHON_MAKEINSTALLDIR=%%replaceme%%
.ELSE
PY_FULL_DLL_NAME=libpython$(PYMAJOR).$(PYMINOR).so.1.0
PYTHONLIB=-lpython$(PYMAJOR).$(PYMINOR)