summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Matteo Bernardini2019-04-17 11:55:13 +0200
committer Matteo Bernardini2019-12-01 09:14:57 +0100
commitbc47d716fadf3c8d40cbfac52ac155b7617fd5fd (patch)
tree5b7267f86a78380fb07bfbde087d591ed57915dd
parent2c23354f4afa52411899696c620ab69542269be7 (diff)
downloadslackbuilds-virtualbox.tar.gz
system/virtualbox: Patch for python >= 3.7.virtualbox
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--system/virtualbox/python_3.7.patch13
-rw-r--r--system/virtualbox/virtualbox.SlackBuild3
2 files changed, 16 insertions, 0 deletions
diff --git a/system/virtualbox/python_3.7.patch b/system/virtualbox/python_3.7.patch
new file mode 100644
index 0000000000..2bc9d0ee44
--- /dev/null
+++ b/system/virtualbox/python_3.7.patch
@@ -0,0 +1,13 @@
+diff -Naur VirtualBox-5.2.8.orig/src/libs/xpcom18a4/python/src/ErrorUtils.cpp VirtualBox-5.2.8/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
+--- VirtualBox-5.2.8.orig/src/libs/xpcom18a4/python/src/ErrorUtils.cpp 2018-02-26 17:05:25.000000000 +0100
++++ VirtualBox-5.2.8/src/libs/xpcom18a4/python/src/ErrorUtils.cpp 2019-04-17 11:45:42.706698000 +0200
+@@ -440,7 +440,8 @@
+ #if PY_MAJOR_VERSION <= 2
+ char *tempResult = PyString_AsString(obResult);
+ #else
+- char *tempResult = PyUnicode_AsUTF8(obResult);
++ /* PyUnicode_AsUTF8() is const char * as of Python 3.7, char * earlier. */
++ const char *tempResult = (const char *)PyUnicode_AsUTF8(obResult);
+ #endif
+ result = (char *)PyMem_Malloc(strlen(tempResult)+1);
+ if (result==NULL)
diff --git a/system/virtualbox/virtualbox.SlackBuild b/system/virtualbox/virtualbox.SlackBuild
index 69f6b6a361..f53fde16c6 100644
--- a/system/virtualbox/virtualbox.SlackBuild
+++ b/system/virtualbox/virtualbox.SlackBuild
@@ -135,6 +135,9 @@ patch -d src/VBox/Installer/linux -i $CWD/vboxdrv.sh-setup.diff
# Fix wrong path to rdesktop-vrdp-keymaps
patch -p1 -i $CWD/006-rdesktop-vrdp-keymap-path.patch
+# Patch for python-3.7
+patch -p1 < $CWD/python_3.7.patch
+
# Remove gcc version check
sed -i 's/^check_gcc$/#check_gcc/' ./configure