From dda36349496e0987f0ccf4f23929f7870ba11813 Mon Sep 17 00:00:00 2001 From: rhatto Date: Wed, 3 Sep 2008 03:50:43 +0000 Subject: merging with changes made since 21th May git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1903 370017ae-e619-0410-ac65-c121f96126d4 --- media/sound/hydrogen/hydrogen-0.9.3.diff | 1088 +++++++++++++++++------------- media/sound/hydrogen/hydrogen.SlackBuild | 218 +++--- media/sound/hydrogen/slack-required | 5 +- 3 files changed, 742 insertions(+), 569 deletions(-) (limited to 'media/sound/hydrogen') diff --git a/media/sound/hydrogen/hydrogen-0.9.3.diff b/media/sound/hydrogen/hydrogen-0.9.3.diff index d47db8d9..1f0dc30a 100644 --- a/media/sound/hydrogen/hydrogen-0.9.3.diff +++ b/media/sound/hydrogen/hydrogen-0.9.3.diff @@ -1,83 +1,599 @@ ---- hydrogen-0.9.3/src/lib/xml/tinyxml.h~ 2006-03-15 15:43:13.000000000 +0000 -+++ hydrogen-0.9.3/src/lib/xml/tinyxml.h 2006-03-15 15:43:33.000000000 +0000 -@@ -823,9 +823,9 @@ - #endif - - /// Construct. -- TiXmlDeclaration::TiXmlDeclaration( const char * _version, -- const char * _encoding, -- const char * _standalone ); -+ TiXmlDeclaration( const char * _version, -+ const char * _encoding, -+ const char * _standalone ); +diff -Naur hydrogen-0.9.3.orig/Makefile.in hydrogen-0.9.3/Makefile.in +--- hydrogen-0.9.3.orig/Makefile.in 2005-11-10 16:00:08.000000000 -0200 ++++ hydrogen-0.9.3/Makefile.in 2008-07-24 19:43:46.000000000 -0300 +@@ -225,7 +225,7 @@ + mkdir -p $(DESTDIR)$(prefix)/share/hydrogen/data/ + cp -R data $(DESTDIR)$(prefix)/share/hydrogen + mkdir -p $(DESTDIR)$(prefix)/share/hydrogen/data/ +- @install -vD hydrogen.desktop $(DESTDIR)$(prefix)/share/applications/hydrogen.desktop ++ @install -vD -m 644 hydrogen.desktop $(DESTDIR)$(prefix)/share/applications/hydrogen.desktop + cd plugins;make install;cd .. + + +diff -Naur hydrogen-0.9.3.orig/configure.in hydrogen-0.9.3/configure.in +--- hydrogen-0.9.3.orig/configure.in 2006-01-18 20:02:37.000000000 -0200 ++++ hydrogen-0.9.3/configure.in 2008-07-24 19:43:40.000000000 -0300 +@@ -367,6 +367,8 @@ + echo "--- Checking for PortAudio -------------------------------------" - virtual ~TiXmlDeclaration() {} + portaudio_support=false ++AC_ARG_ENABLE(portaudio, [ --disable-portaudio Compile without portaudio support], [want_portaudio=$enableval]) ++if test "x$want_portaudio" != "xno"; then + AC_MSG_CHECKING([whether PORTAUDIOPATH environment variable is set]) + if test "x$PORTAUDIOPATH" = "x"; then + AC_MSG_RESULT(PORTAUDIOPATH is not set. No PortAudio support.) +@@ -389,6 +391,7 @@ + echo "-----------------------------------------------------------------" + echo "" - ---- hydrogen-0.9.3/src/tools/HydrogenPlayer.cpp~ 2007-04-01 21:01:06.000000000 +0000 -+++ hydrogen-0.9.3/src/tools/HydrogenPlayer.cpp 2007-04-01 21:01:28.000000000 +0000 -@@ -25,6 +25,7 @@ ++fi - #include -+#include - #include - #include - #include ---- hydrogen-0.9.3/src/gui/DrumkitManager.cpp~ 2007-04-01 21:03:50.000000000 +0000 -+++ hydrogen-0.9.3/src/gui/DrumkitManager.cpp 2007-04-01 21:03:58.000000000 +0000 -@@ -22,6 +22,7 @@ - * - */ - #include -+#include - - #include "config.h" - #include "Skin.h" ---- hydrogen-0.9.3/src/gui/HydrogenApp.cpp~ 2007-04-01 21:04:29.000000000 +0000 -+++ hydrogen-0.9.3/src/gui/HydrogenApp.cpp 2007-04-01 21:04:37.000000000 +0000 -@@ -46,6 +46,7 @@ - #include "LadspaFXProperties.h" - #include "SongEditor/SongEditorPanel.h" - -+#include - #include - #include - #include ---- hydrogen-0.9.3/src/gui/main.cpp~ 2007-04-01 21:05:56.000000000 +0000 -+++ hydrogen-0.9.3/src/gui/main.cpp 2007-04-01 21:06:04.000000000 +0000 -@@ -42,6 +42,7 @@ - #include "lib/DataPath.h" - #include "lib/Exception.h" - -+#include - #include - using namespace std; - ---- hydrogen-0.9.3/src/lib/FLACFile.cpp -+++ hydrogen-0.9.3/src/lib/FLACFile.cpp -@@ -39,6 +39,8 @@ - #undef LEGACY_FLAC - #endif -+#include +diff -Naur hydrogen-0.9.3.orig/configure.in~ hydrogen-0.9.3/configure.in~ +--- hydrogen-0.9.3.orig/configure.in~ 1969-12-31 21:00:00.000000000 -0300 ++++ hydrogen-0.9.3/configure.in~ 2006-01-18 20:02:37.000000000 -0200 +@@ -0,0 +1,557 @@ ++d added Qt .dylib search for OS X systems (2004/12/17 Jonathan Dempsey) + - - /// Reads a FLAC file...not optimized yet - class FLACFile_real : public FLAC::Decoder::File, public Object ---- hydrogen-0.9.3/src/lib/drivers/OssDriver.cpp -+++ hydrogen-0.9.3/src/lib/drivers/OssDriver.cpp -@@ -31,6 +31,8 @@ - - #include - -+#include + - audioProcessCallback ossDriver_audioProcessCallback; - bool ossDriver_running; - pthread_t ossDriverThread; ---- hydrogen-0.9.3/src/lib/FLACFile.cpp.old 2007-02-11 20:12:34.000000000 +0100 -+++ hydrogen-0.9.3/src/lib/FLACFile.cpp 2007-02-11 20:18:25.000000000 +0100 ++dnl Process this file with autoconf to produce a configure script. ++AC_INIT(README) ++#AC_PREREQ(2.58) ++ ++extra_version="" ++hydrogenVersion="0.9.3$extra_version" ++ ++echo " ++ ++----------------------------------------------------------------- ++Starting Hydrogen $hydrogenVersion configuration... ++----------------------------------------------------------------- ++ ++" ++#ac_qmake_lflags="-static" ++#AC_SUBST(ac_qmake_lflags) ++ ++ ++# static build ++#ac_libraries=-static ++ ++ ++AC_DEFINE_UNQUOTED(VERSION, "${hydrogenVersion}", [Version]) ++ ++ ++AC_CONFIG_HEADER(config.h) ++ ++dnl Set default installation prefix. ++AC_PREFIX_DEFAULT(/usr/local) ++ac_prefix=$prefix ++if test "x$ac_prefix" = "xNONE"; then ++ ac_prefix=$ac_default_prefix ++fi ++AC_SUBST(ac_prefix) ++AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.]) ++ ++ ++AC_ARG_ENABLE(profile, [ --enable-profile enable profile info (default=no)], [useProfile="yes"], [useProfile="no"]) ++if test "x$useProfile" = "xyes"; then ++ ac_qmake_cflags="-pg" ++ ac_qmake_cxxflags="-pg" ++ ac_qmake_lflags="-pg" ++ AC_SUBST(ac_qmake_cflags) ++ AC_SUBST(ac_qmake_cxxflags) ++ AC_SUBST(ac_qmake_lflags) ++fi ++ ++dnl Enable debugging argument option. ++AC_ARG_ENABLE(debug, [ --enable-debug enable debugging (default=no)], [ac_debug="debug"], [ac_debug="release"]) ++AC_SUBST(ac_debug) ++if test "x$ac_debug" = "xdebug"; then ++ AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) ++ features_list="${features_list} (Debug)" ++ echo " * Debug mode enabled." ++# CXXFLAGS="${CXXFLAGS} -g -O3" ++#else ++# CXXFLAGS="${CXXFLAGS} -O3" ++fi ++ ++ladspa_enabled=yes ++AC_ARG_ENABLE(ladspa, [ --disable-ladspa disable LADSPA support (default=no)], [ladspa_enabled=$enableval]) ++ ++if test "x$ladspa_enabled" = "xyes"; then ++ AC_DEFINE(LADSPA_SUPPORT, 1, [Define if LADSPA support is enabled.]) ++else ++ echo " * LADSPA support disabled." ++fi ++ ++ ++dnl Checks for programs. ++AC_PROG_CC ++AC_PROG_CPP ++AC_PROG_CXX ++AC_PROG_CXXCPP ++AC_PROG_GCC_TRADITIONAL ++ ++dnl Checks for languages. ++AC_LANG_C ++AC_LANG_CPLUSPLUS ++ ++ ++ ++######################## ++# ++# QT ++# ++##################### ++echo "" ++echo "--- Checking for QT Libs ----------------------------------------" ++ ++#dnl Check for QTDIR environment variable. ++AC_MSG_CHECKING([whether QTDIR environment variable is set]) ++if test "x$QTDIR" = "x"; then ++ # is not set ++ AC_MSG_RESULT([no]) ++ AC_MSG_WARN([QTDIR must be properly set.]) ++ ++ echo " * Searching for Qt library" ++ ac_qtlib="" ++ for X in /usr/share/qt /usr/share/qt3 /usr/lib/qt3 /usr/lib/qt-3.1; do ++ if test "x$ac_qtlib" = "x"; then ++ if test -f $X/lib/libqt-mt.so -o -f $X/lib/libqt-mt.a -o -f $X/lib/libqt-mt.dylib; then ++ ac_qtlib=$X ++ QTDIR=$X ++ echo " |-> searching QT in $X *** Found ***" ++ else ++ echo " |-> searching QT in $X *** Not found ***" ++ fi ++ fi ++ done ++else ++ AC_MSG_RESULT([$QTDIR]) ++ echo " * Searching for Qt library" ++ ac_qtlib="" ++ if test "x$ac_qtlib" = "x"; then ++ if test -f $QTDIR/lib/libqt-mt.so -o -f $QTDIR/lib/libqt-mt.a -o -f $QTDIR/lib/libqt-mt.dylib; then ++ ac_qtlib=$QTDIR ++ echo " |-> searching QT in $QTDIR *** Found ***" ++ else ++ echo " |-> searching QT in $QTDIR *** Not found ***" ++ fi ++ fi ++fi ++ ++#dnl Checks for Qt library. ++#AC_CACHE_CHECK([for Qt library], ++# ac_qtlib, [ ++# for X in qt-mt qt; do ++# if test "x$ac_qtlib" = "x"; then ++# if test -f $QTDIR/lib/lib$X.so -o -f $QTDIR/lib/lib$X.a; then ++# ac_qtlib=$X ++# fi ++# fi ++# done ++#]) ++ ++if test "x$ac_qtlib" = "x"; then ++ AC_MSG_WARN([Qt library not found. Maybe QTDIR isn't properly set.]) ++fi ++AC_SUBST(ac_qtlib) ++ ++ ++#dnl Check for Qt multi-thread support. ++#if test "x$ac_qtlib" = "xqt-mt"; then ++# ac_thread="thread" ++#fi ++#AC_SUBST(ac_thread) ++# ++CFLAGS="$CFLAGS -I$QTDIR/include" ++CPPFLAGS="$CPPFLAGS -I$QTDIR/include" ++LIBS="-L$QTDIR/lib -L/usr/X11R6/lib" ++ ++#AC_CACHE_CHECK([for Qt library version >= 3.1.1], ++# ac_qtlib_version, [ ++# AC_TRY_LINK([#include "qglobal.h"], [ ++#if QT_VERSION < 0x030101 ++#error Qt library 3.1.1 or greater required. ++#endif ++# ], ++# ac_qtlib_version="yes", [ ++# echo "no; Qt 3.1.1 or greater is required" ++# exit ++# ]) ++#]) ++ ++dnl A common error message: ++ac_qtdir_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt3-devel)." ++ ++# Check for Qt qmake utility. ++#AC_PATH_PROG(ac_qmake, qmake, [no], $QTDIR/bin:${PATH}) ++AC_PATH_PROG(ac_qmake, qmake, [no], $QTDIR/bin) ++if test "x$ac_qmake" = "xno"; then ++ AC_MSG_ERROR([qmake $ac_qtdir_errmsg]) ++fi ++AC_SUBST(ac_qmake) ++ ++# Check for Qt moc utility. ++#AC_PATH_PROG(ac_moc, moc, [no], $QTDIR/bin:${PATH}) ++AC_PATH_PROG(ac_moc, moc, [no], $QTDIR/bin) ++if test "x$ac_moc" = "xno"; then ++ AC_MSG_ERROR([moc $ac_qtdir_errmsg]) ++fi ++AC_SUBST(ac_moc) ++ ++# Check for Qt uic utility. ++#AC_PATH_PROG(ac_uic, uic, [no], $QTDIR/bin:${PATH}) ++AC_PATH_PROG(ac_uic, uic, [no], $QTDIR/bin) ++if test "x$ac_uic" = "xno"; then ++ AC_MSG_ERROR([uic $ac_qtdir_errmsg]) ++fi ++AC_SUBST(ac_uic) ++ ++ ++ ++echo "" ++echo "-----------------------------------------------------------------" ++echo "Checking for libraries.." ++echo "-----------------------------------------------------------------" ++ ++ ++ ++dnl Checks for libraries. ++AC_CHECK_LIB(m, main) ++AC_CHECK_LIB(X11, main) ++AC_CHECK_LIB(Xext, main) ++AC_CHECK_LIB($ac_qtlib, main) ++ ++dnl Checks for header files. ++AC_HEADER_STDC ++AC_HEADER_SYS_WAIT ++AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h poll.h) ++ ++dnl Checks for library functions. ++AC_CHECK_FUNCS(system) ++ ++ ++ ++################################# ++# ++# libSndFile ++# ++################################# ++echo "" ++echo "--- Checking for libsndfile -------------------------------------" ++sndfile_found=false ++AC_CHECK_LIB([sndfile], sf_open, sndfile_found=yes) ++#PKG_CHECK_MODULES(LIBSNDFILE, sndfile, sndfile_found=true, sndfile_found=false) ++if test "$sndfile_found" = "false"; then ++ AC_MSG_ERROR("sndfile library not found. Website: http://www.mega-nerd.com/libsndfile/") ++else ++ ac_libraries="${ac_libraries} $( pkg-config --libs sndfile )" ++fi ++echo "-----------------------------------------------------------------" ++echo "" ++ ++ ++ ++ ++###################### ++# ++# FLAC ++# ++######################## ++echo "" ++echo "--- Checking for FLAC++ Libs ------------------------------------" ++flac_support=yes ++AC_ARG_ENABLE(flac_support, [ --disable-flac-support Compile without FLAC support], [flac_support=$enableval]) ++ ++if test "$flac_support" != "no"; then ++ ++ flac_found=no ++ #AC_CHECK_HEADERS(FLAC/file_decoder.h) ++ #AC_CHECK_LIB(FLAC, FLAC__file_decoder_new, flac_found=yes) ++ ++ AC_CHECK_HEADERS(FLAC++/all.h, flac_found=yes) ++ #AC_CHECK_LIB(FLAC++, FLAC::Decoder::File, flac_found=yes) ++ ++ if test "$flac_found" = "no"; then ++ AC_MSG_ERROR("FLAC++ library not found. FLAC website: http://flac.sourceforge.net") ++ else ++ AC_DEFINE(FLAC_SUPPORT, 1, [Define to enable FLAC support]) ++ ac_libraries="${ac_libraries} -lFLAC++ -lFLAC" ++ features_list="${features_list} (FLAC)" ++ fi ++else ++ AC_MSG_WARN("FLAC++ library disabled. WARNING: Many drumkits will not work without FLAC support!!") ++fi ++ ++echo "-----------------------------------------------------------------" ++echo "" ++ ++ ++ ++ ++############################## ++# ++# JACK SUPPORT ++# ++################################ ++echo "" ++echo "--- Checking for JACK -------------------------------------------" ++jack_support=yes ++AC_ARG_ENABLE(jack-support, [ --disable-jack-support Compile without JACK support], [jack_support=$enableval]) ++ ++JACK_SUPPORT=0 ++ ++if test "$jack_support" != "no"; then ++ AC_CHECK_LIB(jack, main, [ac_jack_lib="yes"], [ac_jack_lib="no"]) ++ if test "x$ac_jack_lib" = "xno"; then ++ AC_MSG_WARN([ *** Could not find the JACK library, disabling JACK driver]) ++ else ++ JACK_SUPPORT=1 ++ AC_DEFINE(JACK_SUPPORT, 1, [Define to enable JACK driver]) ++ features_list="${features_list} (Jack)" ++ ac_libraries="${ac_libraries} -ljack" ++ fi ++else ++ echo "JACK support disabled" ++fi ++echo "-----------------------------------------------------------------" ++echo "" ++ ++########################## ++# ++# ALSA ++# ++########################## ++echo "" ++echo "--- Checking for ALSA Libs --------------------------------------" ++ ++use_alsa=yes ++ ++AC_ARG_ENABLE(alsa, [ --disable-alsa Compile without ALSA support], [use_alsa=$enableval]) ++if test "$use_alsa" = "yes"; then ++ alsa_found=no ++ AC_CHECK_HEADERS(alsa/asoundlib.h) ++dnl if test "x${ac_cv_header_alsa_asoundlib_h}" = xyes ; then ++dnl fi ++ ++ AC_CHECK_LIB(asound, snd_seq_open, alsa_found=yes) ++ if test "$alsa_found" = "no" ; then ++ AC_MSG_WARN([ *** Could not find the ALSA library, disabling ALSA support]) ++ else ++ AC_DEFINE( ALSA_SUPPORT, 1, [Define to use ALSA Audio support]) ++ features_list="${features_list} (Alsa)" ++ ac_libraries="${ac_libraries} -lasound" ++ fi ++else ++ echo "ALSA support disabled." ++fi ++ ++echo "-----------------------------------------------------------------" ++echo "" ++ ++ ++########################## ++# ++# OSS SUPPORT ++# ++########################## ++echo "" ++echo "--- Checking for OSS --------------------------------------------" ++oss_support=yes ++ ++AC_ARG_ENABLE(oss-support, [ --disable-oss-support Compile without OSS support], [oss_support=$enableval]) ++if test "$oss_support" = "yes"; then ++ AC_DEFINE(OSS_SUPPORT, 1, [Define to enable OSS driver]) ++ features_list="${features_list} (OSS)" ++else ++ echo "OSS support disabled." ++fi ++ ++echo "-----------------------------------------------------------------" ++echo "" ++ ++ ++ ++################################# ++# ++# PortAudio ++# ++################################# ++echo "" ++echo "--- Checking for PortAudio -------------------------------------" ++ ++portaudio_support=false ++AC_MSG_CHECKING([whether PORTAUDIOPATH environment variable is set]) ++if test "x$PORTAUDIOPATH" = "x"; then ++ AC_MSG_RESULT(PORTAUDIOPATH is not set. No PortAudio support.) ++else ++ AC_MSG_RESULT("[$PORTAUDIOPATH]") ++ if test -f $PORTAUDIOPATH/pa_unix_oss/libportaudio.so; then ++ echo " |-> searching PortAudio in $PORTAUDIOPATH *** Found ***" ++ ac_libraries="${ac_libraries} -L${PORTAUDIOPATH}/pa_unix_oss -lportaudio" ++ features_list="${features_list} (PortAudio)" ++ AC_DEFINE(PORTAUDIO_SUPPORT, 1, [Define to enable PortAudio driver]) ++ ++ ac_qmake_cxxflags="$ac_qmake_cxxflags -I$PORTAUDIOPATH/pa_common" ++ AC_SUBST(ac_qmake_cxxflags) ++ portaudio_support=true ++ else ++ echo " |-> searching PortAudio in $PORTAUDIOPATH *** Not found ***" ++ fi ++ ++fi ++echo "-----------------------------------------------------------------" ++echo "" ++ ++ ++ ++ ++################################# ++# ++# PortMidi ++# ++################################# ++echo "" ++echo "--- Checking for PortMidi -------------------------------------" ++portmidi_support=false ++AC_MSG_CHECKING([whether PORTMIDIPATH environment variable is set]) ++if test "x$PORTMIDIPATH" = "x"; then ++ AC_MSG_RESULT(PORTMIDIPATH is not set. No PortMidi support.) ++else ++ AC_MSG_RESULT("[$PORTMIDIPATH]") ++ if test -f $PORTMIDIPATH/pm_linux/libportmidi.a; then ++ echo " |-> searching PortMidi in $PORTMIDIPATH *** Found ***" ++ ac_libraries="${ac_libraries} ${PORTMIDIPATH}/pm_linux/libportmidi.a ${PORTMIDIPATH}/porttime/libporttime.a" ++ features_list="${features_list} (PortMidi)" ++ AC_DEFINE(PORTMIDI_SUPPORT, 1, [Define to enable PortMidi driver]) ++ ++ ac_qmake_cxxflags="$ac_qmake_cxxflags -I$PORTMIDIPATH/pm_common -I$PORTMIDIPATH/porttime" ++ AC_SUBST(ac_qmake_cxxflags) ++ portmidi_support=true ++ else ++ echo " |-> searching PortMidi in $PORTMIDIPATH *** Not found ***" ++ fi ++ ++fi ++ ++echo "-----------------------------------------------------------------" ++echo "" ++ ++ ++ ++ ++################################## ++# ++# LRDF ++# ++################################### ++echo "" ++echo "--- Checking for LRDF -------------------------------------------" ++LRDF_SUPPORT=0 ++lrdf_check=yes ++AC_ARG_ENABLE(lrdf-support, [ --disable-lrdf-support Compile without LRDF support], [lrdf_check=$enableval]) ++if test "$lrdf_check" = "yes"; then ++ lrdf_found=no ++ AC_CHECK_HEADERS(lrdf.h, lrdf_found=yes) ++# AC_CHECK_LIB(lrdf, lrdf_init, lrdf_found=yes) ++ if test "$lrdf_found" = "no" ; then ++ AC_MSG_WARN([ *** Could not find the LRDF library]) ++ else ++ LRDF_SUPPORT=1 ++ AC_DEFINE(LRDF_SUPPORT, 1, [Define to enable LRDF support]) ++ ac_libraries="${ac_libraries} -llrdf -lraptor -lxml2" ++ features_list="${features_list} (LRDF)" ++ fi ++fi ++echo "-----------------------------------------------------------------" ++echo "" ++ ++ ++ ++################################## ++# ++# define the DATA path ++# ++################################### ++AC_DEFINE_UNQUOTED(DATA_PATH, "${ac_prefix}/share/hydrogen/data", [Data dir]) ++AC_DEFINE_UNQUOTED(COMPILED_FEATURES, "${features_list}", [Compiled features]) ++ ++ ++ ++ ++AC_SUBST(ac_libraries) ++ ++ ++AC_OUTPUT( ++Makefile ++hydrogen.pro ++hydrogenPlayer.pro ++hydrogenBenchmark.pro ++hydrogen2Midi.pro ++hydrogenCUI.pro ++hydrogen.desktop ++plugins/Makefile ++plugins/wasp/Makefile ++) ++ ++ ++echo " ++ ++----------------------------------------------------------------- ++ Hydrogen ${hydrogenVersion} configuration: ++----------------------------------------------------------------- ++ ++ Source code location: ${srcdir} ++ Prefix ${ac_prefix} ++ Data path ${ac_prefix}/share/hydrogen ++ LDFLAGS ${ac_libraries} ++" ++if test "x$ac_debug" = "xdebug"; then ++ echo " Debug messages: yes" ++else ++ echo " Debug messages: no" ++fi ++ ++if test "${flac_found}" = "yes"; then ++ echo " FLAC: yes" ++else ++ echo " FLAC: no" ++fi ++ ++if test "${LRDF_SUPPORT}" = "1"; then ++ echo " LRDF: yes" ++else ++ echo " LRDF: no" ++fi ++ ++echo "" ++ ++if test "${JACK_SUPPORT}" = "1"; then ++ echo " Jack: yes" ++else ++ echo " Jack: no" ++fi ++ ++if test "${alsa_found}" = "yes"; then ++ echo " ALSA : yes" ++else ++ echo " ALSA : no" ++fi ++ ++if test "${oss_support}" = "yes"; then ++ echo " OSS: yes" ++else ++ echo " OSS: no" ++fi ++ ++ ++if test "${portaudio_support}" = "true"; then ++ echo " PortAudio yes" ++else ++ echo " PortAudio no" ++fi ++ ++if test "${portmidi_support}" = "true"; then ++ echo " PortMidi: yes" ++else ++ echo " PortMidi: no" ++fi ++ ++ ++echo " ++ Features list = ${features_list} ++ ++----------------------------------------------------------------- ++Now type make to build Hydrogen. ++----------------------------------------------------------------- ++ ++If you're not a member of hydrogen-dev mailing list yet, please join. ++Please see http://www.hydrogen-music.org for details. ++ ++" +diff -Naur 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 2005-11-08 07:31:22.000000000 -0200 ++++ hydrogen-0.9.3/src/lib/FLACFile.cpp 2008-07-24 19:43:59.000000000 -0300 @@ -33,6 +33,13 @@ //#include "FLAC/file_decoder.h" #include @@ -120,416 +636,16 @@ +#endif } ---- a/hydrogen-0.9.3/data/demo_songs/TR808kit-demo.h2song 2005-10-18 00:32:04.000000000 +0200 -+++ b/hydrogen-0.9.3/data/demo_songs/TR808kit-demo.h2song 2007-06-05 15:33:19.000000000 +0200 -@@ -1,5 +1,5 @@ - -- 0.9.2-cvs -+ 0.9.3 - 125 - 0.71 - 0.5 -@@ -7,10 +7,14 @@ - ArtemioLabs - Demo patterns for the TR-808 Emulation Kit. - true -- song -+ pattern - 0 - 0 - 0 -+ false -+ 1 -+ 0.4 -+ 48 - - - 0 -@@ -18,8 +22,10 @@ - Kick Long - 1 - false -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -44,8 +50,10 @@ - Kick Short - 1 - false -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -70,8 +78,10 @@ - Snare 1 - 1 - false -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -96,8 +106,10 @@ - Snare 2 - 1 - false -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -122,8 +134,10 @@ - Clap - 1 - false -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -148,8 +162,10 @@ - Tom Low - 0.77 - false -+ false - 1 - 0.52 -+ 1 - 0 - 0 - 0 -@@ -174,8 +190,10 @@ - Tom Mid - 0.79 - false -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -200,8 +218,10 @@ - Tom Hi - 0.79 - false -+ false - 0.48 - 1 -+ 1 - 0 - 0 - 0 -@@ -226,8 +246,10 @@ - Closed Hat - 1 - false -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -252,8 +274,10 @@ - Pedal Hat - 1 - false -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -278,8 +302,10 @@ - Open Hat - 1 - false -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -304,8 +330,10 @@ - Cymbal - 0.82 - false -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -330,8 +358,10 @@ - Shaker - 0.84 - false -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -356,8 +386,10 @@ - Conga - 0.88 - false -+ false - 0.9 - 1 -+ 1 - 0 - 0 - 0 -@@ -382,8 +414,10 @@ - Clave - 0.84 - false -+ false - 0.96 - 1 -+ 1 - 0 - 0 - 0 -@@ -408,8 +442,10 @@ - Cowbell - 0.85 - false -+ false - 0.96 - 1 -+ 1 - 0 - 0 - 0 -@@ -434,8 +470,10 @@ - 17 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -453,8 +491,10 @@ - 18 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -472,8 +512,10 @@ - 19 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -491,8 +533,10 @@ - 20 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -510,8 +554,10 @@ - 21 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -529,8 +575,10 @@ - 22 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -548,8 +596,10 @@ - 23 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -567,8 +617,10 @@ - 24 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -586,8 +638,10 @@ - 25 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -605,8 +659,10 @@ - 26 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -624,8 +680,10 @@ - 27 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -643,8 +701,10 @@ - 28 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -662,8 +722,10 @@ - 29 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -681,8 +743,10 @@ - 30 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -700,8 +764,10 @@ - 31 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -719,8 +785,10 @@ - 32 - 0.8 - true -+ false - 1 - 1 -+ 1 - 0 - 0 - 0 -@@ -1602,15 +1670,6 @@ - -1 - 9 - -- -- 168 -- 0.8 -- 1 -- 1 -- 0 -- -1 -- 9 -- - - - -@@ -1792,7 +1851,17 @@ - - - -- -+ -+ -+ 156 -+ 0.8 -+ 1 -+ 1 -+ 0 -+ -1 -+ 26 -+ -+ - - - - + +diff -Naur hydrogen-0.9.3.orig/src/lib/xml/tinyxml.h hydrogen-0.9.3/src/lib/xml/tinyxml.h +--- hydrogen-0.9.3.orig/src/lib/xml/tinyxml.h 2005-10-17 20:32:04.000000000 -0200 ++++ hydrogen-0.9.3/src/lib/xml/tinyxml.h 2008-07-24 19:44:04.000000000 -0300 +@@ -823,7 +823,7 @@ + #endif + + /// Construct. +- TiXmlDeclaration::TiXmlDeclaration( const char * _version, ++ TiXmlDeclaration( const char * _version, + const char * _encoding, + const char * _standalone ); + diff --git a/media/sound/hydrogen/hydrogen.SlackBuild b/media/sound/hydrogen/hydrogen.SlackBuild index fda2692b..11f4b7b7 100755 --- a/media/sound/hydrogen/hydrogen.SlackBuild +++ b/media/sound/hydrogen/hydrogen.SlackBuild @@ -1,104 +1,163 @@ #!/bin/bash # -# hydrogen.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# hydrogen.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# hydrogen.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# hydrogen.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for hydrogen -# by rhatto at riseup.net +# slackbuild for hydrogen, by Silvio Rhatto +# requires: libsndfile +# tested: hydrogen-0.9.3 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building hydrogen are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="hydrogen" +# Set variables +CWD="$(pwd)" +SRC_NAME="hydrogen" +PKG_NAME="hydrogen" ARCH=${ARCH:=i486} -VERSION=${VERSION:=0.9.3} +SRC_VERSION=${VERSION:=0.9.3} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://easynews.dl.sourceforge.net/sourceforge/hydrogen/$SRC" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" -fi +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://downloads.sourceforge.net/hydrogen/$SRC" -tar xvf$tarflag $SRC_DIR/$SRC -cd $PACKAGE-$VERSION - -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -cd $TMP/package-$PACKAGE +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog README" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. @@ -114,18 +173,13 @@ hydrogen: pan capabilities, and import of samples in wave, au, and aiff format. hydrogen: hydrogen: hydrogen: -EOF +EODESC -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION - -for file in AUTHORS COPYING ChangeLog INSTALL README; do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/sound/hydrogen/slack-required b/media/sound/hydrogen/slack-required index 7d55e12e..c98af1ab 100644 --- a/media/sound/hydrogen/slack-required +++ b/media/sound/hydrogen/slack-required @@ -1 +1,4 @@ -libsndfile +# Dependency list to hydrogen +# +# dependency [condition] [version]] +libsndfile -- cgit v1.2.3