diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-09-08 06:59:30 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-09-08 07:08:20 -0300 |
commit | 747118af5e5ce2ae6376adfa9ede7cf3be9528b4 (patch) | |
tree | 1719c8fe322f3f3e217ab2365f9136bfeb0cbf8c /community/py3-greenlet | |
parent | 4e08063a7e87b7034ad05162c1a612ddcf2b817e (diff) | |
download | aports-747118af5e5ce2ae6376adfa9ede7cf3be9528b4.tar.bz2 aports-747118af5e5ce2ae6376adfa9ede7cf3be9528b4.tar.xz |
community/py3-greenlet: rename from py-greenlet
Diffstat (limited to 'community/py3-greenlet')
-rw-r--r-- | community/py3-greenlet/APKBUILD | 58 | ||||
-rw-r--r-- | community/py3-greenlet/ppc64le_clobbering.patch | 38 |
2 files changed, 96 insertions, 0 deletions
diff --git a/community/py3-greenlet/APKBUILD b/community/py3-greenlet/APKBUILD new file mode 100644 index 0000000000..26f85c5400 --- /dev/null +++ b/community/py3-greenlet/APKBUILD @@ -0,0 +1,58 @@ +# Maintainer: Elizabeth Jennifer Myers <elizabeth@sporksirc.net> +# Contributor: Elizabeth Jennifer Myers <elizabeth@sporksirc.net> +pkgname=py-greenlet +_pkgname=greenlet +pkgver=0.4.15 +pkgrel=1 +pkgdesc="Lightweight in-process concurrent programming" +url="https://pypi.python.org/pypi/greenlet" +arch="all" +license="MIT" +depends="" +makedepends="python2-dev py-setuptools python3-dev" +subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz + ppc64le_clobbering.patch" + +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + case "$CARCH" in + mips*) ;; + *) export CFLAGS="-O0" CPPFLAGS="-O0" CXXFLAGS="-O0" ;; + esac + python2 setup.py build + python3 setup.py build +} + +package() { + mkdir -p "$pkgdir" +} + +check() { + cd "$builddir" + python2 setup.py test + python3 setup.py test +} + +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + _py python2 + replaces="$pkgname" +} + +_py3() { + _py python3 +} + +sha512sums="a3b7856aadc988fe153f5cf62552dd6219358f35ee2ca136e5eb5c9871cb7545986753af299e6b3e95877e9aa564559e95c548785f78e680766630b047a1ec89 greenlet-0.4.15.tar.gz +7dde3227207c3d637031c37f4ea2e81d454a3481164b58984528fa186e3edfa30d7f6075fef31c6b5f75c3b08129ec38ccc4d10c0c2cf3fb763803fc6dbd4643 ppc64le_clobbering.patch" diff --git a/community/py3-greenlet/ppc64le_clobbering.patch b/community/py3-greenlet/ppc64le_clobbering.patch new file mode 100644 index 0000000000..bb76ac8519 --- /dev/null +++ b/community/py3-greenlet/ppc64le_clobbering.patch @@ -0,0 +1,38 @@ +diff --git a/platform/switch_ppc64_linux.h b/platform/switch_ppc64_linux.h +index 88e6847..feb60d4 100644 +--- a/platform/switch_ppc64_linux.h ++++ b/platform/switch_ppc64_linux.h +@@ -66,7 +66,6 @@ + + #define REGS_TO_SAVE "r14", "r15", "r16", "r17", "r18", "r19", "r20", \ + "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", \ +- "r31", \ + "fr14", "fr15", "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", \ + "fr22", "fr23", "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", \ + "fr30", "fr31", \ +@@ -80,21 +79,25 @@ slp_switch(void) + register long *stackref, stsizediff; + void * toc; + void * r30; ++ void * r31; + __asm__ volatile ("" : : : REGS_TO_SAVE); + __asm__ volatile ("std 2, %0" : "=m" (toc)); + __asm__ volatile ("std 30, %0" : "=m" (r30)); ++ __asm__ volatile ("std 31, %0" : "=m" (r31)); + __asm__ ("mr %0, 1" : "=r" (stackref) : ); + { + SLP_SAVE_STATE(stackref, stsizediff); + __asm__ volatile ( + "mr 11, %0\n" + "add 1, 1, 11\n" ++ "add 31, 31, 11\n" + : /* no outputs */ + : "r" (stsizediff) + : "11" + ); + SLP_RESTORE_STATE(); + } ++ __asm__ volatile ("ld 31, %0" : : "m" (r31)); + __asm__ volatile ("ld 30, %0" : : "m" (r30)); + __asm__ volatile ("ld 2, %0" : : "m" (toc)); + __asm__ volatile ("" : : : REGS_TO_SAVE); |