This is an automated email from the ASF dual-hosted git repository.

leginee pushed a commit to branch mac-vcl-button-contrast
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 1ef42111e53fc0a941193f799de3d09acc12ce3f
Author: peter kovacs <[email protected]>
AuthorDate: Thu Sep 3 07:40:53 2026 +0200

    Apple Silicon: macOS bundled-Python packaging; the .dmg builds
    
    instsetoo_native now produces native arm64 Apache OpenOffice 5.1.0 .dmg
    installers (en-US de es fr it nl pt ru + SDK). "Successful packaging
    process!"; OpenOffice.app/Contents/MacOS/soffice is Mach-O arm64.
    
    scp2's macOS Python packaging expected an OOoPython.framework
    (OOoPython.framework.zip, Python.app symlinks) that no build has produced
    in years -- python/makefile.mk and pyuno/zipcore build the Unix
    python-core-$(PYVERSION).zip layout on macOS exactly as on Linux. Point
    the macOS scp2 branches at that layout instead:
    
    - scp2/source/python/file_python.scp: gid_File_Py_Python_Core uses
      python-core-<ver>.zip on macOS too; gid_File_Py_Python_Bin enabled for
      macOS; the framework Directory/Unixlink block replaced by a plain
      gid_File_Lib_Python_So (libpython3.11.dylib -> program/).
    - scp2/source/python/profileitem_python.scp: macOS PYUNO_LOADER_PYTHONHOME
      / PYTHONPATH use $ORIGIN/python-core-<ver> like the other UNX.
    - scp2/source/ooo/file_library_ooo.scp: gid_File_Lib_Xslt is skipped on
      macOS -- the bundled libxslt is built static there (like libxml2), so
      there is no shared libxslt.1.dylib to package.
    
    Not yet done (see .agent/mac-silicon-port.md): launch/smoke-test the app
    and pyuno; check libpython3.11.dylib / pyuno.so install-name
    relocatability; code-signing.
    
    Co-Authored-By: Claude Sonnet 5 <[email protected]>
---
 .agent/mac-silicon-port.md                     |  53 +++++++-
 main/scp2/source/ooo/file_library_ooo.scp      |   9 +-
 main/scp2/source/python/file_python.scp        | 175 +------------------------
 main/scp2/source/python/profileitem_python.scp |  11 --
 4 files changed, 57 insertions(+), 191 deletions(-)

diff --git a/.agent/mac-silicon-port.md b/.agent/mac-silicon-port.md
index 43d42c03af..41359f84bf 100644
--- a/.agent/mac-silicon-port.md
+++ b/.agent/mac-silicon-port.md
@@ -264,15 +264,54 @@ After that: rerun `./mac-silicon-build.sh`; if the DMG 
builds, smoke-test
 `pyuno` script). Then: code-signing / notarization for distribution (not done 
on this
 branch).
 
