2007-08-21 14:31:33 +02:00
|
|
|
{ stdenv, fetchurl, gettext, freetype, zlib
|
|
|
|
, libungif, libpng, libjpeg, libtiff, libxml2
|
2010-07-30 14:10:24 +02:00
|
|
|
, withX11 ? false
|
2008-03-26 13:57:30 +01:00
|
|
|
, libX11 ? null, lib, xproto ? null, libXt ? null
|
2007-08-21 14:31:33 +02:00
|
|
|
}:
|
|
|
|
|
2009-05-06 09:28:29 +02:00
|
|
|
let
|
2012-01-28 10:04:48 +01:00
|
|
|
version = "20110222";
|
2009-05-06 09:28:29 +02:00
|
|
|
name = "fontforge-${version}";
|
2010-07-30 14:10:24 +02:00
|
|
|
in
|
2009-05-06 09:28:29 +02:00
|
|
|
|
2007-08-21 14:31:33 +02:00
|
|
|
stdenv.mkDerivation {
|
2009-05-06 09:28:29 +02:00
|
|
|
inherit name;
|
2007-08-21 14:31:33 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2009-05-06 09:28:29 +02:00
|
|
|
url = "mirror://sourceforge/fontforge/fontforge_full-${version}.tar.bz2";
|
2012-01-28 10:04:48 +01:00
|
|
|
sha256 = "0gj342iyd2qmza523r84m65fm7bymcfd4lbllywbfjzq4s0838lg";
|
2007-08-21 14:31:33 +02:00
|
|
|
};
|
2008-03-26 13:57:30 +01:00
|
|
|
|
2010-07-30 14:10:24 +02:00
|
|
|
configureFlags = lib.optionalString withX11 "--with-gui=gdraw";
|
2008-03-26 13:57:30 +01:00
|
|
|
|
|
|
|
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 \
|
2012-02-06 06:49:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lz"
|
2008-03-26 13:57:30 +01:00
|
|
|
'';
|
2007-08-21 14:31:33 +02:00
|
|
|
|
2008-03-26 13:57:30 +01:00
|
|
|
buildInputs =
|
2010-07-30 14:10:24 +02:00
|
|
|
[ gettext freetype zlib libungif libpng libjpeg libtiff libxml2 ]
|
|
|
|
++ lib.optionals withX11 [ libX11 xproto libXt ];
|
2007-08-21 14:31:33 +02:00
|
|
|
}
|