Emacs: Add optional dependencies on GConf and librsvg.

svn path=/nixpkgs/trunk/; revision=21694
This commit is contained in:
Ludovic Courtès 2010-05-09 23:14:23 +00:00
parent 27ef15a6bd
commit e583aae98c
2 changed files with 9 additions and 7 deletions

View File

@ -6,7 +6,8 @@
, xftSupport ? false , xftSupport ? false
, stdenv, fetchurl, ncurses, x11, libXaw ? null, libXpm ? null, Xaw3d ? null , stdenv, fetchurl, ncurses, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
, pkgconfig ? null, gtk ? null, libXft ? null, dbus ? null , pkgconfig ? null, gtk ? null, libXft ? null, dbus ? null
, libpng, libjpeg, libungif, libtiff, texinfo , libpng, libjpeg, libungif, libtiff, librsvg, texinfo
, gconf ? null
}: }:
assert xawSupport -> libXaw != null; assert xawSupport -> libXaw != null;
@ -33,14 +34,14 @@ stdenv.mkDerivation rec {
(if xpmSupport then libXpm else null) (if xpmSupport then libXpm else null)
(if dbusSupport then dbus else null) (if dbusSupport then dbus else null)
(if xaw3dSupport then Xaw3d else null) (if xaw3dSupport then Xaw3d else null)
libpng libjpeg libungif libtiff # maybe not strictly required? libpng libjpeg libungif libtiff librsvg
] ]
++ (if gtkGUI then [pkgconfig gtk] else []) ++ (if gtkGUI then [pkgconfig gtk] else [])
++ (if xftSupport then [libXft] else []); ++ (if xftSupport then [libXft] else [])
++ stdenv.lib.optional (gconf != null) gconf;
configureFlags = " configureFlags =
${if gtkGUI then "--with-x-toolkit=gtk --enable-font-backend --with-xft" else ""} stdenv.lib.optionals gtkGUI [ "--with-x-toolkit=gtk" "--with-xft" ];
";
doCheck = true; doCheck = true;

View File

@ -7399,9 +7399,10 @@ let
emacs23 = import ../applications/editors/emacs-23 { emacs23 = import ../applications/editors/emacs-23 {
inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d
libpng libjpeg libungif libtiff texinfo dbus; libpng libjpeg libungif libtiff librsvg texinfo dbus;
inherit (xlibs) libXaw libXpm libXft; inherit (xlibs) libXaw libXpm libXft;
inherit (gtkLibs) gtk; inherit (gtkLibs) gtk;
gconf = gnome.GConf; # optional GConf support.
xawSupport = stdenv.isDarwin || getPkgConfig "emacs" "xawSupport" false; xawSupport = stdenv.isDarwin || getPkgConfig "emacs" "xawSupport" false;
xaw3dSupport = getPkgConfig "emacs" "xaw3dSupport" false; xaw3dSupport = getPkgConfig "emacs" "xaw3dSupport" false;
gtkGUI = getPkgConfig "emacs" "gtkSupport" true; gtkGUI = getPkgConfig "emacs" "gtkSupport" true;