From 31bc21974d72c626f9a7b0c2d1241d9ed265c1d1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 26 Mar 2008 12:57:30 +0000 Subject: * Purity fix in fontforge: don't look for /usr/include/libxml. svn path=/nixpkgs/trunk/; revision=11288 --- pkgs/tools/misc/fontforge/default.nix | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'pkgs/tools') diff --git a/pkgs/tools/misc/fontforge/default.nix b/pkgs/tools/misc/fontforge/default.nix index 314d29cb4b65..839ec49d93c8 100644 --- a/pkgs/tools/misc/fontforge/default.nix +++ b/pkgs/tools/misc/fontforge/default.nix @@ -1,7 +1,6 @@ { stdenv, fetchurl, gettext, freetype, zlib , libungif, libpng, libjpeg, libtiff, libxml2 -, libX11 ? null , lib , xproto ? null -, libXt ? null +, libX11 ? null, lib, xproto ? null, libXt ? null }: stdenv.mkDerivation { @@ -11,19 +10,24 @@ stdenv.mkDerivation { url = mirror://sourceforge/fontforge/fontforge_full-20070808.tar.bz2; sha256 = "1b3x5djn9ifvszwmgwmn1jwl50pbq6fzvbmgx0qjg0m60m3v44nx"; }; - - preConfigure = " + + configureFlags = if libX11 != null then "--with-gui=gdraw" else ""; + + preConfigure = '' unpackFile ${freetype.src} freetypeSrcPath=$(echo `pwd`/freetype-*) - configureFlags=\"$configureFlags --with-freetype-src=$freetypeSrcPath\" - " - + (if libX11!=null then '' - configureFlags="$configureFlags --with-gui=gdraw"; - '' else ""); + configureFlags="$configureFlags --with-freetype-src=$freetypeSrcPath" + + substituteInPlace configure \ + --replace /usr/include /no-such-path \ + --replace /usr/lib /no-such-path \ + --replace /usr/local /no-such-path \ + ''; - buildInputs = [gettext freetype zlib libungif libpng libjpeg libtiff libxml2] - ++ (lib.optional (libX11!=null) libX11) - ++ (lib.optional (xproto!=null) xproto) - ++ (lib.optional (libXt!=null) libXt) - ; + buildInputs = + [gettext freetype zlib libungif libpng libjpeg libtiff libxml2] + ++ lib.optional (libX11 != null) libX11 + ++ lib.optional (xproto != null) xproto + ++ lib.optional (libXt != null) libXt + ; } -- cgit 1.4.1