3
0
Fork 0
forked from mirrors/nixpkgs

Making mesa optional in wxGTK, and using on non-linux the non-mesa wxGTK for gnuplot and wxmaxima.

That may make them build further.


svn path=/nixpkgs/trunk/; revision=33051
This commit is contained in:
Lluís Batlle i Rossell 2012-03-13 21:54:17 +00:00
parent 59d6b60e46
commit b3456f8bdd
2 changed files with 13 additions and 6 deletions

View file

@ -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 = "wxGTK-2.8.12";
@ -11,7 +15,8 @@ stdenv.mkDerivation {
sha256 = "1gjs9vfga60mk4j4ngiwsk9h6c7j22pw26m3asxr1jwvqbr8kkqk";
};
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,15 +26,14 @@ 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";
# This variable is used by configure to find some dependencies.
SEARCH_INCLUDE =
"${libXinerama}/include ${libSM}/include ${libXxf86vm}/include";
SEARCH_LIB = "${mesa}/lib";
SEARCH_LIB = optionalString withMesa "${mesa}/lib";
# Work around a bug in configure.
NIX_CFLAGS_COMPILE = "-DHAVE_X11_XLIB_H=1";

View file

@ -766,6 +766,7 @@ let
gnuplot = callPackage ../tools/graphics/gnuplot {
inherit (gtkLibs) pango;
wxGTK = if stdenv.isLinux then wxGTK else wxGTK.override { withMesa = false; };
texLive = null;
lua = null;
};
@ -8305,7 +8306,9 @@ let
maxima = callPackage ../applications/science/math/maxima { };
wxmaxima = callPackage ../applications/science/math/wxmaxima { };
wxmaxima = callPackage ../applications/science/math/wxmaxima {
wxGTK = if stdenv.isLinux then wxGTK else wxGTK.override { withMesa = false; };
};
pari = callPackage ../applications/science/math/pari {};