[arch-commits] Commit in wxpython/trunk (PKGBUILD wxpython-cairo.patch)

Eric Bélanger eric at archlinux.org
Sun Nov 6 19:37:40 EST 2011


    Date: Sunday, November 6, 2011 @ 19:37:39
  Author: eric
Revision: 142235

upgpkg: wxpython 2.8.12.1-2

Fix issue with pycairo 1.10 (close FS#26770)

Added:
  wxpython/trunk/wxpython-cairo.patch
Modified:
  wxpython/trunk/PKGBUILD

----------------------+
 PKGBUILD             |    9 ++++----
 wxpython-cairo.patch |   51 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-11-06 21:12:47 UTC (rev 142234)
+++ PKGBUILD	2011-11-07 00:37:39 UTC (rev 142235)
@@ -3,16 +3,16 @@
 
 pkgname=wxpython
 pkgver=2.8.12.1
-pkgrel=1
+pkgrel=2
 pkgdesc="A wxWidgets GUI toolkit for Python"
 arch=('i686' 'x86_64')
 license=('custom:wxWindows')
 url="http://www.wxpython.org"
 depends=('wxgtk' 'python2')
 makedepends=('mesa')
-source=(http://downloads.sourceforge.net/wxpython/wxPython-src-${pkgver}.tar.bz2)
-md5sums=('8c06c5941477beee213b4f2fa78be620')
-sha1sums=('05688dc03d61631750f5904273122bb40a2115f5')
+source=(http://downloads.sourceforge.net/wxpython/wxPython-src-${pkgver}.tar.bz2 wxpython-cairo.patch)
+sha1sums=('05688dc03d61631750f5904273122bb40a2115f5'
+          '420700b0a216b853352ffafd054f406a82a30bb3')
 
 build() {
   cd "${srcdir}/wxPython-src-${pkgver}"
@@ -22,6 +22,7 @@
     --enable-graphics_ctx --with-gnomeprint --disable-optimize --enable-mediactrl \
     --with-libpng=sys --with-libxpm=sys --with-libjpeg=sys --with-libtiff=sys
   cd "${srcdir}/wxPython-src-${pkgver}/wxPython"
+  patch -p2 -i "${srcdir}/wxpython-cairo.patch"
   python2 setup.py WXPORT=gtk2 UNICODE=1 build
 }
 

Added: wxpython-cairo.patch
===================================================================
--- wxpython-cairo.patch	                        (rev 0)
+++ wxpython-cairo.patch	2011-11-07 00:37:39 UTC (rev 142235)
@@ -0,0 +1,51 @@
+--- wxPython/trunk/wx/lib/wxcairo.py	2011/08/25 18:50:02	68894
++++ wxPython/trunk/wx/lib/wxcairo.py	2011/09/22 00:30:25	69181
+@@ -401,6 +401,48 @@
+                                                       ctypes.py_object)),
+             ('Check_Status', ctypes.PYFUNCTYPE(ctypes.c_int, ctypes.c_int))]
+ 
++    # This structure is known good with pycairo 1.10.0. The keep adding stuff
++    # to the middle of the structure instead of only adding to the end!
++    elif cairo.version_info < (1,11):  
++        _fields_ = [
++            ('Context_Type', ctypes.py_object),
++            ('Context_FromContext', ctypes.PYFUNCTYPE(ctypes.py_object,
++                                                      ctypes.c_void_p,
++                                                      ctypes.py_object,
++                                                      ctypes.py_object)),
++            ('FontFace_Type', ctypes.py_object),
++            ('ToyFontFace_Type', ctypes.py_object),  #** new in 1.8.4
++            ('FontFace_FromFontFace', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p)),
++            ('FontOptions_Type', ctypes.py_object),
++            ('FontOptions_FromFontOptions', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p)),
++            ('Matrix_Type', ctypes.py_object),
++            ('Matrix_FromMatrix', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p)),
++            ('Path_Type', ctypes.py_object),
++            ('Path_FromPath', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p)),
++            ('Pattern_Type', ctypes.py_object),
++            ('SolidPattern_Type', ctypes.py_object),
++            ('SurfacePattern_Type', ctypes.py_object),
++            ('Gradient_Type', ctypes.py_object),
++            ('LinearGradient_Type', ctypes.py_object),
++            ('RadialGradient_Type', ctypes.py_object),
++            ('Pattern_FromPattern', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p,
++                                                      ctypes.py_object)), #** changed in 1.8.4
++            ('ScaledFont_Type', ctypes.py_object),
++            ('ScaledFont_FromScaledFont', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p)),
++            ('Surface_Type', ctypes.py_object),
++            ('ImageSurface_Type', ctypes.py_object),
++            ('PDFSurface_Type', ctypes.py_object),
++            ('PSSurface_Type', ctypes.py_object),
++            ('SVGSurface_Type', ctypes.py_object),
++            ('Win32Surface_Type', ctypes.py_object),
++            ('Win32PrintingSurface_Type', ctypes.py_object),
++            ('XCBSurface_Type', ctypes.py_object),
++            ('XlibSurface_Type', ctypes.py_object),
++            ('Surface_FromSurface', ctypes.PYFUNCTYPE(ctypes.py_object,
++                                                      ctypes.c_void_p,
++                                                      ctypes.py_object)),
++            ('Check_Status', ctypes.PYFUNCTYPE(ctypes.c_int, ctypes.c_int))]
++
+ 
+ def _loadPycairoAPI():
+     global pycairoAPI



More information about the arch-commits mailing list