<20220220175251.3373-1-dev@fmac.xyz>
https://faust.grame.fr Functional programming language for realtime audio signal processing --- Move usr/share/* from faust-dev to faust. Code generation should be possible without faust-dev Add subpackages: static, tools Remove more resources for unwanted platforms testing/faust/APKBUILD | 72 +++++++++++++++++++ testing/faust/faust-musl-stacktrace.patch | 16 +++++ testing/faust/faust-tests-old-libraries.patch | 35 +++++++++ 3 files changed, 123 insertions(+) create mode 100644 testing/faust/APKBUILD create mode 100644 testing/faust/faust-musl-stacktrace.patch create mode 100644 testing/faust/faust-tests-old-libraries.patch diff --git a/testing/faust/APKBUILD b/testing/faust/APKBUILD new file mode 100644 index 0000000000..2559b13098 --- /dev/null +++ b/testing/faust/APKBUILD @@ -0,0 +1,72 @@ +# 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-tools::noarch $pkgname-static $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 support for platforms not likely wanted + rm -rvf "$pkgname"/usr/bin/faust2au \ + "$pkgdir"/usr/lib/ios-libsndfile.a \ + "$pkgdir"/usr/share/faust/AU \ + "$pkgdir"/usr/share/faust/android \ + "$pkgdir"/usr/share/faust/iOS \ + "$pkgdir"/usr/share/faust/smartKeyboard +} + +dev() { + pkgdesc="$pkgdesc (development files)" + amove usr/include/* \ + usr/lib/*.so +} + +tools() { + pkgdesc="$pkgdesc (tools)" + amove usr/bin/encoderunitypackage \ + usr/bin/faust2* \ + usr/bin/filename2ident \ + usr/bin/sound2* +} + +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 $@ -- 2.34.1
<164539513341.985.11084677935925209345.gitlab.31248.599ecdbdf8837acc54529cadcacb5cbbd32bee6b@listserv.local>
<20220220175251.3373-1-dev@fmac.xyz>
(view parent)
On Sun, 20 Feb 2022 18:52:51 +0100, Francesco Camuffo wrote: > + amove usr/include/* \ > + usr/lib/*.so > +} is there a reason default_dev doesn't work for this? (just leaving this function out) -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_217400
<164539519860.985.6904494143314693950.gitlab.31248.8316db754f0af5a4a0fd04dd9de4f31ee83d5a63@listserv.local>
<20220220175251.3373-1-dev@fmac.xyz>
(view parent)
On Sun, 20 Feb 2022 18:52:51 +0100, Francesco Camuffo wrote: > + -Wno-dev > + make VERBOSE=1 -C "$pkgname"-build > + make VERBOSE=1 -C tools/sound2faust instead of this, you should use the `cmake --build` invocation, and same for `cmake --install` below in package() -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_217401
<164539520310.985.13173143855558635664.gitlab.31248.e7aa2bfd1539e4b678ec5a7519be7aa32a77ba4e@listserv.local>
<20220220175251.3373-1-dev@fmac.xyz>
(view parent)
On Sun, 20 Feb 2022 18:52:51 +0100, Francesco Camuffo wrote: > +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" ```suggestion:-0+0 faust-tests-old-libraries.patch " ``` -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_217402
<164539525026.985.6254954966243441574.gitlab.31248.8316db754f0af5a4a0fd04dd9de4f31ee83d5a63@listserv.local>
<164539519860.985.6904494143314693950.gitlab.31248.8316db754f0af5a4a0fd04dd9de4f31ee83d5a63@listserv.local>
(view parent)
On Sun, 20 Feb 2022 18:52:51 +0100, Francesco Camuffo wrote: > + -Wno-dev > + make VERBOSE=1 -C "$pkgname"-build > + make VERBOSE=1 -C tools/sound2faust you can also add -G Ninja to the cmake invocation above and `samurai` to makedepends so it builds just slightly faster :) -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_217403
<164540096646.985.5730182834025419702.gitlab.31248.599ecdbdf8837acc54529cadcacb5cbbd32bee6b@listserv.local>
<164539513341.985.11084677935925209345.gitlab.31248.599ecdbdf8837acc54529cadcacb5cbbd32bee6b@listserv.local>
(view parent)
On Sun, 20 Feb 2022 18:52:51 +0100, Francesco Camuffo wrote: > + amove usr/include/* \ > + usr/lib/*.so > +} I don't think headers in usr/share are intended to be separated from other resources in usr/share. that would be the behavior of default_dev. if I'm wrong please let me know -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_217424
<164540097194.985.7834466267101354323.gitlab.31248.8316db754f0af5a4a0fd04dd9de4f31ee83d5a63@listserv.local>
<164539525026.985.6254954966243441574.gitlab.31248.8316db754f0af5a4a0fd04dd9de4f31ee83d5a63@listserv.local>
(view parent)
On Sun, 20 Feb 2022 18:52:51 +0100, Francesco Camuffo wrote: > + -Wno-dev > + make VERBOSE=1 -C "$pkgname"-build > + make VERBOSE=1 -C tools/sound2faust > `cmake --build` L34: ACK. L35: NACK. has a dedicated Makefile. I wouldn't involve cmake -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_217425
<164540097713.985.7555470468341285506.gitlab.31248.e7aa2bfd1539e4b678ec5a7519be7aa32a77ba4e@listserv.local>
<164539520310.985.13173143855558635664.gitlab.31248.e7aa2bfd1539e4b678ec5a7519be7aa32a77ba4e@listserv.local>
(view parent)
On Sun, 20 Feb 2022 18:52:51 +0100, Francesco Camuffo wrote: > +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" ACK -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_217426
<164540153731.985.865786417974754038.gitlab.31248.8316db754f0af5a4a0fd04dd9de4f31ee83d5a63@listserv.local>
<164540097194.985.7834466267101354323.gitlab.31248.8316db754f0af5a4a0fd04dd9de4f31ee83d5a63@listserv.local>
(view parent)
On Sun, 20 Feb 2022 18:52:51 +0100, Francesco Camuffo wrote: > + -Wno-dev > + make VERBOSE=1 -C "$pkgname"-build > + make VERBOSE=1 -C tools/sound2faust you are indeed correct :) -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_217427
<164540166422.985.15003569687694290116.gitlab.31248.8316db754f0af5a4a0fd04dd9de4f31ee83d5a63@listserv.local>
<164540153731.985.865786417974754038.gitlab.31248.8316db754f0af5a4a0fd04dd9de4f31ee83d5a63@listserv.local>
(view parent)
On Sun, 20 Feb 2022 18:52:51 +0100, Francesco Camuffo wrote: > + -Wno-dev > + make VERBOSE=1 -C "$pkgname"-build > + make VERBOSE=1 -C tools/sound2faust the cmake --install invocation also does not install sound2faust, despite a mention in the files, so the install is probably best left alone too. my error -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_217428
<164540169110.985.2602848135004512761.gitlab.31248.599ecdbdf8837acc54529cadcacb5cbbd32bee6b@listserv.local>
<164540096646.985.5730182834025419702.gitlab.31248.599ecdbdf8837acc54529cadcacb5cbbd32bee6b@listserv.local>
(view parent)
On Sun, 20 Feb 2022 18:52:51 +0100, Francesco Camuffo wrote: > + amove usr/include/* \ > + usr/lib/*.so > +} yes, you are right- it does move the usr/share headers too. since they are required for faust, this should be left alone then -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_217429
<164540192042.985.6956458803826039756.gitlab.31248.8316db754f0af5a4a0fd04dd9de4f31ee83d5a63@listserv.local>
<164540166422.985.15003569687694290116.gitlab.31248.8316db754f0af5a4a0fd04dd9de4f31ee83d5a63@listserv.local>
(view parent)
On Sun, 20 Feb 2022 18:52:51 +0100, Francesco Camuffo wrote: > + -Wno-dev > + make VERBOSE=1 -C "$pkgname"-build > + make VERBOSE=1 -C tools/sound2faust thanks. forgot to install sound2faust. :D will fix in v3 -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_217430
<164799720226.985.10701684316031419549.gitlab.31248.dbca3bf3914889bbc5bf3fc513527138f1318012@listserv.local>
<20220220175251.3373-1-dev@fmac.xyz>
(view parent)
Sorry to bother you @mailinglist-bot, but we've detected that this merge request hasn't seen any recent activity. If you need help or want to discuss your approach with developers you can ping `@team/mentors`. You can also ask on IRC on `#alpine-devel` on irc.oftc.net. If no further activity occurs in this MR, Alpine developers may close it in the future. Thanks for your contribution. -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/31248#note_224450