-## Status / Next
+## Milestone 3 — RESULT: the `.dmg` builds ✅ (2026-09-03)
+
+`./mac-silicon-build.sh --from scp2` → **`Successful packaging process!`**. 
Produced
+under `main/instsetoo_native/unxmaccr.pro/`:
+- 
`Apache_OpenOffice/dmg/install/<lang>/Apache_OpenOffice_5.1.0_MacOS_aarch64_install_<lang>.dmg`
+  for en-US de es fr it nl pt ru (~155–198 MB each)
+- 
`Apache_OpenOffice_SDK/dmg/install/en-US/Apache_OpenOffice-SDK_5.1.0_MacOS_aarch64_install_en-US.dmg`
+
+Verified (mounted en-US dmg): proper layout (`OpenOffice.app`, `Applications` 
symlink,
+LICENSEs, READMEs); `OpenOffice.app/Contents/MacOS/soffice` = **Mach-O arm64**;
+`python-core-3.11.15/lib/urllib/` complete.
+
+### Milestone-3 fix: macOS bundled-Python packaging (option b)
+
+`scp2` was written for a pre-2011 macOS Python **framework** 
(`OOoPython.framework.zip`)
+that no build has produced in years — `python/makefile.mk` + 
`pyuno/zipcore/makefile.mk`
+build the Unix `python-core-$(PYVERSION).zip` layout on macOS just like Linux. 
Switched
+the macOS `scp2` branches to that layout:
+- `scp2/source/python/file_python.scp`: `gid_File_Py_Python_Core` → 
`python-core-<ver>.zip`
+  for macOS too; enable `gid_File_Py_Python_Bin` on macOS; replace the whole 
framework
+  `Directory`/`Unixlink` block with a plain `gid_File_Lib_Python_So` 
(`libpython3.11.dylib`
+  into `program/`).
+- `scp2/source/python/profileitem_python.scp`: macOS `PYUNO_LOADER_PYTHONHOME` 
/
+  `PYTHONPATH` use `$ORIGIN/python-core-<ver>` like the other UNX.
+- `scp2/source/ooo/file_library_ooo.scp`: `gid_File_Lib_Xslt` — skip on macOS 
(bundled
+  libxslt is static there, like libxml2, so no shared lib to ship).
+
+### Benign warnings (verified harmless)
+- "ERROR: The following errors occurred in packaging process: ... Copy: 
.../urllib/error.py"
+  — `error.py` is nonetheless present in the mounted dmg; the installer 
double-lists that
+  first file and logs a scary line. dmake returns 0, "Successful packaging 
process!".
+- "Some modules contain old output trees" — leftover from earlier partial 
runs; cosmetic.
 
-**Milestone 2 committed** on `mac-silicon-minimal`: `mac-silicon-build.sh`,
-`libxml2/makefile.mk` (`xmllint` deliver path), 
`scp2/.../file_library_ooo.scp` (openssl
-dylib names), configure-wrapper flags 
(`--without-system-{curl,libxml,libxslt}`, JDK 8),
-`mac-silicon-bootstrap.sh` (CA bundle), this doc.
+## Status / Next
 
-**Next:** the macOS bundled-Python packaging item above → then a building 
`.dmg`.
-Other known gaps: NSS 3.39 age (compiled OK here, watch at runtime); 
code-signing.
+**A native arm64 Apache OpenOffice 5.1.0 `.dmg` for Apple Silicon now builds 
from trunk.**
+Committed on `mac-silicon-minimal`.
+
+**Next (validation / polish, not yet done):**
+1. Smoke-test the app: mount en-US dmg, copy `OpenOffice.app` to 
/Applications, launch
+   (`open`), open Writer, run a Basic macro, run a `pyuno` script 
(`python-core` layout is
+   new on macOS — `PYTHONHOME`/`PYTHONPATH` + `libpython3.11.dylib` 
install-name
+   relocatability are the things to check).
+2. `libpython3.11.dylib` / `pyuno.so` install-name check (`--enable-shared` 
non-framework
+   CPython can bake an absolute `install_name`).
+3. From-scratch `./mac-silicon-build.sh` on a clean tree to confirm no 
ordering luck.
+4. Code-signing / notarization for distribution.
+5. NSS 3.39 age — compiled fine; watch at runtime (signatures / cert UI).
 
 **Milestone 1 (configure + bootstrap) DONE** — committed on 
`mac-silicon-minimal`
 (`503d3e75c9`): `main/mac-silicon-configure.sh`, 
`main/mac-silicon-bootstrap.sh`,
diff --git a/main/scp2/source/ooo/file_library_ooo.scp 
b/main/scp2/source/ooo/file_library_ooo.scp
index 922e0f73d1..345048aa2f 100644
--- a/main/scp2/source/ooo/file_library_ooo.scp
+++ b/main/scp2/source/ooo/file_library_ooo.scp
@@ -1593,16 +1593,16 @@ STD_JAR_FILE( gid_File_Jar_Xsltvalidate, XSLTValidate )
 #endif
 
 #ifndef SYSTEM_LIBXSLT
