summaryrefslogtreecommitdiff
path: root/scp2
diff options
context:
space:
mode:
authorIngo Schmidt <is@openoffice.org>2010-06-04 11:05:31 +0200
committerIngo Schmidt <is@openoffice.org>2010-06-04 11:05:31 +0200
commit5505fa96623051b9bd8584d5f20da50916741e2d (patch)
tree7b460d8f152ae823b4ad181fc1d05040d83b0aa9 /scp2
parentff94b38b00f90b4fbc8f49d132d46f27c537e143 (diff)
native306 #i111497,i111501# Patches for MacOSX Python from Cloph
Diffstat (limited to 'scp2')
-rw-r--r--scp2/source/python/file_python.scp158
-rw-r--r--scp2/source/python/makefile.mk2
-rw-r--r--scp2/source/python/profileitem_python.scp12
3 files changed, 171 insertions, 1 deletions
diff --git a/scp2/source/python/file_python.scp b/scp2/source/python/file_python.scp
index 1303bf59460f..5cd84d82b3e9 100644
--- a/scp2/source/python/file_python.scp
+++ b/scp2/source/python/file_python.scp
@@ -83,11 +83,17 @@ End
File gid_File_Py_Python_Core
TXT_FILE_BODY;
Dir = gid_Dir_Program;
+ #ifdef MACOSX
+ Name = "OOoPython.framework.zip";
+ Styles = (ARCHIVE,USE_INTERNAL_RIGHTS);
+ #else
Name = STRING(CONCAT3(python-core-,PYVERSION,.zip));
Styles = (ARCHIVE);
+ #endif
End
#ifdef UNX
+#ifndef MACOSX
File gid_File_Py_Python_Bin
BIN_FILE_BODY;
Dir = gid_Dir_Program;
@@ -96,6 +102,7 @@ File gid_File_Py_Python_Bin
End
#endif
#endif
+#endif
// Scripting Framework Python script proxy
@@ -126,12 +133,163 @@ File gid_File_Share_Registry_Pyuno_Xcd
End
#ifndef SYSTEM_PYTHON
+#ifndef MACOSX
File gid_File_Lib_Python_So
TXT_FILE_BODY;
Dir = gid_Dir_Program;
Name = STRING(PY_FULL_DLL_NAME);
Styles = (PACKED);
End
+#else //MACOSX
+//directory entries solely to be able to create the symlinks
+Directory gid_Dir_PythonFramework
+ ParentID = gid_Dir_Program;
+ HostName = "OOoPython.framework";
+End
+
+Unixlink gid_Unixlink_Python_Headers
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework;
+ Name = "Headers";
+ Target = "Versions/Current/Headers";
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_Resources
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework;
+ Name = "Resources";
+ Target = "Versions/Current/Resources";
+ Styles = ();
+End
+
+Directory gid_Dir_PythonFramework_Versions
+ ParentID = gid_Dir_PythonFramework;
+ HostName = "Versions";
+End
+
+Unixlink gid_Unixlink_Python_Versions_Current
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions;
+ Name = "Current";
+ Target = STRING(PYMAJMIN);
+ Styles = ();
+End
+
+Directory gid_Dir_PythonFramework_Versions_ver
+ ParentID = gid_Dir_PythonFramework_Versions;
+ HostName = STRING(PYMAJMIN);
+End
+
+Unixlink gid_Unixlink_Python_Versions_ver_Headers
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver;
+ Name = "Headers";
+ Target = STRING(CONCAT2(include/python,PYMAJMIN));
+ Styles = ();
+End
+
+Directory gid_Dir_PythonFramework_Versions_ver_bin
+ ParentID = gid_Dir_PythonFramework_Versions_ver;
+ HostName = "bin";
+End
+
+Directory gid_Dir_PythonFramework_Versions_ver_lib
+ ParentID = gid_Dir_PythonFramework_Versions_ver;
+ HostName = "lib";
+End
+
+Directory gid_Dir_PythonFramework_Versions_ver_lib_pythonver
+ ParentID = gid_Dir_PythonFramework_Versions_ver_lib;
+ HostName = STRING(CONCAT2(python,PYMAJMIN));
+End
+
+Directory gid_Dir_PythonFramework_Versions_ver_lib_pythonver_config
+ ParentID = gid_Dir_PythonFramework_Versions_ver_lib_pythonver;
+ HostName = "config";
+End
+
+Unixlink gid_Unixlink_Python_OOoPython
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework;
+ Name = "OOoPython";
+ Target = "Versions/Current/OOoPython";
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_idle
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "idle";
+ Target = STRING(CONCAT2(idle,PYMAJMIN));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_pydoc
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "pydoc";
+ Target = STRING(CONCAT2(pydoc,PYMAJMIN));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_python_real
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "python";
+ Target = "../Resources/Python.app/Contents/MacOS/OOoPython";
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_python
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "python";
+ Target = STRING(CONCAT2(python,PYMAJMIN));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_pythonconfig
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "python-config";
+ Target = STRING(CONCAT3(python,PYMAJMIN,-config));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_pythonw_real
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "pythonw";
+ Target = "../Resources/Python.app/Contents/MacOS/OOoPython";
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_pythonw
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "pythonw";
+ Target = STRING(CONCAT2(pythonw,PYMAJMIN));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_smtpdpy
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "smtpd.py";
+ Target = STRING(CONCAT3(smtpd,PYMAJMIN,.py));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_libpython
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_lib_pythonver_config;
+ Name = STRING(PY_FULL_DLL_NAME);
+ Target = "../../../OOoPython";
+ Styles = ();
+End
+#endif //MACOSX
+
#ifdef WNT
File gid_File_Lib_Python_So_Brand // Fix for system-python-problem on windows
TXT_FILE_BODY;
diff --git a/scp2/source/python/makefile.mk b/scp2/source/python/makefile.mk
index b34c0af1491d..4e03218ff06a 100644
--- a/scp2/source/python/makefile.mk
+++ b/scp2/source/python/makefile.mk
@@ -44,7 +44,7 @@ SCPDEFS+=-DSYSTEM_PYTHON
.ENDIF
SCPDEFS+=\
- -DPYVERSION=$(PYVERSION) \
+ -DPYVERSION=$(PYVERSION) -DPYMAJMIN=$(PYMAJOR).$(PYMINOR) \
-DPY_FULL_DLL_NAME=$(PY_FULL_DLL_NAME)
SCP_PRODUCT_TYPE=osl
diff --git a/scp2/source/python/profileitem_python.scp b/scp2/source/python/profileitem_python.scp
index be8edc601eb6..1c4fdb077986 100644
--- a/scp2/source/python/profileitem_python.scp
+++ b/scp2/source/python/profileitem_python.scp
@@ -46,7 +46,11 @@ ProfileItem gid_Profileitem_Pythonloader_Pythonhome
Section = "Bootstrap";
Order = 1;
Key = "PYUNO_LOADER_PYTHONHOME";
+ #ifdef MACOSX
+ Value = CONCAT2($ORIGIN,"OOoPython.framework");
+ #else
Value = CONCAT2($ORIGIN/python-core-,PYVERSION);
+ #endif
End
#endif
@@ -60,11 +64,19 @@ ProfileItem gid_Profileitem_Pythonloader_Pythonpath
Value = "$ORIGIN";
#else
#ifdef UNX
+ #ifdef MACOSX
+ #define FRAMEWORKLIB CONCAT4($ORIGIN/OOoPython.framework/Versions/,PYMAJMIN,/lib/python,PYMAJMIN)
+ Value = CONCAT4(FRAMEWORKLIB FRAMEWORKLIB,
+ /lib-dynload FRAMEWORKLIB,
+ /lib-tk FRAMEWORKLIB,
+ /site-packages $ORIGIN);
+ #else
Value = CONCAT9($ORIGIN/python-core-,PYVERSION,
/lib $ORIGIN/python-core-,PYVERSION,
/lib/lib-dynload $ORIGIN/python-core-,PYVERSION,
/lib/lib-tk $ORIGIN/python-core-,PYVERSION,
/lib/site-packages $ORIGIN);
+ #endif
#else
#ifdef _gcc3
Value = STRING(CONCAT9($ORIGIN/python-core-,PYVERSION,