git: eed93fcb3b1e - main - emulators/virtualbox-ose{,-nox11}-legacy: Unbreak build with PYTHON option with python 3.10+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 19 Jan 2025 02:01:23 UTC
The branch main has been updated by vvd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=eed93fcb3b1e681b6f889b7d30b63385f2479dd2
commit eed93fcb3b1e681b6f889b7d30b63385f2479dd2
Author: Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2025-01-19 01:57:22 +0000
Commit: Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-01-19 02:00:46 +0000
emulators/virtualbox-ose{,-nox11}-legacy: Unbreak build with PYTHON option with python 3.10+
MFH: 2025Q1
---
.../files/patch-src_libs_xpcom18a4_python_src_PyXPCOM.h | 11 +++++++++++
emulators/virtualbox-ose-legacy/pkg-plist | 6 ++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_libs_xpcom18a4_python_src_PyXPCOM.h b/emulators/virtualbox-ose-legacy/files/patch-src_libs_xpcom18a4_python_src_PyXPCOM.h
new file mode 100644
index 000000000000..82f7b847556d
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src_libs_xpcom18a4_python_src_PyXPCOM.h
@@ -0,0 +1,11 @@
+--- src/libs/xpcom18a4/python/src/PyXPCOM.h.orig
++++ src/libs/xpcom18a4/python/src/PyXPCOM.h
+@@ -140,7 +140,7 @@ inline PyObject *PyBool_FromLong(long ok)
+ # ifndef PyUnicode_AsUTF8
+ # define PyUnicode_AsUTF8(o) _PyUnicode_AsString(o)
+ # endif
+-# ifndef PyUnicode_AsUTF8AndSize
++# if PY_MINOR_VERSION < 10
+ # define PyUnicode_AsUTF8AndSize(o,s) _PyUnicode_AsStringAndSize(o,s)
+ # endif
+ typedef struct PyMethodChain
diff --git a/emulators/virtualbox-ose-legacy/pkg-plist b/emulators/virtualbox-ose-legacy/pkg-plist
index ecaa95f51ab1..d95f1eeccd6a 100644
--- a/emulators/virtualbox-ose-legacy/pkg-plist
+++ b/emulators/virtualbox-ose-legacy/pkg-plist
@@ -333,7 +333,10 @@ include/virtualbox/xpcom/xptcall.h
include/virtualbox/xpcom/xptcstubsdecl.inc
include/virtualbox/xpcom/xptcstubsdef.inc
include/virtualbox/xpcom/xptinfo.h
-%%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi-1.0-py%%PYTHON_VER%%.egg-info
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi-1.0-py%%PYTHON_VER%%.egg-info/PKG-INFO
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi-1.0-py%%PYTHON_VER%%.egg-info/SOURCES.txt
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi-1.0-py%%PYTHON_VER%%.egg-info/dependency_links.txt
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi-1.0-py%%PYTHON_VER%%.egg-info/top_level.txt
%%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi/VirtualBox_constants.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi%%PYTHON_PYCDIR%%VirtualBox_constants%%PYTHON_PYCEXT%%
%%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi/__init__.py
@@ -398,7 +401,6 @@ lib/virtualbox/VBoxNetDHCP.so
@(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxNetNAT
lib/virtualbox/VBoxNetNAT.so
%%PYTHON%%lib/virtualbox/VBoxPython.so
-%%PYTHON%%lib/virtualbox/VBoxPython%%PYTHON_VERU%%.so
lib/virtualbox/VBoxREM.so
%%I386%%lib/virtualbox/VBoxREM32.so
%%I386%%lib/virtualbox/VBoxREM64.so