Making directfb with more options, so it can be cross-built without X for example.

svn path=/nixpkgs/branches/stdenv-updates/; revision=24926
This commit is contained in:
Lluís Batlle i Rossell 2010-11-29 18:00:26 +00:00
parent 0d122e7c6f
commit fca73ee251

View File

@ -1,6 +1,7 @@
{stdenv, fetchurl, perl, zlib, libjpeg, freetype, {stdenv, fetchurl, perl, zlib, libjpeg, freetype, libpng, giflib
SDL, libX11, xproto, xextproto, libXext, libpng, , enableX11 ? true, libX11, xproto, xextproto, libXext, renderproto, libXrender
renderproto, libXrender, giflib}: , enableSDL ? true, SDL }:
let s = import ./src-for-default.nix; in let s = import ./src-for-default.nix; in
stdenv.mkDerivation { stdenv.mkDerivation {
inherit (s) name; inherit (s) name;
@ -8,22 +9,30 @@ stdenv.mkDerivation {
url = s.url; url = s.url;
sha256 = s.hash; sha256 = s.hash;
}; };
buildInputs = [perl zlib libjpeg freetype SDL
xproto libX11 libXext xextproto libpng buildNativeInputs = [ perl ];
renderproto libXrender giflib
buildInputs = [ zlib libjpeg freetype giflib libpng ]
++ stdenv.lib.optional enableSDL SDL
++ stdenv.lib.optionals enableX11 [
xproto libX11 libXext xextproto
renderproto libXrender
]; ];
NIX_LDFLAGS="-lgcc_s"; NIX_LDFLAGS="-lgcc_s";
configureFlags = [ configureFlags = [
"--enable-sdl" "--enable-sdl"
"--enable-zlib" "--enable-zlib"
"--with-gfxdrivers=all" "--with-gfxdrivers=all"
"--enable-devmem" "--enable-devmem"
"--enable-fbdev" "--enable-fbdev"
"--enable-x11"
"--enable-mmx" "--enable-mmx"
"--enable-sse" "--enable-sse"
"--enable-sysfs" "--enable-sysfs"
"--with-software" "--with-software"
"--with-smooth-scaling" "--with-smooth-scaling"
] ++ stdenv.lib.optionals enableX11 [
"--enable-x11"
]; ];
} }