2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-04-30 12:00:31 +00:00

fontforge: 20190801 -> 20200314

This fixes the failing build.

Build system changed to cmake.
This commit is contained in:
Alyssa Ross 2020-06-05 21:40:35 +00:00
parent 1c68570ab2
commit e9848d11ad
No known key found for this signature in database
GPG Key ID: F9DBED4859B271C0
2 changed files with 12 additions and 21 deletions
pkgs
tools/misc/fontforge
top-level

View File

@ -1,9 +1,9 @@
{ stdenv, fetchurl, lib { stdenv, fetchurl, lib
, autoconf, automake, gnum4, libtool, perl, uthash, pkgconfig, gettext , cmake, perl, uthash, pkgconfig, gettext
, python, freetype, zlib, glib, libungif, libpng, libjpeg, libtiff, libxml2, cairo, pango , python, freetype, zlib, glib, libungif, libpng, libjpeg, libtiff, libxml2, cairo, pango
, readline, woff2, zeromq, libuninameslist , readline, woff2, zeromq, libuninameslist
, withSpiro ? false, libspiro , withSpiro ? false, libspiro
, withGTK ? false, gtk2 , withGTK ? false, gtk3
, withPython ? true , withPython ? true
, withExtras ? true , withExtras ? true
, Carbon ? null, Cocoa ? null , Carbon ? null, Cocoa ? null
@ -11,11 +11,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "fontforge"; pname = "fontforge";
version = "20190801"; version = "20200314";
src = fetchurl { src = fetchurl {
url = "https://github.com/${pname}/${pname}/releases/download/${version}/${pname}-${version}.tar.gz"; url = "https://github.com/${pname}/${pname}/releases/download/${version}/${pname}-${version}.tar.xz";
sha256 = "0lh8yx01asbzxm6car5cfi64njh5p4lxc7iv8dldr5rwg357a86r"; sha256 = "0qf88wd6riycq56d24brybyc93ns74s0nyyavm43zp2kfcihn6fd";
}; };
# use $SOURCE_DATE_EPOCH instead of non-deterministic timestamps # use $SOURCE_DATE_EPOCH instead of non-deterministic timestamps
@ -30,41 +30,32 @@ stdenv.mkDerivation rec {
# do not use x87's 80-bit arithmetic, rouding errors result in very different font binaries # do not use x87's 80-bit arithmetic, rouding errors result in very different font binaries
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-msse2 -mfpmath=sse"; NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-msse2 -mfpmath=sse";
nativeBuildInputs = [ pkgconfig autoconf automake gnum4 libtool perl gettext ]; nativeBuildInputs = [ pkgconfig cmake ];
buildInputs = [ buildInputs = [
readline uthash woff2 zeromq libuninameslist readline uthash woff2 zeromq libuninameslist
python freetype zlib glib libungif libpng libjpeg libtiff libxml2 python freetype zlib glib libungif libpng libjpeg libtiff libxml2
] ]
++ lib.optionals withSpiro [libspiro] ++ lib.optionals withSpiro [libspiro]
++ lib.optionals withGTK [ gtk2 cairo pango ] ++ lib.optionals withGTK [ gtk3 cairo pango ]
++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ]; ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ];
configureFlags = [ "--enable-woff2" ] cmakeFlags = [ "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" ]
++ lib.optionals (!withPython) [ "--disable-python-scripting" "--disable-python-extension" ] ++ lib.optional (!withSpiro) "-DENABLE_LIBSPIRO=OFF"
++ lib.optional withGTK "--enable-gtk2-use" ++ lib.optional (!withGTK) "-DENABLE_GUI=OFF"
++ lib.optional (!withGTK) "--without-x" ++ lib.optional withExtras "-DENABLE_FONTFORGE_EXTRAS=ON";
++ lib.optional withExtras "--enable-fontforge-extras";
# work-around: git isn't really used, but configuration fails without it # work-around: git isn't really used, but configuration fails without it
preConfigure = '' preConfigure = ''
# The way $version propagates to $version of .pe-scripts (https://github.com/dejavu-fonts/dejavu-fonts/blob/358190f/scripts/generate.pe#L19) # The way $version propagates to $version of .pe-scripts (https://github.com/dejavu-fonts/dejavu-fonts/blob/358190f/scripts/generate.pe#L19)
export SOURCE_DATE_EPOCH=$(date -d ${version} +%s) export SOURCE_DATE_EPOCH=$(date -d ${version} +%s)
export GIT="$(type -P true)"
./bootstrap --skip-git --force
''; '';
doCheck = false; # tries to wget some fonts
doInstallCheck = doCheck;
postInstall = postInstall =
# get rid of the runtime dependency on python # get rid of the runtime dependency on python
lib.optionalString (!withPython) '' lib.optionalString (!withPython) ''
rm -r "$out/share/fontforge/python" rm -r "$out/share/fontforge/python"
''; '';
enableParallelBuilding = true;
meta = { meta = {
description = "A font editor"; description = "A font editor";
homepage = "http://fontforge.github.io"; homepage = "http://fontforge.github.io";

View File

@ -3527,7 +3527,7 @@ in
fontforge-gtk = fontforge.override { fontforge-gtk = fontforge.override {
withSpiro = true; withSpiro = true;
withGTK = true; withGTK = true;
gtk2 = gtk2-x11; gtk3 = gtk3-x11;
inherit (darwin.apple_sdk.frameworks) Carbon Cocoa; inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
}; };