aboutsummaryrefslogtreecommitdiff
path: root/pkgs/applications/audio/pianobooster
diff options
context:
space:
mode:
authorCillian de Róiste <goibhniu@fsfe.org>2014-01-25 17:54:28 +0100
committerCillian de Róiste <goibhniu@fsfe.org>2014-01-25 17:54:57 +0100
commit3ee043da54292305a10c869a56606f5e44663556 (patch)
treebe5b618f764eef1637d5327d127f3eabe465a27d /pkgs/applications/audio/pianobooster
parentdd409f09d6b114a74c92221427574362d6098b95 (diff)
pianobooster: patch to build with gcc4.7, wrap it so it finds libGL.so.1
Also add linux as a platform. Patches from: https://github.com/gbin/gbin-overlay/tree/master/media-sound/pianobooster
Diffstat (limited to 'pkgs/applications/audio/pianobooster')
-rw-r--r--pkgs/applications/audio/pianobooster/default.nix15
-rw-r--r--pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake-gcc4.7.patch11
-rw-r--r--pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake.patch44
3 files changed, 68 insertions, 2 deletions
diff --git a/pkgs/applications/audio/pianobooster/default.nix b/pkgs/applications/audio/pianobooster/default.nix
index d5cdffbed952..67848cdc804b 100644
--- a/pkgs/applications/audio/pianobooster/default.nix
+++ b/pkgs/applications/audio/pianobooster/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, alsaLib, cmake, qt4 }:
+{ stdenv, fetchurl, alsaLib, cmake, mesa, makeWrapper, qt4 }:
stdenv.mkDerivation rec {
name = "pianobooster-${version}";
@@ -9,14 +9,25 @@ stdenv.mkDerivation rec {
sha256 = "1xwyap0288xcl0ihjv52vv4ijsjl0yq67scc509aia4plmlm6l35";
};
+ patches = [
+ ./pianobooster-0.6.4b-cmake.patch
+ ./pianobooster-0.6.4b-cmake-gcc4.7.patch
+ ];
+
preConfigure = "cd src";
- buildInputs = [ alsaLib cmake qt4 ];
+ buildInputs = [ alsaLib cmake makeWrapper mesa qt4 ];
+
+ postInstall = ''
+ wrapProgram $out/bin/pianobooster \
+ --prefix LD_LIBRARY_PATH : ${mesa}/lib
+ '';
meta = with stdenv.lib; {
description = "A MIDI file player that teaches you how to play the piano";
homepage = http://pianobooster.sourceforge.net;
license = licenses.gpl3;
+ platforms = platforms.linux;
maintainers = [ maintainers.goibhniu ];
};
}
diff --git a/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake-gcc4.7.patch b/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake-gcc4.7.patch
new file mode 100644
index 000000000000..2b1b28c5a849
--- /dev/null
+++ b/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake-gcc4.7.patch
@@ -0,0 +1,11 @@
+--- pianobooster-src-0.6.4b/src/CMakeLists.txt.orig 2013-04-06 10:48:02.469532914 -0700
++++ pianobooster-src-0.6.4b/src/CMakeLists.txt 2013-04-06 10:48:12.989532445 -0700
+@@ -203,8 +203,6 @@
+ ${PIANOBOOSTER_UI_HDRS} )
+ ENDIF(WIN32)
+
+-SET_TARGET_PROPERTIES(pianobooster PROPERTIES LINK_FLAGS "-mwindows")
+-
+ IF (USE_PCH)
+ ADD_PRECOMPILED_HEADER( pianobooster ${CMAKE_CURRENT_SOURCE_DIR}/precompile/precompile.h )
+ ENDIF (USE_PCH)
diff --git a/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake.patch b/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake.patch
new file mode 100644
index 000000000000..8cdd8738e2b3
--- /dev/null
+++ b/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake.patch
@@ -0,0 +1,44 @@
+--- pianobooster-src-0.6.4b/src/CMakeLists.txt.orig
++++ pianobooster-src-0.6.4b/src/CMakeLists.txt
+@@ -2,12 +2,6 @@
+ # for the debug build type cmake -DCMAKE_BUILD_TYPE=Debug
+ SET(CMAKE_BUILD_TYPE Release)
+ SET(CMAKE_VERBOSE_MAKEFILE OFF)
+-SET(USE_FLUIDSYNTH OFF)
+-
+-# The inplace directory is mainly for windows builds
+-# SET(FLUIDSYNTH_INPLACE_DIR C:/download/misc/ljb/fluidsynth-1.0.9)
+-SET(FLUIDSYNTH_INPLACE_DIR /home/louis/build/fluidsynth-1.0.9)
+-
+
+ # Testing precompiled headers it does not work -- leave as OFF.
+ SET(USE_PCH OFF)
+@@ -78,18 +72,7 @@
+ ADD_DEFINITIONS(-DPB_USE_FLUIDSYNTH)
+ MESSAGE("Building using fluidsynth")
+ SET( PB_BASE_SRCS MidiDeviceFluidSynth.cpp )
+-
+- IF(FLUIDSYNTH_INPLACE_DIR)
+- INCLUDE_DIRECTORIES(${FLUIDSYNTH_INPLACE_DIR}/include/)
+- IF(WIN32)
+- LINK_LIBRARIES( ${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.dll.a)
+- ENDIF(WIN32)
+- IF(UNIX)
+- LINK_LIBRARIES(${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.so)
+- ENDIF(UNIX)
+- ELSEIF(FLUIDSYNTH_INPLACE_DIR)
+- LINK_LIBRARIES( fluidsynth)
+- ENDIF(FLUIDSYNTH_INPLACE_DIR)
++ LINK_LIBRARIES(fluidsynth)
+ ENDIF(USE_FLUIDSYNTH)
+
+
+@@ -214,8 +197,6 @@
+ INSTALL(TARGETS pianobooster RUNTIME DESTINATION bin)
+ #INSTALL( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kmidimon )
+
+-INSTALL( FILES ../README.txt DESTINATION share/doc/pianobooster )
+-
+ INSTALL ( FILES images/pianobooster.png DESTINATION share/pixmaps )
+
+