From f59e3b6bfbfc9bc156d1772a3f6f570792381521 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 14 Mar 2012 17:45:11 +0000 Subject: [PATCH] wxGTK: make mesa support optional in versions 2.9.0 and 2.9.1 too svn path=/nixpkgs/trunk/; revision=33069 --- pkgs/development/libraries/wxGTK-2.9/2.9.0.nix | 14 +++++++++----- pkgs/development/libraries/wxGTK-2.9/2.9.1.nix | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/wxGTK-2.9/2.9.0.nix b/pkgs/development/libraries/wxGTK-2.9/2.9.0.nix index 1a614fada906..b5419d6a3875 100644 --- a/pkgs/development/libraries/wxGTK-2.9/2.9.0.nix +++ b/pkgs/development/libraries/wxGTK-2.9/2.9.0.nix @@ -1,8 +1,12 @@ { stdenv, fetchurl, pkgconfig, gtk, libXinerama, libSM, libXxf86vm, xf86vidmodeproto , gstreamer, gstPluginsBase, GConf -, mesa, compat24 ? false, compat26 ? true, unicode ? true, +, withMesa ? true, mesa ? null, compat24 ? false, compat26 ? true, unicode ? true, }: +assert withMesa -> mesa != null; + +with stdenv.lib; + stdenv.mkDerivation { name = "wxwidgets-2.9.0"; @@ -11,7 +15,8 @@ stdenv.mkDerivation { sha256 = "10n75mpypd9411b29gxmi0g2s7dgbfwkgiyhxwkjsyrmyvfc3xcc"; }; - buildInputs = [ gtk libXinerama libSM libXxf86vm xf86vidmodeproto mesa gstreamer gstPluginsBase GConf ]; + buildInputs = [ gtk libXinerama libSM libXxf86vm xf86vidmodeproto gstreamer gstPluginsBase GConf ] + ++ optional withMesa mesa; buildNativeInputs = [ pkgconfig ]; @@ -21,11 +26,10 @@ stdenv.mkDerivation { (if compat26 then "--enable-compat26" else "--disable-compat26") "--disable-precomp-headers" (if unicode then "--enable-unicode" else "") - "--with-opengl" "--enable-mediactrl" - ]; + ] ++ optional withMesa "--with-opengl"; - SEARCH_LIB = "${mesa}/lib"; + SEARCH_LIB = optionalString withMesa "${mesa}/lib"; preConfigure = " substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE=' diff --git a/pkgs/development/libraries/wxGTK-2.9/2.9.1.nix b/pkgs/development/libraries/wxGTK-2.9/2.9.1.nix index c1056bb9ef1d..30bd79d3eddc 100644 --- a/pkgs/development/libraries/wxGTK-2.9/2.9.1.nix +++ b/pkgs/development/libraries/wxGTK-2.9/2.9.1.nix @@ -1,8 +1,12 @@ { stdenv, fetchurl, pkgconfig, gtk, libXinerama, libSM, libXxf86vm, xf86vidmodeproto , gstreamer, gstPluginsBase, GConf -, mesa, compat24 ? false, compat26 ? true, unicode ? true, +, withMesa ? true, mesa ? null, compat24 ? false, compat26 ? true, unicode ? true, }: +assert withMesa -> mesa != null; + +with stdenv.lib; + stdenv.mkDerivation { name = "wxwidgets-2.9.1"; @@ -11,7 +15,8 @@ stdenv.mkDerivation { sha256 = "1f6pdlzjawhhs17hmimk0l1n3g4g48n2iqrgl181xqfrbxyz75b8"; }; - buildInputs = [ gtk libXinerama libSM libXxf86vm xf86vidmodeproto mesa gstreamer gstPluginsBase GConf ]; + buildInputs = [ gtk libXinerama libSM libXxf86vm xf86vidmodeproto gstreamer gstPluginsBase GConf ] + ++ optional withMesa mesa; buildNativeInputs = [ pkgconfig ]; @@ -21,11 +26,10 @@ stdenv.mkDerivation { (if compat26 then "--enable-compat26" else "--disable-compat26") "--disable-precomp-headers" (if unicode then "--enable-unicode" else "") - "--with-opengl" "--enable-mediactrl" - ]; + ] ++ optional withMesa "--with-opengl"; - SEARCH_LIB = "${mesa}/lib"; + SEARCH_LIB = optionalString withMesa "${mesa}/lib"; preConfigure = " substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='