View | Details | Raw Unified | Return to bug 212691 | Differences between
and this patch

Collapse All | Expand All

(-)emulators/virtualbox-ose/Makefile (-1 / +2 lines)
Lines 163-169 USE_TEX= dvipsk:build formats:build Link Here
163
.endif
163
.endif
164
164
165
.if ${PORT_OPTIONS:MPYTHON}
165
.if ${PORT_OPTIONS:MPYTHON}
166
USES+=		python:2
166
USES+=		python
167
USE_PYTHON=	distutils noegginfo
167
USE_PYTHON=	distutils noegginfo
168
PYDISTUTILS_PKGNAME=	vboxapi
168
PYDISTUTILS_PKGNAME=	vboxapi
169
PYDISTUTILS_PKGVERSION=	1.0
169
PYDISTUTILS_PKGVERSION=	1.0
Lines 320-325 post-patch: Link Here
320
	    ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py
320
	    ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py
321
	@${REINPLACE_CMD} \
321
	@${REINPLACE_CMD} \
322
	    -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \
322
	    -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \
323
	    -e 's|SUPPYTHONLIBS=.*|SUPPYTHONLIBS="${PYTHON_VERSION}${PYTHON_ABIVER}"|' \
323
	    ${WRKSRC}/configure
324
	    ${WRKSRC}/configure
324
.if empty(ICONV_LIB)
325
.if empty(ICONV_LIB)
325
	@${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk \
326
	@${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk \
(-)emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_python_src_PyIID.cpp (+23 lines)
Line 0 Link Here
1
--- src/libs/xpcom18a4/python/src/PyIID.cpp.orig	2016-09-12 16:20:10 UTC
2
+++ src/libs/xpcom18a4/python/src/PyIID.cpp
3
@@ -318,12 +318,20 @@ Py_nsIID::PyTypeMethod_str(PyObject *sel
4
 	return ret;
5
 }
6
 
7
+#if PY_VERSION_HEX < 0x03020000
8
 /* static */long
9
+#else
10
+/* static */Py_hash_t
11
+#endif
12
 Py_nsIID::PyTypeMethod_hash(PyObject *self)
13
 {
14
 	const nsIID &iid = ((Py_nsIID *)self)->m_iid;
15
 
16
+#if PY_VERSION_HEX < 0x03020000
17
 	long ret = iid.m0 + iid.m1 + iid.m2;
18
+#else
19
+	Py_hash_t ret = iid.m0 + iid.m1 + iid.m2;
20
+#endif
21
 	for (int i=0;i<7;i++)
22
 		ret += iid.m3[i];
23
 	if ( ret == -1 )
(-)emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_python_src_PyXPCOM.h (+26 lines)
Line 0 Link Here
1
--- src/libs/xpcom18a4/python/src/PyXPCOM.h.orig	2016-09-12 16:20:10 UTC
2
+++ src/libs/xpcom18a4/python/src/PyXPCOM.h
3
@@ -286,7 +286,11 @@ public:
4
 	static int Py_setattr(PyObject *op, char *name, PyObject *v);
5
 	static int Py_cmp(PyObject *ob1, PyObject *ob2);
6
 	static PyObject *Py_richcmp(PyObject *ob1, PyObject *ob2, int op);
7
+#if PY_VERSION_HEX < 0x03020000
8
 	static long Py_hash(PyObject *self);
9
+#else
10
+	static Py_hash_t Py_hash(PyObject *self);
11
+#endif
12
 };
13
 
14
 //////////////////////////////////////////////////////////////////////////
15
@@ -442,7 +446,11 @@ public:
16
 #endif
17
 	static PyObject *PyTypeMethod_richcompare(PyObject *self, PyObject *ob, int op);
18
 	static PyObject *PyTypeMethod_repr(PyObject *self);
19
+#if PY_VERSION_HEX < 0x03020000
20
 	static long PyTypeMethod_hash(PyObject *self);
21
+#else
22
+	static Py_hash_t PyTypeMethod_hash(PyObject *self);
23
+#endif
24
 	static PyObject *PyTypeMethod_str(PyObject *self);
25
 	static void PyTypeMethod_dealloc(PyObject *self);
26
 	static NS_EXPORT_STATIC_MEMBER_(PyTypeObject) type;
(-)emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_python_src_TypeObject.cpp (+24 lines)
Line 0 Link Here
1
--- src/libs/xpcom18a4/python/src/TypeObject.cpp.orig	2016-09-12 16:20:11 UTC
2
+++ src/libs/xpcom18a4/python/src/TypeObject.cpp
3
@@ -155,13 +155,21 @@ PyXPCOM_TypeObject::Py_richcmp(PyObject 
4
 }
5
 
6
 // @pymethod int|Py_nsISupports|__hash__|Implement a hash-code for the XPCOM object using XPCOM identity rules.
7
+#if PY_VERSION_HEX < 0x03020000
8
 /*static*/long PyXPCOM_TypeObject::Py_hash(PyObject *self)
9
+#else
10
+/*static*/Py_hash_t PyXPCOM_TypeObject::Py_hash(PyObject *self)
11
+#endif
12
 {
13
 	// We always return the value of the nsISupports *.
14
 	nsISupports *pUnkThis;
15
 	if (!Py_nsISupports::InterfaceFromPyObject(self, NS_GET_IID(nsISupports), &pUnkThis, PR_FALSE))
16
 		return -1;
17
+#if PY_VERSION_HEX < 0x03020000
18
 	long ret = _Py_HashPointer(pUnkThis);
19
+#else
20
+	Py_hash_t ret = _Py_HashPointer(pUnkThis);
21
+#endif
22
 	pUnkThis->Release();
23
 	return ret;
24
 }

Return to bug 212691