# $Id: PKGBUILD 203510 2014-01-12 02:18:23Z eric $ # Maintainer: Eric BĂ©langer pkgname=wxpython pkgver=3.0.0.0 _editraver=0.7.20 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' 'glu') source=(http://downloads.sourceforge.net/wxpython/wxPython-src-${pkgver}.tar.bz2 http://editra.org/uploads/src/Editra-${_editraver}.tar.gz) sha1sums=('48451763275cfe4e5bbec49ccd75bc9652cba719' 'f439f4aa2cb90b8348cebb1670df9cf47ba341ab') prepare() { cd "${srcdir}" find . -type f -exec sed -i 's/env python/env python2/' {} \; sed -i 's/sys.exit(1)//' Editra-${_editraver}/setup.py } build() { cd "${srcdir}/wxPython-src-${pkgver}" ./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode \ --enable-graphics_ctx --enable-mediactrl --disable-precomp-headers \ --with-regex=sys --with-libpng=sys --with-libxpm=sys --with-libjpeg=sys --with-libtiff=sys cd wxPython python2 setup.py WXPORT=gtk2 UNICODE=1 build } package() { cd "${srcdir}/wxPython-src-${pkgver}/wxPython" python2 setup.py WXPORT=gtk2 UNICODE=1 install --root="${pkgdir}" install -D -m644 ../docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" cd "${srcdir}/Editra-${_editraver}" python2 setup.py install --root="${pkgdir}" rm -r "${pkgdir}/usr/lib/python2.7/site-packages/wx-3.0-gtk2/wx/tools/Editra" }