[arch-commits] Commit in sonic-pi/trunk (3 files)

David Runge dvzrv at archlinux.org
Thu Feb 7 23:14:41 UTC 2019


    Date: Thursday, February 7, 2019 @ 23:14:40
  Author: dvzrv
Revision: 430407

upgpkg: sonic-pi 3.1.0-4

Devendoring ruby-{ffi,minitest,multi_json,rouge,rugged,sys-proctable}. Removing unrequired vendored ruby-{narray,coreaudio,ruby-prof}. Moving application to /usr/lib/sonic-pi. Adding many TODOs for further devendoring ruby gems.

Modified:
  sonic-pi/trunk/PKGBUILD
  sonic-pi/trunk/fix-paths-in-gui.diff
  sonic-pi/trunk/fix-ruby-paths.diff

-----------------------+
 PKGBUILD              |   47 +++++++++++++++++++++++++++++++++++++++++------
 fix-paths-in-gui.diff |   10 +++++-----
 fix-ruby-paths.diff   |    8 ++++----
 3 files changed, 50 insertions(+), 15 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-02-07 22:41:06 UTC (rev 430406)
+++ PKGBUILD	2019-02-07 23:14:40 UTC (rev 430407)
@@ -1,21 +1,23 @@
 # Maintainer: David Runge <dave at sleepmap.de>
 pkgname=sonic-pi
 pkgver=3.1.0
-pkgrel=3
+pkgrel=4
 pkgdesc="The Live Coding Music Synth for Everyone"
 arch=('x86_64')
 url="https://sonic-pi.net/"
 license=('CCPL' 'LGPL2.1' 'GPL2' 'GPL3' 'MIT')
 groups=('pro-audio')
-depends=('aubio' 'boost-libs' 'erlang-nox' 'libffi' 'http-parser' 'osmid' 'qscintilla-qt5' 'qwt' 'ruby' 'sc3-plugins' 'supercollider')
-makedepends=('boost' 'cmake' 'lua' 'qt5-tools' 'wkhtmltopdf')
+depends=('aubio' 'boost-libs' 'http-parser' 'osmid' 'qscintilla-qt5' 'qwt'
+'ruby-ffi' 'ruby-minitest' 'ruby-multi_json' 'ruby-rouge' 'ruby-rugged'
+'ruby-sys-proctable' 'sc3-plugins' 'supercollider')
+makedepends=('boost' 'cmake' 'erlang-nox' 'lua' 'qt5-tools' 'wkhtmltopdf')
 checkdepends=('ruby-rake')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/samaaron/${pkgname}/archive/v${pkgver}.tar.gz"
         "fix-paths-in-gui.diff"
         "fix-ruby-paths.diff")
 sha512sums=('45373d3e673bc2f45bf5ccea31f6cf5e2003c9bdfc4645dec4b9fec391cb28b9e0b0823a98e9690928e116b8c40f96596bd1c8f5aefbf4f3e43e6c30ab76d41f'
-            'ef3dfe52d05f085f230ee02f84b20ee615a98a0be5ec60edba28075b93a7edbd37668ebbcc30f695126515eb614ebd27cee77ab3145d06ee7ba1c10ffced2471'
-            '1c0238a2cda782de97504c81c47db71b940d89987b7fa6aad1a00c8a095a5627b2d82809d81f48f0e2bee290ad1bbeded634827511d63eed5635bd94806fcccb')
+            'ea827c451a42ea12b7a1ced04978fa3a3eb5368b9802c982a0f815159d5591bedc4dc5b9eed89df3957087352bcb5f778e054abd2cb38cc1e57ab538e73b97f3'
+            '245418d7d3d145a77423350afd2598865395ed5e479fa13922320e6d53c849b01e99c71c460e384f69a8a70d6087899d9e26dcd06d68a13980fc2d6a543b2644')
 
 prepare() {
   cd "$pkgname-$pkgver"
@@ -23,6 +25,39 @@
   rm -rvf app/server/native
   # TODO: patch app/gui/qt/mainwindow.cpp to set path to external components in /usr/{lib,share}/sonic-pi
   patch -Np1 -i ../fix-paths-in-gui.diff
+  #TODO: devendor ruby-activesupport
+  #TODO: devendor ruby-ast
+  #TODO: devendor ruby-atomic (bin)
+  #TODO: devendor ruby-benchmark-ips
+  #TODO: devendor ruby-blankslate
+  #TODO: devendor ruby-did_you_mean (bin)
+  #TODO: devendor ruby-fast_osc (bin)
+  #TODO: devendor ruby-gettext
+  #TODO: devendor ruby-hamster
+  #TODO: devendor ruby-i18n
+  #TODO: devendor ruby-interception (bin)
+  #TODO: devendor ruby-kramdown (i18n-tool.rb breaks on it)
+  #TODO: devendor ruby-locale
+  #TODO: devendor ruby-memoist
+  #TODO: devendor ruby-metaclass
+  #TODO: devendor ruby-mocha
+  #TODO: devendor ruby-parser
+  #TODO: devendor ruby-parslet
+  #TODO: devendor ruby-rubame
+  #TODO: devendor ruby-aubio-prerelease
+  #TODO: devendor ruby-beautify
+  #TODO: devendor ruby-text
+  #TODO: devendor ruby-thread_safe
+  #TODO: devendor ruby-wavefile
+  #TODO: devendor ruby-websocket
+  # devendor ffi, ruby-prof, rugged
+  sed -e '/rugged/d' \
+      -e '/ffi/d' \
+      -e '/ruby-prof/d' \
+      -i app/server/ruby/bin/compile-extensions.rb
+  rm -rvf app/server/ruby/vendor/{ffi,minitest,multi_json,rouge,rugged,sys-proctable}*
+  # remove unrequired gems, so we don't create any doc for them
+  rm -rvf app/server/ruby/vendor/{narray,ruby-coreaudio,ruby-prof}*
 }
 
 build() {
@@ -146,7 +181,7 @@
 
   # ruby
   install -vdm 755 "${pkgdir}/usr/share/${pkgname}"
-  cp -av app/server/ruby "${pkgdir}/usr/share/${pkgname}/server"
+  cp -av app/server/ruby "${pkgdir}/usr/lib/${pkgname}/server"
 
   # license
   install -vDm 644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

Modified: fix-paths-in-gui.diff
===================================================================
--- fix-paths-in-gui.diff	2019-02-07 22:41:06 UTC (rev 430406)
+++ fix-paths-in-gui.diff	2019-02-07 23:14:40 UTC (rev 430407)
@@ -17,8 +17,8 @@
 -  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");
 -  sample_path = QDir::toNativeSeparators(root_path + "/etc/samples");
-+  ruby_server_path = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/server/bin/sonic-pi-server.rb");
-+  port_discovery_path = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/server/bin/port-discovery.rb");
++  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");
 +  sample_path = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/samples");
  
    sp_user_path           = QDir::toNativeSeparators(sonicPiHomePath() + "/.sonic-pi");
@@ -29,8 +29,8 @@
  
 -  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/share/sonic-pi/server/bin/init-script.rb");
-+  exit_script_path        = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/server/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");
@@ -56,7 +56,7 @@
    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/share/sonic-pi/server/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);

