commit:     17d2be0932e7dbb98223948f668281711ba017a9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 20 12:04:44 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jun 20 12:04:44 2018 +0000
URL:        https://gitweb.gentoo.org/proj/kde-sunset.git/commit/?id=17d2be09

media-sound/drumstick: Import from Gentoo ebuild repository

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 media-sound/drumstick/drumstick-0.5.0.ebuild       | 66 ++++++++++++++++++++++
 .../drumstick/files/0.5.0-doc_automagicness.patch  | 20 +++++++
 .../drumstick/files/0.5.0-gcc6-narrowing.patch     | 26 +++++++++
 .../drumstick/files/0.5.0-underlinking.patch       | 17 ++++++
 .../drumstick/files/drumstick-1.0.2-gcc6.patch     | 35 ++++++++++++
 media-sound/drumstick/metadata.xml                 |  8 +++
 6 files changed, 172 insertions(+)

diff --git a/media-sound/drumstick/drumstick-0.5.0.ebuild 
b/media-sound/drumstick/drumstick-0.5.0.ebuild
new file mode 100644
index 0000000..7693a5b
--- /dev/null
+++ b/media-sound/drumstick/drumstick-0.5.0.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit fdo-mime gnome2-utils cmake-utils
+
+DESCRIPTION="Qt4/C++ wrapper for ALSA sequencer"
+HOMEPAGE="http://drumstick.sourceforge.net/";
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="dbus doc"
+
+RDEPEND="
+       media-libs/alsa-lib
+       dev-qt/qtgui:4
+       dev-qt/qtsvg:4
+       x11-misc/shared-mime-info
+       dbus? ( dev-qt/qtdbus:4 )"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig
+       doc? (
+               app-doc/doxygen
+               app-text/docbook-xsl-stylesheets
+               dev-libs/libxslt
+       )"
+
+PATCHES=(
+       "${FILESDIR}"/${PV}-doc_automagicness.patch
+       "${FILESDIR}"/${PV}-underlinking.patch
+       "${FILESDIR}"/${PV}-gcc6-narrowing.patch
+)
+
+src_prepare() {
+       sed -i \
+               -e '/CMAKE_EXE_LINKER_FLAGS/d' \
+               CMakeLists.txt || die
+       cmake-utils_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DUSE_DBUS=$(usex dbus)
+               -DWITH_DOC=$(usex doc)
+       )
+       cmake-utils_src_configure
+}
+
+pkg_preinst() {
+       gnome2_icon_savelist
+}
+
+pkg_postinst() {
+       fdo-mime_desktop_database_update
+       fdo-mime_mime_database_update
+       gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+       fdo-mime_desktop_database_update
+       fdo-mime_mime_database_update
+       gnome2_icon_cache_update
+}

diff --git a/media-sound/drumstick/files/0.5.0-doc_automagicness.patch 
b/media-sound/drumstick/files/0.5.0-doc_automagicness.patch
new file mode 100644
index 0000000..c2474ae
--- /dev/null
+++ b/media-sound/drumstick/files/0.5.0-doc_automagicness.patch
@@ -0,0 +1,20 @@
+diff -urN drumstick-0.5.0.old/CMakeLists.txt drumstick-0.5.0/CMakeLists.txt
+--- drumstick-0.5.0.old/CMakeLists.txt 2010-09-09 12:38:56.000000000 +0200
++++ drumstick-0.5.0/CMakeLists.txt     2011-05-13 11:03:30.156962982 +0200
+@@ -143,6 +143,8 @@
+ ADD_SUBDIRECTORY(library)
+ ADD_SUBDIRECTORY(utils)
+ ADD_SUBDIRECTORY(icons)
++OPTION(WITH_DOC "Build documentation" ON)
++IF( WITH_DOC )
+ IF(${CMAKE_SYSTEM} MATCHES "Linux")
+     FIND_PACKAGE(Doxygen)
+     IF(DOXYGEN_FOUND)
+@@ -157,6 +159,7 @@
+     ENDIF(DOXYGEN_FOUND)
+     ADD_SUBDIRECTORY(doc)
+ ENDIF(${CMAKE_SYSTEM} MATCHES "Linux")
++ENDIF( WITH_DOC )
+ 
+ CONFIGURE_FILE(drumstick-alsa.pc.in drumstick-alsa.pc IMMEDIATE @ONLY)
+ CONFIGURE_FILE(drumstick-file.pc.in drumstick-file.pc IMMEDIATE @ONLY)

diff --git a/media-sound/drumstick/files/0.5.0-gcc6-narrowing.patch 
b/media-sound/drumstick/files/0.5.0-gcc6-narrowing.patch
new file mode 100644
index 0000000..165db47
--- /dev/null
+++ b/media-sound/drumstick/files/0.5.0-gcc6-narrowing.patch
@@ -0,0 +1,26 @@
+Fix GCC 6 failures caused by -Wnarrowing
+
+--- a/utils/buildsmf/buildsmf.cpp
++++ b/utils/buildsmf/buildsmf.cpp
+@@ -53,8 +53,8 @@
+     m_engine->writeKeySignature(0, 2, major_mode); // D major (2 sharps)
+ 
+     // system exclusive event
+-    static char gsreset[] = { 0xf0, 0x41, 0x10, 0x42, 0x12, 
+-                              0x40, 0x00, 0x7f, 0x00, 0x41, 0xf7 };
++    static char gsreset[] = { (char)0xf0, 0x41, 0x10, 0x42, 0x12, 
++                              0x40, 0x00, 0x7f, 0x00, 0x41, (char)0xf7 };
+     m_engine->writeMidiEvent(0, system_exclusive, sizeof(gsreset), gsreset);
+ 
+     // some note events
+--- a/utils/testevents/testevents.cpp
++++ b/utils/testevents/testevents.cpp
+@@ -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[] = {(char)0xf0, 0x41, 0x10, 0x42, 0x12, 0x40, 0, 0x7f, 0, 
0x41, (char)0xf7};
+     dumpEvent(new SysExEvent(QByteArray(sysex, sizeof(sysex))));
+     QString text = "This can be a copyright, song name, instrument, lyric...";
+     TextEvent te(text, 3);

diff --git a/media-sound/drumstick/files/0.5.0-underlinking.patch 
b/media-sound/drumstick/files/0.5.0-underlinking.patch
new file mode 100644
index 0000000..1ec4fd1
--- /dev/null
+++ b/media-sound/drumstick/files/0.5.0-underlinking.patch
@@ -0,0 +1,17 @@
+--- a/utils/vpiano/CMakeLists.txt
++++ b/utils/vpiano/CMakeLists.txt
+@@ -1,3 +1,5 @@
++find_package(X11 REQUIRED)
++
+ SET(vpiano_forms_SRCS
+     vpianoabout.ui
+     connections.ui
+@@ -52,7 +54,7 @@
+ TARGET_LINK_LIBRARIES(drumstick-vpiano
+     ${QT_LIBRARIES} 
+     ${ALSA_LIBS} 
+-    ${QT_X11_X11_LIBRARY}
++    ${X11_X11_LIB}
+     drumstick-common
+     drumstick-alsa
+ )

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 0000000..4bb66e8
--- /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);

diff --git a/media-sound/drumstick/metadata.xml 
b/media-sound/drumstick/metadata.xml
new file mode 100644
index 0000000..dffe209
--- /dev/null
+++ b/media-sound/drumstick/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+<!-- maintainer-needed -->
+       <upstream>
+               <remote-id type="sourceforge">drumstick</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to