upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / faust / repos / community-x86_64 / PKGBUILD
blob4a01aba0e77f599250c5e64e365bb7ff64a8f685
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Albert Graef <aggraef at gmail.com>
3 # Contributor: Bernardo Barros <bernardobarros at gmail dot com>
4 # Contributor: bjoern lindig (bjoern _dot_ lindig _at_ google.com)
6 pkgname=faust
7 pkgver=2.59.5
8 pkgrel=1
9 pkgdesc="A functional programming language for realtime audio signal processing."
10 arch=(x86_64)
11 url="https://faust.grame.fr/"
12 license=(GPL2)
13 groups=(pro-audio)
14 depends=(
15   bash
16   gcc-libs
17   glibc
18   libmicrohttpd
19   llvm-libs
21 makedepends=(
22   cmake
23   libsndfile
24   llvm
25   xxd
27 optdepends=(
28   'clang: for sound2reader'
29   'csound: for faust2csound'
30   'gradle: for faust2android'
31   'graphviz: for faust2sig{,viewer}'
32   'gtk2: for faust2{jack,rosgtk}'
33   'inkscape: for faust2{pdf,png}'
34   'jack: for faust2{api,jack{,console,internal,server,rust},jaqt,netjackqt,nodejs,ros,rosgtk,rpinetjackconsole}'
35   'swig: for faust2android'
36   'libsndfile: for faust2{dummy,sndfile}'
37   'octave: for faust2octave'
38   'pd: for faust2puredata'
39   'portaudio: for faust2paqt'
40   'python: for faust2atomsnippets, faust2md and faust2sc.py'
41   'qt5-tools: for faust2{faustvst,jaqt,lv2}'
42   'rtaudio: for faust2raqt'
43   'ruby-rexml: for faust2sc and scbuilder'
44   'rust: for faust2jackrust'
45   'supercollider: for faust2supercollider'
46   'texlive-core: for faust2pdf'
48 provides=(
49   libfaustmachine.so
50   libfaust.so
51   libOSCFaust.so
52   libHTTPDFaust.so
54 options=(staticlibs)
55 source=(
56   https://github.com/grame-cncm/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz
58 sha512sums=('2cffcb9643c4b7651ad97fcbbf6e25a65488f70b353a47c8022a183b5701e3e632b54774de64602d5e573a5eb6c7e48cac033550d72a659e17478648ecbc7152')
59 b2sums=('48cee8365de6daa86a3b3f7d586ddc9096b51c1761aa43c889610b4be9daf6cae3362508950f01618a2371ea5165196cda3cecdccd65b4e368ca3994af1da88d')
61 build() {
62   local cmake_options=(
63         -B build
64         -C $pkgname-$pkgver/build/backends/all.cmake
65         -C $pkgname-$pkgver/build/targets/all.cmake
66         -D CMAKE_INSTALL_PREFIX=/usr
67         -D CMAKE_BUILD_TYPE=None
68         -D INCLUDE_DYNAMIC=ON
69         -D INCLUDE_ITP=ON
70         -D INCLUDE_STATIC=OFF
71         -W no-dev
72         -S $pkgname-$pkgver/build
73   )
74   # prevent static libs from being mangled with LTO
75   CXXFLAGS+=' -ffat-lto-objects'
77   cmake "${cmake_options[@]}"
78   cmake --build build --verbose
79   make VERBOSE=1 -C $pkgname-$pkgver/tools/sound2faust
82 check() {
83   ctest --test-dir build --output-on-failure
86 package() {
87   DESTDIR="$pkgdir" cmake --install build
88   cd $pkgname-$pkgver
89   make VERBOSE=1 PREFIX=/usr DESTDIR="$pkgdir" install -C tools/sound2faust
91   # docs
92   install -vDm 644 documentation/{,misc/}*.pdf -t "$pkgdir/usr/share/doc/$pkgname"
94   # examples
95   install -vd "$pkgdir/usr/share/$pkgname/examples"
96   cp -vR "examples/"* "$pkgdir/usr/share/$pkgname/examples/"
98   cd syntax-highlighting
99   # atom
100   install -vDm 644 atom/language-$pkgname/package.json -t "$pkgdir/usr/lib/atom/dot-atom/packages/language-$pkgname/"
101   install -vDm 644 atom/language-$pkgname/grammars/$pkgname.cson -t "$pkgdir/usr/lib/atom/dot-atom/packages/language-$pkgname/grammars/"
102   install -vDm 644 atom/language-$pkgname/settings/language-$pkgname.cson -t "$pkgdir/usr/lib/atom/dot-atom/packages/language-$pkgname/settings/"
103   install -vDm 644 atom/language-$pkgname/snippets/* -t "$pkgdir/usr/lib/atom/dot-atom/packages/language-$pkgname/snippets/"
104   install -vDm 644 atom/language-$pkgname/process-palette.json.linux "$pkgdir/usr/share/doc/$pkgname/process-palette.json"
105   # kate
106   install -vDm 644 $pkgname.xml -t "$pkgdir/usr/share/apps/katepart/syntax/"
107   # gedit
108   install -vDm 644 $pkgname.lang -t "$pkgdir/usr/share/gtksourceview-2.0/language-specs/"
109   install -vDm 644 $pkgname.lang -t "$pkgdir/usr/share/gtksourceview-3.0/language-specs/"
110   # highlight
111   install -vDm 644 dsp.lang -t "$pkgdir/usr/share/highlight/langDefs/"
112   # nano
113   install -vDm 644 $pkgname.nanorc -t "$pkgdir/usr/share/nano/"
114   # vim
115   install -vDm 644 $pkgname.vim -t "$pkgdir/usr/share/vim/vimfiles/syntax/"
116   # emacs
117   install -vDm 644 $pkgname-mode.el -t "$pkgdir/usr/share/emacs/site-lisp/"
119   # remove unusable scripts
120   rm -v "$pkgdir/usr/bin/faust2au"
121   # remove precompiled shared libraries for android:
122   # https://github.com/grame-cncm/faust/issues/370
123   rm -rvf "$pkgdir/usr/share/faust/android/app/"{lib,oboe} "$pkgdir/usr/share/faust/smartKeyboard/android/app/oboe"