+++ /dev/null
-Build with gcc 4.7
-https://bugs.gentoo.org/show_bug.cgi?id=421913
-
-Index: hydrogen-0.9.5/gui/src/MainForm.cpp
-===================================================================
---- hydrogen-0.9.5.orig/gui/src/MainForm.cpp
-+++ hydrogen-0.9.5/gui/src/MainForm.cpp
-@@ -70,6 +70,7 @@ using namespace H2Core;
-
- #include <memory>
- #include <cassert>
-+#include <unistd.h>
-
- using namespace std;
- using namespace H2Core;
-Index: hydrogen-0.9.5/gui/src/SongEditor/SongEditor.cpp
-===================================================================
---- hydrogen-0.9.5.orig/gui/src/SongEditor/SongEditor.cpp
-+++ hydrogen-0.9.5/gui/src/SongEditor/SongEditor.cpp
-@@ -21,6 +21,7 @@
- */
-
- #include <assert.h>
-+#include <unistd.h>
- #include <algorithm>
- #include <memory>
-
+++ /dev/null
-diff -ruN hydrogen-0.9.5.orig/libs/hydrogen/src/local_file_mgr.cpp hydrogen-0.9.5/libs/hydrogen/src/local_file_mgr.cpp
---- hydrogen-0.9.5.orig/libs/hydrogen/src/local_file_mgr.cpp 2011-01-29 00:33:23.000000000 +0100
-+++ hydrogen-0.9.5/libs/hydrogen/src/local_file_mgr.cpp 2017-09-26 20:07:31.128723252 +0200
-@@ -980,7 +980,7 @@
-
- std::string playlistInfoFile = patternname;
- std::ifstream verify( playlistInfoFile.c_str() , std::ios::in | std::ios::binary );
-- if ( verify == NULL ) {
-+ if ( !verify ) {
- //ERRORLOG( "Load Playlist: Data file " + playlistInfoFile + " not found." );
- return NULL;
- }
+++ /dev/null
-conf.CheckCHeader lrdf.h check fails because of missing -I/usr/include/raptor2, use pkg-config instead
-
---- Sconstruct
-+++ Sconstruct
-@@ -268,7 +268,8 @@
- env.Append( LIBPATH = 'C:\Program Files\GnuWin32\lib' )
- env.Append( LIBS = [ "pthread" ] )
-
-- if str(env['lrdf']) == "1": env.Append( LIBS = ["lrdf"] )
-+ if str(env['lrdf']) == "1":
-+ env.ParseConfig('pkg-config --cflags --libs lrdf')
- if str(env['jack']) == "1": env.Append( LIBS = ["jack"])
- if str(env['alsa']) == "1": env.Append( LIBS = ["asound"])
- if str(env['libarchive']) == "1": env.Append( LIBS = ["archive"])
-@@ -449,7 +450,7 @@
- Exit(1)
-
- #lrdf: categorizing of ladspa effects
--if str(env['lrdf']) == "1" and not conf.CheckCHeader('lrdf.h'):
-+if str(env['lrdf']) == "1" and not conf.CheckPKG('lrdf >= 0.4.0'):
- print 'lrdf must be installed!'
- Exit(1)
-
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit eutils multilib flag-o-matic toolchain-funcs
-
-DESCRIPTION="Advanced drum machine"
-HOMEPAGE="http://www.hydrogen-music.org/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2 ZLIB"
-SLOT="0"
-KEYWORDS="amd64 ppc ppc64 x86"
-IUSE="alsa +archive jack ladspa lash oss portaudio"
-
-RDEPEND="dev-qt/qtgui:4 dev-qt/qtcore:4
- archive? ( app-arch/libarchive )
- !archive? ( >=dev-libs/libtar-1.2.11-r3 )
- >=media-libs/libsndfile-1.0.18
- alsa? ( media-libs/alsa-lib )
- jack? ( virtual/jack )
- ladspa? ( media-libs/liblrdf )
- lash? ( media-sound/lash )
- portaudio? ( >=media-libs/portaudio-19_pre )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- dev-util/scons"
-
-src_prepare() {
- sed -i -e '/cppflags +=/d' Sconstruct || die
- epatch \
- patches/portaudio.patch \
- "${FILESDIR}"/${P}-use_lrdf_pkgconfig.patch \
- "${FILESDIR}"/${P}-gcc47.patch \
- "${FILESDIR}"/${P}-gcc6.patch
-}
-
-src_compile() {
- # FIXME: The -I/usr/include/raptor2 gets lost in middle of build
- # despite -use_lrdf_pkgconfig.patch
- use ladspa && append-flags $($(tc-getPKG_CONFIG) --cflags lrdf)
-
- export QTDIR="/usr/$(get_libdir)"
- local myconf='portmidi=0' #90614
-
- use alsa || myconf+=' alsa=0'
- use archive && myconf+=' libarchive=1'
- use jack || myconf+=' jack=0'
- use ladspa || myconf+=' lrdf=0'
- use lash && myconf+=' lash=1'
- use oss || myconf+=' oss=0'
- use portaudio && myconf+=' portaudio=1'
-
- scons \
- prefix=/usr \
- DESTDIR="${D}" \
- optflags="${CXXFLAGS}" \
- ${myconf} || die
-}
-
-src_install() {
- dobin hydrogen
- insinto /usr/share/hydrogen
- doins -r data
- doicon data/img/gray/h2-icon.svg
- domenu hydrogen.desktop
- dosym /usr/share/hydrogen/data/doc /usr/share/doc/${PF}/html
- dodoc AUTHORS ChangeLog README.txt
-}