aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Camuffo <dev@fmac.xyz>2022-01-08 15:30:49 +0100
committeralice <alice@ayaya.dev>2022-02-16 23:38:31 +0000
commit9fdb11eafb414cfc6af57716a7ae9c10290eab06 (patch)
tree027a6dcec49ed6907aee283f669d4e5cf4289010
parentf91f7910027bf622965329aa4fb48769bd6158bd (diff)
downloadaports-patches/3868.tar.gz
aports-patches/3868.tar.bz2
aports-patches/3868.tar.xz
testing/faust: new aportpatches/3868
https://faust.grame.fr Functional programming language for realtime audio signal processing
-rw-r--r--testing/faust/APKBUILD59
-rw-r--r--testing/faust/faust-musl-stacktrace.patch16
-rw-r--r--testing/faust/faust-tests-old-libraries.patch35
3 files changed, 110 insertions, 0 deletions
diff --git a/testing/faust/APKBUILD b/testing/faust/APKBUILD
new file mode 100644
index 0000000000..477fa8d9d6
--- /dev/null
+++ b/testing/faust/APKBUILD
@@ -0,0 +1,59 @@
+# Contributor: Francesco Camuffo <dev@fmac.xyz>
+# Maintainer: Francesco Camuffo <dev@fmac.xyz>
+pkgname=faust
+pkgver=2.37.3
+pkgrel=0
+pkgdesc="Functional programming language for realtime audio signal processing"
+url="https://faust.grame.fr"
+arch="all"
+license="GPL-2.0-or-later"
+checkdepends="bash"
+makedepends="
+ cmake
+ libexecinfo-dev
+ libmicrohttpd-dev
+ libsndfile-dev
+ llvm-dev
+ "
+subpackages="$pkgname-doc $pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/grame-cncm/faust/releases/download/$pkgver/faust-$pkgver.tar.gz
+ faust-musl-stacktrace.patch
+ faust-tests-old-libraries.patch"
+
+build() {
+ cmake -B "$pkgname"-build \
+ -S build \
+ -C build/backends/all.cmake \
+ -C build/targets/all.cmake \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DINCLUDE_DYNAMIC=ON \
+ -DINCLUDE_STATIC=ON \
+ -DINCLUDE_ITP=ON \
+ -Wno-dev
+ make VERBOSE=1 -C "$pkgname"-build
+ make VERBOSE=1 -C tools/sound2faust
+}
+
+check() {
+ make interp -C tests/compile-tests
+}
+
+package() {
+ make -C "$pkgname"-build PREFIX=/usr DESTDIR="$pkgdir" install
+
+ # remove precompiled shared libraries for android:
+ # https://github.com/grame-cncm/faust/issues/370
+ rm -rvf "$pkgdir"/usr/share/faust/android/app/lib \
+ "$pkgdir"/usr/share/faust/android/app/oboe \
+ "$pkgdir"/usr/share/faust/smartKeyboard/android/app/oboe
+
+ # rename usage.sh to something more appropriate
+ mv "$pkgdir"/usr/bin/usage.sh "$pkgdir"/usr/bin/faust-usage.sh
+}
+
+sha512sums="
+29c27c1d4b71f63e5a42abdb1557e88ac9d623242a85df16478756a7bcbc3fe78466ace1280ea6a3cd04c979201e52a703f7be53b8a047dcc1f8fa7e034ef26d faust-2.37.3.tar.gz
+f3e07bdd26ab8f0ffbf0c0dfbf8141facc07d2db05346f3b982faca613aa5ecad8986683db8d49caed720d58b183b215d6e1c4ceef069f29f41bcfa699ad5f28 faust-musl-stacktrace.patch
+fe0b800809ea1fcb4fd44e306eff7f01b9316ddc3406bdc52f0e783a3710b5b8e6e05a5925766e4fd73666cc6ca9f42027f608c7f7dbe44436b28e1787703595 faust-tests-old-libraries.patch
+"
diff --git a/testing/faust/faust-musl-stacktrace.patch b/testing/faust/faust-musl-stacktrace.patch
new file mode 100644
index 0000000000..8472a9e599
--- /dev/null
+++ b/testing/faust/faust-musl-stacktrace.patch
@@ -0,0 +1,16 @@
+https://github.com/void-linux/void-packages/blob/ebf9ad105986ec27a9d8a794318df3016df2ee13/srcpkgs/faust/patches/faust-musl-stacktrace.patch
+
+--- a/compiler/errors/errormsg.cpp-old 2019-12-22 19:47:17.694670614 +0100
++++ b/compiler/errors/errormsg.cpp 2019-12-22 19:48:25.145673133 +0100
+@@ -43,9 +43,11 @@
+ gGlobal->printCompilationOptions(str);
+ }
+ str << ")\n";
++#ifdef __GLIBC__
+ #ifndef EMCC
+ stacktrace(str, 20);
+ #endif
++#endif
+ throw faustexception(str.str());
+ }
+ }
diff --git a/testing/faust/faust-tests-old-libraries.patch b/testing/faust/faust-tests-old-libraries.patch
new file mode 100644
index 0000000000..26f3d53e0e
--- /dev/null
+++ b/testing/faust/faust-tests-old-libraries.patch
@@ -0,0 +1,35 @@
+From 974d4da02b525261d934a9eb70e41a1c4ee309c3 Mon Sep 17 00:00:00 2001
+From: Stephane Letz <letz@grame.fr>
+Date: Fri, 7 Jan 2022 18:27:52 +0100
+Subject: [PATCH] Correct compile-tests to be used even if faust is not
+ installed.
+
+---
+ tests/compile-tests/Make.lang | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/tests/compile-tests/Make.lang b/tests/compile-tests/Make.lang
+index 3e27a69ac..7fd5ffa9b 100644
+--- a/tests/compile-tests/Make.lang
++++ b/tests/compile-tests/Make.lang
+@@ -13,7 +13,8 @@ MAKE ?= make
+
+ SAMPLESROOT := ../..
+ REGRESSION := ..
+-FAUSTLIBS ?= ../../libraries
++FAUSTLIBS1 ?= ../../libraries
++FAUSTLIBS2 ?= ../../libraries/old
+
+ FAUSTOPTIONS ?=
+ outdir ?= cpp
+@@ -75,8 +76,8 @@ $(version)/$(outdir):
+ # generic rule rule for $(lang) output
+ $(version)/$(outdir)/%.$(ext): $(SAMPLESROOT)/%.dsp
+ @[ -d $(@D) ] || mkdir -p $(@D)
+- $(FAUST) -lang $(lang) -I $(FAUSTLIBS) $(FAUSTOPTIONS) $< -o $@
++ $(FAUST) -lang $(lang) -I $(FAUSTLIBS1) -I $(FAUSTLIBS2) $(FAUSTOPTIONS) $< -o $@
+
+ $(version)/$(outdir)/%.$(ext): $(REGRESSION)/%.dsp
+ @[ -d $(@D) ] || mkdir -p $(@D)
+- $(FAUST) -lang $(lang) -I $(FAUSTLIBS) $(FAUSTOPTIONS) $< -o $@
++ $(FAUST) -lang $(lang) -I $(FAUSTLIBS1) -I $(FAUSTLIBS2) $(FAUSTOPTIONS) $< -o $@