diff --git a/hydrogen-datadir.patch b/hydrogen-datadir.patch new file mode 100644 index 0000000..57a9986 --- /dev/null +++ b/hydrogen-datadir.patch @@ -0,0 +1,22 @@ +diff -rupN hydrogen-0.9.4.2.old/libs/hydrogen/src/data_path.cpp hydrogen-0.9.4.2/libs/hydrogen/src/data_path.cpp +--- hydrogen-0.9.4.2.old/libs/hydrogen/src/data_path.cpp 2008-04-22 16:42:36.000000000 -0400 ++++ hydrogen-0.9.4.2/libs/hydrogen/src/data_path.cpp 2010-10-16 23:28:33.000000000 -0400 +@@ -55,14 +55,13 @@ QString DataPath::get_data_path() + + #else + if ( __data_path == "" ) { +- QString qStringPath = qApp->applicationDirPath() + QString ( "/data" ) ; +- __data_path = qStringPath; +- ++ __data_path = DATA_PATH; + QFile file( __data_path ); + if ( !file.exists() ) { +- // try using the system wide data dir +- __data_path = DATA_PATH; ++ QString qStringPath = qApp->applicationDirPath() + QString ( "/data" ) ; ++ __data_path = qStringPath; + } ++ + } + return __data_path; + #endif diff --git a/hydrogen.spec b/hydrogen.spec index b388fb7..403d5c6 100644 --- a/hydrogen.spec +++ b/hydrogen.spec @@ -1,9 +1,12 @@ Summary: Advanced drum machine for GNU/Linux Name: hydrogen Version: 0.9.4.2 -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.hydrogen-music.org/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +# Correct datadir. hydrogens busts if there is a file /usr/bin/data in the system. +# Patch sent to the upstream devel mailing list. Fixes RHBZ#643622 +Patch0: hydrogen-datadir.patch License: GPLv2+ Group: Applications/Multimedia BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -53,6 +56,7 @@ patch -p0 < patches/portaudio.patch # portmidi build fix. Looks like other distros did not obey upstream decisions sed -i '/porttime/d' Sconstruct %endif +%patch0 -p1 -b .datadir %build @@ -127,6 +131,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Oct 16 2010 Orcan Ogetbil - 0.9.4.2-3 +- Fix data directory. Fixes RHBZ#643622 + * Wed Sep 29 2010 jkeating - 0.9.4.2-2 - Rebuilt for gcc bug 634757