forked from mirrors/nixpkgs
fontforge: 20160404 -> 20170730 + support reproducible builds
This commit is contained in:
parent
f0f55ac6cd
commit
0385079696
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, fetchpatch, lib
|
||||
{ stdenv, fetchFromGitHub, fetchpatch, lib, runCommand
|
||||
, autoconf, automake, gnum4, libtool, perl, gnulib, uthash, pkgconfig, gettext
|
||||
, python, freetype, zlib, glib, libungif, libpng, libjpeg, libtiff, libxml2, pango
|
||||
, withSpiro ? false, libspiro
|
||||
|
@ -9,22 +9,30 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "fontforge-${version}";
|
||||
version = "20160404";
|
||||
version = "20170730";
|
||||
|
||||
# The way $version propagates to $version of .pe-scripts (https://github.com/dejavu-fonts/dejavu-fonts/blob/358190f/scripts/generate.pe#L19)
|
||||
SOURCE_DATE_EPOCH = lib.fileContents (runCommand "unixtime-of-${version}" {} "date -d ${version} +%s > $out");
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fontforge";
|
||||
repo = "fontforge";
|
||||
rev = version;
|
||||
sha256 = "15nacq84n9gvlzp3slpmfrrbh57kfb6lbdlc46i7aqgci4qv6fg0";
|
||||
sha256 = "15k6x97383p8l40jvcivalhwgbbcdg5vciyjz6m9r0lrlnjqkv99";
|
||||
};
|
||||
|
||||
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";
|
||||
patches = [
|
||||
./fontforge-20140813-use-system-uthash.patch
|
||||
|
||||
(fetchpatch {
|
||||
url = "https://github.com/fontforge/fontforge/compare/${version}...volth:rb-${version}.patch";
|
||||
name = "fontforge-${version}-reproducible-build.patch";
|
||||
sha256 = "089w94xnc0ik3rfx9b7q124x9n1nzbyzzcyynl1x31d22byxgl34";
|
||||
})
|
||||
];
|
||||
|
||||
# do not use x87's 80-bit arithmetic, rouding errors result in very different font binaries
|
||||
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isi686 [ "-msse2" "-mfpmath=sse" ];
|
||||
|
||||
buildInputs = [
|
||||
autoconf automake gnum4 libtool perl pkgconfig gettext uthash
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
--- a/Makefile.am.old 2014-08-12 10:07:32.000000000 +0530
|
||||
+++ b/Makefile.am 2014-09-08 16:23:56.046996941 +0530
|
||||
@@ -43,7 +43,6 @@
|
||||
AM_CPPFLAGS =
|
||||
AM_LDFLAGS =
|
||||
|
||||
-BUILT_SOURCES = uthash/src
|
||||
EXTRA_DIST =
|
||||
CLEANFILES =
|
||||
MOSTLYCLEANFILES =
|
||||
@@ -113,7 +112,6 @@
|
||||
Packaging/FontForge-doc.spec \
|
||||
Packaging/FontForge.spec \
|
||||
Packaging/FontForge.static.spec \
|
||||
- uthash/src \
|
||||
$(NULL)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
@@ -129,11 +127,6 @@
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
-uthash/src:
|
||||
- if [ ! -e uthash/src ]; then \
|
||||
- if [ -e uthash ] ; then rm -r uthash ; fi ; \
|
||||
- git clone https://github.com/troydhanson/uthash ; \
|
||||
- fi ;
|
||||
|
||||
# We import a selection of targets from Frank's standard packaging Makefile.
|
||||
|
|
@ -1,7 +1,15 @@
|
|||
{stdenv, fontforge, zlib}:
|
||||
{stdenv, fetchFromGitHub, zlib}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "fontforge-fonttools-${fontforge.version}";
|
||||
src = fontforge.src;
|
||||
version = "20160404";
|
||||
name = "fontforge-fonttools-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fontforge";
|
||||
repo = "fontforge";
|
||||
rev = version;
|
||||
sha256 = "15nacq84n9gvlzp3slpmfrrbh57kfb6lbdlc46i7aqgci4qv6fg0";
|
||||
};
|
||||
|
||||
buildInputs = [zlib];
|
||||
|
||||
|
|
Loading…
Reference in a new issue