fontforge-fonttools: Install all tools

Since CMake port, the contrib files are not installed. Let's use a Debian patch to install them.
This commit is contained in:
Jan Tojnar 2021-04-05 13:04:24 +02:00 committed by erictapen
parent 70babe5bcf
commit 7d01c1e6d5

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, lib
{ stdenv, fetchpatch, fetchFromGitHub, lib
, cmake, perl, uthash, pkg-config, gettext
, python, freetype, zlib, glib, libungif, libpng, libjpeg, libtiff, libxml2, cairo, pango
, readline, woff2, zeromq, libuninameslist
@ -23,6 +23,15 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Rl/5lbXaPgIndANaD0IakaDus6T53FjiBb45FIuGrvc=";
};
patches = [
# Allow installing contrib files (e.g. extras and tools).
# Taken from https://salsa.debian.org/fonts-team/fontforge/-/blob/master/debian/patches/0001-add-extra-cmake-install-rules.patch
(fetchpatch {
url = "https://salsa.debian.org/fonts-team/fontforge/raw/76bffe6ccf8ab20a0c81476a80a87ad245e2fd1c/debian/patches/0001-add-extra-cmake-install-rules.patch";
sha256 = "u3D9od2xLECNEHhZ+8dkuv9818tPkdP6y/Tvd9CADJg=";
})
];
# use $SOURCE_DATE_EPOCH instead of non-deterministic timestamps
postPatch = ''
find . -type f -name '*.c' -exec sed -r -i 's#\btime\(&(.+)\)#if (getenv("SOURCE_DATE_EPOCH")) \1=atol(getenv("SOURCE_DATE_EPOCH")); else &#g' {} \;