diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-01-12 13:17:28 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-01-12 13:43:30 +0100 |
commit | f9c59ca16839b52e5dc42601706f195fa98b9f1c (patch) | |
tree | 80c8386819d943c2c09ee4577e31d2e3c3306efe /pkgs | |
parent | 9274093a34806268862496b9028e10b2aa9f183a (diff) | |
download | nixlib-f9c59ca16839b52e5dc42601706f195fa98b9f1c.tar nixlib-f9c59ca16839b52e5dc42601706f195fa98b9f1c.tar.gz nixlib-f9c59ca16839b52e5dc42601706f195fa98b9f1c.tar.bz2 nixlib-f9c59ca16839b52e5dc42601706f195fa98b9f1c.tar.lz nixlib-f9c59ca16839b52e5dc42601706f195fa98b9f1c.tar.xz nixlib-f9c59ca16839b52e5dc42601706f195fa98b9f1c.tar.zst nixlib-f9c59ca16839b52e5dc42601706f195fa98b9f1c.zip |
fontforge: large update with large changes implied
- Things didn't work very well before, as libs were only dlopened and not found. Fixes #5716. - Newer releases need autotools to build (and git), leading to some bloat. - Also, more things are installed by default, increasing the output size.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/misc/fontforge/default.nix | 74 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 5 |
2 files changed, 49 insertions, 30 deletions
diff --git a/pkgs/tools/misc/fontforge/default.nix b/pkgs/tools/misc/fontforge/default.nix index ad2820012dbd..e166d2e93c95 100644 --- a/pkgs/tools/misc/fontforge/default.nix +++ b/pkgs/tools/misc/fontforge/default.nix @@ -1,39 +1,59 @@ -{ stdenv, fetchurl, gettext, freetype, zlib -, libungif, libpng, libjpeg, libtiff, libxml2 -, withX11 ? false -, libX11 ? null, lib, xproto ? null, libXt ? null +{ stdenv, fetchurl, fetchpatch, lib +, autoconf, automake, gnum4, libtool, git, perl, gnulib, uthash, pkgconfig, gettext +, python, freetype, zlib, glib, libungif, libpng, libjpeg, libtiff, libxml2 +, withGTK ? false, gtk2 +, withPython ? false # python-scripting was breaking inconsolata and libertine builds }: -let - version = "20110222"; - name = "fontforge-${version}"; +let + version = "20141230"; # also tagged v2.1.0 in stdenv.mkDerivation { - inherit name; - + name = "fontforge-${version}"; + src = fetchurl { - url = "mirror://sourceforge/fontforge/fontforge_full-${version}.tar.bz2"; - sha256 = "0gj342iyd2qmza523r84m65fm7bymcfd4lbllywbfjzq4s0838lg"; + url = "https://github.com/fontforge/fontforge/archive/${version}.tar.gz"; + sha256 = "1xfi13knn1x7hd7pvr6090qz6qfa5znbs85rg1p5mfj377z2h8rb"; }; - - configureFlags = lib.optionalString withX11 "--with-gui=gdraw"; - - preConfigure = '' - unpackFile ${freetype.src} - freetypeSrcPath=$(echo `pwd`/freetype-*) - 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 \ + 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 + ] + ++ lib.optionals withGTK [ gtk2 ]; + + configureFlags = + lib.optionals (!withPython) [ "--disable-python-scripting" "--disable-python-extension" ] + ++ lib.optional withGTK "--enable-gtk2-use"; - export NIX_LDFLAGS="$NIX_LDFLAGS -lz" + preConfigure = '' + cp -r "${gnulib}" ./gnulib + chmod +w -R ./gnulib + ./bootstrap --skip-git --gnulib-srcdir=./gnulib ''; - buildInputs = - [ gettext freetype zlib libungif libpng libjpeg libtiff libxml2 ] - ++ lib.optionals withX11 [ libX11 xproto libXt ]; + 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; + }; } + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 95b5223242e8..b007e22bb4a2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1211,9 +1211,8 @@ let flvtool2 = callPackage ../tools/video/flvtool2 { }; fontforge = lowPrio (callPackage ../tools/misc/fontforge { }); - - fontforgeX = callPackage ../tools/misc/fontforge { - withX11 = true; + fontforge-gtk = callPackage ../tools/misc/fontforge { + withGTK = true; }; forktty = callPackage ../os-specific/linux/forktty {}; |