summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2016-05-20 19:15:37 +0200
committerJohannes Huber <johu@gentoo.org>2016-05-20 19:15:54 +0200
commit89330eb9060d5afd229668c20a1f890620614617 (patch)
treead20154ee336dc560d4c999250c42499425abd11 /media-sound/drumstick
parentsys-apps/pciutils-3.5.0: fix missing pci_init for LIBPCI_3.0 (diff)
downloadgentoo-89330eb9060d5afd229668c20a1f890620614617.tar.gz
gentoo-89330eb9060d5afd229668c20a1f890620614617.tar.bz2
gentoo-89330eb9060d5afd229668c20a1f890620614617.zip
media-sound/drumstick: Fix build with gcc-6
Adding upstream patch which fixes build with gcc-6. Gentoo-bug: 583512 Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'media-sound/drumstick')
-rw-r--r--media-sound/drumstick/drumstick-1.0.2.ebuild2
-rw-r--r--media-sound/drumstick/files/drumstick-1.0.2-gcc6.patch35
2 files changed, 37 insertions, 0 deletions
diff --git a/media-sound/drumstick/drumstick-1.0.2.ebuild b/media-sound/drumstick/drumstick-1.0.2.ebuild
index 47cd4af4bd6..b2b8346ca9a 100644
--- a/media-sound/drumstick/drumstick-1.0.2.ebuild
+++ b/media-sound/drumstick/drumstick-1.0.2.ebuild
@@ -36,6 +36,8 @@ DEPEND="${RDEPEND}
DOCS=( AUTHORS ChangeLog NEWS README TODO )
+PATCHES=( "${FILESDIR}/${P}-gcc6.patch" )
+
src_configure() {
local mycmakeargs=(
$(cmake-utils_use_find_package doc Doxygen)
diff --git a/media-sound/drumstick/files/drumstick-1.0.2-gcc6.patch b/media-sound/drumstick/files/drumstick-1.0.2-gcc6.patch
new file mode 100644
index 00000000000..4bb66e85536
--- /dev/null
+++ b/media-sound/drumstick/files/drumstick-1.0.2-gcc6.patch
@@ -0,0 +1,35 @@
+Index: library/file/qove.cpp
+===================================================================
+--- a/library/file/qove.cpp (revision 316)
++++ b/library/file/qove.cpp (working copy)
+@@ -11356,7 +11356,7 @@
+ OVE::MeasureData* measureData = d->ove.getMeasureData(i, j, k);
+ QList<OVE::MusicData*> tempoPtrs = measureData->getMusicDatas(OVE::MusicData_Tempo);
+
+- if (k == 0 || (k > 0 && abs(measure->getTypeTempo() - d->ove.getMeasure(k - 1)->getTypeTempo()) > 0.01)) {
++ if (k == 0 || (k > 0 && std::abs(measure->getTypeTempo() - d->ove.getMeasure(k - 1)->getTypeTempo()) > 0.01)) {
+ int tick = d->mtt.getTick(k, 0);
+ int tempo = (int) measure->getTypeTempo();
+ tempos[tick] = tempo;
+@@ -11739,7 +11739,7 @@
+ }
+ case OVE::Articulation_Arpeggio: {
+ //if( art->getChangeSoundEffect() ) {
+- unsigned int soundEffect = abs(art->getSoundEffect().first) + abs(art->getSoundEffect().second);
++ unsigned int soundEffect = std::abs(art->getSoundEffect().first) + std::abs(art->getSoundEffect().second);
+ int tickAmount = (soundEffect / notes.size()) * ((notes.size() - i) - 1);
+ startTick -= tickAmount;
+ //}
+Index: utils/testevents/testevents.cpp
+===================================================================
+--- a/utils/testevents/testevents.cpp (revision 316)
++++ b/utils/testevents/testevents.cpp (working copy)
+@@ -262,7 +262,7 @@
+ dumpEvent(new KeyPressEvent(5, 60, 124));
+ dumpEvent(new ChanPressEvent(6, 111));
+ dumpEvent(new PitchBendEvent(7, 1234));
+- char sysex[] = {0xf0, 0x41, 0x10, 0x42, 0x12, 0x40, 0, 0x7f, 0, 0x41, 0xf7};
++ char sysex[] = {'\xf0', '\x41', '\x10', '\x42', '\x12', '\x40', '\0', '\x7f', '\0', '\x41', '\xf7'};
+ dumpEvent(new SysExEvent(QByteArray(sysex, sizeof(sysex))));
+ QString text = "This can be a copyright, song name, instrument, lyric...";
+ TextEvent te(text, 3);