summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/guitarix/README19
-rw-r--r--audio/guitarix/guitarix.SlackBuild47
-rw-r--r--audio/guitarix/guitarix.info6
-rw-r--r--audio/guitarix/patches/0001-fix-Issue-switching-presets-with-midi-messages-repor.patch35
-rw-r--r--audio/guitarix/patches/0002-set-wscript-to-versio-0.34.0git.patch153
-rw-r--r--audio/guitarix/patches/0003-fix-build-even-for-gcc4.8.patch65
6 files changed, 313 insertions, 12 deletions
diff --git a/audio/guitarix/README b/audio/guitarix/README
index 569e7627a4..5dd02bf29d 100644
--- a/audio/guitarix/README
+++ b/audio/guitarix/README
@@ -1,13 +1,20 @@
guitarix offers the range of sounds you would expect from a full-featured
-universal guitar-amp. You can get crisp clean-sounds, nice overdrive,
-fat distortion and a diversity of crazy sounds never heard before.
+universal guitar-amp. You can get crisp clean-sounds, nice overdrive, fat
+distortion and a diversity of crazy sounds never heard before. Guitarix
+can be used as a standalone application, as LADSPA plugins, or as LV2
+plugins.
meterbridge is an optional runtime dependency.
-Guitarix can be used as a standalone application, as LADSPA plugins,
-or as LV2 plugins. By default, all three are built. To disable LV2, set
-LV2=no in the script's environment (you will still need lilv installed,
-however). The script author hasn't tested LV2 support.
+By default, the package is built with SSE support if the host CPU supports
+SSE. If building for another host, you can set SSE=no in the environment
+to build without it.
+
+Starting with version 0.34.0, guitarix can browse and download presets
+from the web, using the 'Online' button in the preset selector. To
+enable this feature, install webkitgtk before building guitarix. To
+disable this feature (even if webkitgtk is installed), set WEBKIT=no in
+the environment.
This package uses POSIX filesystem capabilities to execute with
elevated privileges (required for realtime audio processing). This
diff --git a/audio/guitarix/guitarix.SlackBuild b/audio/guitarix/guitarix.SlackBuild
index 465fba0238..e3fa1af6a9 100644
--- a/audio/guitarix/guitarix.SlackBuild
+++ b/audio/guitarix/guitarix.SlackBuild
@@ -24,11 +24,24 @@
# installed to /usr/lib/ on 64-bit. Grr.
# - Upstream wants avahi by default. For now, hardcoded --no-avahi.
+# 20151108 bkw:
+# - Updated for 0.34.0
+# - Added --disable-cxx11 to ./waf flags, as bluetooth.h uses the gcc
+# typeof() extension. Not sure if newer versions of bluez would have
+# this issue (but Slackware 14.1's bluez is pretty old by now).
+# - Added patch from upstream git to allow building without webkitgtk.
+# The author added support for downloading presets, but didn't make
+# it optional in 0.34.0. Also added a couple of bugfix patches.
+# - Support building 0.33.0 with VERSION=0.33.0 in the env.
+# - Add SSE=no option.
+# - Add WEBKIT=no option.
+# - Remove LV2=no option from README (but not from script).
+
# Modified version released under the WTFPL, for details see
# http://www.wtfpl.net/txt/copying/
PRGNAM=guitarix
-VERSION=${VERSION:-0.32.3}
+VERSION=${VERSION:-0.34.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -84,10 +97,36 @@ find -L . \
# be present among', implying we should only need Audio *or* AudioVideo.
sed -i '/^Categories/s,$,Audio;,;' $PRGNAM.desktop.in
+# this is no longer documented in README, but still here for debugging.
if [ "${LV2:-yes}" = "no" ]; then
LV2OPT=--no-lv2
fi
+# 20151109 bkw: in case anyone needs guitarix-0.33.0:
+# Starting with 0.34.0, the default is to pass -std=c++11 to gcc, which
+# causes Slack 14.1's old bluetooth.h to fail (it uses gcc extensions).
+# Before 0.34.0, this option's not needed... and will cause an error if
+# it's present. Also, our patches are for 0.34.0 and won't apply to
+# 0.33.0. So:
+if ./waf --help | grep -q -- --disable-cxx11; then
+ EXTRAOPT="--disable-cxx11"
+ PATCH=${PATCH:-yes}
+fi
+
+# patches are optional (undocumented in README, on purpose)
+if [ "${PATCH:-no}" = "yes" ]; then
+ for patch in $CWD/patches/*.patch; do
+ patch -p2 < "$patch"
+ done
+fi
+
+# allow building non-SSE package on SSE host
+[ "${SSE:-yes}" = "no" ] && EXTRAOPT="$EXTRAOPT --disable-sse"
+
+# allow disabling webkitgtk. A bit of a dirty hack.
+[ "${WEBKIT:-yes}" = "no" ] && \
+ sed -i 's,webkit-1.0,webkit-DISABLED,' wscript
+
LIBDIR="/usr/lib${LIBDIRSUFFIX}"
./waf configure \
--prefix=/usr \
@@ -96,8 +135,9 @@ LIBDIR="/usr/lib${LIBDIRSUFFIX}"
--lv2dir="$LIBDIR/lv2/" \
--libdir="$LIBDIR" \
--no-avahi \
+ $EXTRAOPT \
$LV2OPT
-./waf build
+./waf build # -v # verbose, shows actual commands
./waf install --destdir=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
@@ -106,7 +146,8 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
# Shared libraries are supposed to be +x.
chmod 755 $PKG/$LIBDIR/libgx*.so.?.?
-# Man page written for this SlackBuild
+# Man page written for this SlackBuild. It's for guitarix-0.32.3, but
+# the command line options haven't changed since then.
mkdir -p $PKG/usr/man/man1
gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
diff --git a/audio/guitarix/guitarix.info b/audio/guitarix/guitarix.info
index 3132c40be3..cc51ee0abb 100644
--- a/audio/guitarix/guitarix.info
+++ b/audio/guitarix/guitarix.info
@@ -1,8 +1,8 @@
PRGNAM="guitarix"
-VERSION="0.32.3"
+VERSION="0.34.0"
HOMEPAGE="http://guitarix.sourceforge.net/"
-DOWNLOAD="http://downloads.sourceforge.net/guitarix/guitarix2-0.32.3.tar.bz2"
-MD5SUM="fb0a853acf40aa8a26f0abe5f224989a"
+DOWNLOAD="http://downloads.sourceforge.net/guitarix/guitarix2-0.34.0.tar.bz2"
+MD5SUM="0ac5f18ee738d535b1551ea68ac2fce9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="gtkmm jack-audio-connection-kit liblrdf eigen3 lilv"
diff --git a/audio/guitarix/patches/0001-fix-Issue-switching-presets-with-midi-messages-repor.patch b/audio/guitarix/patches/0001-fix-Issue-switching-presets-with-midi-messages-repor.patch
new file mode 100644
index 0000000000..7f7ad8fc3f
--- /dev/null
+++ b/audio/guitarix/patches/0001-fix-Issue-switching-presets-with-midi-messages-repor.patch
@@ -0,0 +1,35 @@
+From c929d5872b81214e7aef3fc82bc178b427dc30f8 Mon Sep 17 00:00:00 2001
+From: Hermann Meyer <brummer-@web.de>
+Date: Mon, 9 Nov 2015 06:57:27 +0100
+Subject: [PATCH 1/3] * fix Issue switching presets with midi messages
+ reported by eduardomezencio
+
+---
+ trunk/src/gx_head/engine/gx_paramtable.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/trunk/src/gx_head/engine/gx_paramtable.cpp b/trunk/src/gx_head/engine/gx_paramtable.cpp
+index b82fe93..4ef2851 100644
+--- a/trunk/src/gx_head/engine/gx_paramtable.cpp
++++ b/trunk/src/gx_head/engine/gx_paramtable.cpp
+@@ -505,7 +505,7 @@ void MidiControllerList::on_pgm_chg() {
+ do {
+ pgm = gx_system::atomic_get(program_change);
+ } while (!gx_system::atomic_compare_and_exchange(&program_change, pgm, -1));
+- new_program(pgm);
++ if (pgm>=0) new_program(pgm);
+ }
+
+ void MidiControllerList::on_mute_chg() {
+@@ -521,7 +521,7 @@ void MidiControllerList::on_bank_chg() {
+ do {
+ bk = gx_system::atomic_get(bank_change);
+ } while (!gx_system::atomic_compare_and_exchange(&bank_change, bk, -1));
+- new_bank(bk);
++ if (bk>=0) new_bank(bk);
+ }
+
+ void MidiControllerList::set_config_mode(bool mode, int ctl) {
+--
+1.8.4
+
diff --git a/audio/guitarix/patches/0002-set-wscript-to-versio-0.34.0git.patch b/audio/guitarix/patches/0002-set-wscript-to-versio-0.34.0git.patch
new file mode 100644
index 0000000000..d3b560c3ff
--- /dev/null
+++ b/audio/guitarix/patches/0002-set-wscript-to-versio-0.34.0git.patch
@@ -0,0 +1,153 @@
+From 6b161fa314ee5948a7ebde5d4320d669041e831e Mon Sep 17 00:00:00 2001
+From: Hermann Meyer <brummer-@web.de>
+Date: Mon, 9 Nov 2015 09:46:54 +0100
+Subject: [PATCH 2/3] * set wscript to versio 0.34.0git * make webkit
+ optional * add filebrowser for upload preset banks
+
+---
+ trunk/src/gx_head/gui/gx_preset_window.cpp | 34 +++++++++++++++++++++++++++++-
+ trunk/src/headers/gx_preset_window.h | 8 ++++++-
+ trunk/wscript | 5 +++--
+ 3 files changed, 43 insertions(+), 4 deletions(-)
+
+diff --git a/trunk/src/gx_head/gui/gx_preset_window.cpp b/trunk/src/gx_head/gui/gx_preset_window.cpp
+index ead8c93..1050a9d 100644
+--- a/trunk/src/gx_head/gui/gx_preset_window.cpp
++++ b/trunk/src/gx_head/gui/gx_preset_window.cpp
+@@ -81,10 +81,13 @@ PresetWindow::PresetWindow(Glib::RefPtr<gx_gui::GxBuilder> bld, gx_engine::GxMac
+ //actiongroup->add(act, sigc::mem_fun(*this, &PresetWindow::on_presets_close));
+ //gtk_activatable_set_related_action(GTK_ACTIVATABLE(close_preset->gobj()), act->gobj());
+ close_preset->hide(); // disable (maybe remove later)
++#ifdef HAVE_WEBKIT
+ actions.online_preset_bank = Gtk::Action::create("OnlineBank");
+ actions.group->add(actions.online_preset_bank, sigc::mem_fun(*this, &PresetWindow::on_online_preset));
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(online_preset->gobj()), actions.online_preset_bank->gobj());
+-
++#else
++ online_preset->set_sensitive(false);
++#endif
+ bank_treeview->set_model(Gtk::ListStore::create(bank_col));
+ bank_treeview->set_name("PresetView");
+ bank_treeview->get_selection()->set_select_function(
+@@ -686,6 +689,7 @@ void PresetWindow::on_new_bank() {
+ start_edit(m->get_path(edit_iter), *bank_treeview->get_column(1), *bank_cellrenderer);
+ }
+
++#ifdef HAVE_WEBKIT
+
+ bool PresetWindow::insertRequested(const char *ur, gpointer data)
+ {
+@@ -748,6 +752,31 @@ bool PresetWindow::downloadRequested(WebKitWebView* webView, WebKitDownload *dow
+ return TRUE;
+ }
+
++bool PresetWindow::uploadRequested(WebKitWebView* webView, WebKitFileChooserRequest *request,gpointer data )
++{
++ Gtk::FileChooserDialog d( "Select upload file");
++ d.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
++ d.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
++ d.add_shortcut_folder(string(getenv("HOME")) + string("/.config/guitarix/bamks"));
++ Gtk::FileFilter banks;
++ banks.set_name("Bank Files");
++ banks.add_pattern("*.gx");
++ d.add_filter(banks);
++ Gtk::FileFilter all;
++ all.add_pattern("*");
++ all.set_name("All Files");
++ d.add_filter(all);
++ d.set_current_folder(string(getenv("HOME")) + string("/.config/guitarix/banks"));
++
++ if (d.run() != Gtk::RESPONSE_OK) {
++ return FALSE;
++ }
++ Glib::ustring filename = d.get_filename();
++ const gchar* f[2] = {filename.c_str(),0};
++ webkit_file_chooser_request_select_files (request, f);
++ return TRUE;
++}
++
+ void PresetWindow::show_online_preset() {
+
+ Gtk::Window *window = new Gtk::Window();
+@@ -760,6 +789,7 @@ void PresetWindow::show_online_preset() {
+ window->add(*Gtk::manage(scrollbox));
+ webkit_web_view_load_uri(web_view, "https://musical-artifacts.com/?apps=guitarix");
+ g_signal_connect(G_OBJECT (web_view), "download-requested", G_CALLBACK(downloadRequested), this);
++ g_signal_connect(G_OBJECT (web_view), "run-file-chooser", G_CALLBACK(uploadRequested), this);
+ window->show_all();
+ }
+
+@@ -767,6 +797,8 @@ void PresetWindow::on_online_preset() {
+ Glib::signal_idle().connect_once(sigc::mem_fun(*this, &PresetWindow::show_online_preset));
+ }
+
++#endif
++
+ bool PresetWindow::on_bank_drag_motion(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint timestamp) {
+ Gtk::Widget *source_widget = Gtk::Widget::drag_get_source_widget(context);
+ if (!source_widget) {
+diff --git a/trunk/src/headers/gx_preset_window.h b/trunk/src/headers/gx_preset_window.h
+index a009670..48a9801 100644
+--- a/trunk/src/headers/gx_preset_window.h
++++ b/trunk/src/headers/gx_preset_window.h
+@@ -24,7 +24,10 @@
+ /****************************************************************
+ ** class PresetWindow
+ */
++
++#ifdef HAVE_WEBKIT
+ #include <webkit/webkit.h>
++#endif
+
+ class PresetStore: public Gtk::ListStore {
+ public:
+@@ -141,12 +144,15 @@ private:
+ bool is_row_separator(const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::iterator& iter);
+ void on_new_bank();
+ void on_preset_save();
++ const std::string pdir() { return options.get_preset_dir();}
++#ifdef HAVE_WEBKIT
+ void on_online_preset();
+ void show_online_preset();
+- const std::string pdir() { return options.get_preset_dir();}
+ static bool downloadRequested(WebKitWebView* webView, WebKitDownload *download,gpointer data );
++ static bool uploadRequested(WebKitWebView* webView, WebKitFileChooserRequest *request,gpointer data );
+ static bool insertRequested(const char* uri, gpointer data );
+ static void download_status(GObject* object, GParamSpec* pspec, gpointer data);
++#endif
+ bool on_bank_drag_motion(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint timestamp);
+ void on_bank_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const Gtk::SelectionData& data, guint info, guint timestamp);
+ void on_bank_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, Gtk::SelectionData& selection, int info, int timestamp);
+diff --git a/trunk/wscript b/trunk/wscript
+index 9c0e41b..99cab29 100644
+--- a/trunk/wscript
++++ b/trunk/wscript
+@@ -24,7 +24,7 @@ blddir = 'build'
+ use_2to3 = True
+
+ # used by waf dist and waf build
+-VERSION='0.34.0'
++VERSION='0.34.0git'
+ APPNAME='guitarix'
+
+ good_faust_versions = ['0.9.58','0.9.65']
+@@ -649,7 +649,7 @@ def configure(conf):
+ conf.check_cfg(package='lrdf', args='--cflags --libs', uselib_store='LRDF', mandatory=1)
+ conf.check(header_name='ladspa.h', mandatory=1)
+ conf.check_cfg(package='lilv-0', args='--cflags --libs', uselib_store='LILV', mandatory=1)
+- conf.check_cfg(package='webkit-1.0', args='--cflags --libs', uselib_store='WEBKIT', mandatory=1)
++ conf.check_cfg(package='webkit-1.0', args='--cflags --libs', uselib_store='WEBKIT', mandatory=0, define_name='HAVE_WEBKIT')
+ check_boost(conf)
+ conf.check_cfg(package='lv2', atleast_version='1.2.0',args='--cflags --libs', uselib_store='LV2CORE', mandatory=1)
+
+@@ -811,6 +811,7 @@ def configure(conf):
+ display_feature("Use prebuild gperf files", not conf.env["HAVE_GPERF"])
+ display_feature("Avahi service discovery", conf.env["HAVE_AVAHI"])
+ display_feature("Bluetooth rfcomm", conf.env["HAVE_BLUEZ"])
++ display_feature("Use Webkit", conf.env["HAVE_WEBKIT"])
+ display_feature("Use internal zita-resampler", not conf.env['ZITA_RESAMPLER'])
+ if conf.env['CONVOLVER_FFMPEG']:
+ display_feature("Use zita-convolver-ffmpeg", True)
+--
+1.8.4
+
diff --git a/audio/guitarix/patches/0003-fix-build-even-for-gcc4.8.patch b/audio/guitarix/patches/0003-fix-build-even-for-gcc4.8.patch
new file mode 100644
index 0000000000..50c64372ad
--- /dev/null
+++ b/audio/guitarix/patches/0003-fix-build-even-for-gcc4.8.patch
@@ -0,0 +1,65 @@
+From 995a692e807a5812a356d08d4d4adb1d72e67a7d Mon Sep 17 00:00:00 2001
+From: Hermann Meyer <brummer-@web.de>
+Date: Mon, 9 Nov 2015 13:06:45 +0100
+Subject: [PATCH 3/3] * fix build even for gcc4.8
+
+---
+ trunk/src/LV2/DSP/gx_common.h | 4 ++--
+ trunk/src/headers/gx_system.h | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/trunk/src/LV2/DSP/gx_common.h b/trunk/src/LV2/DSP/gx_common.h
+index 0a3e44b..282c765 100644
+--- a/trunk/src/LV2/DSP/gx_common.h
++++ b/trunk/src/LV2/DSP/gx_common.h
+@@ -35,7 +35,7 @@
+ /* On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero)
+ flags to avoid costly denormals */
+ #ifdef __SSE3__
+-#ifndef _X86INTRIN_H_INCLUDED
++#ifndef _PMMINTRIN_H_INCLUDED
+ #include <pmmintrin.h>
+ #endif //ndef
+ inline void AVOIDDENORMALS()
+@@ -44,7 +44,7 @@ inline void AVOIDDENORMALS()
+ _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
+ }
+ #else
+-#ifndef _X86INTRIN_H_INCLUDED
++#ifndef _XMMINTRIN_H_INCLUDED
+ #include <xmmintrin.h>
+ #endif //ndef
+ inline void AVOIDDENORMALS()
+diff --git a/trunk/src/headers/gx_system.h b/trunk/src/headers/gx_system.h
+index 7bf35f8..abf1e06 100644
+--- a/trunk/src/headers/gx_system.h
++++ b/trunk/src/headers/gx_system.h
+@@ -51,7 +51,7 @@ inline unsigned int get_fpu_status_bits() {
+ /* On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero)
+ flags to avoid costly denormals */
+ #ifdef __SSE3__
+-#ifndef _X86INTRIN_H_INCLUDED
++#ifndef _PMMINTRIN_H_INCLUDED
+ #include <pmmintrin.h>
+ #endif //ndef
+ inline void AVOIDDENORMALS() {
+@@ -59,14 +59,14 @@ inline void AVOIDDENORMALS() {
+ _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
+ }
+ #else
+-#ifndef _X86INTRIN_H_INCLUDED
++#ifndef _XMMINTRIN_H_INCLUDED
+ #include <xmmintrin.h>
+ #endif //ndef
+ inline void AVOIDDENORMALS() { _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); }
+ #endif //__SSE3__
+
+ #else
+-#ifndef _X86INTRIN_H_INCLUDED
++#ifndef _XMMINTRIN_H_INCLUDED
+ inline void _MM_SET_EXCEPTION_STATE(unsigned int __mask) {}
+ inline unsigned int _MM_GET_EXCEPTION_STATE(void) { return 0; }
+ #endif //ndef
+--
+1.8.4
+