[SCM] musescore/master: perhaps fix non-Linux builds
tg at users.alioth.debian.org
tg at users.alioth.debian.org
Sat Aug 5 01:45:48 UTC 2017
The following commit has been merged in the master branch:
commit 76abcfde84df08a626977ac4369696697ba1abfb
Author: mirabilos <tg at debian.org>
Date: Sat Aug 5 01:08:26 2017 +0200
perhaps fix non-Linux builds
diff --git a/debian/changelog b/debian/changelog
index b33f9cb..39bcbcb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,9 @@ musescore (2.1.0+dfsg1-0.1) UNRELEASED; urgency=medium
- 01-debundle-freetype.patch was implemented by a cmake option
- installs higher resolution icons (Closes: #858822)
* Remove musescore-soundfont-gm transitional package after release
+ * Add 01-oss-salsa.patch to perhaps fix kFreeBSD, Hurd builds.
- -- Thorsten Glaser <tg at mirbsd.de> Sat, 05 Aug 2017 00:42:31 +0200
+ -- Thorsten Glaser <tg at mirbsd.de> Sat, 05 Aug 2017 01:07:56 +0200
musescore (2.0.3+dfsg1-2) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index 7b963b9..e8e7498 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders: Toby Smithe <tsmithe at ubuntu.com>,
Tiago Bortoletto Vaz <tiago at debian.org>
Build-Depends: cmake,
debhelper (>= 9),
- libasound2-dev,
+ libasound2-dev (>= 1.0.6) | liboss4-salsa-dev,
libfreetype6-dev (>= 2.5.2),
libjack-dev,
libmp3lame-dev,
diff --git a/debian/patches/01-oss-salsa.patch b/debian/patches/01-oss-salsa.patch
new file mode 100644
index 0000000..a86b660
--- /dev/null
+++ b/debian/patches/01-oss-salsa.patch
@@ -0,0 +1,57 @@
+Description: Add function missing in OSS-sALSA to fix non-Linux compile;
+ fixup int vs. ssize_t issue in related code to ensure it will work.
+Author: mirabilos <tg at debian.org>
+Forwarded: not-needed
+
+--- a/mscore/mididriver.cpp
++++ b/mscore/mididriver.cpp
+@@ -101,6 +101,26 @@ bool Port::operator<(const Port& p) cons
+ #include "alsa.h"
+ #include "alsamidi.h"
+
++// The following is a Debian-specific hack which is likely to
++// not work forever, but needed right now: on kfreebsd and hurd,
++// we do not have ALSA but OSS provides the salsa compatibility
++// layer, which currently lacks a single, trivial function. We
++// need to distinguish salsa from ALSA (hard because the former
++// use, in Debian, the latter’s includes); one hackish way is
++// to use the reported library version as salsa still reports
++// version 1.0.5 whereas ALSA is much newer. Just inline the
++// function if the ALSA version is too old.
++#if (SND_LIB_MAJOR < 2) && (SND_LIB_MINOR < 1) && (SND_LIB_SUBMINOR < 6)
++#define snd_seq_event_length(ev) __extension__({ \
++ ssize_t snd_seq_event_length__len; \
++ \
++ snd_seq_event_length__len = sizeof(snd_seq_event_t); \
++ if (snd_seq_ev_is_variable(ev)) \
++ snd_seq_event_length__len += ev->data.ext.len; \
++ (len); \
++})
++#endif
++
+ namespace Ms {
+ static const unsigned int inCap = SND_SEQ_PORT_CAP_SUBS_READ;
+ static const unsigned int outCap = SND_SEQ_PORT_CAP_SUBS_WRITE;
+@@ -532,11 +552,11 @@ void AlsaMidiDriver::write(const Event&
+
+ bool AlsaMidiDriver::putEvent(snd_seq_event_t* event)
+ {
+- int error;
++ ssize_t error;
+
+ do {
+ error = snd_seq_event_output_direct(alsaSeq, event);
+- int len = snd_seq_event_length(event);
++ ssize_t len = snd_seq_event_length(event);
+ if (error == len) {
+ return false;
+ }
+@@ -551,7 +571,7 @@ bool AlsaMidiDriver::putEvent(snd_seq_ev
+ }
+ }
+ else
+- qDebug("MidiAlsaDevice::putEvent(): midi write returns %d, expected %d: %s",
++ qDebug("MidiAlsaDevice::putEvent(): midi write returns %zd, expected %zd: %s",
+ error, len, snd_strerror(error));
+ } while (error == -12);
+ return true;
diff --git a/debian/patches/series b/debian/patches/series
index b95883e..7c6494a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+01-oss-salsa.patch
02-global-flags.patch
03-debundle-openssl.patch
04-manpage-errors.patch
--
musescore packaging
More information about the pkg-multimedia-commits
mailing list