diff options
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | gcc5.patch | 11 | ||||
-rw-r--r-- | swig.patch | 77 |
4 files changed, 159 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..22a629417a70 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = python2-enable + pkgdesc = Low-level drawing and interaction packages + pkgver = 4.5.1 + pkgrel = 1 + url = https://github.com/enthought/enable + arch = i686 + arch = x86_64 + license = BSD + makedepends = python2-distribute + makedepends = cython2 + makedepends = swig + depends = python2-reportlab + depends = python2-traitsui + depends = glu + conflicts = python-enthought-enable + conflicts = python2-enable-git + conflicts = python-ets-enable-svn + options = !emptydirs + source = python2-enable.tar.gz::https://github.com/enthought/enable/archive/4.5.1.tar.gz + source = swig.patch + source = gcc5.patch + md5sums = f25368400538909de5b165f1d9697ca0 + md5sums = bb0c5bbda3091c9b77fa74520eb84695 + md5sums = 0c1d220157b8b6d0b6c82b704b5156e3 + +pkgname = python2-enable + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a1861e4b0eb7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Andrzej Giniewicz <gginiu@gmail.com> +pkgname=python2-enable +pkgver=4.5.1 +pkgrel=1 +pkgdesc="Low-level drawing and interaction packages" +arch=('i686' 'x86_64') +url="https://github.com/enthought/enable" +license=('BSD') +depends=('python2-reportlab' 'python2-traitsui' 'glu') +makedepends=('python2-distribute' 'cython2' 'swig') +conflicts=('python-enthought-enable' 'python2-enable-git' 'python-ets-enable-svn') +options=(!emptydirs) + +source=("$pkgname.tar.gz::https://github.com/enthought/enable/archive/${pkgver}.tar.gz" "swig.patch" "gcc5.patch") +md5sums=('f25368400538909de5b165f1d9697ca0' + 'bb0c5bbda3091c9b77fa74520eb84695' + '0c1d220157b8b6d0b6c82b704b5156e3') + +prepare() { + cd "$srcdir"/enable-$pkgver + + patch -p 1 < ../swig.patch + patch -p 0 < ../gcc5.patch + + sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ + -i $(find . -name '*.py') +} + +build() { + cd "$srcdir"/enable-$pkgver + + python2 setup.py build +} + +package() { + cd "$srcdir"/enable-$pkgver + + python2 setup.py install --root="$pkgdir"/ --optimize=1 + + install -D "LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + diff --git a/gcc5.patch b/gcc5.patch new file mode 100644 index 000000000000..0e428b9d8b88 --- /dev/null +++ b/gcc5.patch @@ -0,0 +1,11 @@ +--- kiva/agg/setup.py.orig 2015-07-07 20:52:27.901686497 +0200 ++++ kiva/agg/setup.py 2015-07-07 20:52:37.228293774 +0200 +@@ -170,7 +170,7 @@ + f = os.popen("g++ --version") + line0 = f.readline() + f.close() +- m = re.match(r'.+?\s(3|4)\.\d+', line0) ++ m = re.match(r'.+?\s(3|4|5)\.\d+', line0) + if int(m.group(1)) < 4: + use_32bit_workaround = True + diff --git a/swig.patch b/swig.patch new file mode 100644 index 000000000000..48069fa2a6b6 --- /dev/null +++ b/swig.patch @@ -0,0 +1,77 @@ +diff -ur enable-4.5.0/kiva/agg/src/affine_matrix.i enable-4.5.0_swig_fix/kiva/agg/src/affine_matrix.i +--- enable-4.5.0/kiva/agg/src/affine_matrix.i 2015-03-23 11:27:31.000000000 -0600 ++++ enable-4.5.0_swig_fix/kiva/agg/src/affine_matrix.i 2015-03-25 12:00:40.000000000 -0600 +@@ -157,7 +157,7 @@ + }; + }; + +-%pythoncode { ++%pythoncode %{ + def is_sequence(arg): + try: + len(arg) +@@ -184,7 +184,7 @@ + """ + self.multiply(other) + return self +-} ++%} + + %extend agg24::trans_affine + { +diff -ur enable-4.5.0/kiva/agg/src/constants.i enable-4.5.0_swig_fix/kiva/agg/src/constants.i +--- enable-4.5.0/kiva/agg/src/constants.i 2015-03-23 11:27:31.000000000 -0600 ++++ enable-4.5.0_swig_fix/kiva/agg/src/constants.i 2015-03-25 11:58:24.000000000 -0600 +@@ -44,7 +44,7 @@ + unsigned path_cmd(unsigned c); + unsigned path_flags(unsigned c); + +-%pythoncode { ++%pythoncode %{ + + #---------------------------------------------------------------------------- + # +@@ -141,4 +141,4 @@ + for key,value in interp_string_map.items(): + interp_enum_map[value] = key + +-} ++%} +diff -ur enable-4.5.0/kiva/agg/src/hit_test.i enable-4.5.0_swig_fix/kiva/agg/src/hit_test.i +--- enable-4.5.0/kiva/agg/src/hit_test.i 2015-03-23 11:27:31.000000000 -0600 ++++ enable-4.5.0_swig_fix/kiva/agg/src/hit_test.i 2015-03-25 12:01:02.000000000 -0600 +@@ -22,7 +22,7 @@ + } + + %pythoncode +-{ ++%{ + from numpy import shape, transpose, zeros, rank, reshape, int32 + + def points_in_polygon(pts, poly_pts, use_winding=False): +@@ -92,4 +92,4 @@ + else: + _agg.points_in_polygon(pts, poly_pts, results) + return results +-} ++%} +diff -ur enable-4.5.0/kiva/agg/src/rgba.i enable-4.5.0_swig_fix/kiva/agg/src/rgba.i +--- enable-4.5.0/kiva/agg/src/rgba.i 2015-03-23 11:27:31.000000000 -0600 ++++ enable-4.5.0_swig_fix/kiva/agg/src/rgba.i 2015-03-25 11:59:59.000000000 -0600 +@@ -74,7 +74,7 @@ + } + + +-%pythoncode { ++%pythoncode %{ + def is_sequence(arg): + try: + len(arg) +@@ -90,6 +90,6 @@ + if len(args) not in [3,4]: + raise ValueError, "array argument must be 1x3 or 1x4" + _Rgba.__init__(self,*args) +-} ++%} + + %clear double r, double g, double b, double a; |