aboutsummaryrefslogtreecommitdiff
path: root/audio/seq24
diff options
context:
space:
mode:
authorJohannes Schoepfer <slackbuilds@schoepfer.info>2019-11-16 20:08:55 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-11-16 20:09:24 +0700
commitaed70c69dba08ed8c79df26b5c881d5cfb2039ec (patch)
tree21346f2b184ccf8def79ef3022b94e1a8391b583 /audio/seq24
parenta7dc98916ce1512b86a39270b16c861095cb83b4 (diff)
audio/seq24: Updated for version 0.9.3.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/seq24')
-rw-r--r--audio/seq24/01-mutex.patch331
-rw-r--r--audio/seq24/README19
-rw-r--r--audio/seq24/perfedit.patch29
-rw-r--r--audio/seq24/seq24.SlackBuild31
-rw-r--r--audio/seq24/seq24.info10
-rw-r--r--audio/seq24/slack-desc2
6 files changed, 375 insertions, 47 deletions
diff --git a/audio/seq24/01-mutex.patch b/audio/seq24/01-mutex.patch
new file mode 100644
index 000000000000..4e8585a94491
--- /dev/null
+++ b/audio/seq24/01-mutex.patch
@@ -0,0 +1,331 @@
+Description: Use standard mutex and condition variable classes
+ Use std::recursive_mutex and std::condition_variable instead of custom classes
+ based on pthread.
+ .
+ Fixes FTBFS with recent GCC versions which defines the "mutex" class which
+ conflicts with seq24's version of "mutex".
+Author: James Cowgill <jcowgill@debian.org>
+Bug: https://bugs.launchpad.net/seq24/+bug/1647614
+Bug-Debian: https://bugs.debian.org/822394
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/Module.am
++++ b/src/Module.am
+@@ -31,8 +31,6 @@ bin_PROGRAMS = %D%/seq24
+ %D%/midibus_portmidi.h \
+ %D%/midifile.cpp \
+ %D%/midifile.h \
+- %D%/mutex.cpp \
+- %D%/mutex.h \
+ %D%/options.cpp \
+ %D%/options.h \
+ %D%/optionsfile.cpp \
+--- a/src/midibus.h
++++ b/src/midibus.h
+@@ -35,11 +35,11 @@ class midibus;
+ # include <alsa/seq_midi_event.h>
+ #endif
+
++#include <mutex>
+ #include <string>
+
+ #include "event.h"
+ #include "sequence.h"
+-#include "mutex.h"
+ #include "globals.h"
+
+ const int c_midibus_output_size = 0x100000;
+@@ -90,7 +90,7 @@ class midibus
+
+
+ /* locking */
+- mutex m_mutex;
++ std::recursive_mutex m_mutex;
+
+ /* mutex */
+ void lock();
+@@ -208,7 +208,7 @@ class mastermidibus
+ sequence *m_seq;
+
+ /* locking */
+- mutex m_mutex;
++ std::recursive_mutex m_mutex;
+
+ /* mutex */
+ void lock();
+--- a/src/midibus_portmidi.h
++++ b/src/midibus_portmidi.h
+@@ -25,12 +25,12 @@ class mastermidibus;
+
+ #ifdef __WIN32__
+
++#include <mutex>
+ #include <string>
+
+ #include "portmidi.h"
+ #include "event.h"
+ #include "sequence.h"
+-#include "mutex.h"
+ #include "globals.h"
+
+ const int c_midibus_output_size = 0x100000;
+@@ -65,7 +65,7 @@ class midibus
+ long m_lasttick;
+
+ /* locking */
+- mutex m_mutex;
++ std::recursive_mutex m_mutex;
+
+ /* mutex */
+ void lock();
+@@ -164,7 +164,7 @@ class mastermidibus
+ sequence *m_seq;
+
+ /* locking */
+- mutex m_mutex;
++ std::recursive_mutex m_mutex;
+
+ /* mutex */
+ void lock();
+--- a/src/mutex.cpp
++++ /dev/null
+@@ -1,62 +0,0 @@
+-//----------------------------------------------------------------------------
+-//
+-// This file is part of seq24.
+-//
+-// seq24 is free software; you can redistribute it and/or modify
+-// it under the terms of the GNU General Public License as published by
+-// the Free Software Foundation; either version 2 of the License, or
+-// (at your option) any later version.
+-//
+-// seq24 is distributed in the hope that it will be useful,
+-// but WITHOUT ANY WARRANTY; without even the implied warranty of
+-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-// GNU General Public License for more details.
+-//
+-// You should have received a copy of the GNU General Public License
+-// along with seq24; if not, write to the Free Software
+-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-//
+-//-----------------------------------------------------------------------------
+-
+-#include "mutex.h"
+-
+-const pthread_mutex_t mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+-const pthread_cond_t condition_var::cond = PTHREAD_COND_INITIALIZER;
+-
+-mutex::mutex( )
+-{
+- m_mutex_lock = recmutex;
+-}
+-
+-void
+-mutex::lock( )
+-{
+- pthread_mutex_lock( &m_mutex_lock );
+-}
+-
+-
+-void
+-mutex::unlock( )
+-{
+- pthread_mutex_unlock( &m_mutex_lock );
+-}
+-
+-condition_var::condition_var( )
+-{
+- m_cond = cond;
+-}
+-
+-
+-void
+-condition_var::signal( )
+-{
+- pthread_cond_signal( &m_cond );
+-}
+-
+-void
+-condition_var::wait( )
+-{
+- pthread_cond_wait( &m_cond, &m_mutex_lock );
+-}
+-
+-
+--- a/src/mutex.h
++++ /dev/null
+@@ -1,63 +0,0 @@
+-//----------------------------------------------------------------------------
+-//
+-// This file is part of seq24.
+-//
+-// seq24 is free software; you can redistribute it and/or modify
+-// it under the terms of the GNU General Public License as published by
+-// the Free Software Foundation; either version 2 of the License, or
+-// (at your option) any later version.
+-//
+-// seq24 is distributed in the hope that it will be useful,
+-// but WITHOUT ANY WARRANTY; without even the implied warranty of
+-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-// GNU General Public License for more details.
+-//
+-// You should have received a copy of the GNU General Public License
+-// along with seq24; if not, write to the Free Software
+-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-//
+-//-----------------------------------------------------------------------------
+-
+-#pragma once
+-
+-#include "globals.h"
+-
+-#include <pthread.h>
+-
+-class mutex {
+-
+-private:
+-
+- static const pthread_mutex_t recmutex;
+-
+-protected:
+-
+- /* mutex lock */
+- pthread_mutex_t m_mutex_lock;
+-
+-public:
+-
+- mutex();
+-
+- void lock();
+- void unlock();
+-
+-};
+-
+-class condition_var : public mutex {
+-
+-private:
+-
+- static const pthread_cond_t cond;
+-
+- pthread_cond_t m_cond;
+-
+-public:
+-
+- condition_var();
+-
+- void wait();
+- void signal();
+-
+-};
+-
+--- a/src/perform.cpp
++++ b/src/perform.cpp
+@@ -426,7 +426,7 @@ perform::~perform()
+ m_outputing = false;
+ m_running = false;
+
+- m_condition_var.signal();
++ m_condition_var.notify_one();
+
+ if (m_out_thread_launched )
+ pthread_join( m_out_thread, NULL );
+@@ -1005,7 +1005,7 @@ void perform::stop()
+
+ void perform::inner_start(bool a_state)
+ {
+- m_condition_var.lock();
++ std::lock_guard<std::mutex> lock(m_mutex);
+
+ if (!is_running()) {
+
+@@ -1015,10 +1015,8 @@ void perform::inner_start(bool a_state)
+ off_sequences();
+
+ set_running(true);
+- m_condition_var.signal();
++ m_condition_var.notify_one();
+ }
+-
+- m_condition_var.unlock();
+ }
+
+
+@@ -1262,18 +1260,18 @@ void perform::output_func()
+
+ //printf ("waiting for signal\n");
+
+- m_condition_var.lock();
++ std::unique_lock<std::mutex> lock(m_mutex);
+
+ while (!m_running) {
+
+- m_condition_var.wait();
++ m_condition_var.wait(lock);
+
+ /* if stopping, then kill thread */
+ if (!m_outputing)
+ break;
+ }
+
+- m_condition_var.unlock();
++ lock.unlock();
+
+ //printf( "signaled [%d]\n", m_playback_mode );
+
+--- a/src/perform.h
++++ b/src/perform.h
+@@ -32,6 +32,9 @@ class perform;
+ #endif
+ #include <pthread.h>
+
++#include <condition_variable>
++#include <mutex>
++
+
+ /* if we have jack, include the jack headers */
+ #ifdef JACK_SUPPORT
+@@ -152,7 +155,8 @@ class perform
+ int m_control_status;
+ int m_screen_set;
+
+- condition_var m_condition_var;
++ std::condition_variable m_condition_var;
++ std::mutex m_mutex;
+
+ // do not access these directly, use set/lookup below
+ std::map<unsigned int,long> key_events;
+--- a/src/perfroll.h
++++ b/src/perfroll.h
+@@ -39,8 +39,6 @@
+
+ #include "globals.h"
+ #include "perform.h"
+-#include "mutex.h"
+-
+
+ using namespace Gtk;
+
+--- a/src/sequence.h
++++ b/src/sequence.h
+@@ -26,11 +26,11 @@ class sequence;
+ #include <string>
+ #include <list>
+ #include <stack>
++#include <mutex>
+
+ #include "event.h"
+ #include "midibus.h"
+ #include "globals.h"
+-#include "mutex.h"
+
+ enum draw_type
+ {
+@@ -153,7 +153,7 @@ class sequence
+ long m_rec_vol;
+
+ /* locking */
+- mutex m_mutex;
++ std::recursive_mutex m_mutex;
+
+ /* used to idenfity which events are ours in the out queue */
+ //unsigned char m_tag;
diff --git a/audio/seq24/README b/audio/seq24/README
index 3356fce8c355..db24584f1090 100644
--- a/audio/seq24/README
+++ b/audio/seq24/README
@@ -1,4 +1,17 @@
-Seq24 is a minimal loop based midi sequencer.
+Seq24 is a pattern based midi sequencer with strong live performance
+functions.
-Seq24 was created to provide a very simple interface for editing and playing
-midi 'loops.'
+It was created to provide a very simple interface for editing and playing
+midi 'loops'.
+
+Future developments of seq24 can be found at
+https://launchpad.net/seq24
+
+This package uses POSIX filesystem capabilities to execute with
+elevated privileges (required for realtime audio processing). This
+may be considered a security/stability risk. Please read
+http://www.slackbuilds.org/caps/ for more information. To disable
+capabilities, pass SETCAP=no to the script.
+
+Optional dependencies, autodetected at buildtime:
+jack-audio-connection-kit||jack2
diff --git a/audio/seq24/perfedit.patch b/audio/seq24/perfedit.patch
deleted file mode 100644
index 960e6d2bcc1b..000000000000
--- a/audio/seq24/perfedit.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- seq24/trunk/src/perfedit.cpp.old 2016-01-03 23:30:55.562890265 +0700
-+++ seq24/trunk/src/perfedit.cpp 2016-01-03 23:32:24.958812214 +0700
-@@ -119,7 +119,7 @@
- /* snap */
- m_button_snap = manage( new Button());
- m_button_snap->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( snap_xpm ))));
-- m_button_snap->signal_clicked().connect( bind<Menu *>( mem_fun( *this, &perfedit::popup_menu), m_menu_snap ));
-+ m_button_snap->signal_clicked().connect( bind<void>( mem_fun( *this, &perfedit::popup_menu), m_menu_snap ));
- add_tooltip( m_button_snap, "Grid snap. (Fraction of Measure Length)" );
- m_entry_snap = manage( new Entry());
- m_entry_snap->set_size_request( 40, -1 );
-@@ -152,7 +152,7 @@
- /* beats per measure */
- m_button_bpm = manage( new Button());
- m_button_bpm->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( down_xpm ))));
-- m_button_bpm->signal_clicked().connect( bind<Menu *>( mem_fun( *this, &perfedit::popup_menu), m_menu_bpm ));
-+ m_button_bpm->signal_clicked().connect( bind<void>( mem_fun( *this, &perfedit::popup_menu), m_menu_bpm ));
- add_tooltip( m_button_bpm, "Time Signature. Beats per Measure" );
- m_entry_bpm = manage( new Entry());
- m_entry_bpm->set_width_chars(2);
-@@ -162,7 +162,7 @@
- /* beat width */
- m_button_bw = manage( new Button());
- m_button_bw->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( down_xpm ))));
-- m_button_bw->signal_clicked().connect( bind<Menu *>( mem_fun( *this, &perfedit::popup_menu), m_menu_bw ));
-+ m_button_bw->signal_clicked().connect( bind<void>( mem_fun( *this, &perfedit::popup_menu), m_menu_bw ));
- add_tooltip( m_button_bw, "Time Signature. Length of Beat" );
- m_entry_bw = manage( new Entry());
- m_entry_bw->set_width_chars(2);
diff --git a/audio/seq24/seq24.SlackBuild b/audio/seq24/seq24.SlackBuild
index 39df07766b49..05c62fd225d3 100644
--- a/audio/seq24/seq24.SlackBuild
+++ b/audio/seq24/seq24.SlackBuild
@@ -2,6 +2,7 @@
# Slackware build script for seq24
# Copyright 2010 Arik Miller <milleraa@msoe.edu>
+# Copyright 2019 Johannes Schoepfer, Germany
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,14 +24,16 @@
# YOUR DATA IS DESTROYED.
PRGNAM=seq24
-VERSION=${VERSION:-rev136}
+VERSION=${VERSION:-0.9.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -40,8 +43,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -59,9 +62,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM/trunk
-tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM/trunk
+rm -rf $PRGNAM-$VERSION
+tar -xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -71,10 +74,10 @@ find -L . \
autoreconf -i
-patch -p2 < $CWD/perfedit.patch
+patch -p1 < $CWD/01-mutex.patch
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS -O2 -std=c++11" \
+CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -100,6 +103,16 @@ cat $CWD/$PRGNAM.SlackBuild > /$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+# Only add capability stuff if not disabled:
+if [ "${SETCAP:-yes}" = "yes" ]; then
+ # set realtime capabilities
+ echo "/sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/seq24" \
+ >> $PKG/install/doinst.sh
+ # Only allow execution by audio group
+ chown root:audio $PKG/usr/bin/*
+ chmod 0750 $PKG/usr/bin/*
+fi
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/audio/seq24/seq24.info b/audio/seq24/seq24.info
index 7681d18b9564..db4bbdd92796 100644
--- a/audio/seq24/seq24.info
+++ b/audio/seq24/seq24.info
@@ -1,10 +1,10 @@
PRGNAM="seq24"
-VERSION="rev136"
+VERSION="0.9.3"
HOMEPAGE="http://filter24.org/seq24/"
-DOWNLOAD="http://master.dl.sourceforge.net/project/slackbuildsdirectlinks/seq24/seq24-rev136.tar.gz"
-MD5SUM="e3616365eefa04349773198fec794241"
+DOWNLOAD="https://launchpad.net/seq24/trunk/0.9.3/+download/seq24-0.9.3.tar.bz2"
+MD5SUM="e7c653abb71f17e5cc070ef1d8406a1a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Arik Miller"
-EMAIL="ad423520@hotmail.com"
+MAINTAINER="Johannes Schoepfer"
+EMAIL="slackbuilds@schoepfer.info"
diff --git a/audio/seq24/slack-desc b/audio/seq24/slack-desc
index 31ab4764ac97..4d1750a5e0a9 100644
--- a/audio/seq24/slack-desc
+++ b/audio/seq24/slack-desc
@@ -6,7 +6,7 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-seq24: seq24 (minimal loop based midi sequencer)
+seq24: seq24 (pattern based midi sequencer)
seq24:
seq24: Seq24 was created to provide a very simple interface for editing and
seq24: playing midi 'loops'.