diff options
-rw-r--r-- | .SRCINFO | 59 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rwxr-xr-x | PKGBUILD | 260 | ||||
-rw-r--r-- | SonicPi.patch | 13 | ||||
-rw-r--r-- | build-ubuntu-app.patch | 70 | ||||
-rwxr-xr-x | launcher.sh | 5 | ||||
-rw-r--r-- | sonic-pi-3.2.0-devendor_qscintilla-qt5.patch | 23 | ||||
-rw-r--r-- | sonic-pi-3.2.0-gui_paths.patch | 76 | ||||
-rw-r--r-- | sonic-pi-3.2.0-ruby_paths.patch | 130 | ||||
-rw-r--r-- | sonic-pi-git.desktop | 10 | ||||
-rw-r--r-- | sonic-pi-git.png | bin | 87225 -> 0 bytes |
11 files changed, 454 insertions, 194 deletions
@@ -1,31 +1,52 @@ pkgbase = sonic-pi-git - pkgdesc = A music-centric programming environment, originally built for the raspberry pi. - pkgver = v2.5.0.r342.gdeb449e - pkgrel = 3 + pkgdesc = The Live Coding Music Synth for Everyone + pkgver = v3.2.0.r44.gc3895b5f0 + pkgrel = 1 url = http://sonic-pi.net/ arch = i686 arch = x86_64 + groups = pro-audio license = MIT + makedepends = boost makedepends = cmake makedepends = git - makedepends = supercollider + makedepends = erlang-nox + makedepends = gendesk + makedepends = lua makedepends = qt5-tools - depends = sed - depends = ruby - depends = libffi - depends = lua + makedepends = wkhtmltopdf + depends = aubio + depends = gcc-libs + depends = glibc + depends = osmid + depends = qt5-base depends = qscintilla-qt5 - depends = jack - optdepends = qjackctl: for graphical jackd spawning/configuration - optdepends = jack2: better jackd if you want to use without gui - source = sonic-pi::git+https://github.com/samaaron/sonic-pi.git - source = launcher.sh - source = sonic-pi-git.png - source = sonic-pi-git.desktop - md5sums = SKIP - md5sums = 9c6a820718f549d9c49dfb3d9a8b102e - md5sums = ba86680be610cc3d6f12d4a89b0f434d - md5sums = f283c44f25e1297008a34f42af3588bc + depends = ruby + depends = ruby-activesupport + depends = ruby-bundler + depends = ruby-ffi + depends = ruby-i18n + depends = ruby-kramdown + depends = ruby-minitest + depends = ruby-mocha + depends = ruby-multi_json + depends = ruby-rake + depends = ruby-rouge + depends = ruby-rugged + depends = ruby-sys-proctable + depends = sc3-plugins + depends = sox + depends = supercollider + provides = sonic-pi + conflicts = sonic-pi + source = git+https://github.com/samaaron/sonic-pi.git + source = sonic-pi-3.2.0-gui_paths.patch + source = sonic-pi-3.2.0-devendor_qscintilla-qt5.patch + source = sonic-pi-3.2.0-ruby_paths.patch + sha512sums = SKIP + sha512sums = e530cc13cb6674dca2ace2a8da566ce28263a15197cf7fccd5d3e58b676c08ce860bc6264a95d26569ff1f923020a40ece1e05841c955c5db16e61c30938f1c0 + sha512sums = fbe196bc332a7a04e8d5097204a13626e7aba3a70715d2a1676c0b1f37f56da427d0d5b417f92c27e64f91a03dd9d4335f65f26f9e9d14e4076d496c94c949af + sha512sums = 987504a8b98eea4a3fac2557fcbf002b8d0e9c991922c74e7649546ff963c30d0fef891cecb546f840801c88ec9b82f1afb4cebef9838a53af20d0f3f63a9c39 pkgname = sonic-pi-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..05eadd3d44c1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pkg.tar.zst +sonic-pi/ @@ -1,96 +1,202 @@ # Maintainer: Nigel Michki <nigeil@yahoo.com> +# Contributor: David Runge <dvzrv@archlinux.org> # Contributor: Serhii Balbieko <sergey@balbeko.com> # Contributor: Simon Dreher <code@simon-dreher.de> +_name=sonic-pi pkgname=sonic-pi-git -pkgver=v2.11.1.r573.g47821c6d7 +pkgver=v3.2.0.r44.gc3895b5f0 pkgrel=1 -pkgdesc="A music-centric programming environment, originally built for the raspberry pi." -arch=('i686' - 'x86_64') +pkgdesc="The Live Coding Music Synth for Everyone" +arch=('i686' 'x86_64') url="http://sonic-pi.net/" license=('MIT') -groups=() +groups=('pro-audio') conflicts=('sonic-pi') -depends=('sed' - 'ruby' - 'libffi' - 'lua' - 'qscintilla-qt5' - 'jack' - 'aubio' - 'qwt-qt5-opengl') -makedepends=('cmake' - 'git' - 'supercollider' - 'qt5-tools' - 'boost') -optdepends=('qjackctl: for graphical jackd spawning/configuration' - 'jack2: better jackd if you want to use without gui' - 'sc3-plugins-git: plugins for supercollider' - 'pulseaudio-jack: support for jack2-pulseaudio integration' - 'cadence: easy jack/pulseaudio crossover') -source=('sonic-pi::git+https://github.com/samaaron/sonic-pi.git' - 'launcher.sh' - 'sonic-pi-git.png' - 'sonic-pi-git.desktop' - 'build-ubuntu-app.patch' - 'SonicPi.patch') -md5sums=('SKIP' - '298e2729cda0c33c9cec7f7f721c1bbd' - 'ba86680be610cc3d6f12d4a89b0f434d' - 'fd330b2be9b52e9bee2fb9922141e2ca' - '5ed2b42a1a0f6fd4840f1a7154b2d44f' - 'c1c63041f01c9b1394c3a3273f5ff543') +provides=('sonic-pi') +depends=('aubio' 'gcc-libs' 'glibc' 'osmid' 'qt5-base' 'qscintilla-qt5' 'ruby' +'ruby-activesupport' 'ruby-bundler' 'ruby-ffi' 'ruby-i18n' 'ruby-kramdown' +'ruby-minitest' 'ruby-mocha' 'ruby-multi_json' 'ruby-rake' 'ruby-rouge' +'ruby-rugged' 'ruby-sys-proctable' 'sc3-plugins' 'sox' 'supercollider') +makedepends=('boost' 'cmake' 'git' 'erlang-nox' 'gendesk' 'lua' 'qt5-tools' +'wkhtmltopdf') +source=('git+https://github.com/samaaron/sonic-pi.git' + "${_name}-3.2.0-gui_paths.patch" + "${_name}-3.2.0-devendor_qscintilla-qt5.patch" + "${_name}-3.2.0-ruby_paths.patch") +sha512sums=('SKIP' + 'e530cc13cb6674dca2ace2a8da566ce28263a15197cf7fccd5d3e58b676c08ce860bc6264a95d26569ff1f923020a40ece1e05841c955c5db16e61c30938f1c0' + 'fbe196bc332a7a04e8d5097204a13626e7aba3a70715d2a1676c0b1f37f56da427d0d5b417f92c27e64f91a03dd9d4335f65f26f9e9d14e4076d496c94c949af' + '987504a8b98eea4a3fac2557fcbf002b8d0e9c991922c74e7649546ff963c30d0fef891cecb546f840801c88ec9b82f1afb4cebef9838a53af20d0f3f63a9c39') + +pkgver() { + cd "${_name}" + git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g' +} prepare() { - msg2 "Hook up qwt to qmake" - qmake -set QMAKEFEATURES usr/share/qt4/mkspecs/features - - msg2 "Fix wrongly-named (on Arch) QT library" - find $srcdir/sonic-pi/app/gui/qt -type f -name "*" -readable -exec sed -i 's/lqt5scintilla2/lqscintilla2_qt5/g' {} + - - #Patch build-ubuntu-app script to skip ubuntu-specific (and redundant) options - msg2 "Patch build-ubuntu-app script for Arch Linux" - cd $srcdir/sonic-pi/app/gui/qt - patch < $srcdir/build-ubuntu-app.patch - patch < $srcdir/SonicPi.patch + cd "${_name}" + gendesk -n \ + --pkgname "${pkgname}" \ + --pkgdesc "${pkgdesc}" \ + --name "${pkgname}" \ + --exec "${_name}" \ + --categories "AudioVideo;Audio" + rm -rvf app/server/native + # patch app/gui/qt/{model/sonicpitheme,mainwindow}.cpp to set path to + # external components in /usr/{lib,share}/sonic-pi + patch -Np1 -i "../${_name}-3.2.0-gui_paths.patch" + # devendor qscintilla-qt5: https://github.com/samaaron/sonic-pi/issues/2278 + patch -Np1 -i "../${_name}-3.2.0-devendor_qscintilla-qt5.patch" + # devendor gems requiring compilation: + # ffi, ruby-prof, rugged + sed -e '/rugged/d' \ + -e '/ffi/d' \ + -e '/ruby-prof/d' \ + -i app/server/ruby/bin/compile-extensions.rb + # remove unrequired gems, so we don't create any doc for them + rm -rvf app/server/ruby/vendor/{activesupport,ffi,i18n,kramdown,minitest,mocha,multi_json,rouge,rugged,sys-proctable}* + rm -rvf app/server/ruby/vendor/{narray,ruby-coreaudio,ruby-prof}* } build() { - #Based on instructions from INSTALL_LINUX.md in upstream sources - cd $srcdir/sonic-pi/app/gui/qt - ./build-ubuntu-app - - #Cleaning up object files - cd $srcdir - find . -type f -name "*.o" -exec rm {} + - find . ! -perm -g+r -exec chmod 666 {} + - rm -f $srcdir/sonic-pi/app/gui/qt/sed* -} + cd "${_name}" + ( + # OSC and pi_server + cd app/server/erlang + erlc {osc,pi_server}.erl + ) -pkgver() { - cd $srcdir/sonic-pi - git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g' + ( + # ruby extensions + cd app/server/ruby/bin + ./compile-extensions.rb + ./i18n-tool.rb -t + ) + + ( + # GUI + cd app/gui/qt/ + # help template + cp -vf utils/ruby_help.{tmpl,h} + ../../server/ruby/bin/qt-doc.rb -o utils/ruby_help.h + # generating translations + lrelease lang/*.ts + # compiling GUI + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -B build \ + -S . + make VERBOSE=1 -C build + ) + + ( + # patch app/server/ruby/lib/sonicpi/util.rb to set proper paths to external components + # NOTE: this can only be done after running + # app/server/ruby/bin/compile-extensions.rb, as ruby-wavefile uses a + # hardcoded location of a file (move to prepare() after devendoring more ruby gems) + patch -Np1 -i "../${_name}-3.2.0-ruby_paths.patch" + ) } +## tests fail: https://github.com/samaaron/sonic-pi/issues/1865 +#check() { +# cd "${_name}" +# cd app/server/ruby/test +# rake test +#} + package() { - #Install sources to /opt/ - mkdir $pkgdir/opt/ - mkdir $pkgdir/opt/sonic-pi - cp -R $srcdir/sonic-pi/* $pkgdir/opt/sonic-pi/ > /dev/null - ln -s -r $pkgdir/opt/sonic-pi/app/server $pkgdir/opt/sonic-pi/server - - #Add a launcher script to /usr/bin - mkdir $pkgdir/usr - mkdir $pkgdir/usr/bin - install -Dm644 "$srcdir/launcher.sh" "$pkgdir/usr/bin/sonic-pi" - chmod +x $pkgdir/usr/bin/sonic-pi - - #Add a desktop entry - mkdir $pkgdir/usr/share - mkdir $pkgdir/usr/share/applications - install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop" - mkdir $pkgdir/usr/share/pixmaps - install -Dm644 "sonic-pi-git.png" "$pkgdir/usr/share/pixmaps/$pkgname.png" + cd "${_name}" + # GUI executable + install -vDm 755 "app/gui/qt/build/${_name}" "${pkgdir}/usr/bin/${_name}" + # book + install -vDm 644 app/gui/qt/book/*.html \ + -t "${pkgdir}/usr/share/${_name}/book" + # i18n + install -vDm 644 app/gui/qt/lang/*.qm \ + -t "${pkgdir}/usr/share/${_name}/lang" + # help + install -vDm 644 app/gui/qt/help/*.html \ + -t "${pkgdir}/usr/share/${_name}/help" + # html + install -vDm 644 app/gui/qt/html/*.html \ + -t "${pkgdir}/usr/share/${_name}/html" + # images + install -vDm 644 app/gui/qt/images/*.png \ + -t "${pkgdir}/usr/share/${_name}/images" + install -vDm 644 app/gui/qt/images/coreteam/*.png \ + -t "${pkgdir}/usr/share/${_name}/images/coreteam" + install -vDm 644 app/gui/qt/images/toolbar/default/*.png \ + -t "${pkgdir}/usr/share/${_name}/images/toolbar/default" + install -vDm 644 app/gui/qt/images/toolbar/pro/*.png \ + -t "${pkgdir}/usr/share/${_name}/images/toolbar/pro" + install -vDm 644 etc/doc/images/tutorial/*.png \ + -t "${pkgdir}/usr/share/${_name}/images/tutorial" + # theme + install -vDm 644 app/gui/qt/theme/app.qss \ + -t "${pkgdir}/usr/share/${_name}/theme/" + install -vDm 644 app/gui/qt/theme/dark/doc-styles.css \ + -t "${pkgdir}/usr/share/${_name}/theme/dark" + install -vDm 644 app/gui/qt/theme/light/doc-styles.css \ + -t "${pkgdir}/usr/share/${_name}/theme/light" + # samples + install -vDm 644 etc/samples/*.{flac,md} \ + -t "${pkgdir}/usr/share/${_name}/samples" + # snippets + install -vDm 644 etc/snippets/fx/*.sps \ + -t "${pkgdir}/usr/share/${_name}/snippets/fx" + install -vDm 644 etc/snippets/live_loop/*.sps \ + -t "${pkgdir}/usr/share/${_name}/snippets/live_loop" + install -vDm 644 etc/snippets/syntax/*.sps \ + -t "${pkgdir}/usr/share/${_name}/snippets/syntax" + # synthdefs + install -vDm 644 etc/synthdefs/compiled/*.scsyndef \ + -t "${pkgdir}/usr/share/${_name}/synthdefs/compiled" + install -vDm 644 etc/synthdefs/designs/overtone/${_name}/*.clj\ + -t "${pkgdir}/usr/share/${_name}/synthdefs/designs/overtone/" + install -vDm 644 etc/synthdefs/designs/overtone/${_name}/src/sonic_pi/*.clj\ + -t "${pkgdir}/usr/share/${_name}/synthdefs/designs/overtone/sonic_pi/src" + install -vDm 644 etc/synthdefs/designs/overtone/${_name}/test/sonic_pi/*.clj\ + -t "${pkgdir}/usr/share/${_name}/synthdefs/designs/overtone/sonic_pi/test" + # buffers + install -vDm 644 etc/buffers/rand-stream.wav \ + -t "${pkgdir}/usr/share/${_name}/buffers" + # docs + install -vDm 644 etc/doc/cheatsheets/*.md \ + -t "${pkgdir}/usr/share/doc/${_name}/cheatsheets" + # pdfs + install -vDm 644 etc/synthdefs/graphviz/pdf/*.pdf \ + -t "${pkgdir}/usr/share/doc/${_name}/synthdefs" + # tutorial + install -vDm 644 etc/doc/tutorial/*.md \ + -t "${pkgdir}/usr/share/doc/${_name}/tutorial" + # examples + install -vDm 644 etc/examples/algomancer/*.rb \ + -t "${pkgdir}/usr/share/doc/${_name}/examples/algomancer" + install -vDm 644 etc/examples/apprentice/*.rb \ + -t "${pkgdir}/usr/share/doc/${_name}/examples/apprentice" + install -vDm 644 etc/examples/illusionist/*.rb \ + -t "${pkgdir}/usr/share/doc/${_name}/examples/illusionist" + install -vDm 644 etc/examples/incubation/*.rb \ + -t "${pkgdir}/usr/share/doc/${_name}/examples/incubation" + install -vDm 644 etc/examples/magician/*.rb \ + -t "${pkgdir}/usr/share/doc/${_name}/examples/magician" + install -vDm 644 etc/examples/sorcerer/*.rb \ + -t "${pkgdir}/usr/share/doc/${_name}/examples/sorcerer" + install -vDm 644 etc/examples/wizard/*.rb \ + -t "${pkgdir}/usr/share/doc/${_name}/examples/wizard" + # erlang + install -vDm 755 app/server/erlang/*.beam \ + -t "${pkgdir}/usr/lib/${_name}" + # ruby + install -vdm 755 "${pkgdir}/usr/share/${_name}" + cp -av app/server/ruby "${pkgdir}/usr/lib/${_name}/server" + rm -vf "${pkgdir}/usr/lib/${_name}/server/vendor/"*/ext/*.{o,c} + rm -vf "${pkgdir}/usr/lib/${_name}/server/vendor/"*/ext/*/*.{o,c} + rm -vf "${pkgdir}/usr/lib/${_name}/server/Rakefile" + rm -vf "${pkgdir}/usr/lib/${_name}/server/vendor/"*/Rakefile + # xdg + install -vDm 644 "${_name}.desktop" -t "${pkgdir}/usr/share/applications/" + # license + install -vDm 644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/SonicPi.patch b/SonicPi.patch deleted file mode 100644 index fc8aff0ae6cb..000000000000 --- a/SonicPi.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- src/sonic-pi/app/gui/qt/SonicPi.pro 2016-08-13 10:16:29.000000000 -0400 -+++ SonicPiArch.pro 2016-08-13 10:17:39.257494865 -0400 -@@ -18,7 +18,9 @@ - #------------------------------------------------- - - TARGET = 'sonic-pi' --CONFIG += qscintilla2 qwt c++11 -+CONFIG += qscintilla2 qwt c++11 -+INCLUDEPATH += /usr/include/qwt5 -+LIBS += -l qwt - - QT += core gui concurrent network - greaterThan(QT_MAJOR_VERSION, 4) { diff --git a/build-ubuntu-app.patch b/build-ubuntu-app.patch deleted file mode 100644 index 9a7122b71606..000000000000 --- a/build-ubuntu-app.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/src/sonic-pi/app/gui/qt/build-ubuntu-app b/build-arch-app -index 2c6dfb4..41400dd 100755 ---- a/src/sonic-pi/app/gui/qt/build-ubuntu-app -+++ b/build-arch-app -@@ -8,7 +8,7 @@ echo "We're working to make this script a one shot solution for all Linux platform" - echo "Please direct rage and suggestions to Factoid in (https://gitter.im/samaaron/sonic-pi)" - - #Install dependencies for building supercollider, as well as qt5 and supporting libraries for gui --sudo apt-get install -y g++ ruby ruby-dev pkg-config git build-essential libjack-jackd2-dev libsndfile1-dev libasound2-dev libavahi-client-dev libicu-dev libreadline6-dev libfftw3-dev libxt-dev libudev-dev cmake libboost1.58-dev libqwt-qt5-dev libqt5scintilla2-dev libqt5svg5-dev qt5-qmake qt5-default qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev qtpositioning5-dev libqt5sensors5-dev qtmultimedia5-dev libffi-dev -+#sudo apt-get install -y g++ ruby ruby-dev pkg-config git build-essential libjack-jackd2-dev libsndfile1-dev libasound2-dev libavahi-client-dev libicu-dev libreadline6-dev libfftw3-dev libxt-dev libudev-dev cmake libboost1.58-dev libqwt-qt5-dev libqt5scintilla2-dev libqt5svg5-dev qt5-qmake qt5-default qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev qtpositioning5-dev libqt5sensors5-dev qtmultimedia5-dev libffi-dev - - ### IF YOU HAVE PROBLEMS WITH qwt - #cd $SP_APP_SRC/../../../../ -@@ -30,29 +30,29 @@ sudo apt-get install g++ ruby ruby-dev pkg-config git build-essential libjack-ja - #sudo make install - - #Build supercollider 3.8 from source --cd ../../../../ --SP_ROOT=`pwd` --git clone https://github.com/supercollider/supercollider.git --cd supercollider --git submodule init && git submodule update --mkdir build --cd build --cmake -DSC_EL=no -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/qt5 .. --make --sudo make install -+#cd ../../../../ -+#SP_ROOT=`pwd` -+#git clone https://github.com/supercollider/supercollider.git -+#cd supercollider -+#git submodule init && git submodule update -+#mkdir build -+#cd build -+#cmake -DSC_EL=no -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/qt5 .. -+#make -+#sudo make install - #This should install to /usr/local/ - - #Build sc3 plugins and install to /usr/local/ so supercollider 3.7.1 can find them --cd $SP_ROOT --git clone https://github.com/supercollider/sc3-plugins.git --cd sc3-plugins --git submodule init && git submodule update --cp -r external_libraries/nova-simd/* source/VBAPUGens --mkdir build --cd build --cmake -DSC_PATH=/usr/local/include/SuperCollider -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release .. --make --sudo make install -+#cd $SP_ROOT -+#git clone https://github.com/supercollider/sc3-plugins.git -+#cd sc3-plugins -+#git submodule init && git submodule update -+#cp -r external_libraries/nova-simd/* source/VBAPUGens -+#mkdir build -+#cd build -+#cmake -DSC_PATH=/usr/local/include/SuperCollider -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release .. -+#make -+#sudo make install - - #Install libaubio 4.2.2 (apt-get version is too old) - cd $SP_ROOT -@@ -70,5 +70,5 @@ cd $SP_APP_SRC - cp -f ruby_help.tmpl ruby_help.h - ../../server/bin/qt-doc.rb -o ruby_help.h - lrelease SonicPi.pro --qmake -qt=qt5 SonicPi.pro -+qmake-qt5 SonicPi.pro - make diff --git a/launcher.sh b/launcher.sh deleted file mode 100755 index 5f831e9e23df..000000000000 --- a/launcher.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -#Launches the sonic-pi program, which seems to like running -#in its own little directory. -echo "Remember to start jackd (using qjackctl or some other program) before launching!" -/opt/sonic-pi/app/gui/qt/sonic-pi diff --git a/sonic-pi-3.2.0-devendor_qscintilla-qt5.patch b/sonic-pi-3.2.0-devendor_qscintilla-qt5.patch new file mode 100644 index 000000000000..4f7a1725576a --- /dev/null +++ b/sonic-pi-3.2.0-devendor_qscintilla-qt5.patch @@ -0,0 +1,23 @@ +diff -ruN a/app/gui/qt/CMakeLists.txt c/app/gui/qt/CMakeLists.txt +--- a/app/gui/qt/CMakeLists.txt 2020-02-25 01:23:45.000000000 +0100 ++++ c/app/gui/qt/CMakeLists.txt 2020-03-08 16:54:34.158555996 +0100 +@@ -38,9 +38,7 @@ + + find_package(Qt5 COMPONENTS Core Widgets Gui Concurrent Network OpenGL PrintSupport Xml Svg REQUIRED) + find_package(Threads REQUIRED) +- +-# We build scintilla as part of the main project to make it easy to debug/fix +-add_subdirectory(external/QScintilla-2.11.4) ++find_library(QSCINTILLA_QT5 qscintilla2_qt5) + + set(APP_NAME sonic-pi) + +@@ -129,7 +127,7 @@ + + target_link_libraries(${APP_NAME} + PRIVATE +- QScintilla ++ ${QSCINTILLA_QT5} + Qt5::Core + Qt5::Gui + Qt5::Widgets diff --git a/sonic-pi-3.2.0-gui_paths.patch b/sonic-pi-3.2.0-gui_paths.patch new file mode 100644 index 000000000000..22069e9dd188 --- /dev/null +++ b/sonic-pi-3.2.0-gui_paths.patch @@ -0,0 +1,76 @@ +diff -ruN a/app/gui/qt/mainwindow.cpp b/app/gui/qt/mainwindow.cpp +--- a/app/gui/qt/mainwindow.cpp 2020-02-25 01:23:45.000000000 +0100 ++++ b/app/gui/qt/mainwindow.cpp 2020-03-08 13:53:17.604508214 +0100 +@@ -353,10 +353,10 @@ + ruby_path = "ruby"; + } + +- ruby_server_path = QDir::toNativeSeparators(root_path + "/app/server/ruby/bin/sonic-pi-server.rb"); +- port_discovery_path = QDir::toNativeSeparators(root_path + "/app/server/ruby/bin/port-discovery.rb"); +- fetch_url_path = QDir::toNativeSeparators(root_path + "/app/server/ruby/bin/fetch-url.rb"); +- sample_path = QDir::toNativeSeparators(root_path + "/etc/samples"); ++ ruby_server_path = QDir::toNativeSeparators(root_path + "/usr/lib/sonic-pi/server/bin/sonic-pi-server.rb"); ++ port_discovery_path = QDir::toNativeSeparators(root_path + "/usr/lib/sonic-pi/server/bin/port-discovery.rb"); ++ fetch_url_path = QDir::toNativeSeparators(root_path + "/usr/lib/sonic-pi/server/bin/fetch-url.rb"); ++ sample_path = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/samples"); + + sp_user_path = QDir::toNativeSeparators(sonicPiHomePath() + "/.sonic-pi"); + sp_user_tmp_path = QDir::toNativeSeparators(sp_user_path + "/.writableTesterPath"); +@@ -367,14 +367,14 @@ + process_log_path = QDir::toNativeSeparators(log_path + "/processes.log"); + scsynth_log_path = QDir::toNativeSeparators(log_path + QDir::separator() + "scsynth.log"); + +- init_script_path = QDir::toNativeSeparators(root_path + "/app/server/ruby/bin/init-script.rb"); +- exit_script_path = QDir::toNativeSeparators(root_path + "/app/server/ruby/bin/exit-script.rb"); ++ init_script_path = QDir::toNativeSeparators(root_path + "/usr/lib/sonic-pi/server/bin/init-script.rb"); ++ exit_script_path = QDir::toNativeSeparators(root_path + "/usr/lib/sonic-pi/server/bin/exit-script.rb"); + +- qt_app_theme_path = QDir::toNativeSeparators(root_path + "/app/gui/qt/theme/app.qss"); ++ qt_app_theme_path = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/theme/app.qss"); + +- qt_browser_dark_css = QDir::toNativeSeparators(root_path + "/app/gui/qt/theme/dark/doc-styles.css"); +- qt_browser_light_css = QDir::toNativeSeparators(root_path + "/app/gui/qt/theme/light/doc-styles.css"); +- qt_browser_hc_css = QDir::toNativeSeparators(root_path + "/app/gui/qt/theme/high_contrast/doc-styles.css"); ++ qt_browser_dark_css = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/theme/dark/doc-styles.css"); ++ qt_browser_light_css = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/theme/light/doc-styles.css"); ++ qt_browser_hc_css = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/theme/high_contrast/doc-styles.css"); + + // attempt to create log directory + QDir logDir(log_path); +@@ -1056,7 +1056,7 @@ + return QCoreApplication::applicationDirPath() + "/../../../../.."; + #else + // On linux, CMake builds app into the build folder +- return QCoreApplication::applicationDirPath() + "/../../../.."; ++ return QCoreApplication::applicationDirPath() + "/../.."; + #endif + } + +@@ -1098,7 +1098,7 @@ + // Register server pid for potential zombie clearing + QStringList regServerArgs; + #if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0) +- regServerArgs << QDir::toNativeSeparators(rootPath() + "/app/server/ruby/bin/task-register.rb")<< QString::number(serverProcess->processId()); ++ regServerArgs << QDir::toNativeSeparators(rootPath() + "/usr/lib/sonic-pi/server/bin/task-register.rb")<< QString::number(serverProcess->processId()); + #endif + QProcess *regServerProcess = new QProcess(); + regServerProcess->start(ruby_path, regServerArgs); +diff -ruN a/app/gui/qt/model/sonicpitheme.cpp b/app/gui/qt/model/sonicpitheme.cpp +--- a/app/gui/qt/model/sonicpitheme.cpp 2020-02-25 01:23:45.000000000 +0100 ++++ b/app/gui/qt/model/sonicpitheme.cpp 2020-03-08 19:59:00.840045897 +0100 +@@ -25,11 +25,11 @@ + this->customSettingsFilename = customSettingsFilename; + this->rootPath = rootPath; + +- qt_app_theme_path = QDir::toNativeSeparators(rootPath + "/app/gui/qt/theme/app.qss"); ++ qt_app_theme_path = QDir::toNativeSeparators(rootPath + "/usr/share/sonic-pi/theme/app.qss"); + +- qt_browser_dark_css = QDir::toNativeSeparators(rootPath + "/app/gui/qt/theme/dark/doc-styles.css"); +- qt_browser_light_css = QDir::toNativeSeparators(rootPath + "/app/gui/qt/theme/light/doc-styles.css"); +- qt_browser_hc_css = QDir::toNativeSeparators(rootPath + "/app/gui/qt/theme/high_contrast/doc-styles.css"); ++ qt_browser_dark_css = QDir::toNativeSeparators(rootPath + "/usr/share/sonic-pi/theme/dark/doc-styles.css"); ++ qt_browser_light_css = QDir::toNativeSeparators(rootPath + "/usr/share/sonic-pi/theme/light/doc-styles.css"); ++ qt_browser_hc_css = QDir::toNativeSeparators(rootPath + "/usr/share/sonic-pi/theme/high_contrast/doc-styles.css"); + + loadToolBarIcons(); + diff --git a/sonic-pi-3.2.0-ruby_paths.patch b/sonic-pi-3.2.0-ruby_paths.patch new file mode 100644 index 000000000000..5317858ee7c2 --- /dev/null +++ b/sonic-pi-3.2.0-ruby_paths.patch @@ -0,0 +1,130 @@ +diff -ruN a/app/server/ruby/core.rb d/app/server/ruby/core.rb +--- a/app/server/ruby/core.rb 2020-02-25 01:23:45.000000000 +0100 ++++ d/app/server/ruby/core.rb 2020-03-08 21:29:51.417948839 +0100 +@@ -146,7 +146,7 @@ + module Core + module SPRand + # Read in same random numbers as server for random stream sync +- @@random_numbers = ::WaveFile::Reader.new(File.expand_path("../../../../etc/buffers/rand-stream.wav", __FILE__), ::WaveFile::Format.new(:mono, :float, 44100)).read(441000).samples.freeze ++ @@random_numbers = ::WaveFile::Reader.new(File.expand_path("/usr/share/sonic-pi/buffers/rand-stream.wav", __FILE__), ::WaveFile::Format.new(:mono, :float, 44100)).read(441000).samples.freeze + + def self.tl_seed_map(seed, idx=0) + {:sonic_pi_spider_random_gen_seed => seed, +diff -ruN a/app/server/ruby/lib/sonicpi/util.rb d/app/server/ruby/lib/sonicpi/util.rb +--- a/app/server/ruby/lib/sonicpi/util.rb 2020-02-25 01:23:45.000000000 +0100 ++++ d/app/server/ruby/lib/sonicpi/util.rb 2020-03-09 19:16:54.479452971 +0100 +@@ -252,11 +252,11 @@ + end + + def root_path +- File.absolute_path("#{File.dirname(__FILE__)}/../../../../../") ++ File.absolute_path("/usr/share/sonic-pi") + end + + def etc_path +- File.absolute_path("#{root_path}/etc") ++ File.absolute_path("#{root_path}") + end + + def snippets_path +@@ -264,7 +264,7 @@ + end + + def doc_path +- File.absolute_path("#{etc_path}/doc") ++ File.absolute_path("/usr/share/doc/sonic-pi") + end + + def cheatsheets_path +@@ -276,7 +276,7 @@ + end + + def tmp_path +- File.absolute_path("#{root_path}/tmp") ++ File.absolute_path("/tmp") + end + + def synthdef_path +@@ -292,19 +292,20 @@ + end + + def app_path +- File.absolute_path("#{root_path}/app") ++ File.absolute_path("/usr/lib/sonic-pi") + end + + def html_public_path +- File.absolute_path("#{app_path}/gui/html/public") ++ File.absolute_path("#{doc_path}/gui/html/public") + end + ++ # this path is only relevant during build time + def qt_gui_path + File.absolute_path("#{app_path}/gui/qt") + end + + def examples_path +- File.absolute_path("#{etc_path}/examples") ++ File.absolute_path("#{doc_path}/examples") + end + + def server_path +@@ -312,7 +313,7 @@ + end + + def server_bin_path +- File.absolute_path("#{server_path}/ruby/bin") ++ File.absolute_path("#{server_path}/bin") + end + + def native_path +@@ -320,15 +321,15 @@ + end + + def sox_path +- File.join(native_path, "sox", __exe_fix("sox")) ++ File.absolute_path("/usr/bin/sox") + end + + def osmid_o2m_path +- File.join(native_path, "osmid", __exe_fix("o2m")) ++ File.absolute_path("/usr/bin/o2m") + end + + def osmid_m2o_path +- File.join(native_path, "osmid", __exe_fix("m2o")) ++ File.absolute_path("/usr/bin/m2o") + end + + def scsynth_log_path +@@ -373,7 +374,7 @@ + end + + def erlang_server_path +- File.join(server_path, "erlang") ++ File.absolute_path("/usr/lib/sonic-pi") + end + + def user_settings_path +diff -ruN a/app/server/ruby/util.rb d/app/server/ruby/util.rb +--- a/app/server/ruby/util.rb 2020-02-25 01:23:45.000000000 +0100 ++++ d/app/server/ruby/util.rb 2020-03-08 21:43:42.229538721 +0100 +@@ -12,15 +12,15 @@ + #++ + + def sp_sonic_pi_path() +- File.absolute_path("#{File.dirname(__FILE__)}/../../") ++ File.absolute_path("#{File.dirname(__FILE__)}/..") + end + + def sp_scripts_path() +- File.absolute_path("#{sp_sonic_pi_path}/app/scripts") ++ File.absolute_path("#{sp_sonic_pi_path}/scripts") + end + + def sp_synthdefs_path() +- File.absolute_path("#{sp_sonic_pi_path}/app/etc/synthdefs/compiled") ++ File.absolute_path("#{sp_sonic_pi_path}/synthdefs/compiled") + end + + def spider_log(message) diff --git a/sonic-pi-git.desktop b/sonic-pi-git.desktop deleted file mode 100644 index 06867e6f8976..000000000000 --- a/sonic-pi-git.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Type=Application -Name=Sonic pi -Comment=A music-centric programming environment, originally built for the raspberry pi. -Exec=/usr/bin/sonic-pi -Icon=sonic-pi-git -Terminal=false -StartupNotify=false -Categories=Application;Development; diff --git a/sonic-pi-git.png b/sonic-pi-git.png Binary files differdeleted file mode 100644 index bfee139b8a36..000000000000 --- a/sonic-pi-git.png +++ /dev/null |