2019-11-10 16:44:34 +00:00
|
|
|
{ stdenv, fetchsvn, SDL, autoconf, automake, libtool, gtk2, m4, pkgconfig, libGLU, libGL, makeWrapper }:
|
2011-03-28 19:58:49 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-06-09 03:41:44 +01:00
|
|
|
name = "smpeg-svn${version}";
|
2011-03-28 19:58:49 +01:00
|
|
|
version = "390";
|
|
|
|
|
|
|
|
src = fetchsvn {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "svn://svn.icculus.org/smpeg/trunk";
|
2011-03-28 19:58:49 +01:00
|
|
|
rev = version;
|
|
|
|
sha256 = "0ynwn7ih5l2b1kpzpibns9bb9wzfjak7mgrb1ji0dkn2q5pv6lr0";
|
|
|
|
};
|
|
|
|
|
2017-01-18 00:12:49 +00:00
|
|
|
patches = [
|
|
|
|
./format.patch
|
|
|
|
./gcc6.patch
|
2019-01-17 08:26:35 +00:00
|
|
|
./libx11.patch
|
2017-01-18 00:12:49 +00:00
|
|
|
];
|
2012-09-27 00:29:53 +01:00
|
|
|
|
2017-01-18 00:12:49 +00:00
|
|
|
enableParallelBuilding = true;
|
2016-02-07 20:44:18 +00:00
|
|
|
|
2019-11-10 16:44:34 +00:00
|
|
|
buildInputs = [ SDL gtk2 libGLU libGL ];
|
2014-10-23 01:31:14 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ autoconf automake libtool m4 pkgconfig makeWrapper ];
|
2011-03-28 19:58:49 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
touch NEWS AUTHORS ChangeLog
|
2012-09-27 00:29:53 +01:00
|
|
|
sh autogen.sh
|
2011-03-28 19:58:49 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
sed -i -e 's,"SDL.h",<SDL/SDL.h>,' \
|
|
|
|
-e 's,"SDL_mutex.h",<SDL/SDL_mutex.h>,' \
|
|
|
|
-e 's,"SDL_audio.h",<SDL/SDL_audio.h>,' \
|
|
|
|
-e 's,"SDL_thread.h",<SDL/SDL_thread.h>,' \
|
|
|
|
-e 's,"SDL_types.h",<SDL/SDL_types.h>,' \
|
|
|
|
$out/include/smpeg/*.h
|
2014-10-23 01:31:14 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/smpeg-config \
|
|
|
|
--prefix PATH ":" "${pkgconfig}/bin" \
|
2015-10-11 15:21:43 +01:00
|
|
|
--prefix PKG_CONFIG_PATH ":" "${SDL.dev}/lib/pkgconfig"
|
2011-03-28 19:58:49 +01:00
|
|
|
'';
|
|
|
|
|
2019-10-30 00:12:09 +00:00
|
|
|
NIX_LDFLAGS = "-lX11";
|
2019-01-20 21:39:33 +00:00
|
|
|
|
2011-03-28 19:58:49 +01:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://icculus.org/smpeg/";
|
2011-03-28 19:58:49 +01:00
|
|
|
description = "MPEG decoding library";
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2011-03-28 19:58:49 +01:00
|
|
|
};
|
|
|
|
}
|