Commits

Anonymous committed 5d5e713

native306 #i111497,i111501# Patches for MacOSX Python from Cloph

Comments (0)

Files changed (4)

instsetoo_native/util/makefile.mk

 .ENDIF			# "$(alllangiso)"!=""
 
 .IF "$(LOCALPYFILES)"!=""
-$(foreach,i,$(alllangiso) openoffice_$i{$(PKGFORMAT:^".") .archive} openofficewithjre_$i{$(PKGFORMAT:^".")} openofficedev_$i{$(PKGFORMAT:^".")} broffice_$i{$(PKGFORMAT:^".")} brofficewithjre_$i{$(PKGFORMAT:^".")} brofficedev_$i{$(PKGFORMAT:^".")} sdkoo_$i{$(PKGFORMAT:^".")}) updatepack : $(LOCALPYFILES) $(BIN)$/cp1251.py $(BIN)$/iso8859_1.py
+$(foreach,i,$(alllangiso) openoffice_$i{$(PKGFORMAT:^".") .archive} openofficewithjre_$i{$(PKGFORMAT:^".")} openofficedev_$i{$(PKGFORMAT:^".")} broffice_$i{$(PKGFORMAT:^".")} brofficewithjre_$i{$(PKGFORMAT:^".")} brofficedev_$i{$(PKGFORMAT:^".")} sdkoo_$i{$(PKGFORMAT:^".")}) updatepack : $(LOCALPYFILES)
 .ENDIF			# "$(LOCALPYFILES)"!=""
 
 $(BIN)$/%.py : $(SOLARSHAREDBIN)$/pyuno$/%.py
 	@$(COPY) $< $@
 
-.IF "$(SYSTEM_PYTHON)" != "YES"
-$(BIN)$/cp1251.py : $(SOLARLIBDIR)$/python$/encodings$/cp1251.py
-	@$(COPY) $< $@
-$(BIN)$/iso8859_1.py : $(SOLARLIBDIR)$/python$/encodings$/iso8859_1.py
-	@$(COPY) $< $@
-.ELSE
-$(BIN)$/cp1251.py :
-	@echo "Using system python - nothing more to do here"
-$(BIN)$/iso8859_1.py :
-	@echo "Using system python - nothing more to do here"
-.ENDIF
-
 $(BIN)$/intro.zip : $(SOLARCOMMONPCKDIR)$/openoffice_nologo$/intro.zip
 	$(COPY) $< $@
 

scp2/source/python/file_python.scp

 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;
 End
 #endif
 #endif
+#endif
 
 // Scripting Framework Python script proxy
 
 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;

scp2/source/python/makefile.mk

 .ENDIF
 
 SCPDEFS+=\
-	-DPYVERSION=$(PYVERSION) \
+	-DPYVERSION=$(PYVERSION) -DPYMAJMIN=$(PYMAJOR).$(PYMINOR) \
 	-DPY_FULL_DLL_NAME=$(PY_FULL_DLL_NAME)
 
 SCP_PRODUCT_TYPE=osl

scp2/source/python/profileitem_python.scp

     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
 
     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,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.