From 779e0cfc3ddd713589e87ce8b783c9c39055382c0870e14925dfec78c886f9b6 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Thu, 5 Feb 2015 10:53:14 +0000 Subject: [PATCH] Accepting request 284148 from home:coolo:branches:openSUSE:Factory - added propagate-creation-and-modification-times-to-ttf.patch from debian's reproducible build project to get reproducible font builds OBS-URL: https://build.opensuse.org/request/show/284148 OBS-URL: https://build.opensuse.org/package/show/M17N/fontforge?expand=0&rev=41 --- fontforge.changes | 6 ++++ fontforge.spec | 4 ++- ...eation-and-modification-times-to-ttf.patch | 33 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 propagate-creation-and-modification-times-to-ttf.patch diff --git a/fontforge.changes b/fontforge.changes index 3280d84..df42700 100644 --- a/fontforge.changes +++ b/fontforge.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 5 08:45:26 UTC 2015 - coolo@suse.com + +- added propagate-creation-and-modification-times-to-ttf.patch from + debian's reproducible build project to get reproducible font builds + ------------------------------------------------------------------- Thu Oct 2 22:54:57 UTC 2014 - crrodriguez@opensuse.org diff --git a/fontforge.spec b/fontforge.spec index 15282e8..2aa1cee 100644 --- a/fontforge.spec +++ b/fontforge.spec @@ -1,7 +1,7 @@ # # spec file for package fontforge # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -36,6 +36,7 @@ Patch3: fontforge-python-module-name.diff Patch4: fontforge-fixgiflib.patch # PATCH-FIX-UPSTREAM http://sourceforge.net/p/fontforge/git/ci/9ae25e0 Patch5: fontforge-arraysubscript.patch +Patch6: propagate-creation-and-modification-times-to-ttf.patch BuildRequires: cairo-devel BuildRequires: fdupes BuildRequires: fontconfig-devel @@ -109,6 +110,7 @@ to develop applications that use FontForge libraries. %patch4 -p1 %endif %patch5 -p1 +%patch6 -p1 mkdir docs tar -jxvf %{SOURCE1} -C docs chmod 644 docs/quadraticspline.gif diff --git a/propagate-creation-and-modification-times-to-ttf.patch b/propagate-creation-and-modification-times-to-ttf.patch new file mode 100644 index 0000000..dce8a4d --- /dev/null +++ b/propagate-creation-and-modification-times-to-ttf.patch @@ -0,0 +1,33 @@ +From: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774148 + +Description: propagate creation and modification times to TTF + Instead of using the current time as creation and modification + times when writing a TrueType Font file, we now propagate those + coming from the source. This enables TrueType Font to be built + reproducibly. + +diff --git a/fontforge/tottf.c b/fontforge/tottf.c +index a980610..3d488b0 100644 +--- a/fontforge/tottf.c ++++ b/fontforge/tottf.c +@@ -2812,7 +2812,6 @@ void cvt_unix_to_1904( long time, int32 result[2]) { + + static void sethead(struct head *head,SplineFont *sf,struct alltabs *at, + enum fontformat format, int32 *bsizes) { +- time_t now; + int i, lr, rl, indic_rearrange, arabic; + ASM *sm; + struct ttflangname *useng; +@@ -2920,10 +2919,8 @@ static void sethead(struct head *head,SplineFont *sf,struct alltabs *at, + head->flags |= (1<<9); /* Apple documents this */ + /* if there are any indic characters, set bit 10 */ + +- time(&now); /* seconds since 1970, need to convert to seconds since 1904 */ +- cvt_unix_to_1904(now,head->modtime); +- memcpy(head->createtime,head->modtime,sizeof(head->modtime)); +- ++ cvt_unix_to_1904(sf->modificationtime,head->modtime); ++ cvt_unix_to_1904(sf->creationtime,head->createtime); + } + + static void sethhead(struct hhead *hhead,struct hhead *vhead,struct alltabs *at, SplineFont *sf) {