supercollider: fix cross

This commit is contained in:
Matthias von Faber 2018-03-10 08:41:49 +01:00 committed by Enno Boland
parent afc0ed35c5
commit 90e112e2c1

View file

@ -1,19 +1,41 @@
# Template file for 'supercollider'
pkgname=supercollider
version=3.9.1
revision=2
revision=3
wrksrc=SuperCollider-Source
build_style=cmake
hostmakedepends="pkg-config"
makedepends="jack-devel fftw-devel qt5-webkit-devel yaml-cpp-devel libsndfile-devel libXt-devel qt5-sensors-devel avahi-libs-devel qt5-declarative-devel qt5-devel qt5-plugin-odbc qt5-plugin-sqlite qt5-plugin-tds qt5-plugin-mysql qt5-plugin-pgsql qt5-location-devel qt5-tools-devel emacs libatomic-devel"
configure_args="-DENABLE_TESTSUITE=OFF -DSYSTEM_BOOST=ON -DSYSTEM_YAMLCPP=ON"
hostmakedepends="emacs pkg-config"
makedepends="avahi-libs-devel boost-devel fftw-devel jack-devel libXt-devel libatomic-devel libsndfile-devel qt5-declarative-devel qt5-devel qt5-location-devel qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds qt5-sensors-devel qt5-tools-devel qt5-webkit-devel yaml-cpp-devel"
short_desc="An environment and programming language for real time audio synthesis"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="GPL-3"
nocross="This is nocross because emacs is nocross"
homepage="https://github.com/supercollider/supercollider"
distfiles="https://github.com/supercollider/supercollider/releases/download/Version-${version}/SuperCollider-${version}-Source-linux.tar.bz2"
distfiles="${homepage}/releases/download/Version-${version}/SuperCollider-${version}-Source-linux.tar.bz2"
checksum=ea58ba387ae6ff52aed1ebf5c6658d145b1ec9da7ad5a1eec806accaa47d0e94
if [ -n "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-host-tools qt5-devel"
fi
case "$XBPS_TARGET_MACHINE" in
*-musl) broken="Doesn't compile under musl becasue of glibc dependant code in SC_StringBuffer.cpp";;
*-musl) makedepends+=" libglob-devel";;
esac
pre_configure() {
sed -i 's/yaml/yaml-cpp/g' CMakeLists.txt editors/sc-ide/CMakeLists.txt
case "$XBPS_TARGET_MACHINE" in
*-musl)
sed -i \
-e '/include/s,glob\.h,libglob/glob.h,g' \
-e 's/glob(/g_glob(/g' \
-e 's/globfree(/g_globfree(/g' \
common/SC_Filesystem_unix.cpp
sed -i 's/__va_copy/va_copy/g' common/SC_StringBuffer.cpp
echo 'target_link_libraries(sclang glob)' >> lang/CMakeLists.txt
echo 'target_link_libraries(scsynth glob)' >> server/scsynth/CMakeLists.txt
echo 'target_link_libraries(supernova glob)' >> server/supernova/CMakeLists.txt
echo 'target_link_libraries(SuperCollider glob)' >> editors/sc-ide/CMakeLists.txt
;;
esac
}