diff --git a/.cvsignore b/.cvsignore index e69de29..da418e1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +hydrogen-0.9.3.tar.gz diff --git a/hydrogen-0.9.3-flac113.patch b/hydrogen-0.9.3-flac113.patch new file mode 100644 index 0000000..9563233 --- /dev/null +++ b/hydrogen-0.9.3-flac113.patch @@ -0,0 +1,48 @@ +Fix API compatibility with newer FLAC. +Taken from ArchLinux package. + +--- 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-libdir.patch b/hydrogen-0.9.3-libdir.patch new file mode 100644 index 0000000..af2ef93 --- /dev/null +++ b/hydrogen-0.9.3-libdir.patch @@ -0,0 +1,76 @@ +Make hydrogen look for LADSPA plufins in the right places. +Please note that this patch is not completly correct -- @libdir@ +is originally meant to be included in makefiles and could possibly +contain make variables to expand. Nevertheless, when called by +the RPM build system, it is RPM who expands the path from _libdir +macros, so when this is built with RPM, we always get an expanded +path. + +--- hydrogen-0.9.3/src/lib/Preferences.cpp.libdir 2007-10-07 19:23:23.000000000 +0200 ++++ hydrogen-0.9.3/src/lib/Preferences.cpp 2007-10-07 19:24:29.000000000 +0200 +@@ -79,9 +79,8 @@ Preferences::Preferences() + m_ladspaPathVect.push_back(sLadspaPath); + } + else { +- m_ladspaPathVect.push_back( "/usr/lib/ladspa" ); +- m_ladspaPathVect.push_back( string( CONFIG_PREFIX ).append( "/lib/hydrogen/plugins" ) ); +- m_ladspaPathVect.push_back( "/usr/local/lib/ladspa" ); ++ m_ladspaPathVect.push_back( LIBDIR "/ladspa" ); ++ m_ladspaPathVect.push_back( LIBDIR "/hydrogen/plugins" ); + } + + m_pDefaultUIStyle = new UIStyle(); +--- hydrogen-0.9.3/hydrogen2Midi.pro.in.libdir 2007-10-07 19:30:43.000000000 +0200 ++++ hydrogen-0.9.3/hydrogen2Midi.pro.in 2007-10-07 20:52:54.000000000 +0200 +@@ -9,6 +9,8 @@ + QMAKE_CXXFLAGS+=@ac_qmake_cxxflags@ + QMAKE_LFLAGS+=@ac_qmake_lflags@ + ++QMAKE_CXXFLAGS+=-DLIBDIR=\"@libdir@\" ++ + SOURCES += \ + src/lib/xml/tinystr.cpp \ + src/lib/xml/tinyxml.cpp \ +--- hydrogen-0.9.3/hydrogenBenchmark.pro.in.libdir 2007-10-07 19:30:43.000000000 +0200 ++++ hydrogen-0.9.3/hydrogenBenchmark.pro.in 2007-10-07 20:52:54.000000000 +0200 +@@ -10,6 +10,8 @@ + QMAKE_CXXFLAGS+=@ac_qmake_cxxflags@ + QMAKE_LFLAGS+=@ac_qmake_lflags@ + ++QMAKE_CXXFLAGS+=-DLIBDIR=\"@libdir@\" ++ + SOURCES += \ + src/lib/xml/tinystr.cpp \ + src/lib/xml/tinyxml.cpp \ +--- hydrogen-0.9.3/hydrogenCUI.pro.in.libdir 2007-10-07 19:30:43.000000000 +0200 ++++ hydrogen-0.9.3/hydrogenCUI.pro.in 2007-10-07 20:52:54.000000000 +0200 +@@ -9,6 +9,8 @@ + QMAKE_CXXFLAGS+=@ac_qmake_cxxflags@ + QMAKE_LFLAGS+=@ac_qmake_lflags@ + ++QMAKE_CXXFLAGS+=-DLIBDIR=\"@libdir@\" ++ + SOURCES += \ + src/lib/xml/tinystr.cpp \ + src/lib/xml/tinyxml.cpp \ +--- hydrogen-0.9.3/hydrogenPlayer.pro.in.libdir 2007-10-07 19:30:43.000000000 +0200 ++++ hydrogen-0.9.3/hydrogenPlayer.pro.in 2007-10-07 20:52:54.000000000 +0200 +@@ -9,6 +9,8 @@ + QMAKE_CXXFLAGS+=@ac_qmake_cxxflags@ -g + QMAKE_LFLAGS+=@ac_qmake_lflags@ + ++QMAKE_CXXFLAGS+=-DLIBDIR=\"@libdir@\" ++ + SOURCES += \ + src/lib/xml/tinystr.cpp \ + src/lib/xml/tinyxml.cpp \ +--- hydrogen-0.9.3/hydrogen.pro.in.libdir 2007-10-07 19:30:43.000000000 +0200 ++++ hydrogen-0.9.3/hydrogen.pro.in 2007-10-07 20:52:54.000000000 +0200 +@@ -9,6 +9,7 @@ + QMAKE_CXXFLAGS+=@ac_qmake_cxxflags@ -g + QMAKE_LFLAGS+=@ac_qmake_lflags@ + ++QMAKE_CXXFLAGS+=-DLIBDIR=\"@libdir@\" + + SOURCES += \ + src/lib/xml/tinystr.cpp \ diff --git a/hydrogen-0.9.3-null-sample.patch b/hydrogen-0.9.3-null-sample.patch new file mode 100644 index 0000000..1dc2544 --- /dev/null +++ b/hydrogen-0.9.3-null-sample.patch @@ -0,0 +1,14 @@ +--- src/lib/Hydrogen.cpp~ 2006-01-06 06:15:50.000000000 -0800 ++++ src/lib/Hydrogen.cpp 2006-07-22 16:41:44.000000000 -0700 +@@ -2491,9 +2491,8 @@ + Sample *pSample = Sample::load( sSampleFilename ); + // pSample->setFilename( pNewSample->getFilename() ); // riuso il path del nuovo sample (perche' e' gia relativo al path del drumkit) + if (pSample == NULL) { +- errorLog( "[loadDrumkit] Error Loading drumkit: NULL sample, now using /emptySample.wav" ); +- pSample->m_sFilename = string(DataPath::getDataPath() ).append( "/emptySample.wav" ); +- pSample = Sample::load( pSample->m_sFilename ); ++ errorLog( "[loadDrumkit] Error Loading drumkit: " + sSampleFilename + " sample, now using /emptySample.wav" ); ++ pSample = Sample::load( string(DataPath::getDataPath() ).append( "/emptySample.wav" )); + } + InstrumentLayer *pLayer = new InstrumentLayer( pSample ); + pLayer->m_fStartVelocity = pNewLayer->m_fStartVelocity; diff --git a/hydrogen-0.9.3-wasp.patch b/hydrogen-0.9.3-wasp.patch new file mode 100644 index 0000000..774984c --- /dev/null +++ b/hydrogen-0.9.3-wasp.patch @@ -0,0 +1,49 @@ +Making gcc call linker honors the Build ID. Additionaly we want compiler +flags only from RPM and we do want to install the result in libdir +no matter what architecture are we on. + +--- hydrogen-0.9.3/plugins/wasp/Makefile.in.wasp 2005-11-10 20:39:20.000000000 +0100 ++++ hydrogen-0.9.3/plugins/wasp/Makefile.in 2007-10-07 18:47:01.000000000 +0200 +@@ -1,21 +1,20 @@ +-INCLUDES = -I/usr/local/include/ -Iinclude +-CC = gcc +-CFLAGS = $(INCLUDES) -fPIC -DPIC -Wall -O2 -g -c ++INCLUDES = -Iinclude ++CFLAGS += $(INCLUDES) -nostartfiles -shared -fPIC -DPIC ++ + prefix = @ac_prefix@ ++exec_prefix = @prefix@ ++libdir = @libdir@ + + all: wasp_booster.so wasp_noisifier.so wasp_xshaper.so + + wasp_booster.so: plugins/booster.c +- $(CC) $(CFLAGS) -o plugins/booster.o plugins/booster.c +- ld -shared -o wasp_booster.so plugins/booster.o ++ $(CC) $(CFLAGS) -o wasp_booster.so plugins/booster.c + + wasp_noisifier.so: plugins/noisifier.c +- $(CC) $(CFLAGS) -o plugins/noisifier.o plugins/noisifier.c +- ld -shared -o wasp_noisifier.so plugins/noisifier.o ++ $(CC) $(CFLAGS) -o wasp_noisifier.so plugins/noisifier.c + + wasp_xshaper.so: plugins/x-shaper.c +- $(CC) $(CFLAGS) -o plugins/xshaper.o plugins/x-shaper.c +- ld -shared -o wasp_xshaper.so plugins/xshaper.o ++ $(CC) $(CFLAGS) -o wasp_xshaper.so plugins/x-shaper.c + + clean: + @rm -f `find . -name "*.o"` +@@ -23,9 +22,9 @@ + + install: + @echo "Installing WASP plugins" +- mkdir -p $(DESTDIR)$(prefix)/lib/hydrogen/plugins/ +- @install -vD *.so $(DESTDIR)$(prefix)/lib/hydrogen/plugins ++ mkdir -p $(DESTDIR)${libdir}/hydrogen/plugins/ ++ @install -vD *.so $(DESTDIR)${libdir}/hydrogen/plugins + + uninstall: +- @rm -rf $(DESTDIR)$(prefix)/lib/hydrogen ++ @rm -rf $(DESTDIR)${libdir}/hydrogen + diff --git a/hydrogen.spec b/hydrogen.spec new file mode 100644 index 0000000..ba0676b --- /dev/null +++ b/hydrogen.spec @@ -0,0 +1,128 @@ +Summary: Advanced drum machine for GNU/Linux +Name: hydrogen +Version: 0.9.3 +Release: 9%{?dist} +URL: http://www.hydrogen-music.org/ +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch0: hydrogen-0.9.3-g++4.patch +Patch1: hydrogen-0.9.3-flac113.patch +Patch3: hydrogen-0.9.3-wasp.patch +Patch4: hydrogen-0.9.3-libdir.patch +Patch5: hydrogen-0.9.3-null-sample.patch +License: GPLv2+ +Group: Applications/Multimedia +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: flac-devel jack-audio-connection-kit-devel liblrdf-devel +BuildRequires: qt-devel libsndfile-devel alsa-lib-devel +BuildRequires: libxml2-devel + +BuildRequires: desktop-file-utils +Requires(post): desktop-file-utils +Requires(postun): desktop-file-utils + +%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. + +%prep +%setup -q +%patch0 -p0 -b .g++4 +%patch1 -p0 -b .flac133 +%patch3 -p1 -b .wasp +%patch4 -p1 -b .libdir +%patch5 -p0 -b .null-sample + +%build +unset QTDIR || : ; . /etc/profile.d/qt.sh +export QTLIB=${QTDIR}/lib QTINC=${QTDIR}/include +%configure --disable-oss-support +# Not using _smp_mflags macro: Dependencies are not tracked correctly in +# Makefiles, concurrency problems would occur +make + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install +# Reinstall hydrogen.desktop properly. +rm $RPM_BUILD_ROOT%{_datadir}/applications/hydrogen.desktop +desktop-file-install --vendor fedora \ + --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ + --remove-category Application \ + --remove-category Sound \ + --add-category X-Drumming \ + --add-category X-MIDI \ + --add-category X-Jack \ + --remove-mime-type text/xml \ + hydrogen.desktop + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +touch --no-create %{_datadir}/icons/hicolor +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + +%postun +touch --no-create %{_datadir}/icons/hicolor +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + +%files +%defattr(-,root,root) +%doc AUTHORS ChangeLog COPYING README +%{_bindir}/hydrogen* +%{_libdir}/hydrogen +%{_datadir}/hydrogen +%{_datadir}/applications/fedora-hydrogen.desktop + +%changelog +* Mon Oct 09 2007 Lubomir Kundrak 0.9.3-9 +- Incorporate fixes from #190040, thanks to Hans de Goede +- Removed useless LIBDIR introduced in previous revision +- Fixed desktop file installation +- Call gtk-update-icon-cache only if it is present + +* Sun Oct 07 2007 Lubomir Kundrak 0.9.3-8 +- Remove -j from make to fix concurrency problems +- Handle libdir on 64bit platforms correctly +- Rename patches + +* Sat Oct 06 2007 Lubomir Kundrak 0.9.3-7.1 +- Fix desktop file +- Fix compatibility with new FLAC +- Fix linking for Build ID use + +* Mon Mar 26 2007 Anthony Green 0.9.3-7 +- Improve Source0 link. +- Add %%post(un) scriptlets for MimeType update. +- Add update-desktop-database scriptlets. + +* Sat Jul 22 2006 Anthony Green 0.9.3-6 +- Add hydrogen-null-sample.patch to fix crash. + +* Sun Jul 02 2006 Anthony Green 0.9.3-5 +- Clean up BuildRequires. +- Configure with --disable-oss-support +- Don't run ldconfig (not needed) +- Remove post/postun scriptlets. + +* Sat May 13 2006 Anthony Green 0.9.3-4 +- BuildRequire libxml2-devel. +- Remove explicit Requires for some runtime libraries. +- Set QTDIR via /etc/profile.d/qt.sh. +- Update desktop icons and icon cache in post and postun. +- Don't use __rm or __make macros. + +* Sat May 13 2006 Anthony Green 0.9.3-3 +- Conditionally apply ardour-lib64-ladspa.patch. + +* Sat May 13 2006 Anthony Green 0.9.3-2 +- Build fixes for x86_64. + +* Wed Apr 26 2006 Anthony Green 0.9.3-1 +- Created. diff --git a/sources b/sources index e69de29..df28e46 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +d5840b5d330d433d00ea1727efb0fc7f hydrogen-0.9.3.tar.gz