From befed3c1b0cc166a28f451745e7da27209c811ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sun, 6 Dec 2020 14:44:13 +0100 Subject: [PATCH] surge: initial add 1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- recipes-musicians/surge/surge.bb | 50 +++++++++++++++++++ .../0001-arm-native.cmake-adjust-to-oe.patch | 30 +++++++++++ ...CMakeLists.txt-adjust-python-python3.patch | 31 ++++++++++++ ...e-vst3.sh-Do-not-try-to-strip-antive.patch | 28 +++++++++++ ...enerate-manifest-it-won-t-work-cross.patch | 34 +++++++++++++ .../packagegroups/musicians-world.bb | 1 + 6 files changed, 174 insertions(+) create mode 100644 recipes-musicians/surge/surge.bb create mode 100644 recipes-musicians/surge/surge/0001-arm-native.cmake-adjust-to-oe.patch create mode 100644 recipes-musicians/surge/surge/0002-CMakeLists.txt-adjust-python-python3.patch create mode 100644 recipes-musicians/surge/surge/0003-package-vst3.sh-Do-not-try-to-strip-antive.patch create mode 100644 recipes-musicians/surge/surge/0004-Do-not-generate-manifest-it-won-t-work-cross.patch diff --git a/recipes-musicians/surge/surge.bb b/recipes-musicians/surge/surge.bb new file mode 100644 index 0000000..110b1cc --- /dev/null +++ b/recipes-musicians/surge/surge.bb @@ -0,0 +1,50 @@ +SUMMARY = "Synthesizer plug-in (previously released as Vember Audio Surge)" +HOMEPAGE = "https://surge-synthesizer.github.io/" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://LICENSE;md5=79ee739fc097e8ad5582e1d177746365" + +DEPENDS += " \ + lv2-ttl-generator \ + cairo \ + xcb-util-cursor \ + xcb-util-keysyms \ + libxkbcommon \ + libsndfile1 \ +" + +inherit cmake python3native features_check lv2-turtle-helper pack_audio_plugins + +REQUIRED_DISTRO_FEATURES = "x11" + +SRC_URI = " \ + gitsm://github.com/surge-synthesizer/surge.git;branch=main \ + file://0001-arm-native.cmake-adjust-to-oe.patch \ + file://0002-CMakeLists.txt-adjust-python-python3.patch \ + file://0003-package-vst3.sh-Do-not-try-to-strip-antive.patch \ + file://0004-Do-not-generate-manifest-it-won-t-work-cross.patch \ +" +SRCREV = "5270cfb97a51570f81f29c1e641c0c6def901448" +S = "${WORKDIR}/git" +PV = "1.7.1" + +EXTRA_OECMAKE_append_arm = " -DARM_NATIVE=native" +EXTRA_OECMAKE_append_aarch64 = " -DARM_NATIVE=native" + +LV2_TTL_GENERATOR = "${STAGING_BINDIR}/lv2-ttl-generator" + +do_ttl_sed() { + sed -i 's:LV2_PLUGIN_INFO_FILE:${LV2_PLUGIN_INFO_FILE}:g' ${S}/CMakeLists.txt +} + +do_install() { + install -d ${D}${libdir}/lv2 + cp -r ${B}/surge_products/Surge.lv2 ${D}${libdir}/lv2/ + + install -d ${D}${libdir}/vst3 + for lib in `find ${B}/surge_products/Surge.vst3 -name Surge.so`; do + install $lib ${D}${libdir}/vst3 + done + + # TODO headless +} + diff --git a/recipes-musicians/surge/surge/0001-arm-native.cmake-adjust-to-oe.patch b/recipes-musicians/surge/surge/0001-arm-native.cmake-adjust-to-oe.patch new file mode 100644 index 0000000..74c4ca6 --- /dev/null +++ b/recipes-musicians/surge/surge/0001-arm-native.cmake-adjust-to-oe.patch @@ -0,0 +1,30 @@ +From 776564ce4049f44bcbe9804e2bb3c81b154f9731 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sat, 5 Dec 2020 22:25:57 +0100 +Subject: [PATCH] arm-native.cmake: adjust to oe +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller +--- + cmake/arm-native.cmake | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/cmake/arm-native.cmake b/cmake/arm-native.cmake +index de92a619..8b1e07c6 100644 +--- a/cmake/arm-native.cmake ++++ b/cmake/arm-native.cmake +@@ -1,7 +1,5 @@ + set( LINUX_ON_ARM True ) + set(LINUX_ON_ARM_COMPILE_OPTIONS +- -march=native +- -mcpu=native + -Wno-psabi + -flax-vector-conversions #FIXME - remove this + ) +-- +2.26.2 + diff --git a/recipes-musicians/surge/surge/0002-CMakeLists.txt-adjust-python-python3.patch b/recipes-musicians/surge/surge/0002-CMakeLists.txt-adjust-python-python3.patch new file mode 100644 index 0000000..451eb53 --- /dev/null +++ b/recipes-musicians/surge/surge/0002-CMakeLists.txt-adjust-python-python3.patch @@ -0,0 +1,31 @@ +From c6e21a51788f9777e8acd00a2fd1936392380940 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sat, 5 Dec 2020 22:31:16 +0100 +Subject: [PATCH] CMakeLists.txt: adjust python -> python3 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 872ff0ed..d75e30a1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -379,7 +379,7 @@ elseif( UNIX AND NOT APPLE ) + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + DEPENDS ${PIGGY_INPUTS} + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/lintemp +- COMMAND python ${CMAKE_SOURCE_DIR}/scripts/linux/emit-vector-piggy.py ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/lintemp ++ COMMAND python3 ${CMAKE_SOURCE_DIR}/scripts/linux/emit-vector-piggy.py ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/lintemp + ) + + if( LINUX_ON_ARM ) +-- +2.26.2 + diff --git a/recipes-musicians/surge/surge/0003-package-vst3.sh-Do-not-try-to-strip-antive.patch b/recipes-musicians/surge/surge/0003-package-vst3.sh-Do-not-try-to-strip-antive.patch new file mode 100644 index 0000000..36dfaf6 --- /dev/null +++ b/recipes-musicians/surge/surge/0003-package-vst3.sh-Do-not-try-to-strip-antive.patch @@ -0,0 +1,28 @@ +From f8586a2671012c2392b78361b96d17cdd9cfbd44 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sat, 5 Dec 2020 22:43:17 +0100 +Subject: [PATCH] package-vst3.sh: Do not try to strip (antive) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller +--- + scripts/linux/package-vst3.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/linux/package-vst3.sh b/scripts/linux/package-vst3.sh +index b91adc74..409ebf8e 100755 +--- a/scripts/linux/package-vst3.sh ++++ b/scripts/linux/package-vst3.sh +@@ -17,4 +17,4 @@ fi + VST_SO_DIR="$BUNDLE_DIR/Contents/${ARCH}-linux" + mkdir -p "$VST_SO_DIR" + cp $1 "$VST_SO_DIR"/Surge.so +-strip -s "$VST_SO_DIR"/Surge.so ++ +-- +2.26.2 + diff --git a/recipes-musicians/surge/surge/0004-Do-not-generate-manifest-it-won-t-work-cross.patch b/recipes-musicians/surge/surge/0004-Do-not-generate-manifest-it-won-t-work-cross.patch new file mode 100644 index 0000000..ba1543f --- /dev/null +++ b/recipes-musicians/surge/surge/0004-Do-not-generate-manifest-it-won-t-work-cross.patch @@ -0,0 +1,34 @@ +From 9cee76f8433b1dbc024d16212c9d566df04aaf58 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sat, 5 Dec 2020 23:16:35 +0100 +Subject: [PATCH 2/2] Do not generate manifest - it won't work cross +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Instead keep file info so that lv2-turttle-helper.bbclass can generate ttls +for us. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Andreas Müller +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d75e30a1..318e59fe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -878,7 +878,7 @@ if( BUILD_LV2 ) + COMMAND echo "Packaging up LV2 component" + COMMAND ${CMAKE_COMMAND} -E make_directory ${SURGE_PRODUCT_DIR}/Surge.lv2 + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/libsurge-lv2-dll.so ${SURGE_PRODUCT_DIR}/Surge.lv2/Surge.so +- COMMAND python scripts/linux/generate-lv2-ttl.py ${SURGE_PRODUCT_DIR}/Surge.lv2/Surge.so ++ COMMAND echo ${SURGE_PRODUCT_DIR}/Surge.lv2/Surge.so >> LV2_PLUGIN_INFO_FILE + ) + endif() + +-- +2.26.2 + diff --git a/recipes-support/packagegroups/musicians-world.bb b/recipes-support/packagegroups/musicians-world.bb index 5ad5207..e5d3bfb 100644 --- a/recipes-support/packagegroups/musicians-world.bb +++ b/recipes-support/packagegroups/musicians-world.bb @@ -162,6 +162,7 @@ RDEPENDS_${PN} += " \ stk \ string-machine-lv2 string-machine-vst \ supercollider \ + surge-lv2 surge-vst3 \ triceratops-lv2 \ vamp-plugin-sdk \ wolf-shaper-dssi wolf-shaper-lv2 wolf-shaper-vst \