From fca73ee251d58abbe41d22c50836f45516cd345a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 29 Nov 2010 18:00:26 +0000 Subject: [PATCH] Making directfb with more options, so it can be cross-built without X for example. svn path=/nixpkgs/branches/stdenv-updates/; revision=24926 --- .../libraries/directfb/default.nix | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/directfb/default.nix b/pkgs/development/libraries/directfb/default.nix index 0a3c5e5d7b2..55a8a823e1c 100644 --- a/pkgs/development/libraries/directfb/default.nix +++ b/pkgs/development/libraries/directfb/default.nix @@ -1,6 +1,7 @@ -{stdenv, fetchurl, perl, zlib, libjpeg, freetype, - SDL, libX11, xproto, xextproto, libXext, libpng, - renderproto, libXrender, giflib}: +{stdenv, fetchurl, perl, zlib, libjpeg, freetype, libpng, giflib +, enableX11 ? true, libX11, xproto, xextproto, libXext, renderproto, libXrender +, enableSDL ? true, SDL }: + let s = import ./src-for-default.nix; in stdenv.mkDerivation { inherit (s) name; @@ -8,22 +9,30 @@ stdenv.mkDerivation { url = s.url; sha256 = s.hash; }; - buildInputs = [perl zlib libjpeg freetype SDL - xproto libX11 libXext xextproto libpng - renderproto libXrender giflib + + buildNativeInputs = [ perl ]; + + 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"; + configureFlags = [ "--enable-sdl" "--enable-zlib" "--with-gfxdrivers=all" "--enable-devmem" "--enable-fbdev" - "--enable-x11" "--enable-mmx" "--enable-sse" "--enable-sysfs" "--with-software" "--with-smooth-scaling" + ] ++ stdenv.lib.optionals enableX11 [ + "--enable-x11" ]; }