diff options
Diffstat (limited to 'libre/supercollider')
-rw-r--r-- | libre/supercollider/PKGBUILD | 68 | ||||
-rw-r--r-- | libre/supercollider/boost-1.67.patch | 12 | ||||
-rw-r--r-- | libre/supercollider/supercollider.install | 8 | ||||
-rw-r--r-- | libre/supercollider/use-system-boost.patch | 75 |
4 files changed, 163 insertions, 0 deletions
diff --git a/libre/supercollider/PKGBUILD b/libre/supercollider/PKGBUILD new file mode 100644 index 000000000..ae8988b89 --- /dev/null +++ b/libre/supercollider/PKGBUILD @@ -0,0 +1,68 @@ +# Maintainer (Arch): David Runge <dave@sleepmap.de> +# Contributor (Arch): speps <speps at aur dot archlinux dot org> +# Contributor (Arch): osc <farid at archlinux-br.org> +# Contributor (Prabola): Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> + +_name=SuperCollider +pkgname=supercollider +pkgver=3.10.0 +pkgrel=3 +pkgrel+=.par1 +pkgdesc="Environment and programming language for real time audio synthesis and algorithmic composition" +pkgdesc+=" (built without nonfree qt5-webengine)" +arch=('armv7h' 'i686' 'x86_64') +url="https://supercollider.github.io" +license=('GPL3') +groups=('pro-audio') +depends=('boost-libs' 'desktop-file-utils' 'fftw' 'jack' 'qt5-svg' 'qt5-webkit' 'qt5-websockets' 'yaml-cpp') +makedepends=('boost' 'cmake' 'emacs' 'qt5-tools') +checkdepends=('xorg-server-xvfb') +optdepends=('emacs: emacs interface' + 'gedit: gedit interface' + 'sc3-plugins: additional extension plugins for scsynth') +source=("https://github.com/${pkgname}/${pkgname}/releases/download/Version-${pkgver}/${_name}-${pkgver}-Source-linux.tar.bz2" + 'boost-1.67.patch' + 'use-system-boost.patch' +) +install="${pkgname}.install" +sha512sums=('5670f0264329f0e90ed9c1b5bf63853fd67cd83ad48e2d96979ca548ed42265105d766e7fbb51839cb7b917a687929080e7c42f1c0baf3eb36a5365dee4b12bb' + '9980d77802f18fd56d2a13f24f070e81768d9111b2cc63e479a0e9b405a04aec28bc523e5d36aab0462af6a3831d64598470cdc6c3266431e2ca64aa427a6bf2' + '5e42f64e5e08ca9e03870e662b6694a0c41f4ab2e6522c8d2aade617a68b4455dc1932a18de18176a9ed9fc89e36f1f1ec76d3e3ff8322d0d1e8ae6fb85cbce9') + +prepare() { + mv -v "${_name}-Source" "${pkgname}-${pkgver}" + cd "${pkgname}-${pkgver}" + # supernova build: + # https://github.com/supercollider/supercollider/issues/3981 + patch -Np1 -i ../boost-1.67.patch + # make sure system boost is used + # https://github.com/supercollider/supercollider/issues/4096 + patch -Np1 -i ../use-system-boost.patch + mkdir -v build +} + +build() { + cd "${pkgname}-${pkgver}/build" + cmake .. -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DLIBSCSYNTH=ON \ + -DFORTIFY=ON \ + -DSYSTEM_YAMLCPP=ON \ + -DSYSTEM_BOOST=ON \ + -DSC_VIM=OFF \ + -DSC_IDE=OFF \ + -DSC_QT=OFF + make VERBOSE=1 +} + +check() { + cd "${pkgname}-${pkgver}/build" + xvfb-run make test ARGS="-V" || warning "Known failing tests: https://github.com/supercollider/supercollider/issues/3555" +} + +package() { + cd "${pkgname}-${pkgver}/build" + make DESTDIR="${pkgdir}" install + install -t "${pkgdir}/usr/share/doc/${pkgname}/" \ + -vDm 644 ../{AUTHORS,{CHANGELOG,README,README_LINUX}.md} +} diff --git a/libre/supercollider/boost-1.67.patch b/libre/supercollider/boost-1.67.patch new file mode 100644 index 000000000..1d1abaf91 --- /dev/null +++ b/libre/supercollider/boost-1.67.patch @@ -0,0 +1,12 @@ +diff -upr supercollider-3.9.3.orig/server/supernova/utilities/time_tag.hpp supercollider-3.9.3/server/supernova/utilities/time_tag.hpp +--- supercollider-3.9.3.orig/server/supernova/utilities/time_tag.hpp 2018-03-28 23:05:07.000000000 +0300 ++++ supercollider-3.9.3/server/supernova/utilities/time_tag.hpp 2018-06-03 01:32:16.824417338 +0300 +@@ -230,7 +230,7 @@ public: + #ifdef BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG + time_duration offset = seconds(get_secs() - ntp_offset) + nanoseconds(get_nanoseconds()); + #else +- time_duration offset = seconds(get_secs() - ntp_offset) + microseconds(get_nanoseconds()/1000); ++ time_duration offset = seconds(get_secs() - ntp_offset) + microseconds(long(get_nanoseconds()/1000)); + #endif + return ptime(base, offset); + } diff --git a/libre/supercollider/supercollider.install b/libre/supercollider/supercollider.install new file mode 100644 index 000000000..d69f3162d --- /dev/null +++ b/libre/supercollider/supercollider.install @@ -0,0 +1,8 @@ +post_install () { + echo "The vim plugin 'SCVim' is now developed separately: https://github.com/supercollider/scvim" + echo "Until a package is provided, please use the install methods mentioned in the link." +} + +post_upgrade () { + post_install +} diff --git a/libre/supercollider/use-system-boost.patch b/libre/supercollider/use-system-boost.patch new file mode 100644 index 000000000..0c69eb438 --- /dev/null +++ b/libre/supercollider/use-system-boost.patch @@ -0,0 +1,75 @@ +diff -ruN a/editors/sc-ide/CMakeLists.txt b/editors/sc-ide/CMakeLists.txt +--- a/editors/sc-ide/CMakeLists.txt 2018-09-25 01:20:49.000000000 +0200 ++++ b/editors/sc-ide/CMakeLists.txt 2018-11-28 15:53:19.827910183 +0100 +@@ -219,7 +219,6 @@ + include_directories(${CMAKE_SOURCE_DIR}/include/common) + include_directories(${CMAKE_SOURCE_DIR}/common) + include_directories(${CMAKE_SOURCE_DIR}/include/plugin_interface) +-include_directories(${CMAKE_SOURCE_DIR}/external_libraries/boost) + include_directories(${YAMLCPP_INCLUDE_DIR}) + # For QtCollider headers: + include_directories(${CMAKE_SOURCE_DIR}) +@@ -304,6 +303,7 @@ + else() + # in-house-built boost system + target_link_libraries( SuperCollider boost_system boost_filesystem ) ++ include_directories(${CMAKE_SOURCE_DIR}/external_libraries/boost) + endif() + + if(APPLE) +diff -ruN a/external_libraries/CMakeLists.txt b/external_libraries/CMakeLists.txt +--- a/external_libraries/CMakeLists.txt 2018-08-28 03:12:47.000000000 +0200 ++++ b/external_libraries/CMakeLists.txt 2018-11-28 17:39:57.981205691 +0100 +@@ -74,6 +74,14 @@ + PROPERTY FOLDER 3rdparty + ) + ++ #oscpack ++ add_library(oscpack STATIC EXCLUDE_FROM_ALL "oscpack_build.cpp") ++ target_include_directories(oscpack PRIVATE boost) ++ target_include_directories(oscpack INTERFACE oscpack_1_1_0 ) ++else() ++ #oscpack ++ add_library(oscpack STATIC EXCLUDE_FROM_ALL "oscpack_build.cpp") ++ target_include_directories(oscpack INTERFACE oscpack_1_1_0 ) + endif() + + # tlsf +@@ -82,11 +90,6 @@ + target_include_directories( tlsf INTERFACE TLSF-2.4.6/src ) + set_property(TARGET tlsf PROPERTY POSITION_INDEPENDENT_CODE TRUE) + +-#oscpack +-add_library(oscpack STATIC EXCLUDE_FROM_ALL "oscpack_build.cpp") +-target_include_directories(oscpack PRIVATE boost) +-target_include_directories(oscpack INTERFACE oscpack_1_1_0 ) +- + + if(LTO) + set_property(TARGET oscpack tlsf +@@ -104,7 +107,11 @@ + CREATE_FINAL_FILE(${CMAKE_CURRENT_BINARY_DIR}/libyamlcpp.cpp ${yaml_src}) + + add_library(yaml STATIC EXCLUDE_FROM_ALL ${CMAKE_CURRENT_BINARY_DIR}/libyamlcpp.cpp) +- target_include_directories(yaml PUBLIC ${CMAKE_SOURCE_DIR}/external_libraries/yaml-cpp/include boost) ++ if(Boost_FOUND) ++ target_include_directories(yaml PUBLIC ${Boost_INCLUDE_DIRS}) ++ else() ++ target_include_directories(yaml PUBLIC ${CMAKE_SOURCE_DIR}/external_libraries/yaml-cpp/include boost) ++ endif() + set_property( TARGET yaml PROPERTY FOLDER 3rdparty ) + set(YAMLCPP_LIBRARY yaml) + set(YAMLCPP_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/external_libraries/yaml-cpp/include) +diff -ruN a/testsuite/server/CMakeLists.txt b/testsuite/server/CMakeLists.txt +--- a/testsuite/server/CMakeLists.txt 2018-08-28 03:12:47.000000000 +0200 ++++ b/testsuite/server/CMakeLists.txt 2018-11-28 16:24:08.449255929 +0100 +@@ -5,4 +5,8 @@ + endif() + + add_library(boost_test STATIC boost_test.cpp) +-target_include_directories(boost_test PUBLIC ${CMAKE_SOURCE_DIR}/external_libraries/boost) ++if (Boost_FOUND) ++ target_include_directories(boost_test PUBLIC ${Boost_INCLUDE_DIRS}) ++else() ++ target_include_directories(boost_test PUBLIC ${CMAKE_SOURCE_DIR}/external_libraries/boost) ++endif() |