diff --git a/community/zynaddsubfx/PKGBUILD b/community/zynaddsubfx/PKGBUILD index 80e1d4cbf..9d24d98a9 100644 --- a/community/zynaddsubfx/PKGBUILD +++ b/community/zynaddsubfx/PKGBUILD @@ -1,4 +1,4 @@ -# Maintainer: David Runge <dave@sleepmap.de> +# Maintainer: David Runge <dvzrv@archlinux.org> # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> # Contributor: SpepS <dreamspepser at yahoo dot it> # Contributor: Ionut Biru <ibiru@archlinux.org> @@ -8,82 +8,176 @@ # - don't build with neon (-DNoNeonPlease=1) pkgname=zynaddsubfx -pkgver=3.0.5 -pkgrel=2 +pkgver=3.0.6 +pkgrel=1 +_mruby_zest_commit='dd3d45ba333011f2359e86f9a758d9836e53fe5f' # refs/tags/3.0.6 pkgdesc="Opensource software synthesizer capable of making a countless number of instruments." -arch=('x86_64') +arch=(x86_64) url="http://zynaddsubfx.sourceforge.net" -license=('GPL2') -groups=('lv2-plugins' 'pro-audio' 'vst-plugins') -depends=('fftw' 'hicolor-icon-theme' 'liblo' 'libxpm' 'mxml' 'ntk' 'portaudio' 'rtosc') -#makedepends=('asciidoc' 'asciidoctor' 'dblatex' 'cmake' 'doxygen' 'ghostscript' 'gnuplot' 'imagemagick' 'texlive-pictures' 'texlive-pstricks') -makedepends=('asciidoc' 'asciidoctor' 'cmake' 'doxygen') -# tests don't link: https://sourceforge.net/p/zynaddsubfx/bugs/186/ -# checkdepends=('cxxtest') -# zyn-fusion is still too fragmented to be build: -# https://github.com/zynaddsubfx/zyn-fusion-issues/issues/214 -# https://github.com/zynaddsubfx/zyn-fusion-issues/issues/215 -# https://github.com/zynaddsubfx/zyn-fusion-issues/issues/216 -# https://github.com/zynaddsubfx/zyn-fusion-issues/issues/217 -source=("https://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2" - "${pkgname}-system-rtosc.patch" - "${pkgname}-fix-bash-completion-installation.patch") -sha512sums=('1e4d5a6393937e6c7103e6d0e97df76f2d129350854c2f338aa888591091b1508c63e9b52c8e5a176e282ff2f6b72c6a87de54875c412771aff26e8ece2c84e8' - 'e12f6925bc18012a2cee816d94eca51a0e39a9ba020f9692537ba8df839faa954c6dda86a334de59d7c036fa00b77968bae78eb39971a4c58eb126fafafedd7e' - '667196e5c75286613e6b191645c7edf1e8da6ca54a4e95a34994c3172a0706c1dae48804081299f03cd75b63907f972b2c1ccfa3bb07011cdfda1fd29b21ed69') +license=(GPL2) +groups=(lv2-plugins pro-audio vst-plugins) +# NOTE: fftw is dlopen()'ed +depends=(fftw gcc-libs glibc hicolor-icon-theme libglvnd zlib) +makedepends=(alsa-lib asciidoc asciidoctor cmake cxxtest doxygen git jack liblo +libxpm mxml portaudio rtosc ruby-rake ttf-roboto) +optdepends=( + 'lv2-host: for using the LV2 plugin' + 'vst-host: for using the VST plugin' +) +source=( + "https://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2" + "${pkgname}-3.0.6-system_rtosc.patch" + "${pkgname}-3.0.6-libzest_location.patch" + "${pkgname}-mruby-zest-build::git+https://github.com/mruby-zest/mruby-zest-build#commit=${_mruby_zest_commit}" + "${pkgname}-mruby::git+https://github.com/mruby/mruby" + "${pkgname}-nanovg::git+https://github.com/memononen/nanovg" + "${pkgname}-mruby-sleep::git+https://github.com/matsumoto-r/mruby-sleep" + "${pkgname}-mruby-dir-glob::git+https://github.com/gromnitsky/mruby-dir-glob" + "${pkgname}-mruby-regexp-pcre::git+https://github.com/iij/mruby-regexp-pcre" + "${pkgname}-mruby-set::git+https://github.com/yui-knk/mruby-set" + "${pkgname}-mruby-io::git+https://github.com/iij/mruby-io" + "${pkgname}-mruby-glew::git+https://github.com/IceDragon200/mruby-glew" + "${pkgname}-mruby-glfw3::git+https://github.com/IceDragon200/mruby-glfw3" + "${pkgname}-mruby-nanovg::git+https://github.com/mruby-zest/mruby-nanovg" + "${pkgname}-mruby-qml-spawn::git+https://github.com/mruby-zest/mruby-qml-spawn" + "${pkgname}-mruby-qml-parse::git+https://github.com/mruby-zest/mruby-qml-parse" + "${pkgname}-mruby-complex::git+https://github.com/pbosetti/mruby-complex" + "${pkgname}-mruby-dir::git+https://github.com/iij/mruby-dir" + "${pkgname}-mruby-errno::git+https://github.com/iij/mruby-errno" + "${pkgname}-mruby-file-stat::git+https://github.com/ksss/mruby-file-stat" + "${pkgname}-mruby-process::git+https://github.com/iij/mruby-process" + "${pkgname}-mruby-zest-build-3.0.6-devendor_rtosc.patch" + "${pkgname}-mruby-zest-build-3.0.6-libzest_location.patch" + "${pkgname}-mruby-zest-build-3.0.6-system_wide_location.patch" +) +sha512sums=('86311f00d97e20c7eb22a46c99736c56765ed9737e728ef380a324e4a92c731086ed74f5d7bfeae104b690ab1ee1b40bfb8f240bc4c46f8afd47308ec48cbcea' + 'c84d185e7bcc3d7b0bd44941999b9b14638e230c5c5d86b487a39d6b793b56649b6aacde8d27b0aef567eaa3d381d3906d7bd31fd5fd74d5a662e21d188fcdc9' + '695f5776b07e4ace611f358ea1007e0023f1ba6dcf4ebb85974b461490850c51bb85903abafc07b23236051ab161cc0e538a127a11efd0b1dfd129dc99f37d77' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + '0677bf66e5996b09298a3f7e3aabf0d5d8a5bbdca6ed869038e1a35cbef94c2bafcfeb92cd163f43476aadf5c915cde92c75876c5ff3964d5b2049509075a765' + 'd7ef0b4e8068d1d09d34c913d7b70342eaaa2eb8dae619d223e3e03ac667cf76c6e5615b60efabaf7eae594e3a5d6f40bc0cf10b8e939da1aa349bc27dff4ea8' + '2a6b57df3a9ffac669341d37739b281ce32696f82d82ee17220fdc9e426729d40f91cf50e1b58b7be1cc9bc5651d99794ae5e1bbd32f25c14aaf489989e10aab') +b2sums=('4adbeffb9bc0bd77bf81a6734f5c26fc676426e644e27cebb8e54e8d74d869c0e1b468782cd1a64aacef8f9b788d434a8d30a194944650eea03c4fd146ee7bf7' + 'd9586ef1dd7866963d342f9be8def639ab4428a173f8abc2e503643d87e2c9087ff8d6af538df7c8f8df8f8facd409e8665735ef905deae8dfe3a840de340ea1' + '68a24898a4646c6d84e782c4e31a962de456fa315d5c398c16b013efa684683f80cc411bf51628bb9cff799fc77f669d56e5d44af5938e05d0ec64322ad30ec7' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + '70ea96032e5f3f20f4270339f03b508c5a5e5d62859d6771adce452fbcde48f89edb4ef8908255cbf915f1088ce5d3fc5baa1b1e74794db3bc975e48c3425d14' + '2f1782fd907fb0e284c16ee0f09e1d93d05984676707da2d9d47038880e723379535f8d3934f97753cc9a6865aed957a1c230840dda3a2cb49a26cb4ff2cd034' + '69ccb494e863caf8e47eaa70609940d532cfae6265eeffc626f24ed6a2290511d828d63405a7560fd567b0ab01bdabedd85aa3fe28bec5a638477654f9440f40') prepare() { - cd "${pkgname}-${pkgver}" - mkdir -vp build - # devendor rtosc: https://sourceforge.net/p/zynaddsubfx/bugs/184/ - patch -Np1 -i "../${pkgname}-system-rtosc.patch" - patch -Np1 -i "../${pkgname}-fix-bash-completion-installation.patch" -} - -build() { - cd "${pkgname}-${pkgver}/build" - cmake \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DDefaultOutput=jack \ - -DDefaultInput=jack \ - -DGuiModule=ntk \ - -DNoNeonPlease=1 \ - .. - make VERBOSE=1 ( - # building only man and html documentation - # generating a pdf is broken: https://bugs.archlinux.org/task/59778 - # https://sourceforge.net/p/zynaddsubfx/bugs/185/ - cd ../doc - make man - make xhtml + cd "${pkgname}-${pkgver}" + # https://github.com/zynaddsubfx/zynaddsubfx/pull/170 + # https://github.com/zynaddsubfx/zynaddsubfx/pull/171 + patch -Np1 -i ../"${pkgname}-3.0.6-system_rtosc.patch" + # load libzest.so from custom system location in /usr/lib/zynaddsubfx/ + patch -Np1 -i ../"${pkgname}-3.0.6-libzest_location.patch" + # disable broken PortChecker test + sed -e '/add_test(PortChecker/d' -i src/Tests/CMakeLists.txt + ) + + ( + cd "${pkgname}-mruby-zest-build" + git submodule init + git submodule deinit deps/rtosc + git submodule deinit deps/libuv + git config submodule.mruby.url "${srcdir}/${pkgname}-mruby" + git config submodule.deps/nanovg.url "${srcdir}/${pkgname}-nanovg" + git config submodule.deps/mruby-sleep.url "${srcdir}/${pkgname}-mruby-sleep" + git config submodule.deps/mruby-dir-glob.url "${srcdir}/${pkgname}-mruby-dir-glob" + git config submodule.deps/mruby-regexp-pcre.url "${srcdir}/${pkgname}-mruby-regexp-pcre" + git config submodule.deps/mruby-set.url "${srcdir}/${pkgname}-mruby-set" + git config submodule.deps/mruby-io.url "${srcdir}/${pkgname}-mruby-io" + git config submodule.deps/mruby-glew.url "${srcdir}/${pkgname}-mruby-glew" + git config submodule.deps/mruby-glfw3.url "${srcdir}/${pkgname}-mruby-glfw3" + git config submodule.deps/mruby-nanovg.url "${srcdir}/${pkgname}-mruby-nanovg" + git config submodule.deps/mruby-qml-spawn.url "${srcdir}/${pkgname}-mruby-qml-spawn" + git config submodule.deps/mruby-qml-parse.url "${srcdir}/${pkgname}-mruby-qml-parse" + git config submodule.deps/mruby-complex.url "${srcdir}/${pkgname}-mruby-complex" + git config submodule.deps/mruby-dir.url "${srcdir}/${pkgname}-mruby-dir" + git config submodule.deps/mruby-errno.url "${srcdir}/${pkgname}-mruby-errno" + git config submodule.deps/mruby-file-stat.url "${srcdir}/${pkgname}-mruby-file-stat" + git config submodule.deps/mruby-process.url "${srcdir}/${pkgname}-mruby-process" + git submodule update + # use system provided rtosc + patch -Np1 -i ../"${pkgname}-mruby-zest-build-3.0.6-devendor_rtosc.patch" + # load libzest.so from custom system location in /usr/lib/zynaddsubfx/ + patch -Np1 -i ../"${pkgname}-mruby-zest-build-3.0.6-libzest_location.patch" + # load qml data from custom system location in /usr/share/zynaddsubfx/qml/ + # load JSON schema from custom system location in /usr/share/zynaddsubfx/schema/ + # load fonts from custom system location in /usr/share/fonts/TTF/ + patch -Np1 -i ../"${pkgname}-mruby-zest-build-3.0.6-system_wide_location.patch" ) } -# check() { -# cd "${pkgname}-${pkgver}/build" -# make -k test -# } +build() { + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=None \ + -DDefaultOutput=jack \ + -DDefaultInput=jack \ + -DGuiModule=zest \ + -DNoNeonPlease=1 \ + -DZYN_SYSTEM_RTOSC=ON \ + -W no-dev \ + -B build \ + -S "${pkgname}-${pkgver}" + make VERBOSE=1 -C build + make man -C "${pkgname}-${pkgver}/doc" + + make -C "${pkgname}-mruby-zest-build" +} + +check() { + make -k test ARGS='-VVd' -C build +} package() { - cd "${pkgname}-${pkgver}/build" - make DESTDIR="${pkgdir}/" install - # banks and examples - install -vd "${pkgdir}/usr/share/${pkgname}" - cp -va ../instruments/banks "${pkgdir}/usr/share/${pkgname}" - cp -va ../instruments/examples "${pkgdir}/usr/share/${pkgname}" - # icons - install -vDm 644 "../${pkgname}.ico" \ - "${pkgdir}/usr/share/pixmaps/${pkgname}.ico" - install -vDm 644 "../${pkgname}.svg" \ - "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg" - # man page - install -vDm 644 "../doc/${pkgname}.1" \ - "${pkgdir}/usr/share/man/man1/${pkgname}.1" - # documentation - install -vDm 644 "../doc/${pkgname}.html" \ - "${pkgdir}/usr/share/doc/${pkgname}/${pkgname}.html" -# install -vDm 644 "../doc/${pkgname}.pdf" \ -# "${pkgdir}/usr/share/doc/${pkgname}/${pkgname}.pdf" - cp -va ../doc/images "${pkgdir}/usr/share/doc/${pkgname}/" + depends+=(libasound.so libjack.so liblo.so libmxml.so libportaudio.so + librtosc.so librtosc-cpp.so) + + make DESTDIR="${pkgdir}/" install -C build + install -vDm 644 "${pkgname}-${pkgver}/${pkgname}.svg" -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps/" + install -vDm 644 "${pkgname}-${pkgver}/doc/${pkgname}.1" -t "${pkgdir}/usr/share/man/man1/" + + cd "${pkgname}-mruby-zest-build" + install -vDm 755 zest "${pkgdir}/usr/bin/zyn-fusion" + install -vDm 755 libzest.so -t "${pkgdir}/usr/lib/$pkgname/" + install -vDm 644 src/mruby-zest/{example,qml}/*.qml -t "${pkgdir}/usr/share/${pkgname}/qml/" + install -vDm 644 src/osc-bridge/schema/test.json -t "${pkgdir}/usr/share/${pkgname}/schema/" + install -vDm 644 completions/zyn-fusion -t "${pkgdir}/usr/share/bash-completion/completions/" } diff --git a/community/zynaddsubfx/zynaddsubfx-3.0.6-libzest_location.patch b/community/zynaddsubfx/zynaddsubfx-3.0.6-libzest_location.patch new file mode 100644 index 000000000..ce14e6735 --- /dev/null +++ b/community/zynaddsubfx/zynaddsubfx-3.0.6-libzest_location.patch @@ -0,0 +1,13 @@ +diff --git i/src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp w/src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp +index 0829e889..010e1fac 100644 +--- i/src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp ++++ w/src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp +@@ -68,7 +68,7 @@ public: + #else + handle = dlopen("./libzest.so", RTLD_LAZY); + if(!handle) +- handle = dlopen("/opt/zyn-fusion/libzest.so", RTLD_LAZY); ++ handle = dlopen("/usr/lib/zynaddsubfx/libzest.so", RTLD_LAZY); + if(!handle) + handle = dlopen("libzest.so", RTLD_LAZY); + #endif diff --git a/community/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch b/community/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch new file mode 100644 index 000000000..799ff8e90 --- /dev/null +++ b/community/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch @@ -0,0 +1,92 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5c708574..ef17dbd3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,24 +10,34 @@ if(DEFINED ZYN_DATADIR) + add_definitions(-DZYN_DATADIR="${ZYN_DATADIR}") + endif() + ++option(ZYN_SYSTEM_RTOSC "Use system provided librtosc and librtosc-cpp" OFF) ++ + #Include RTOSC +-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt") +- message(STATUS "RTOSC NOT FOUND") +- message(STATUS "Attempting to checkout submodule") +- find_package(Git REQUIRED) +- execute_process(COMMAND git submodule update --init --recursive) ++if(ZYN_SYSTEM_RTOSC) ++ include(FindPkgConfig) ++ pkg_check_modules(RTOSC REQUIRED librtosc) ++ pkg_check_modules(RTOSC_CPP REQUIRED librtosc-cpp) ++ include_directories(${RTOSC_INCLUDE_DIR}) ++ message(STATUS "Found system provided librtosc and librtosc-cpp...") ++else() + if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt") +- message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n" +- "please check file permissions and your network") ++ message(STATUS "RTOSC NOT FOUND") ++ message(STATUS "Attempting to checkout submodule") ++ find_package(Git REQUIRED) ++ execute_process(COMMAND git submodule update --init --recursive) ++ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt") ++ message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n" ++ "please check file permissions and your network") ++ endif() ++ else() ++ message(STATUS "Found Rtosc Submodule...") + endif() +-else() +- message(STATUS "Found Rtosc Submodule...") +-endif() + +-set(RTOSC_NO_INSTALL TRUE) +-include("rtosc/cmake/ColorMessage.cmake") +-add_subdirectory(rtosc) +-include_directories(rtosc/include) ++ set(RTOSC_NO_INSTALL TRUE) ++ include("rtosc/cmake/ColorMessage.cmake") ++ add_subdirectory(rtosc) ++ include_directories(rtosc/include) ++endif() + + enable_testing() + include(CTestConfig.cmake) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 2900f4b7..8348df70 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -575,13 +575,27 @@ else() + set(PTHREAD_LIBRARY pthread) + endif() + +-target_link_libraries(zynaddsubfx_core +- ${ZLIB_LIBRARIES} +- ${FFTW3F_LIBRARIES} +- ${MXML_LIBRARIES} +- ${OS_LIBRARIES} +- ${PTHREAD_LIBRARY} +- rtosc rtosc-cpp) ++if(ZYN_SYSTEM_RTOSC) ++ target_link_libraries(zynaddsubfx_core ++ ${ZLIB_LIBRARIES} ++ ${FFTW3F_LIBRARIES} ++ ${MXML_LIBRARIES} ++ ${OS_LIBRARIES} ++ ${PTHREAD_LIBRARY} ++ ${RTOSC_LIBRARIES} ++ ${RTOSC_CPP_LIBRARIES} ++ ) ++else() ++ target_link_libraries(zynaddsubfx_core ++ ${ZLIB_LIBRARIES} ++ ${FFTW3F_LIBRARIES} ++ ${MXML_LIBRARIES} ++ ${OS_LIBRARIES} ++ ${PTHREAD_LIBRARY} ++ rtosc ++ rtosc-cpp ++ ) ++endif() + + if(IwyuErr) + message (STATUS "Include what you use: ${IwyuErr}") diff --git a/community/zynaddsubfx/zynaddsubfx-fix-bash-completion-installation.patch b/community/zynaddsubfx/zynaddsubfx-fix-bash-completion-installation.patch deleted file mode 100644 index 0c96ecaa9..000000000 --- a/community/zynaddsubfx/zynaddsubfx-fix-bash-completion-installation.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ruN a/cmake/BashCompletion.cmake d/cmake/BashCompletion.cmake ---- a/cmake/BashCompletion.cmake 2019-02-23 16:43:37.000000000 +0100 -+++ d/cmake/BashCompletion.cmake 2019-04-19 00:21:17.721631142 +0200 -@@ -78,15 +78,15 @@ - BASHCOMP_PKG_PATH=\"${BASHCOMP_PKG_PATH}\"\n\ - fi\n\ - echo -e \"\\nInstalling bash completion...\\n\"\n\ --mkdir -p \"\$BASHCOMP_PKG_PATH\"\n\ --cp \"${CMAKE_CURRENT_BINARY_DIR}/${SCRIPT_NAME}\" \"\$BASHCOMP_PKG_PATH\"\n\ --chmod a+r \"\$BASHCOMP_PKG_PATH/${SCRIPT_NAME}\"\n\ --echo -e \"Bash completion for ${SCRIPT_NAME} has been installed to \$BASHCOMP_PKG_PATH/${SCRIPT_NAME}\"\n\ -+mkdir -p \"\${DESTDIR}/$BASHCOMP_PKG_PATH\"\n\ -+cp \"${CMAKE_CURRENT_BINARY_DIR}/${SCRIPT_NAME}\" \"\${DESTDIR}/$BASHCOMP_PKG_PATH\"\n\ -+chmod a+r \"\${DESTDIR}/$BASHCOMP_PKG_PATH/${SCRIPT_NAME}\"\n\ -+echo -e \"Bash completion for ${SCRIPT_NAME} has been installed to \${DESTDIR}/$BASHCOMP_PKG_PATH/${SCRIPT_NAME}\"\n\ - ") - INSTALL(CODE "EXECUTE_PROCESS(COMMAND chmod u+x \"install_${SCRIPT_NAME}_completion.sh\" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )") - INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"./install_${SCRIPT_NAME}_completion.sh\" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )") - -- MESSAGE(STATUS "Bash completion script for ${SCRIPT_NAME} will be installed to ${BASHCOMP_PKG_PATH} or fallback to ${BASHCOMP_USER_PATH} if unwritable.") -+ MESSAGE(STATUS "Bash completion script for ${SCRIPT_NAME} will be installed to ${DESTDIR}/${BASHCOMP_PKG_PATH} or fallback to ${BASHCOMP_USER_PATH} if unwritable.") - ENDMACRO() - ENDIF() - diff --git a/community/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-devendor_rtosc.patch b/community/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-devendor_rtosc.patch new file mode 100644 index 000000000..38e84e14f --- /dev/null +++ b/community/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-devendor_rtosc.patch @@ -0,0 +1,14 @@ +diff --git i/src/mruby-widget-lib/src/gem.c w/src/mruby-widget-lib/src/gem.c +index 8e3d721..7f200e3 100644 +--- i/src/mruby-widget-lib/src/gem.c ++++ w/src/mruby-widget-lib/src/gem.c +@@ -11,8 +11,8 @@ + #ifdef WIN32 + #include <windows.h> + #endif ++#include <rtosc/rtosc.h> + #include "../../../deps/pugl/pugl/pugl.h" +-#include "../../../deps/rtosc/include/rtosc/rtosc.h" + #include "../../../src/osc-bridge/src/bridge.h" + #include "../../../deps/mruby-nanovg/src/gl_core.3.2.h" + diff --git a/community/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-libzest_location.patch b/community/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-libzest_location.patch new file mode 100644 index 000000000..26dad9247 --- /dev/null +++ b/community/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-libzest_location.patch @@ -0,0 +1,13 @@ +diff --git i/test-libversion.c w/test-libversion.c +index 808c01f..a122585 100644 +--- i/test-libversion.c ++++ w/test-libversion.c +@@ -660,7 +660,7 @@ int main(int argc, char **argv) + if(!handle) + handle = dlopen("libzest.so", RTLD_LAZY); + if(!handle) +- handle = dlopen("/opt/zyn-fusion/libzest.so", RTLD_LAZY); ++ handle = dlopen("/usr/lib/zynaddsubfx/libzest.so", RTLD_LAZY); + #endif + if(!handle) { + printf("[ERROR] Cannot Open libzest.so\n"); diff --git a/community/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-system_wide_location.patch b/community/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-system_wide_location.patch new file mode 100644 index 000000000..101ea3bd7 --- /dev/null +++ b/community/zynaddsubfx/zynaddsubfx-mruby-zest-build-3.0.6-system_wide_location.patch @@ -0,0 +1,46 @@ +diff --git i/src/mruby-widget-lib/mrblib/script.rb w/src/mruby-widget-lib/mrblib/script.rb +index 2d3e7fc..4dbd3c7 100644 +--- i/src/mruby-widget-lib/mrblib/script.rb ++++ w/src/mruby-widget-lib/mrblib/script.rb +@@ -160,13 +160,13 @@ class ZRunner + search = @search_path + search ||= "" + font_error = false +- sans = [search + "font/Roboto-Regular.ttf", "deps/nanovg/example/Roboto-Regular.ttf"] ++ sans = ["/usr/share/fonts/TTF/Roboto-Regular.ttf", search + "font/Roboto-Regular.ttf", "deps/nanovg/example/Roboto-Regular.ttf"] + if(@vg.create_font('sans', sans[0]) == -1 && @vg.create_font('sans', sans[1]) == -1) + GL::debug "[ERROR] could not find sans font" + font_error = true + end + +- bold = [search + "font/Roboto-Bold.ttf", "deps/nanovg/example/Roboto-Bold.ttf"] ++ bold = ["/usr/share/fonts/TTF/Roboto-Bold.ttf", search + "font/Roboto-Bold.ttf", "deps/nanovg/example/Roboto-Bold.ttf"] + if(@vg.create_font('bold', bold[0]) == -1 && @vg.create_font('bold', bold[1]) == -1) + GL::debug "[ERROR] could not find bold font" + font_error = true +diff --git i/src/mruby-widget-lib/src/api.c w/src/mruby-widget-lib/src/api.c +index 6949413..1118717 100644 +--- i/src/mruby-widget-lib/src/api.c ++++ w/src/mruby-widget-lib/src/api.c +@@ -110,7 +110,7 @@ zest_open(char *address) + if(strstr(path, "libzest")) + strstr(path, "libzest")[0] = 0; + char path2[256]; +- snprintf(path2, sizeof(path2), "%s%s", path, "./qml/MainWindow.qml"); ++ snprintf(path2, sizeof(path2), "%s%s", path, "../../share/zynaddsubfx/qml/MainWindow.qml"); + FILE *f = fopen(path2, "r"); + if(f) { + printf("[INFO:Zyn] Found Assets at %s\n", path); +diff --git i/src/osc-bridge/src/bridge.c w/src/osc-bridge/src/bridge.c +index f87c849..6405bbb 100644 +--- i/src/osc-bridge/src/bridge.c ++++ w/src/osc-bridge/src/bridge.c +@@ -431,7 +431,7 @@ schema_t br_get_schema(bridge_t *br, uri_t uri) + schema_t sch; + + //printf("[debug] loading json file\n"); +- FILE *f = fopen("schema/test.json", "r"); ++ FILE *f = fopen("/usr/share/zynaddsubfx/schema/test.json", "r"); + if(!f && br->search_path) { + char tmp[256]; + snprintf(tmp, sizeof(tmp), "%s%s", br->search_path, "schema/test.json"); diff --git a/community/zynaddsubfx/zynaddsubfx-system-rtosc.patch b/community/zynaddsubfx/zynaddsubfx-system-rtosc.patch deleted file mode 100644 index 35b7a3996..000000000 --- a/community/zynaddsubfx/zynaddsubfx-system-rtosc.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -ruN a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2019-04-15 06:05:59.000000000 +0200 -+++ b/CMakeLists.txt 2019-04-16 21:01:48.285475235 +0200 -@@ -11,23 +11,32 @@ - endif() - - #Include RTOSC --if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt") -- message(STATUS "RTOSC NOT FOUND") -- message(STATUS "Attempting to checkout submodule") -- find_package(Git REQUIRED) -- execute_process(COMMAND git submodule update --init) -+find_package(PkgConfig) -+set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) -+pkg_check_modules(RTOSC REQUIRED librtosc ) -+if(RTOSC_FOUND) -+ message(STATUS "Found Rtosc system package...") -+ message(STATUS "Including from: ${RTOSC_INCLUDE_DIR}") -+ include_directories(${RTOSC_INCLUDE_DIR}) -+else() - if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt") -- message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n" -- "please check file permissions and your network") -+ message(STATUS "RTOSC NOT FOUND") -+ message(STATUS "Attempting to checkout submodule") -+ find_package(Git REQUIRED) -+ execute_process(COMMAND git submodule update --init) -+ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt") -+ message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n" -+ "please check file permissions and your network") -+ endif() -+ else() -+ message(STATUS "Found Rtosc Submodule...") - endif() --else() -- message(STATUS "Found Rtosc Submodule...") -+ set(RTOSC_NO_INSTALL TRUE) -+ include("rtosc/cmake/ColorMessage.cmake") -+ add_subdirectory(rtosc) -+ include_directories(rtosc/include) - endif() - --set(RTOSC_NO_INSTALL TRUE) --include("rtosc/cmake/ColorMessage.cmake") --add_subdirectory(rtosc) --include_directories(rtosc/include) - - enable_testing() - include(CTestConfig.cmake)