mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
community/supercollider to 3.11.1-1
This commit is contained in:
parent
affdaf1efb
commit
0d5a61a643
3 changed files with 347 additions and 45 deletions
|
@ -7,8 +7,8 @@
|
|||
|
||||
_name=SuperCollider
|
||||
pkgname=supercollider
|
||||
pkgver=3.11.0
|
||||
pkgrel=4
|
||||
pkgver=3.11.1
|
||||
pkgrel=1
|
||||
pkgdesc="Environment and programming language for real time audio synthesis and algorithmic composition"
|
||||
arch=('x86_64')
|
||||
url="https://supercollider.github.io"
|
||||
|
@ -22,12 +22,21 @@ checkdepends=('xorg-server-xvfb')
|
|||
optdepends=('emacs: emacs interface'
|
||||
'gedit: gedit interface'
|
||||
'sc3-plugins: additional extension plugins for scsynth')
|
||||
provides=("libscsynth.so" "sclang=${pkgver}" "scsynth=${pkgver}")
|
||||
source=("https://github.com/${pkgname}/${pkgname}/releases/download/Version-${pkgver}/${_name}-${pkgver}-Source.tar.bz2"
|
||||
"${pkgname}-3.11.0-use_system_link.patch")
|
||||
provides=('libscsynth.so' "sclang=${pkgver}" "scsynth=${pkgver}")
|
||||
source=("https://github.com/${pkgname}/${pkgname}/releases/download/Version-${pkgver}/${_name}-${pkgver}-Source.tar.bz2"{,.asc}
|
||||
"${pkgname}-3.11.1-devendor_abletonlink.patch::https://github.com/supercollider/supercollider/pull/4836/commits/95bd9721226f3cb1bba903bea8154cee5859cfb8.patch"
|
||||
"${pkgname}-3.11.1-fix_linker_errors.patch"
|
||||
)
|
||||
install="${pkgname}.install"
|
||||
sha512sums=('64fef4d751436337baf40ced068a496d3e9221f751dcde7bfc2857a79c094764dff814d1c0cf519380053ddcfdb2c3f2b8eb787d3cff03e522c19fd95951b1da'
|
||||
'1a9977f7b1a1a90ea3b4163ef6f6f963325e8d87b6ca16fecaa5a1816323d6cb4ab7eb750957d58be34a99fd3ed08ed7b7a92ac5352f31c894a8eb002f0aa71c')
|
||||
sha512sums=('5c4c5ba75f32ee7dda9a9e30c346ff028aedce81374474b4ee93fb8dc631f7b6ea54e91706b3502be6ed84baa69f6d659fcddaf5140ca292827d62734efbd6b2'
|
||||
'SKIP'
|
||||
'6a31c8c2edd102b806cfe110c2f27516e9fe05a7b074d50e14d5aad69cb80a2badfcb3a20f942d6dee90dfaf4bf5ae7eb8b8ef8c517ea8e0110bee7f0c2c4f40'
|
||||
'900f6559986ba80fe5aa8a05881f1ccfc2ae01d5b18dc0cf963bf86bfb7cbc0b77dfb9a4f059e588c9563c2ef9f8632731f3d046b79d8bfdffa88111cae7c52a')
|
||||
b2sums=('0fed25646c7163e8e13ae27024a25206f1ea141c5c23b93d7a1f4c00a30f0ce15a084b73eccb424f724f2000db138e3539b568045afddcfd612cf5dab99cb94d'
|
||||
'SKIP'
|
||||
'c589ea2451b4c232fa34de1b442e6822fb5867475b0e0bb7b94563cbfac54f09f47a7be8cf1e9f4a2896ffa678db40d718ec9ee301ad037eaebeb71772e773e4'
|
||||
'b8d0b153d08dcf98b5b2c385c52a1c446086f4c795f34840bf1a55f8eccdf53e262fcfb8b7245332919d1b932e5887dc20236ad35df29c4712853d2676e89a20')
|
||||
validpgpkeys=('0B7D1EA4E32B5C3C4275D3C70796CC538BEFF177') # Brian Heim <self@brianlheim.com>
|
||||
|
||||
|
||||
prepare() {
|
||||
|
@ -36,16 +45,16 @@ prepare() {
|
|||
# devendoring Ableton Link:
|
||||
# https://github.com/supercollider/supercollider/issues/4818
|
||||
# https://github.com/supercollider/supercollider/pull/4836
|
||||
patch -Np1 -i "../${pkgname}-3.11.0-use_system_link.patch"
|
||||
# removing macOS hidden files (due to release tarball issues):
|
||||
# https://github.com/supercollider/supercollider/issues/4545
|
||||
find . -type f -iname "*\._*" -delete
|
||||
patch -Np1 -i "../${pkgname}-3.11.1-devendor_abletonlink.patch"
|
||||
# fix linker issues with libscsynth.so (backported patch)
|
||||
# https://github.com/supercollider/supercollider/issues/4992
|
||||
patch -Np1 -i "../${pkgname}-3.11.1-fix_linker_errors.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_BUILD_TYPE='None' \
|
||||
-DBoost_NO_BOOST_CMAKE=ON \
|
||||
-DLIBSCSYNTH=ON \
|
||||
-DFORTIFY=ON \
|
||||
|
@ -53,16 +62,17 @@ build() {
|
|||
-DSYSTEM_BOOST=ON \
|
||||
-DSYSTEM_YAMLCPP=ON \
|
||||
-DSC_VIM=OFF \
|
||||
-Wno-dev \
|
||||
-B build \
|
||||
-DSSE=OFF -DSSE2=OFF -DSUPERNOVA=OFF -DNOVA_SIMD=ON -DNATIVE=OFF \
|
||||
-DCMAKE_C_FLAGS="${CFLAGS}" \
|
||||
.
|
||||
-S .
|
||||
make VERBOSE=1 -C build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${pkgname}-${pkgver}/build"
|
||||
xvfb-run make test ARGS="-V" -C build || echo "Known failing tests: https://github.com/supercollider/supercollider/issues/3555"
|
||||
cd "${pkgname}-${pkgver}"
|
||||
xvfb-run make test ARGS="-V" -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
diff --git c/CMakeLists.txt w/CMakeLists.txt
|
||||
index 30d9c8d1a..5e1e9cb89 100644
|
||||
--- c/CMakeLists.txt
|
||||
+++ w/CMakeLists.txt
|
||||
@@ -228,6 +228,7 @@ endif()
|
||||
|
||||
option(SC_SYMLINK_CLASSLIB "Place a symlink of SCCLassLibrary instead of copying" OFF)
|
||||
|
||||
+option(SYSTEM_ABLETON_LINK "Use link from system" OFF)
|
||||
option(SYSTEM_BOOST "Use boost libraries from system" OFF)
|
||||
option(SYSTEM_YAMLCPP "Use yaml-cpp library from system" OFF)
|
||||
|
||||
diff --git c/lang/CMakeLists.txt w/lang/CMakeLists.txt
|
||||
index 9b5095d11..bb678c016 100644
|
||||
--- c/lang/CMakeLists.txt
|
||||
+++ w/lang/CMakeLists.txt
|
||||
@@ -252,7 +252,12 @@ endif()
|
||||
|
||||
if (SC_ABLETON_LINK)
|
||||
message(STATUS "Compiling with Ableton Link support")
|
||||
- include(../external_libraries/link/AbletonLinkConfig.cmake)
|
||||
+ if(SYSTEM_ABLETON_LINK)
|
||||
+ find_package(AbletonLink NAMES AbletonLink ableton-link link REQUIRED)
|
||||
+ else()
|
||||
+ include(../external_libraries/link/AbletonLinkConfig.cmake)
|
||||
+ endif()
|
||||
+
|
||||
target_link_libraries(libsclang Ableton::Link)
|
||||
|
||||
add_definitions(-DSC_ABLETON_LINK)
|
|
@ -0,0 +1,322 @@
|
|||
From 993b6bc06aa4b9c6eaf47cfdd9363a28b1494b2c Mon Sep 17 00:00:00 2001
|
||||
From: brianlheim <self@brianlheim.com>
|
||||
Date: Sat, 13 Jun 2020 13:23:22 -0500
|
||||
Subject: [PATCH 1/2] cmake: compile boost::filesystem with PIC
|
||||
|
||||
---
|
||||
external_libraries/CMakeLists.txt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/external_libraries/CMakeLists.txt b/external_libraries/CMakeLists.txt
|
||||
index 39330ff85c..5017abd891 100644
|
||||
--- a/external_libraries/CMakeLists.txt
|
||||
+++ b/external_libraries/CMakeLists.txt
|
||||
@@ -58,6 +58,7 @@ if(NOT SYSTEM_BOOST) # we compile boost ourselves
|
||||
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
+ target_compile_options(boost_filesystem_lib PRIVATE -fPIC)
|
||||
target_compile_options(boost_thread_lib PRIVATE -fPIC)
|
||||
target_link_libraries(boost_thread_lib rt)
|
||||
endif()
|
||||
|
||||
From bdd624b40b9eacd6efcdccccc72879d044686b56 Mon Sep 17 00:00:00 2001
|
||||
From: brianlheim <self@brianlheim.com>
|
||||
Date: Sat, 13 Jun 2020 13:35:32 -0500
|
||||
Subject: [PATCH 2/2] servers: separate out main-only EventLoop code
|
||||
|
||||
otherwise, we get linking errors on macOS
|
||||
|
||||
see also #5012, #5013
|
||||
---
|
||||
common/SC_Apple.hpp | 14 ------
|
||||
common/SC_Apple.mm | 60 -------------------------
|
||||
common/SC_AppleEventLoop.hpp | 34 ++++++++++++++
|
||||
common/SC_AppleEventLoop.mm | 80 +++++++++++++++++++++++++++++++++
|
||||
common/SC_EventLoop.hpp | 3 +-
|
||||
server/scsynth/CMakeLists.txt | 8 +++-
|
||||
server/supernova/CMakeLists.txt | 9 +++-
|
||||
7 files changed, 131 insertions(+), 77 deletions(-)
|
||||
create mode 100644 common/SC_AppleEventLoop.hpp
|
||||
create mode 100644 common/SC_AppleEventLoop.mm
|
||||
|
||||
diff --git a/common/SC_Apple.hpp b/common/SC_Apple.hpp
|
||||
index 958d097f36..c7e53e9fcc 100644
|
||||
--- a/common/SC_Apple.hpp
|
||||
+++ b/common/SC_Apple.hpp
|
||||
@@ -23,19 +23,5 @@ namespace SC { namespace Apple {
|
||||
|
||||
void disableAppNap();
|
||||
|
||||
-namespace EventLoop {
|
||||
-
|
||||
-// Setup the main application. This function must be called in the
|
||||
-// main thread and before any other calls to Cocoa methods.
|
||||
-void setup();
|
||||
-// Run the event loop. This function must be called in the main thread.
|
||||
-// It blocks until the event loop finishes.
|
||||
-void run();
|
||||
-// Ask the event loop to stop and terminate the program.
|
||||
-// This function can be called from any thread.
|
||||
-void quit();
|
||||
-
|
||||
-} // EventLoop
|
||||
-
|
||||
} // namespace Apple
|
||||
} // namespace SC
|
||||
diff --git a/common/SC_Apple.mm b/common/SC_Apple.mm
|
||||
index a4e10a66cd..dbb7ddbb7d 100644
|
||||
--- a/common/SC_Apple.mm
|
||||
+++ b/common/SC_Apple.mm
|
||||
@@ -42,65 +42,5 @@ void disableAppNap() {
|
||||
}
|
||||
}
|
||||
|
||||
-namespace EventLoop {
|
||||
-
|
||||
-static std::atomic_bool g_running;
|
||||
-
|
||||
-void setup() {
|
||||
- // The following code would transform the process into a foreground application.
|
||||
- // For now it's the plugin's responsibility to do this (early or lazily)
|
||||
- // because we don't want to always show an icon in the docker.
|
||||
- // ProcessSerialNumber psn = { 0, kCurrentProcess };
|
||||
- // TransformProcessType(&psn, kProcessTransformToForegroundApplication);
|
||||
-
|
||||
- // Create NSApplication
|
||||
- [NSApplication sharedApplication];
|
||||
-}
|
||||
-
|
||||
-void run() {
|
||||
-#if 0
|
||||
- // this doesn't work...
|
||||
- [NSApp run];
|
||||
-#else
|
||||
- // Kudos to https://www.cocoawithlove.com/2009/01/demystifying-nsapplication-by.html
|
||||
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
-
|
||||
- [NSApp finishLaunching];
|
||||
- g_running = true;
|
||||
-
|
||||
- while (g_running) {
|
||||
- [pool release];
|
||||
- pool = [[NSAutoreleasePool alloc] init];
|
||||
- NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
|
||||
- untilDate:[NSDate distantFuture]
|
||||
- inMode:NSDefaultRunLoopMode
|
||||
- dequeue:YES];
|
||||
- if (event) {
|
||||
- [NSApp sendEvent:event];
|
||||
- [NSApp updateWindows];
|
||||
- }
|
||||
- }
|
||||
- [pool release];
|
||||
-#endif
|
||||
-}
|
||||
-
|
||||
-void quit() {
|
||||
- // break from event loop instead of [NSApp terminate:nil]
|
||||
- g_running = false;
|
||||
- // send dummy event to wake up event loop
|
||||
- NSEvent* event = [NSEvent otherEventWithType:NSApplicationDefined
|
||||
- location:NSMakePoint(0, 0)
|
||||
- modifierFlags:0
|
||||
- timestamp:0
|
||||
- windowNumber:0
|
||||
- context:nil
|
||||
- subtype:0
|
||||
- data1:0
|
||||
- data2:0];
|
||||
- [NSApp postEvent:event atStart:NO];
|
||||
-}
|
||||
-
|
||||
-} // EventLoop
|
||||
-
|
||||
} // namespace Apple
|
||||
} // namespace SC
|
||||
diff --git a/common/SC_AppleEventLoop.hpp b/common/SC_AppleEventLoop.hpp
|
||||
new file mode 100644
|
||||
index 0000000000..6f19bb2818
|
||||
--- /dev/null
|
||||
+++ b/common/SC_AppleEventLoop.hpp
|
||||
@@ -0,0 +1,34 @@
|
||||
+/************************************************************************
|
||||
+ *
|
||||
+ * Copyright 2019 Christof Ressi <info@christofressi.com>
|
||||
+ *
|
||||
+ * This program is free software: you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation, either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ *
|
||||
+ ************************************************************************/
|
||||
+
|
||||
+#pragma once
|
||||
+
|
||||
+namespace SC { namespace Apple { namespace EventLoop {
|
||||
+
|
||||
+// Setup the main application. This function must be called in the
|
||||
+// main thread and before any other calls to Cocoa methods.
|
||||
+void setup();
|
||||
+// Run the event loop. This function must be called in the main thread.
|
||||
+// It blocks until the event loop finishes.
|
||||
+void run();
|
||||
+// Ask the event loop to stop and terminate the program.
|
||||
+// This function can be called from any thread.
|
||||
+void quit();
|
||||
+
|
||||
+}}} // namespace SC::Apple::EventLoop
|
||||
diff --git a/common/SC_AppleEventLoop.mm b/common/SC_AppleEventLoop.mm
|
||||
new file mode 100644
|
||||
index 0000000000..cfcf42ddfe
|
||||
--- /dev/null
|
||||
+++ b/common/SC_AppleEventLoop.mm
|
||||
@@ -0,0 +1,80 @@
|
||||
+/************************************************************************
|
||||
+ *
|
||||
+ * Copyright 2019 Christof Ressi <info@christofressi.com>
|
||||
+ *
|
||||
+ * This program is free software: you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation, either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ *
|
||||
+ ************************************************************************/
|
||||
+
|
||||
+#include "SC_AppleEventLoop.hpp"
|
||||
+#include <atomic>
|
||||
+
|
||||
+#import <Cocoa/Cocoa.h>
|
||||
+
|
||||
+namespace SC { namespace Apple { namespace EventLoop {
|
||||
+
|
||||
+static std::atomic_bool g_running;
|
||||
+
|
||||
+void setup() {
|
||||
+ // The following code would transform the process into a foreground application.
|
||||
+ // For now it's the plugin's responsibility to do this (early or lazily)
|
||||
+ // because we don't want to always show an icon in the docker.
|
||||
+ // ProcessSerialNumber psn = { 0, kCurrentProcess };
|
||||
+ // TransformProcessType(&psn, kProcessTransformToForegroundApplication);
|
||||
+
|
||||
+ // Create NSApplication
|
||||
+ [NSApplication sharedApplication];
|
||||
+}
|
||||
+
|
||||
+void run() {
|
||||
+ // this doesn't work...
|
||||
+ // [NSApp run];
|
||||
+ // Kudos to https://www.cocoawithlove.com/2009/01/demystifying-nsapplication-by.html
|
||||
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
+
|
||||
+ [NSApp finishLaunching];
|
||||
+ g_running = true;
|
||||
+
|
||||
+ while (g_running) {
|
||||
+ [pool release];
|
||||
+ pool = [[NSAutoreleasePool alloc] init];
|
||||
+ NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
|
||||
+ untilDate:[NSDate distantFuture]
|
||||
+ inMode:NSDefaultRunLoopMode
|
||||
+ dequeue:YES];
|
||||
+ if (event) {
|
||||
+ [NSApp sendEvent:event];
|
||||
+ [NSApp updateWindows];
|
||||
+ }
|
||||
+ }
|
||||
+ [pool release];
|
||||
+}
|
||||
+
|
||||
+void quit() {
|
||||
+ // break from event loop instead of [NSApp terminate:nil]
|
||||
+ g_running = false;
|
||||
+ // send dummy event to wake up event loop
|
||||
+ NSEvent* event = [NSEvent otherEventWithType:NSApplicationDefined
|
||||
+ location:NSMakePoint(0, 0)
|
||||
+ modifierFlags:0
|
||||
+ timestamp:0
|
||||
+ windowNumber:0
|
||||
+ context:nil
|
||||
+ subtype:0
|
||||
+ data1:0
|
||||
+ data2:0];
|
||||
+ [NSApp postEvent:event atStart:NO];
|
||||
+}
|
||||
+
|
||||
+}}} // namespace SC::Apple::EventLoop
|
||||
diff --git a/common/SC_EventLoop.hpp b/common/SC_EventLoop.hpp
|
||||
index 1d62b4de89..6e58208cc0 100644
|
||||
--- a/common/SC_EventLoop.hpp
|
||||
+++ b/common/SC_EventLoop.hpp
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <functional>
|
||||
#ifdef __APPLE__
|
||||
-# include "SC_Apple.hpp"
|
||||
+# include "SC_AppleEventLoop.hpp"
|
||||
# include <thread>
|
||||
#endif
|
||||
|
||||
@@ -21,6 +21,7 @@ class EventLoop {
|
||||
SC::Apple::EventLoop::setup();
|
||||
#endif
|
||||
}
|
||||
+
|
||||
// Run the event loop until 'waitFunction' returns.
|
||||
static void run(std::function<void()> waitFunction) {
|
||||
#ifdef __APPLE__
|
||||
diff --git a/server/scsynth/CMakeLists.txt b/server/scsynth/CMakeLists.txt
|
||||
index 0bab0f2c3a..0845d8721b 100644
|
||||
--- a/server/scsynth/CMakeLists.txt
|
||||
+++ b/server/scsynth/CMakeLists.txt
|
||||
@@ -229,7 +229,13 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
target_link_libraries(libscsynth rt)
|
||||
endif()
|
||||
|
||||
-add_executable(scsynth scsynth_main.cpp)
|
||||
+add_executable(scsynth
|
||||
+ scsynth_main.cpp
|
||||
+
|
||||
+ # these files contain code only used in main()
|
||||
+ ${CMAKE_SOURCE_DIR}/common/SC_ServerBootDelayWarning.cpp
|
||||
+ $<$<BOOL:${APPLE}>: ${CMAKE_SOURCE_DIR}/common/SC_AppleEventLoop.mm >
|
||||
+ )
|
||||
target_link_libraries(scsynth libscsynth)
|
||||
|
||||
if (PTHREADS_FOUND)
|
||||
diff --git a/server/supernova/CMakeLists.txt b/server/supernova/CMakeLists.txt
|
||||
index d6423c75cb..4a3e2c8baf 100644
|
||||
--- a/server/supernova/CMakeLists.txt
|
||||
+++ b/server/supernova/CMakeLists.txt
|
||||
@@ -201,7 +201,14 @@ if(WIN32)
|
||||
endif()
|
||||
|
||||
|
||||
-add_executable(supernova server/main.cpp ${supernova_headers})
|
||||
+add_executable(supernova
|
||||
+ server/main.cpp
|
||||
+ ${supernova_headers}
|
||||
+
|
||||
+ # these files contain code only used in main()
|
||||
+ ${CMAKE_SOURCE_DIR}/common/SC_ServerBootDelayWarning.cpp
|
||||
+ $<$<BOOL:${APPLE}>: ${CMAKE_SOURCE_DIR}/common/SC_AppleEventLoop.mm >
|
||||
+ )
|
||||
target_link_libraries(supernova libsupernova)
|
||||
|
||||
if(WIN32)
|
Loading…
Reference in a new issue