Modified: fix-ruby-paths.diff
===================================================================
--- fix-ruby-paths.diff	2019-02-07 22:41:06 UTC (rev 430406)
+++ fix-ruby-paths.diff	2019-02-07 23:14:40 UTC (rev 430407)
@@ -1,18 +1,18 @@
 diff -ruN sonic-pi-3.1.0-a/app/server/ruby/core.rb sonic-pi-3.1.0-c/app/server/ruby/core.rb
 --- sonic-pi-3.1.0-a/app/server/ruby/core.rb	2018-01-22 23:00:13.000000000 +0100
-+++ sonic-pi-3.1.0-c/app/server/ruby/core.rb	2018-04-10 23:10:47.329683107 +0200
++++ sonic-pi-3.1.0-c/app/server/ruby/core.rb	2019-02-07 21:50:09.761647719 +0100
 @@ -147,7 +147,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("../../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 sonic-pi-3.1.0-a/app/server/ruby/lib/sonicpi/util.rb sonic-pi-3.1.0-c/app/server/ruby/lib/sonicpi/util.rb
 --- sonic-pi-3.1.0-a/app/server/ruby/lib/sonicpi/util.rb	2018-01-22 23:00:13.000000000 +0100
-+++ sonic-pi-3.1.0-c/app/server/ruby/lib/sonicpi/util.rb	2018-04-10 23:28:08.120969596 +0200
++++ sonic-pi-3.1.0-c/app/server/ruby/lib/sonicpi/util.rb	2019-02-07 21:38:55.994922542 +0100
 @@ -216,11 +216,11 @@
      end
  
@@ -50,7 +50,7 @@
  
      def app_path
 -      File.absolute_path("#{root_path}/app")
-+      File.absolute_path("#{root_path}")
++      File.absolute_path("/usr/lib/sonic-pi")
      end
  
      def html_public_path



More information about the arch-commits mailing list