PKGBUILDs/extra/csound/PKGBUILD

161 lines
5.4 KiB
Bash
Raw Normal View History

2019-12-25 19:53:31 +00:00
# Maintainer: David Runge <dvzrv@archlinux.org>
2021-06-22 17:26:46 +00:00
# Maintainer: Brett Cornwall <ainola@archlinux.org>
2018-02-13 00:46:38 +00:00
# Contributor: speps
# Contributor: Bernardo Barros
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - disable NEON
2018-05-18 14:06:09 +00:00
# - disable java interface
2018-02-13 00:46:38 +00:00
# - skip aarch64 - incompatible with beta luajit
2022-02-07 02:17:01 +00:00
buildarch=4
2018-02-13 00:46:38 +00:00
pkgbase=csound
2021-11-21 22:26:03 +00:00
pkgname=(csound csound-doc)
2022-11-27 01:06:09 +00:00
pkgver=6.18.1
2022-02-04 00:09:39 +00:00
_manual_pkgver=6.17.0
2023-05-03 19:20:17 +00:00
pkgrel=3
2022-02-04 00:09:39 +00:00
pkgdesc="Programming language for sound rendering and signal processing"
2021-11-21 22:26:03 +00:00
arch=(x86_64)
2019-02-18 15:14:12 +00:00
url="https://csound.com"
2021-11-21 22:26:03 +00:00
license=(LGPL2.1)
2018-11-07 13:42:32 +00:00
# libpd needs to be packaged: https://github.com/libpd/libpd/releases
2019-07-13 21:51:34 +00:00
# gmm > 5.1 breaks linear-algebra opcode: https://github.com/csound/csound/issues/920
2021-07-01 02:27:01 +00:00
makedepends=(
2021-11-21 22:26:03 +00:00
alsa-lib
cmake
doxygen
dssi
fluidsynth
hdf5
jack
java-environment
ladspa
libmusicxml
libsamplerate
libsndfile
libwebsockets
llvm
lua
openssl
portaudio
portmidi
portsmf
python
stk
strip-nondeterminism
swig
wiiuse
2021-07-01 02:27:01 +00:00
)
2021-11-21 22:26:03 +00:00
checkdepends=(cunit)
2023-03-21 13:06:09 +00:00
source=(
https://github.com/$pkgbase/$pkgbase/archive/$pkgver/$pkgname-$pkgver.tar.gz
$pkgbase.sh
https://github.com/$pkgbase/$pkgbase/releases/download/$_manual_pkgver/Csound${_manual_pkgver}_manual_html.zip
https://github.com/$pkgbase/$pkgbase/releases/download/$_manual_pkgver/Csound${_manual_pkgver}_manual_pdf.zip
)
2022-11-27 01:06:09 +00:00
sha512sums=('4ea4dccb36017c96482389a8d139f6f55c79c5ceb9cc34e6d2bfabcb930b4833d0301be4a4b21929db27b2d8ce30754b5c5867acd2ea5a849135e1b8d1506acf'
2018-10-18 23:16:45 +00:00
'53a8ae1e61db2a3a492930ef0f0881b613ae47108c5e8de0a6e2aa28bcf7a5c93c7fea8b7fc2bbae29ab92e1e68bf94ba406be1255ad8ab5725ea9078c1fd6dc'
2022-02-04 00:09:39 +00:00
'ff2098828e51e78aa80b10736ea162d90c0b1bef3265e469951a5df63250d283e852490cb2a6599dcb1b8a5c185cf4f0b9534f501e4cb755b9da67ecfb1f4ba6'
'bf664bab1dec073b48853ccf7519086c55ad74af33db86ac7f95746231c18fb10d46a485047788050094e412d27bbd0df65e238d31b01b435989f2fd734189a6')
2022-11-27 01:06:09 +00:00
b2sums=('1b258724dd986eea63921e36b43235eb05702729ee31e40ef724f7e7644755adeb5a3abdca9188d65296882d5f532693c0f9fc742ee5d39ccc7fbed860ec0bf4'
2020-08-08 18:01:42 +00:00
'8a556685d0f9ee55c4de521b3d76fc729936e98e991e8ea860d64b29a1b09d142ab0a51548b2dddadb41ecb796e84ba1f8ed114494b4c67d7d6d8ab3475b2ede'
2022-02-04 00:09:39 +00:00
'3148a60a398d49d6932864d84b2ee37ddf86d5389b91c99443b2c64f7c3b270d040b83ac88b80ebc772c198223682452da1618391fcc8963fe63151b7837037e'
'c0210f2fb97a6707ae6cd0a0cf38cd374f4d4c973b188ee8d418a7efd5c98dc1d4e61867de021ed2859bd8264cc0876b46deb565c358b6efea42f471d39671a9')
2018-02-13 00:46:38 +00:00
prepare() {
2019-12-25 19:53:31 +00:00
# fix file permissions in html manual
find html/ -type f -exec chmod -c 644 {} \;
2018-02-13 00:46:38 +00:00
}
build() {
2019-06-18 23:16:36 +00:00
local _java_major=$(java --version 2>/dev/null |grep 'openjdk'| cut -d ' ' -f2| cut -d '.' -f1)
2023-03-21 13:06:09 +00:00
local cmake_options=(
-B build
-D CMAKE_INSTALL_PREFIX=/usr
-D CMAKE_BUILD_TYPE=None
# it's not allowed to redistribute the scansyn opcodes: https://github.com/csound/csound/issues/1148
-D BUILD_SCANSYN_OPCODES=OFF
-D CMAKE_CXX_FLAGS="-Wno-error -Wno-missing-field-initializers -DPFFFT_SIMD_DISABLE"
-D CMAKE_C_FLAGS="-Wno-error -Wno-missing-field-initializers -DPFFFT_SIMD_DISABLE"
-D BUILD_JAVA_INTERFACE=0 \
-D JAVA_AWT_LIBRARY="/usr/lib/jvm/java-${_java_major}-openjdk/jre/lib/libawt.so"
-D JAVA_JVM_LIBRARY="/usr/lib/jvm/java-${_java_major}-openjdk/jre/lib"
-D LUA_LIBRARY=/usr/lib/liblua.so
-D BUILD_STATIC_LIBRARY=ON
-S $pkgbase-$pkgver
-W no-dev
)
cmake "${cmake_options[@]}"
cmake --build build --verbose
2022-02-04 00:09:39 +00:00
# For reproducibility (See https://bugs.archlinux.org/task/70331)
find build -name '*.jar' -exec strip-nondeterminism {} +
2018-02-13 00:46:38 +00:00
}
2018-11-07 13:42:32 +00:00
check() {
2023-03-21 13:06:09 +00:00
ctest --test-dir build --output-on-failure
2018-11-07 13:42:32 +00:00
}
2018-02-13 00:46:38 +00:00
package_csound() {
2023-03-21 13:06:09 +00:00
groups=(
pro-audio
)
depends=(
curl libcurl.so
gcc-libs
glibc
libsamplerate libsamplerate.so
libsndfile libsndfile.so
)
optdepends=(
'alsa-lib: for librtalsa plugin'
'csound-doc: for the canonical Csound Reference Manual'
'csound-plugins: for additional opcodes'
'csoundqt: for frontend/ editor with integrated help'
'hdf5: for hdf5ops plugin'
'java-runtime: java integration'
'fluidsynth: for libfluidOpcodes plugin'
'jack: for libjacko, librtjack and libjackTransport plugins'
'liblo: for libosc plugin'
'ncurses: for libfaustcsound plugin'
'portmidi: for libpmidi plugin'
'portaudio: for librtpa plugin'
'libpulse: for librtpulse plugin'
'stk: for libstkops plugin'
'libwebsockets: for libwebsocketIO plugin'
'wiiuse: for libwiimote plugin'
'libx11: for libwidgets plugin'
'lua: for LUA integration'
'openssl: for libfaustcsound plugin'
'python-numpy: For Csound Python bindings'
'vim-csound: vim integration'
'zlib: for libfaustcsound plugin'
)
provides=(
libcsound64.so
libcsnd6.so
)
2022-02-04 00:09:39 +00:00
2023-03-21 13:06:09 +00:00
DESTDIR="$pkgdir" cmake --install build
2018-02-13 00:46:38 +00:00
# export vars in profile.d
2023-03-21 13:06:09 +00:00
install -vDm 755 "$srcdir/$pkgname.sh" -t "$pkgdir/etc/profile.d/"
2018-07-28 23:14:48 +00:00
# rename extract executable due to name conflict with libextractor
# https://github.com/csound/csound/issues/985
2023-03-21 13:06:09 +00:00
mv -v "$pkgdir/usr/bin/extract" "$pkgdir/usr/bin/$pkgname-extract"
2019-06-18 23:16:36 +00:00
# moving csnd6.jar to /usr/share/java
2023-03-21 13:40:59 +00:00
#install -vdm 755 "$pkgdir/usr/share/java/"
#mv -v "$pkgdir/usr/lib/"*.jar "$pkgdir/usr/share/java/"
2018-02-13 00:46:38 +00:00
}
package_csound-doc() {
2022-02-04 00:09:39 +00:00
pkgdesc+=" - documentation"
2023-03-21 13:06:09 +00:00
install -vDm 644 Csound${_manual_pkgver}_manual.pdf "$pkgdir/usr/share/doc/$pkgname/$pkgbase-manual.pdf"
2022-02-04 00:09:39 +00:00
2023-03-21 13:06:09 +00:00
install -dv "$pkgdir/usr/share/doc/$pkgname/html"
cp -av html/* "$pkgdir/usr/share/doc/$pkgname/html/"
2018-02-13 00:46:38 +00:00
}
# vim:set ts=2 sw=2 et: