Subject: [alpine-aports] [PATCH] testing/py3-pyo: new aport

From: Jean-Louis Fuchs <[email-masked]>
Date: Tue, 29 Aug 2017 21:39:57 +0200

---
 testing/py3-pyo/APKBUILD             | 31 +++++++++++++++++++++++++++++++
 testing/py3-pyo/portaudio-only.patch | 14 ++++++++++++++
 testing/py3-pyo/remove-O3.patch      | 12 ++++++++++++
 3 files changed, 57 insertions(+)
 create mode 100644 testing/py3-pyo/APKBUILD
 create mode 100644 testing/py3-pyo/portaudio-only.patch
 create mode 100644 testing/py3-pyo/remove-O3.patch

diff --git a/testing/py3-pyo/APKBUILD b/testing/py3-pyo/APKBUILD
new file mode 100644
index 0000000000..92eaa7e984
--- /dev/null
+++ b/testing/py3-pyo/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Jean-Louis Fuchs <[email-masked]>
+# Maintainer: Jean-Louis Fuchs <[email-masked]>
+pkgname=py3-pyo
+_pkgname=pyo
+pkgver=0.8.6
+pkgrel=0
+pkgdesc="dedicated Python module for digital signal processing"
+url="http://ajaxsoundstudio.com/software/pyo/"
+arch="all"
+license="GPL"
+options="!check"
+depends="python3 python3-tkinter"
+makedepends="python3-dev portaudio-dev libsndfile-dev"
+source="http://ajaxsoundstudio.com/downloads/${_pkgname}_${pkgver}-src.tar.bz2
+	portaudio-only.patch
+	remove-O3.patch"
+builddir="$srcdir/${_pkgname}_${pkgver}-src"
+
+build() {
+	cd "$builddir"
+	python3 setup.py build --minimal
+}
+
+package() {
+	cd "$builddir"
+	python3 setup.py install --root="$pkgdir" --optimize=1
+}
+
+sha512sums="7cde34f16710d7375dc7ccd88c4496bc9b4b3c8af3affdc3c2933d9a51c57e860e16b3a1e28d45589ef39813a640787c34ab8130f452c81cfd2958c14f660c42  pyo_0.8.6-src.tar.bz2
+292c16864698b39e40c869dcff8a34c564bd827ebdf7ae146d0dd50fbba02d3d5d32e0421a09737c7c1e68fb88bae208f6af4268ca38b838a01a6aeb103750c8  portaudio-only.patch
+5994f01ae188a2e414df914a2c096dc812966dab9b75caceae0a7d8d20f568e7770bc68bb670d391185697159ab967a6b95e58dc599606970508135280f6692b  remove-O3.patch"
diff --git a/testing/py3-pyo/portaudio-only.patch b/testing/py3-pyo/portaudio-only.patch
new file mode 100644
index 0000000000..e855903d13
--- /dev/null
+++ b/testing/py3-pyo/portaudio-only.patch
@@ -0,0 +1,14 @@
+diff -ruN a/setup.py b/setup.py
+--- a/setup.py	2017-08-29 21:04:01.704564192 +0200
++++ b/setup.py	2017-08-29 21:04:30.369416183 +0200
+@@ -94,7 +94,9 @@
+ if '--minimal' in sys.argv:
+     minimal_build = True
+     sys.argv.remove('--minimal') 
+-    libraries = []
++    macros.append(('USE_PORTAUDIO', None))
++    ad_files.append("ad_portaudio.c")
++    libraries = ["portaudio"]
+ else:
+     minimal_build = False
+     # portaudio
diff --git a/testing/py3-pyo/remove-O3.patch b/testing/py3-pyo/remove-O3.patch
new file mode 100644
index 0000000000..7595f2a813
--- /dev/null
+++ b/testing/py3-pyo/remove-O3.patch
@@ -0,0 +1,12 @@
+diff -ruN a/setup.py b/setup.py
+--- a/setup.py	2017-08-29 21:11:55.290997348 +0200
++++ b/setup.py	2017-08-29 21:12:13.690639738 +0200
+@@ -84,7 +84,7 @@
+     sys.argv.remove('--fast-compile')
+     oflag = "-O0"
+ else:
+-    oflag = "-O3"
++    oflag = "-Os"
+ 
+ # Specific audio drivers source files to compile
+ ad_files = []
-- 
2.13.5

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---