projectm: adopt, Qt{4->5}, {2->3}1.3, patch rpath, clean-up closure
Co-Authored-By: ajs124 <git@ajs124.de>
This commit is contained in:
parent
259f344ae6
commit
247b546889
|
@ -1,57 +1,63 @@
|
||||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, cmake
|
{ mkDerivation
|
||||||
, glew, ftgl, ttf_bitstream_vera
|
, lib
|
||||||
, withQt ? true, qt4
|
, fetchFromGitHub
|
||||||
, withLibvisual ? false, libvisual, SDL
|
, autoreconfHook
|
||||||
, withJack ? false, libjack2
|
, pkgconfig
|
||||||
, withPulseAudio ? true, libpulseaudio
|
, SDL2
|
||||||
|
, qtdeclarative
|
||||||
|
, libpulseaudio
|
||||||
|
, glm
|
||||||
|
, which
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert withJack -> withQt;
|
mkDerivation rec {
|
||||||
assert withPulseAudio -> withQt;
|
pname = "projectm";
|
||||||
|
version = "3.1.3";
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
src = fetchFromGitHub {
|
||||||
name = "projectm-2.1.0";
|
owner = "projectM-visualizer";
|
||||||
|
repo = "projectM";
|
||||||
meta = {
|
rev = "v${version}";
|
||||||
description = "Music Visualizer";
|
sha256 = "1mjnahr694phksmvc069y89rv85s4l2z9fixkc3l1f5qj2vgn4sy";
|
||||||
homepage = "http://projectm.sourceforge.net/";
|
|
||||||
license = stdenv.lib.licenses.lgpl21Plus;
|
|
||||||
platforms = stdenv.lib.platforms.linux;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
src = fetchurl {
|
nativeBuildInputs = [
|
||||||
url = "mirror://sourceforge/projectm/2.1.0/projectM-complete-2.1.0-Source.tar.gz";
|
pkgconfig
|
||||||
sha256 = "1vh6jk68a0jdb6qwppb6f8cbgmhnv2ba3bcavzfd6sq06gq08cji";
|
autoreconfHook
|
||||||
};
|
which
|
||||||
|
|
||||||
patch_gcc6 = fetchpatch {
|
|
||||||
url = "https://raw.githubusercontent.com/gentoo/gentoo/45abd63abc6644b6e177c057b5b42d894dbf8e29/media-libs/libprojectm/files/libprojectm-2.1.0-fix-c++14.patch";
|
|
||||||
sha256 = "1i50scxv1jlqvb3jm3sql89a7wqckxhlpvnhz20vvmm1kii6lrsn";
|
|
||||||
};
|
|
||||||
|
|
||||||
patchPhase = ''
|
|
||||||
patch -d src/libprojectM -p1 -i "$patch_gcc6"
|
|
||||||
sed -i 's:''${LIBVISUAL_PLUGINSDIR}:''${CMAKE_INSTALL_PREFIX}/lib/libvisual-0.4:' \
|
|
||||||
src/projectM-libvisual/CMakeLists.txt
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig cmake ];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DprojectM_FONT_MENU=${ttf_bitstream_vera}/share/fonts/truetype/VeraMono.ttf"
|
|
||||||
"-DprojectM_FONT_TITLE=${ttf_bitstream_vera}/share/fonts/truetype/Vera.ttf"
|
|
||||||
"-DINCLUDE-PROJECTM-TEST=OFF"
|
|
||||||
"-DINCLUDE-PROJECTM-QT=${if withQt then "ON" else "OFF"}"
|
|
||||||
"-DINCLUDE-PROJECTM-LIBVISUAL=${if withLibvisual then "ON" else "OFF"}"
|
|
||||||
"-DINCLUDE-PROJECTM-JACK=${if withJack then "ON" else "OFF"}"
|
|
||||||
"-DINCLUDE-PROJECTM-PULSEAUDIO=${if withPulseAudio then "ON" else "OFF"}"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with stdenv.lib;
|
buildInputs = [
|
||||||
[ glew ftgl ]
|
SDL2
|
||||||
++ optional withQt qt4
|
qtdeclarative
|
||||||
++ optionals withLibvisual [ libvisual SDL ]
|
libpulseaudio
|
||||||
++ optional withJack libjack2
|
glm
|
||||||
++ optional withPulseAudio libpulseaudio
|
];
|
||||||
;
|
|
||||||
|
configureFlags = [
|
||||||
|
"--enable-qt"
|
||||||
|
"--enable-sdl"
|
||||||
|
];
|
||||||
|
|
||||||
|
fixupPhase = ''
|
||||||
|
# NOTE: 2019-10-05: Upstream inserts the src path buring build into ELF rpath, so must delete it out
|
||||||
|
# upstream report: https://github.com/projectM-visualizer/projectm/issues/245
|
||||||
|
for entry in $out/bin/* ; do
|
||||||
|
patchelf --set-rpath "$(patchelf --print-rpath $entry | tr ':' '\n' | grep -v 'src/libprojectM' | tr '\n' ':')" "$entry"
|
||||||
|
done
|
||||||
|
wrapQtApp $out/bin/projectM-pulseaudio
|
||||||
|
rm $out/bin/projectM-unittest
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "https://github.com/projectM-visualizer/projectm";
|
||||||
|
description = "Cross-platform Milkdrop-compatible music visualizer";
|
||||||
|
license = lib.licenses.lgpl21;
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
maintainers = with lib.maintainers; [ ajs124 ];
|
||||||
|
longDescription = ''
|
||||||
|
The open-source project that reimplements the esteemed Winamp Milkdrop by Geiss in a more modern, cross-platform reusable library.
|
||||||
|
Read an audio input and produces mesmerizing visuals, detecting tempo, and rendering advanced equations into a limitless array of user-contributed visualizations.
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6093,7 +6093,7 @@ in
|
||||||
|
|
||||||
projectlibre = callPackage ../applications/misc/projectlibre { };
|
projectlibre = callPackage ../applications/misc/projectlibre { };
|
||||||
|
|
||||||
projectm = callPackage ../applications/audio/projectm { };
|
projectm = libsForQt5.callPackage ../applications/audio/projectm { };
|
||||||
|
|
||||||
proot = callPackage ../tools/system/proot { };
|
proot = callPackage ../tools/system/proot { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue