2015-01-12 12:17:28 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch, lib
|
|
|
|
, autoconf, automake, gnum4, libtool, git, perl, gnulib, uthash, pkgconfig, gettext
|
2015-04-01 02:49:45 +01:00
|
|
|
, python, freetype, zlib, glib, libungif, libpng, libjpeg, libtiff, libxml2, pango
|
2015-01-12 12:17:28 +00:00
|
|
|
, withGTK ? false, gtk2
|
|
|
|
, withPython ? false # python-scripting was breaking inconsolata and libertine builds
|
2007-08-21 13:31:33 +01:00
|
|
|
}:
|
|
|
|
|
2015-01-12 12:17:28 +00:00
|
|
|
let
|
2015-10-25 17:52:49 +00:00
|
|
|
version = "20150824"; # also tagged v2.1.0
|
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 {
|
2015-01-12 12:17:28 +00:00
|
|
|
name = "fontforge-${version}";
|
|
|
|
|
2007-08-21 13:31:33 +01:00
|
|
|
src = fetchurl {
|
2015-01-12 12:17:28 +00:00
|
|
|
url = "https://github.com/fontforge/fontforge/archive/${version}.tar.gz";
|
2015-10-25 17:52:49 +00:00
|
|
|
sha256 = "09zzg166lw5ldbzsa2j9x7hizn6y3ld1kf4abfkiy301rdqj9ar8";
|
2007-08-21 13:31:33 +01:00
|
|
|
};
|
2012-02-06 05:49:27 +00:00
|
|
|
|
2015-01-12 12:17:28 +00:00
|
|
|
patches = [(fetchpatch {
|
|
|
|
name = "use-system-uthash.patch";
|
|
|
|
url = "http://pkgs.fedoraproject.org/cgit/fontforge.git/plain/"
|
|
|
|
+ "fontforge-20140813-use-system-uthash.patch?id=8bdf933";
|
|
|
|
sha256 = "0n8i62qv2ygfii535rzp09vvjx4qf9zp5qq7qirrbzm1l9gykcjy";
|
|
|
|
})];
|
|
|
|
patchFlags = "-p0";
|
|
|
|
|
|
|
|
# FIXME: git isn't really used, but configuration fails without it
|
|
|
|
buildInputs = [
|
|
|
|
git autoconf automake gnum4 libtool perl pkgconfig gettext uthash
|
|
|
|
python freetype zlib glib libungif libpng libjpeg libtiff libxml2
|
2015-12-27 04:02:09 +00:00
|
|
|
pango
|
2015-01-12 12:17:28 +00:00
|
|
|
]
|
2015-12-27 04:02:09 +00:00
|
|
|
++ lib.optionals withGTK [ gtk2 ];
|
2015-01-12 12:17:28 +00:00
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
lib.optionals (!withPython) [ "--disable-python-scripting" "--disable-python-extension" ]
|
|
|
|
++ lib.optional withGTK "--enable-gtk2-use";
|
2012-02-06 05:49:27 +00:00
|
|
|
|
2015-01-12 12:17:28 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cp -r "${gnulib}" ./gnulib
|
|
|
|
chmod +w -R ./gnulib
|
|
|
|
./bootstrap --skip-git --gnulib-srcdir=./gnulib
|
2008-03-26 12:57:30 +00:00
|
|
|
'';
|
2007-08-21 13:31:33 +01:00
|
|
|
|
2015-01-12 12:17:28 +00:00
|
|
|
postInstall =
|
|
|
|
# get rid of the runtime dependency on python
|
|
|
|
lib.optionalString (!withPython) ''
|
|
|
|
rm -r "$out/share/fontforge/python"
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A font editor";
|
|
|
|
homepage = http://fontforge.github.io;
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
2007-08-21 13:31:33 +01:00
|
|
|
}
|
2015-01-12 12:17:28 +00:00
|
|
|
|