From 5abe7f343544eb51be3ff099a4de40e22b5c7b30 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Apr 10 2010 22:26:26 +0000 Subject: - Update to 0.9.4.1 - Build the wasp plugins - Fixes ladspa plugin path on 64bit systems - Fixes crash RHBZ#570348 --- diff --git a/.cvsignore b/.cvsignore index 267f5d2..ee996db 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -hydrogen-0.9.4.tar.gz +hydrogen-0.9.4.1.tar.gz diff --git a/hydrogen-lib64.patch b/hydrogen-lib64.patch new file mode 100644 index 0000000..62efb71 --- /dev/null +++ b/hydrogen-lib64.patch @@ -0,0 +1,12 @@ +diff -rupN 0.9.4.1.old/libs/hydrogen/src/preferences.cpp 0.9.4.1/libs/hydrogen/src/preferences.cpp +--- 0.9.4.1.old/libs/hydrogen/src/preferences.cpp 2009-08-26 08:12:27.000000000 -0400 ++++ 0.9.4.1/libs/hydrogen/src/preferences.cpp 2010-04-10 07:14:14.000000000 -0400 +@@ -99,6 +99,8 @@ Preferences::Preferences() + #else + m_ladspaPathVect.push_back( "/usr/lib/ladspa" ); + m_ladspaPathVect.push_back( "/usr/local/lib/ladspa" ); ++ m_ladspaPathVect.push_back( "/usr/lib64/ladspa" ); ++ m_ladspaPathVect.push_back( "/usr/local/lib64/ladspa" ); + #endif + + } diff --git a/hydrogen-linking.patch b/hydrogen-linking.patch new file mode 100644 index 0000000..2460aad --- /dev/null +++ b/hydrogen-linking.patch @@ -0,0 +1,12 @@ +diff -rupN hydrogen-0.9.4.old/Sconstruct hydrogen-0.9.4/Sconstruct +--- hydrogen-0.9.4.old/Sconstruct 2009-09-07 17:31:13.000000000 -0400 ++++ hydrogen-0.9.4/Sconstruct 2010-02-13 15:56:14.000000000 -0500 +@@ -269,7 +269,7 @@ def get_hydrogen_gui( lib_hydrogen , opt + if str(env['lash']) == "1": + env.ParseConfig('pkg-config --cflags --libs lash-1.0') + +- if sys.platform == "darwin": ++ if sys.platform == "darwin" or sys.platform == "linux2": + env.Append( LIBS = ["z"] ) + + if sys.platform == "darwin" and str(env['coreaudio']) == "1": diff --git a/hydrogen-portmidi-200.patch b/hydrogen-portmidi-200.patch new file mode 100644 index 0000000..4b64f77 --- /dev/null +++ b/hydrogen-portmidi-200.patch @@ -0,0 +1,32 @@ +diff -rupN hydrogen-0.9.4.old/libs/hydrogen/src/IO/portmidi_driver.cpp hydrogen-0.9.4.new/libs/hydrogen/src/IO/portmidi_driver.cpp +--- hydrogen-0.9.4.old/libs/hydrogen/src/IO/portmidi_driver.cpp 2009-07-14 21:10:17.000000000 -0400 ++++ hydrogen-0.9.4.new/libs/hydrogen/src/IO/portmidi_driver.cpp 2010-01-30 01:47:50.000000000 -0500 +@@ -31,7 +31,7 @@ + #ifdef PORTMIDI_SUPPORT + + #include +-#define TIME_PROC ((long (*)(void *)) Pt_Time) ++#define TIME_PROC ((int32_t (*)(void *)) Pt_Time) + #define TIME_START Pt_Start(1, 0, 0) /* timer started w/millisecond accuracy */ + + #include +@@ -47,7 +47,7 @@ void* PortMidiDriver_thread( void* param + _INFOLOG( "PortMidiDriver_thread starting" ); + + PmError status; +- PmError length; ++ int length; + PmEvent buffer[1]; + while ( instance->m_bRunning ) { + status = Pm_Poll( instance->m_pMidiIn ); +diff -rupN hydrogen-0.9.4.old/Sconstruct hydrogen-0.9.4.new/Sconstruct +--- hydrogen-0.9.4.old/Sconstruct 2009-09-07 17:31:13.000000000 -0400 ++++ hydrogen-0.9.4.new/Sconstruct 2010-01-30 01:48:01.000000000 -0500 +@@ -265,7 +265,6 @@ def get_hydrogen_gui( lib_hydrogen , opt + if str(env['portaudio']) == "1": env.Append( LIBS = [ "portaudio" ] ) + if str(env['portmidi']) == "1": + env.Append( LIBS = [ "portmidi" ] ) +- env.Append( LIBS = [ "porttime" ] ) + if str(env['lash']) == "1": + env.ParseConfig('pkg-config --cflags --libs lash-1.0') + diff --git a/hydrogen-qt47.patch b/hydrogen-qt47.patch new file mode 100644 index 0000000..09703a6 --- /dev/null +++ b/hydrogen-qt47.patch @@ -0,0 +1,11 @@ +--- 0.9.4.1.old/libs/hydrogen/src/song.cpp 2009-07-14 21:10:17.000000000 -0400 ++++ 0.9.4.1/libs/hydrogen/src/song.cpp 2010-04-10 08:14:54.000000000 -0400 +@@ -141,7 +141,7 @@ Song* Song::get_default_song(){ + song->set_swing_factor( 0.0 ); + + InstrumentList* pList = new InstrumentList(); +- Instrument *pNewInstr = new Instrument(QString( 0 ), "New instrument", new ADSR()); ++ Instrument *pNewInstr = new Instrument(QString( "" ), "New instrument", new ADSR()); + pList->add( pNewInstr ); + song->set_instrument_list( pList ); + diff --git a/hydrogen.spec b/hydrogen.spec index e501463..34152de 100644 --- a/hydrogen.spec +++ b/hydrogen.spec @@ -1,11 +1,21 @@ Summary: Advanced drum machine for GNU/Linux Name: hydrogen -Version: 0.9.4 +Version: 0.9.4.1 Release: 1%{?dist} URL: http://www.hydrogen-music.org/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz # For convenience, to take the svn snapshot: Source9: hydrogen-snapshot.sh +# portmidi-200 needs a new patch. Causes RHBZ#555488 +Patch0: hydrogen-portmidi-200.patch +# Fix DSO linking. RHBZ#564719. Sent to upstream ML: +Patch1: hydrogen-linking.patch +# Fix ladspa plugin path in 64bit systems +Patch2: hydrogen-lib64.patch +# Fix wasp ladspa plugin linking +Patch3: wasp-linking.patch +# Fix qt-4.7 build issue +Patch4: hydrogen-qt47.patch License: GPLv2+ Group: Applications/Multimedia BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -14,28 +24,63 @@ BuildRequires: alsa-lib-devel BuildRequires: desktop-file-utils BuildRequires: flac-devel BuildRequires: jack-audio-connection-kit-devel +BuildRequires: ladspa-devel BuildRequires: lash-devel BuildRequires: liblrdf-devel BuildRequires: libsndfile-devel BuildRequires: libtar-devel BuildRequires: portaudio-devel BuildRequires: portmidi-devel -BuildRequires: qt-devel +BuildRequires: qt4-devel BuildRequires: scons +%{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}} + %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. +# According tothe old wasp home page +# http://linux01.gwdg.de/~nlissne/wasp/index.html +# wasp code is now maintained in hydrogen tree. +%package -n ladspa-wasp-plugins +Summary: Wave Sculpting Plugins +Group: Applications/Multimedia +License: GPLv2+ +Requires: ladspa + +%description -n ladspa-wasp-plugins +The Wave Sculpting Plugins (WASP) is a set of LADSPA plugins which includes both +processors and generators. While being pretty simple and not CPU-hungry, they +incorporate such interesting algorithms as a multi-mode wave shaper, noisifier, +clipping booster and variable noise source. + +WASP is now part of the hydrogen drum machine. + + %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{version} patch -p0 < patches/portaudio.patch +%if 0%{fedora} < 13 patch -p0 < patches/portmidi.patch +%else +%patch0 -p1 -b .200 +%endif +%patch1 -p1 -b .linking +%patch2 -p1 -b .lib64 +%patch3 -p1 -b .wasp.linking +%patch4 -p1 -b .qt47 %build export QTDIR=%{_qt4_prefix} scons %{?_smp_mflags} prefix=%{_prefix} portaudio=1 portmidi=1 lash=1 oss=0 optflags="$RPM_OPT_FLAGS" +# Build the wasp plugins +pushd plugins + %{_qt4_qmake} + make %{?_smp_mflags} +popd + %install rm -rf $RPM_BUILD_ROOT export QTDIR=%{_qt4_prefix} @@ -62,6 +107,9 @@ mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/*.svg \ rm -f $RPM_BUILD_ROOT%{_datadir}/hydrogen/data/doc/{Makefile,README}* \ $RPM_BUILD_ROOT%{_datadir}/hydrogen/data/doc/*.{docbook,po,pot} +#Install the wasp plugins +mkdir -p $RPM_BUILD_ROOT%{_libdir}/ladspa +cp -a plugins/libwasp*.so $RPM_BUILD_ROOT%{_libdir}/ladspa/ %clean rm -rf $RPM_BUILD_ROOT @@ -84,11 +132,29 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING* README.txt %{_bindir}/hydrogen -%{_datadir}/hydrogen +%{_datadir}/hydrogen/ %{_datadir}/applications/fedora-hydrogen.desktop %{_datadir}/icons/hicolor/scalable/apps/*.svg +%files -n ladspa-wasp-plugins +%defattr(-,root,root,-) +%doc plugins/wasp/AUTHORS plugins/wasp/ChangeLog plugins/wasp/LICENSE +%{_libdir}/ladspa/libwasp*.so + + %changelog +* Sat Apr 10 2010 Orcan Ogetbil - 0.9.4.1-1 +- Update to 0.9.4.1 +- Build the wasp plugins +- Fixes ladspa plugin path on 64bit systems +- Fixes crash RHBZ#570348 + +* Sat Feb 13 2010 Orcan Ogetbil - 0.9.4-3 +- Fix DSO linking RHBZ#564719 + +* Sat Jan 30 2010 Orcan Ogetbil - 0.9.4-2 +- Add patch against portmidi-200 on F13+. Fixes RHBZ#555488 + * Tue Sep 15 2009 Orcan Ogetbil - 0.9.4-1 - Update to 0.9.4 diff --git a/sources b/sources index b7d6530..c3c576a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -69b0e35a5bba8151347c5e6ec9e8e4f3 hydrogen-0.9.4.tar.gz +a328cc1286934747172e2e92e58bc1f4 hydrogen-0.9.4.1.tar.gz diff --git a/wasp-linking.patch b/wasp-linking.patch new file mode 100644 index 0000000..13272f1 --- /dev/null +++ b/wasp-linking.patch @@ -0,0 +1,65 @@ +diff -rupN 0.9.4.1.old/plugins/wasp/wasp_booster/wasp_booster.pro 0.9.4.1/plugins/wasp/wasp_booster/wasp_booster.pro +--- 0.9.4.1.old/plugins/wasp/wasp_booster/wasp_booster.pro 2007-06-18 14:30:19.000000000 -0400 ++++ 0.9.4.1/plugins/wasp/wasp_booster/wasp_booster.pro 2010-04-10 06:43:30.000000000 -0400 +@@ -5,14 +5,15 @@ QT -= core + DESTDIR = ../../ + INCLUDEPATH += ../include + SOURCES += booster.c ++QMAKE_LFLAGS_PLUGIN += -nostartfiles + + linux-g++* { + CONFIG = plugin + + # there's something weird in linux qmake...this is a simple and ugly workaround +- QMAKE_LINK_SHLIB_CMD = ld -shared -o libwasp_booster.so booster.o ++ #QMAKE_LINK_SHLIB_CMD = gcc -nostartfiles -lm -shared booster.o -o libwasp_booster.so + } + + win32 { + CONFIG = dll +-} +\ No newline at end of file ++} +diff -rupN 0.9.4.1.old/plugins/wasp/wasp_noisifier/wasp_noisifier.pro 0.9.4.1/plugins/wasp/wasp_noisifier/wasp_noisifier.pro +--- 0.9.4.1.old/plugins/wasp/wasp_noisifier/wasp_noisifier.pro 2007-06-18 14:30:19.000000000 -0400 ++++ 0.9.4.1/plugins/wasp/wasp_noisifier/wasp_noisifier.pro 2010-04-10 06:44:36.000000000 -0400 +@@ -5,14 +5,15 @@ QT -= core + DESTDIR = ../../ + INCLUDEPATH += ../include + SOURCES += noisifier.c ++QMAKE_LFLAGS_PLUGIN += -nostartfiles + + linux-g++* { + CONFIG = plugin + + # there's something weird in linux qmake...this is a simple and ugly workaround +- QMAKE_LINK_SHLIB_CMD = ld -shared -o libwasp_noisifier.so noisifier.o ++ #QMAKE_LINK_SHLIB_CMD = gcc -lm -shared -o wasp_noisifier.so noisifier.o + } + + win32 { + CONFIG = dll +-} +\ No newline at end of file ++} +diff -rupN 0.9.4.1.old/plugins/wasp/wasp_xshaper/wasp_xshaper.pro 0.9.4.1/plugins/wasp/wasp_xshaper/wasp_xshaper.pro +--- 0.9.4.1.old/plugins/wasp/wasp_xshaper/wasp_xshaper.pro 2007-06-18 14:30:19.000000000 -0400 ++++ 0.9.4.1/plugins/wasp/wasp_xshaper/wasp_xshaper.pro 2010-04-10 06:44:55.000000000 -0400 +@@ -5,13 +5,14 @@ QT -= core + DESTDIR = ../../ + INCLUDEPATH += ../include + SOURCES += xshaper.c ++QMAKE_LFLAGS_PLUGIN += -nostartfiles + + linux-g++* { + CONFIG = plugin + # there's something weird in linux qmake...this is a simple and ugly workaround +- QMAKE_LINK_SHLIB_CMD = ld -shared -o libwasp_xshaper.so xshaper.o ++ #QMAKE_LINK_SHLIB_CMD = gcc -lm -shared -o wasp_xshaper.so xshaper.o + } + + win32 { + CONFIG = dll +-} +\ No newline at end of file ++}