2018-07-21 00:44:44 +00:00
|
|
|
{ stdenv, darwin, fetchsvn, autoconf, automake, pkgconfig, makeWrapper, SDL2 }:
|
2017-08-26 22:23:31 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "smpeg2-svn${version}";
|
|
|
|
version = "412";
|
|
|
|
|
|
|
|
src = fetchsvn {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "svn://svn.icculus.org/smpeg/trunk";
|
2017-08-26 22:23:31 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1irf2d8f150j8cx8lbb0pz1rijap536crsz0mw871xrh6wd2fd96";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./gcc6.patch
|
|
|
|
./sdl2.patch
|
|
|
|
];
|
|
|
|
|
2018-01-20 21:57:44 +00:00
|
|
|
nativeBuildInputs = [ autoconf automake pkgconfig makeWrapper ];
|
2017-08-26 22:23:31 +00:00
|
|
|
|
2018-01-20 21:57:44 +00:00
|
|
|
buildInputs = [ SDL2 ]
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
|
2017-08-26 22:23:31 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sh autogen.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
sed -e 's,#include "\(SDL.*.h\)",#include <SDL2/\1>,' -i $out/include/smpeg2/*.h
|
|
|
|
|
|
|
|
wrapProgram $out/bin/smpeg2-config \
|
|
|
|
--prefix PATH ":" "${pkgconfig}/bin" \
|
|
|
|
--prefix PKG_CONFIG_PATH ":" "${SDL2.dev}/lib/pkgconfig"
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://icculus.org/smpeg/";
|
2017-08-26 22:23:31 +00:00
|
|
|
description = "SDL2 MPEG Player Library";
|
|
|
|
license = licenses.lgpl2;
|
2018-01-20 15:26:21 +00:00
|
|
|
platforms = platforms.unix;
|
2017-08-26 22:23:31 +00:00
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
};
|
|
|
|
}
|