2007-08-21 14:31:33 +02:00
|
|
|
{ stdenv, fetchurl, gettext, freetype, zlib
|
|
|
|
, libungif, libpng, libjpeg, libtiff, libxml2
|
2008-03-26 13:57:30 +01:00
|
|
|
, libX11 ? null, lib, xproto ? null, libXt ? null
|
2007-08-21 14:31:33 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "fontforge-20070808";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2007-08-27 15:01:33 +02:00
|
|
|
url = mirror://sourceforge/fontforge/fontforge_full-20070808.tar.bz2;
|
2007-08-21 14:31:33 +02:00
|
|
|
sha256 = "1b3x5djn9ifvszwmgwmn1jwl50pbq6fzvbmgx0qjg0m60m3v44nx";
|
|
|
|
};
|
2008-03-26 13:57:30 +01:00
|
|
|
|
|
|
|
configureFlags = if libX11 != null then "--with-gui=gdraw" else "";
|
|
|
|
|
|
|
|
preConfigure = ''
|
2007-08-21 14:31:33 +02:00
|
|
|
unpackFile ${freetype.src}
|
|
|
|
freetypeSrcPath=$(echo `pwd`/freetype-*)
|
2008-03-26 13:57:30 +01:00
|
|
|
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 \
|
|
|
|
'';
|
2007-08-21 14:31:33 +02:00
|
|
|
|
2008-03-26 13:57:30 +01:00
|
|
|
buildInputs =
|
|
|
|
[gettext freetype zlib libungif libpng libjpeg libtiff libxml2]
|
|
|
|
++ lib.optional (libX11 != null) libX11
|
|
|
|
++ lib.optional (xproto != null) xproto
|
|
|
|
++ lib.optional (libXt != null) libXt
|
|
|
|
;
|
2007-08-21 14:31:33 +02:00
|
|
|
}
|