summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerry2017-09-12 15:15:59 +0700
committerHerry2017-09-12 15:15:59 +0700
commit3720efe66ccf63b0377a71c94690cea63f129515 (patch)
tree68cc343687f40122f93fef8c2b191417fd501f1e
downloadaur-3720efe66ccf63b0377a71c94690cea63f129515.tar.gz
initial commit
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD52
-rw-r--r--wxpython-nuitka-methods.patch31
3 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c0bb6418b0ef
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = wxpython-nuitka
+ pkgdesc = A wxWidgets GUI toolkit for Python. Nuitka compilable version.
+ pkgver = 3.0.2.0
+ pkgrel = 3
+ url = https://www.wxpython.org
+ arch = i686
+ arch = x86_64
+ arch = armv7h
+ license = custom:wxWindows
+ makedepends = mesa
+ makedepends = glu
+ depends = wxgtk3
+ depends = python2
+ provides = wxpython=3.0.2.0
+ conflicts = wxpython
+ source = https://downloads.sourceforge.net/wxpython/wxPython-src-3.0.2.0.tar.bz2
+ source = wxpython-nuitka-methods.patch
+ sha256sums = d54129e5fbea4fb8091c87b2980760b72c22a386cb3b9dd2eebc928ef5e8df61
+ sha256sums = c9266e81f6b9206675717c7c2aa082ec44bf694cd7f10318b2581831d9e517cc
+
+pkgname = wxpython-nuitka
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3535eeaa7f28
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Herry Sugiharto <herrysugiharto@gmail.com>
+# Maintainer: Eric BĂ©langer <eric@archlinux.org>
+
+pkgname=wxpython-nuitka
+pkgver=3.0.2.0
+pkgrel=3
+pkgdesc="A wxWidgets GUI toolkit for Python. Nuitka compilable version."
+arch=('i686' 'x86_64' 'armv7h')
+license=('custom:wxWindows')
+url="https://www.wxpython.org"
+depends=('wxgtk3' 'python2')
+makedepends=('mesa' 'glu')
+provides=('wxpython=3.0.2.0')
+conflicts=('wxpython')
+source=("https://downloads.sourceforge.net/wxpython/wxPython-src-${pkgver}.tar.bz2"
+ "wxpython-nuitka-methods.patch")
+sha256sums=('d54129e5fbea4fb8091c87b2980760b72c22a386cb3b9dd2eebc928ef5e8df61'
+ 'c9266e81f6b9206675717c7c2aa082ec44bf694cd7f10318b2581831d9e517cc')
+
+prepare() {
+ find . -type f -exec sed -i 's/env python/env python2/' {} \;
+ cd wxPython-src-${pkgver}
+ patch -Np1 -i ../../wxpython-nuitka-methods.patch
+ cd ${srcdir}
+}
+
+build() {
+ cd wxPython-src-${pkgver}
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib \
+ --includedir=/usr/include \
+ --with-gtk=3 \
+ --with-opengl \
+ --enable-unicode \
+ --enable-graphics_ctx \
+ --disable-precomp-headers \
+ --with-regex=sys \
+ --with-libpng=sys \
+ --with-libxpm=sys \
+ --with-libjpeg=sys \
+ --with-libtiff=sys \
+ --with-wx-config=/usr/bin/wx-config-gtk3
+ cd wxPython
+ python2 setup.py WX_CONFIG=/usr/bin/wx-config-gtk3 WXPORT=gtk3 UNICODE=1 build
+}
+
+package() {
+ cd wxPython-src-${pkgver}/wxPython
+ python2 setup.py WX_CONFIG=/usr/bin/wx-config-gtk3 WXPORT=gtk3 UNICODE=1 install --root="${pkgdir}"
+ install -Dm644 ../docs/licence.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
diff --git a/wxpython-nuitka-methods.patch b/wxpython-nuitka-methods.patch
new file mode 100644
index 000000000000..49a3f6f29f1d
--- /dev/null
+++ b/wxpython-nuitka-methods.patch
@@ -0,0 +1,31 @@
+diff -uw old/wxPython/src/helpers.cpp new/wxPython/src/helpers.cpp
+--- old/wxPython/src/helpers.cpp 2015-01-06 23:33:57.306574595 +0100
++++ new/wxPython/src/helpers.cpp 2015-01-06 23:31:59.406447996 +0100
+@@ -1945,15 +1945,23 @@
+
+ void wxPyCallbackHelper::setRecursionGuard(PyObject* method) const
+ {
+- PyFunctionObject* func = (PyFunctionObject*)PyMethod_Function(method);
++ if (PyMethod_Check(method)) {
++ PyFunctionObject* func = (PyFunctionObject*)PyMethod_GET_FUNCTION(method);
+ PyObject_SetAttr(m_self, func->func_name, Py_None);
++ } else {
++ PyObject* name = PyObject_GetAttrString(method, "__name__");
++ PyObject_SetAttr(m_self, name, Py_None);
++ }
+ }
+
+ void wxPyCallbackHelper::clearRecursionGuard(PyObject* method) const
+ {
+- PyFunctionObject* func = (PyFunctionObject*)PyMethod_Function(method);
+- if (PyObject_HasAttr(m_self, func->func_name)) {
+- PyObject_DelAttr(m_self, func->func_name);
++ if (PyMethod_Check(method)) {
++ PyFunctionObject* func = (PyFunctionObject*)PyMethod_GET_FUNCTION(method);
++ PyObject_SetAttr(m_self, func->func_name, NULL);
++ } else {
++ PyObject* name = PyObject_GetAttrString(method, "__name__");
++ PyObject_SetAttr(m_self, name, NULL);
+ }
+ }
+