diff --git a/README.md b/README.md index 5c376e5..f53caef 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # hydrogen +Hydrogen is an advanced drum machine for GNU/Linux. It's main goal is to bring professional yet simple and intuitive pattern-based drum programming. + diff --git a/hydrogen-0.9.3-build-flac.patch b/hydrogen-0.9.3-build-flac.patch new file mode 100644 index 0000000..63fb806 --- /dev/null +++ b/hydrogen-0.9.3-build-flac.patch @@ -0,0 +1,44 @@ +--- src/lib/FLACFile.cpp.old 2007-02-11 20:12:34.000000000 +0100 ++++ src/lib/FLACFile.cpp 2007-02-11 20:18:25.000000000 +0100 +@@ -33,6 +33,13 @@ + //#include "FLAC/file_decoder.h" + #include + ++#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8 ++#define LEGACY_FLAC ++#else ++#undef LEGACY_FLAC ++#endif ++ ++ + /// Reads a FLAC file...not optimized yet + class FLACFile_real : public FLAC::Decoder::File, public Object + { +@@ -164,16 +171,28 @@ + } + + set_metadata_ignore_all(); ++ ++#ifdef LEGACY_FLAC + set_filename( sFilename.c_str() ); + + State s=init(); + if( s != FLAC__FILE_DECODER_OK ) { ++#else ++ FLAC__StreamDecoderInitStatus s=init(sFilename.c_str() ); ++ if(s!=FLAC__STREAM_DECODER_INIT_STATUS_OK) { ++#endif + errorLog( "[load] Error in init()" ); + } + ++#ifdef LEGACY_FLAC + if ( process_until_end_of_file() == false ) { + errorLog( "[load] Error in process_until_end_of_file()" ); + } ++#else ++ if ( process_until_end_of_stream() == false ) { ++ errorLog( "[load] Error in process_until_end_of_stream()" ); ++ } ++#endif + } + diff --git a/hydrogen-0.9.3-g++4.patch b/hydrogen-0.9.3-g++4.patch new file mode 100644 index 0000000..eb298f2 --- /dev/null +++ b/hydrogen-0.9.3-g++4.patch @@ -0,0 +1,11 @@ +--- src/lib/xml/tinyxml.h~ 2005-10-17 18:32:04.000000000 -0400 ++++ src/lib/xml/tinyxml.h 2006-04-26 16:57:39.000000000 -0400 +@@ -823,7 +823,7 @@ + #endif + + /// Construct. +- TiXmlDeclaration::TiXmlDeclaration( const char * _version, ++ TiXmlDeclaration( const char * _version, + const char * _encoding, + const char * _standalone ); + diff --git a/hydrogen-0.9.3-gcc43.patch b/hydrogen-0.9.3-gcc43.patch new file mode 100644 index 0000000..865208b --- /dev/null +++ b/hydrogen-0.9.3-gcc43.patch @@ -0,0 +1,60 @@ +The STL headers in gcc-4.3 have been cleaned up, so that the headers don't drag in +unnecessary dependencies which aren't requested by the standard. +This fixes build for gcc-4.3 + +Lubomir Kundrak + +diff -rup hydrogen-0.9.3.orig/src/gui/DrumkitManager.h hydrogen-0.9.3/src/gui/DrumkitManager.h +--- hydrogen-0.9.3.orig/src/gui/DrumkitManager.h 2005-10-18 00:32:04.000000000 +0200 ++++ hydrogen-0.9.3/src/gui/DrumkitManager.h 2008-01-03 21:45:23.000000000 +0100 +@@ -43,6 +43,7 @@ + #include + + #include ++#include + + #include "UI/DrumkitManager_UI.h" + #include "lib/Object.h" +diff -rup hydrogen-0.9.3.orig/src/gui/main.cpp hydrogen-0.9.3/src/gui/main.cpp +--- hydrogen-0.9.3.orig/src/gui/main.cpp 2005-11-08 15:52:51.000000000 +0100 ++++ hydrogen-0.9.3/src/gui/main.cpp 2008-01-03 21:51:21.000000000 +0100 +@@ -43,6 +43,7 @@ + #include "lib/Exception.h" + + #include ++#include + using namespace std; + + void showInfo(); +diff -rup hydrogen-0.9.3.orig/src/lib/FLACFile.cpp hydrogen-0.9.3/src/lib/FLACFile.cpp +--- hydrogen-0.9.3.orig/src/lib/FLACFile.cpp 2008-01-03 21:06:25.000000000 +0100 ++++ hydrogen-0.9.3/src/lib/FLACFile.cpp 2008-01-03 21:39:52.000000000 +0100 +@@ -27,6 +27,7 @@ + + #include + #include ++#include + + #ifdef FLAC_SUPPORT + +diff -rup hydrogen-0.9.3.orig/src/tools/HydrogenPlayer.cpp hydrogen-0.9.3/src/tools/HydrogenPlayer.cpp +--- hydrogen-0.9.3.orig/src/tools/HydrogenPlayer.cpp 2005-10-18 00:32:04.000000000 +0200 ++++ hydrogen-0.9.3/src/tools/HydrogenPlayer.cpp 2008-01-04 23:30:06.000000000 +0100 +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include "lib/Hydrogen.h" + #include "lib/LocalFileMng.h" +--- hydrogen-0.9.3.orig/src/lib/drivers/OssDriver.cpp 2009-01-25 14:12:53.000000000 +0100 ++++ hydrogen-0.9.3/src/lib/drivers/OssDriver.cpp 2009-01-25 14:11:18.000000000 +0100 +@@ -30,6 +30,7 @@ + #include "../Preferences.h" + + #include ++#include + + audioProcessCallback ossDriver_audioProcessCallback; + bool ossDriver_running; diff --git a/hydrogen-0.9.6-gcc-4.7.patch b/hydrogen-0.9.6-gcc-4.7.patch new file mode 100644 index 0000000..2a655ab --- /dev/null +++ b/hydrogen-0.9.6-gcc-4.7.patch @@ -0,0 +1,10 @@ +--- hydrogen-0.9.6/src/core/src/IO/portmidi_driver.cpp.orig 2012-05-25 14:19:45.000000000 +0200 ++++ hydrogen-0.9.6/src/core/src/IO/portmidi_driver.cpp 2012-07-08 16:09:59.193699959 +0200 +@@ -40,6 +40,7 @@ + #define TIME_START Pt_Start(1, 0, 0) /* timer started w/millisecond accuracy */ + + #include ++#include + + namespace H2Core + { diff --git a/hydrogen.spec b/hydrogen.spec new file mode 100644 index 0000000..bbd1360 --- /dev/null +++ b/hydrogen.spec @@ -0,0 +1,145 @@ +%define majver %(echo %version | cut -d_ -f1) +%define pkgver %(echo %version | tr _ -) +Name: hydrogen +Version: 0.9.6_beta3 +Release: 1mamba +Summary: Advanced drum machine for GNU/Linux +Group: Graphical Desktop/Applications/Multimedia +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.hydrogen-music.org/ +Source: http://downloads.sourceforge.net/project/hydrogen/Hydrogen/%{majver}%20Sources/hydrogen-%{pkgver}.tar.gz +Patch0: %{name}-0.9.3-g++4.patch +Patch1: %{name}-0.9.3-gcc43.patch +Patch2: %{name}-0.9.3-build-flac.patch +Patch3: %{name}-0.9.6-gcc-4.7.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libalsa-devel +BuildRequires: libarchive-devel +BuildRequires: libgcc +BuildRequires: libjack-devel +BuildRequires: liblrdf-devel +BuildRequires: libportaudio-devel +BuildRequires: libportmidi-devel +BuildRequires: libqt4-devel +BuildRequires: libsndfile-devel +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Hydrogen is an advanced drum machine for GNU/Linux. It's main goal is to bring professional yet simple and intuitive pattern-based drum programming. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +Hydrogen is an advanced drum machine for GNU/Linux. It's main goal is to bring professional yet simple and intuitive pattern-based drum programming. + +This package contains the headers that programmers will need to develop applications which will use %{name}. + + +%prep +%setup -q -c +mv %{name}-*/* . +#sed -i "s|linux2|linux3|" Sconstruct +#%patch0 +#%patch1 -p1 +#%patch2 +%patch3 -p1 + +%build +QTDIR=%{_qt4_libdir} +LADSPA_PATH=%{_libdir}/ladspa +%cmake \ + -DCMAKE_COLOR_MAKEFILE=1 \ + -DWANT_DEBUG=1 \ + -DWANT_JACK=1 \ + -DWANT_ALSA=1 \ + -DWANT_LIBARCHIVE=1 \ + -DWANT_RUBBERBAND=1 \ + -DWANT_OSS=0 \ + -DWANT_PORTAUDIO=1 \ + -DWANT_PORTMIDI=1 \ + -DWANT_LASH=0 \ + -DWANT_LRDF=1 \ + -DWANT_COREAUDIO=0 \ + -DWANT_COREMIDI=0 + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall +#scons install DESTDIR=%{buildroot} + +install -d %{buildroot}%{_datadir}/pixmaps +convert /usr/share/hydrogen/data/img/gray/h2-icon.svg -resize 64x64 \ + %{buildroot}%{_datadir}/pixmaps/hydrogen.png + + +# Create the system menu entry +install -d %{buildroot}%{_datadir}/applications +cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF +[Desktop Entry] +Name=Hydrogen +GenericName=An advanced drum machine +GenericName[it]=Batteria elettronica avanzata +Exec=%{name} +Icon=hydrogen.png +Terminal=0 +Type=Application +Categories=Qt;KDE;AudioVideo;Music; +EOF + +%files +%defattr(-,root,root) +%{_bindir}/* +%{_libdir}/libhydrogen-core-0.9.6.so +%{_datadir}/hydrogen/data +%{_datadir}/applications/hydrogen.desktop +%{_datadir}/pixmaps/hydrogen.png +%doc AUTHORS COPYING README.txt + +%files devel +%defattr(-,root,root) +%dir %{_includedir}/hydrogen +%{_includedir}/hydrogen/* + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%changelog +* Wed Jul 24 2013 Silvan Calarco 0.9.6_beta3-1mamba +- update to 0.9.6_beta3 + +* Sat Jul 07 2012 Automatic Build System 0.9.6-1mamba +- update to 0.9.6 + +* Mon Oct 04 2010 Automatic Build System 0.9.4.2-1mamba +- automatic update by autodist + +* Sun May 16 2010 Automatic Build System 0.9.4.1-1mamba +- automatic update by autodist + +* Sun Jan 25 2009 Silvan Calarco 0.9.3-3mamba +- moved to music menu entry + +* Mon May 05 2008 Silvan Calarco 0.9.3-2mamba +- changed maintainer + +* Mon Oct 30 2006 Stefano Cotta Ramusino 0.9.3-1qilnx +- update to version 0.9.3 by autospec +- added missing build requirement + +* Sat Jun 11 2005 Silvan Calarco 0.9.1-3qilnx +- rebuilt against new libFLAC release + +* Thu Apr 07 2005 Alessandro Ramazzina 0.9.1-2qilnx +- rebuild and moved from devel-contrib repository to devel repository + +* Wed Mar 17 2005 Matteo Bernasconi 0.9.1-1qilnx +- first build