+// On macOS the bundled libxslt is built static (--enable-shared=no, like
+// main/libxml2) and linked into its consumers, so there is no shared
+// libxslt to package -- mirror libxml2, which has no scp2 File entry.
+#ifndef MACOSX
 File gid_File_Lib_Xslt
     TXT_FILE_BODY;
     Styles = (PACKED);
     Dir = SCP2_OOO_BIN_DIR;
   #ifdef UNX
-    #ifdef MACOSX
-       Name = STRING(CONCAT4(libxslt,.,LIBXSLT_MAJOR,UNXSUFFIX));
-    #else
        Name = STRING(CONCAT4(libxslt,UNXSUFFIX,.,LIBXSLT_MAJOR));
-    #endif
   #else
    #ifdef _gcc3
     Name = "libxslt-1.dll";
@@ -1612,6 +1612,7 @@ File gid_File_Lib_Xslt
   #endif
 End
 #endif
+#endif
 
 
 STD_LIB_FILE( gid_File_Lib_Unoxml, unoxml )
diff --git a/main/scp2/source/python/file_python.scp 
b/main/scp2/source/python/file_python.scp
index 95f64c09db..7116bb0b2e 100644
--- a/main/scp2/source/python/file_python.scp
+++ b/main/scp2/source/python/file_python.scp
@@ -112,27 +112,24 @@ File gid_File_Py_Python_Core
     Dir = gid_Dir_Common_Ure;
 #endif
 //    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;
+#if defined MACOSX
+    Dir = gid_Brand_Dir_Program;
+#else
     Dir = gid_Dir_Common_Ure;
+#endif
 //    Dir = gid_Dir_Program;
     Name = "python.bin";
     Styles = (PACKED);
 End
 #endif
 #endif
-#endif
 
 // Scripting Framework Python script proxy
 
@@ -167,177 +164,17 @@ 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_Common_Ure;
-//    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
 #if defined MACOSX
     Dir = gid_Brand_Dir_Program;
 #else
     Dir = gid_Dir_Common_Ure;
 #endif
-//    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;
+//    Dir = gid_Dir_Program;
     Name = STRING(PY_FULL_DLL_NAME);
-    Target = "../../../OOoPython";
-    Styles = ();
+    Styles = (PACKED);
 End
-#endif //MACOSX
-
-//#ifdef WNT
-//File gid_File_Lib_Python_So_Brand // Fix for system-python-problem on windows
-//    TXT_FILE_BODY;
-//    Dir = gid_Brand_Dir_Program;
-//    Name = STRING(PY_FULL_DLL_NAME);
-//    Styles = (PACKED);
-//End
-//#endif
 #endif
 
 #ifdef UNX
diff --git a/main/scp2/source/python/profileitem_python.scp 
b/main/scp2/source/python/profileitem_python.scp
index 4ae2f5b177..00c02d91bd 100644
--- a/main/scp2/source/python/profileitem_python.scp
+++ b/main/scp2/source/python/profileitem_python.scp
@@ -47,11 +47,7 @@ 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
 
@@ -65,17 +61,10 @@ ProfileItem gid_Profileitem_Pythonloader_Pythonpath
     Value = "$ORIGIN";
 #else
   #ifdef UNX
-    #ifdef MACOSX
-    #define FRAMEWORKLIB 
CONCAT4($ORIGIN/OOoPython.framework/Versions/,PYMAJMIN,/lib/python,PYMAJMIN)
-    Value = CONCAT3(FRAMEWORKLIB FRAMEWORKLIB,
-                  /lib-dynload FRAMEWORKLIB,
-                  /site-packages $ORIGIN);
-    #else
     Value = CONCAT7($ORIGIN/python-core-,PYVERSION,
                   /lib $ORIGIN/python-core-,PYVERSION,
                   /lib/lib-dynload $ORIGIN/python-core-,PYVERSION,
                   /lib/site-packages $ORIGIN);
-    #endif
   #else
    #ifdef _gcc3
     Value = STRING(CONCAT7($ORIGIN/python-core-,PYVERSION,

Reply via email to