2007-08-21 13:31:33 +01:00
|
|
|
{ stdenv, fetchurl, gettext, freetype, zlib
|
|
|
|
, libungif, libpng, libjpeg, libtiff, libxml2
|
2010-07-30 13:10:24 +01:00
|
|
|
, withX11 ? false
|
2008-03-26 12:57:30 +00:00
|
|
|
, libX11 ? null, lib, xproto ? null, libXt ? null
|
2007-08-21 13:31:33 +01:00
|
|
|
}:
|
|
|
|
|
2009-05-06 08:28:29 +01:00
|
|
|
let
|
|
|
|
version = "20090408";
|
|
|
|
name = "fontforge-${version}";
|
2010-07-30 13:10:24 +01:00
|
|
|
in
|
2009-05-06 08:28:29 +01:00
|
|
|
|
2007-08-21 13:31:33 +01:00
|
|
|
stdenv.mkDerivation {
|
2009-05-06 08:28:29 +01:00
|
|
|
inherit name;
|
2007-08-21 13:31:33 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2009-05-06 08:28:29 +01:00
|
|
|
url = "mirror://sourceforge/fontforge/fontforge_full-${version}.tar.bz2";
|
|
|
|
sha256 = "1s9a1mgbr5sv5jx6rdj2v3p6s52hgjr9wqd1aq57kn9whc8ny8y4";
|
2007-08-21 13:31:33 +01:00
|
|
|
};
|
2008-03-26 12:57:30 +00:00
|
|
|
|
2010-07-30 13:10:24 +01:00
|
|
|
configureFlags = lib.optionalString withX11 "--with-gui=gdraw";
|
2008-03-26 12:57:30 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
2007-08-21 13:31:33 +01:00
|
|
|
unpackFile ${freetype.src}
|
|
|
|
freetypeSrcPath=$(echo `pwd`/freetype-*)
|
2008-03-26 12:57:30 +00: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 13:31:33 +01:00
|
|
|
|
2008-03-26 12:57:30 +00:00
|
|
|
buildInputs =
|
2010-07-30 13:10:24 +01:00
|
|
|
[ gettext freetype zlib libungif libpng libjpeg libtiff libxml2 ]
|
|
|
|
++ lib.optionals withX11 [ libX11 xproto libXt ];
|
2007-08-21 13:31:33 +01:00
|
|
|
}
|