unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add seq24.
@ 2016-12-05 10:02 Ricardo Wurmus
  2016-12-05 22:19 ` Leo Famulari
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2016-12-05 10:02 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/music.scm (seq24): New variable.
* gnu/packages/patches/seq24-rename-mutex.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register patch.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/music.scm                        |  30 +++++++
 gnu/packages/patches/seq24-rename-mutex.patch | 122 ++++++++++++++++++++++++++
 3 files changed, 153 insertions(+)
 create mode 100644 gnu/packages/patches/seq24-rename-mutex.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 96689a7..9f8325d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -854,6 +854,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/scheme48-tests.patch			\
   %D%/packages/patches/scotch-test-threading.patch		\
   %D%/packages/patches/sdl-libx11-1.6.patch			\
+  %D%/packages/patches/seq24-rename-mutex.patch			\
   %D%/packages/patches/serf-comment-style-fix.patch		\
   %D%/packages/patches/serf-deflate-buckets-test-fix.patch	\
   %D%/packages/patches/slim-session.patch			\
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index f748b57..e82f955 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -2671,6 +2671,36 @@ sequencer and LFO.  It can hold any number of arpeggiator, sequencer, or LFO
 modules running in parallel.")
     (license license:gpl2+)))
 
+(define-public seq24
+  (package
+    (name "seq24")
+    (version "0.9.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://launchpad.net/seq24/trunk/"
+                                  version "/+download/seq24-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32
+                "12dphdhnvfk1k0vmagi1v2lhyxjyj1j3cz6ksjw0ydcvid1x8ap2"))
+              (patches (search-patches "seq24-rename-mutex.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "CXXFLAGS=-std=gnu++11")))
+    (inputs
+     `(("gtkmm" ,gtkmm-2)
+       ("alsa-lib" ,alsa-lib)
+       ("jack" ,jack-1)
+       ("lash" ,lash)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "https://edge.launchpad.net/seq24/")
+    (synopsis "Real-time MIDI sequencer")
+    (description "Seq24 is a real-time MIDI sequencer.  It was created to
+provide a very simple interface for editing and playing MIDI loops.")
+    (license license:gpl2+)))
+
 (define-public python-discogs-client
   (package
     (name "python-discogs-client")
diff --git a/gnu/packages/patches/seq24-rename-mutex.patch b/gnu/packages/patches/seq24-rename-mutex.patch
new file mode 100644
index 0000000..270abb6
--- /dev/null
+++ b/gnu/packages/patches/seq24-rename-mutex.patch
@@ -0,0 +1,122 @@
+The custom mutex definition in Seq24 clashes with the mutex defined in gtkmm.
+This patch renames the custom definition.
+
+diff --git a/src/midibus.h b/src/midibus.h
+index 2cdf8e8..1bb02bd 100644
+--- a/src/midibus.h
++++ b/src/midibus.h
+@@ -90,7 +90,7 @@ class midibus
+ 
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+@@ -208,7 +208,7 @@ class mastermidibus
+     sequence *m_seq;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+diff --git a/src/midibus_portmidi.h b/src/midibus_portmidi.h
+index 0119e9c..8c6a27a 100644
+--- a/src/midibus_portmidi.h
++++ b/src/midibus_portmidi.h
+@@ -65,7 +65,7 @@ class midibus
+     long m_lasttick;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+@@ -164,7 +164,7 @@ class mastermidibus
+     sequence *m_seq;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+diff --git a/src/mutex.cpp b/src/mutex.cpp
+index b3f23fd..914114f 100644
+--- a/src/mutex.cpp
++++ b/src/mutex.cpp
+@@ -20,23 +20,23 @@
+ 
+ #include "mutex.h"
+ 
+-const pthread_mutex_t mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
++const pthread_mutex_t seq24mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+ const pthread_cond_t condition_var::cond  = PTHREAD_COND_INITIALIZER;
+ 
+-mutex::mutex( )
++seq24mutex::seq24mutex( )
+ {
+     m_mutex_lock = recmutex;
+ }
+ 
+ void
+-mutex::lock( )
++seq24mutex::lock( )
+ {
+     pthread_mutex_lock( &m_mutex_lock );
+ }
+ 
+ 
+ void
+-mutex::unlock( )
++seq24mutex::unlock( )
+ {
+     pthread_mutex_unlock( &m_mutex_lock );
+ }
+diff --git a/src/mutex.h b/src/mutex.h
+index 399f8a3..4f1b867 100644
+--- a/src/mutex.h
++++ b/src/mutex.h
+@@ -24,7 +24,7 @@
+ 
+ #include <pthread.h>
+ 
+-class mutex {
++class seq24mutex {
+ 
+ private:
+ 
+@@ -37,14 +37,14 @@ protected:
+ 
+ public:
+ 
+-    mutex();
++    seq24mutex();
+ 
+     void lock();
+     void unlock();
+ 
+ };
+ 
+-class condition_var : public mutex {
++class condition_var : public seq24mutex {
+ 
+ private:
+ 
+diff --git a/src/sequence.h b/src/sequence.h
+index 2943946..9da8700 100644
+--- a/src/sequence.h
++++ b/src/sequence.h
+@@ -153,7 +153,7 @@ class sequence
+     long m_rec_vol;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* used to idenfity which events are ours in the out queue */
+     //unsigned char m_tag;
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: Add seq24.
  2016-12-05 10:02 [PATCH] gnu: Add seq24 Ricardo Wurmus
@ 2016-12-05 22:19 ` Leo Famulari
  2016-12-06  9:14   ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Leo Famulari @ 2016-12-05 22:19 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Mon, Dec 05, 2016 at 11:02:28AM +0100, Ricardo Wurmus wrote:
> * gnu/packages/music.scm (seq24): New variable.
> * gnu/packages/patches/seq24-rename-mutex.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register patch.

> diff --git a/gnu/packages/patches/seq24-rename-mutex.patch b/gnu/packages/patches/seq24-rename-mutex.patch
> new file mode 100644
> index 0000000..270abb6
> --- /dev/null
> +++ b/gnu/packages/patches/seq24-rename-mutex.patch
> @@ -0,0 +1,122 @@
> +The custom mutex definition in Seq24 clashes with the mutex defined in gtkmm.
> +This patch renames the custom definition.

Should we report this upstream?

LGTM

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: Add seq24.
  2016-12-05 22:19 ` Leo Famulari
@ 2016-12-06  9:14   ` Ricardo Wurmus
  0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2016-12-06  9:14 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


Leo Famulari <leo@famulari.name> writes:

> On Mon, Dec 05, 2016 at 11:02:28AM +0100, Ricardo Wurmus wrote:
>> * gnu/packages/music.scm (seq24): New variable.
>> * gnu/packages/patches/seq24-rename-mutex.patch: New file.
>> * gnu/local.mk (dist_patch_DATA): Register patch.
>
>> diff --git a/gnu/packages/patches/seq24-rename-mutex.patch b/gnu/packages/patches/seq24-rename-mutex.patch
>> new file mode 100644
>> index 0000000..270abb6
>> --- /dev/null
>> +++ b/gnu/packages/patches/seq24-rename-mutex.patch
>> @@ -0,0 +1,122 @@
>> +The custom mutex definition in Seq24 clashes with the mutex defined in gtkmm.
>> +This patch renames the custom definition.
>
> Should we report this upstream?

Yes, I just reported it and added the URL to the top of our patch file.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
http://elephly.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-06  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-05 10:02 [PATCH] gnu: Add seq24 Ricardo Wurmus
2016-12-05 22:19 ` Leo Famulari
2016-12-06  9:14   ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).