[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/11: gnu: fontforge: Make SVG builds reproducible.
From: |
Eric Bavier |
Subject: |
06/11: gnu: fontforge: Make SVG builds reproducible. |
Date: |
Fri, 15 Apr 2016 05:39:57 +0000 |
bavier pushed a commit to branch master
in repository guix.
commit 5391be116ec454dc563d0f92aa2485e017cfbf5b
Author: Eric Bavier <address@hidden>
Date: Tue Apr 5 22:34:54 2016 -0500
gnu: fontforge: Make SVG builds reproducible.
* gnu/packages/patches/fontforge-svg-modtime.patch: New file.
* gnu/packages/fontutils.scm (fontforge)[source]: Use it.
* gnu-system.am (dist_patch_DATA): Add it.
---
gnu-system.am | 1 +
gnu/packages/fontutils.scm | 3 +-
gnu/packages/patches/fontforge-svg-modtime.patch | 35 ++++++++++++++++++++++
3 files changed, 38 insertions(+), 1 deletions(-)
diff --git a/gnu-system.am b/gnu-system.am
index 0c5255f..cd1c663 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -472,6 +472,7 @@ dist_patch_DATA =
\
gnu/packages/patches/flashrom-use-libftdi1.patch \
gnu/packages/patches/flint-ldconfig.patch \
gnu/packages/patches/fltk-shared-lib-defines.patch \
+ gnu/packages/patches/fontforge-svg-modtime.patch \
gnu/packages/patches/freeimage-CVE-2015-0852.patch \
gnu/packages/patches/gawk-fts-test.patch \
gnu/packages/patches/gawk-shell.patch \
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index a16e9dd..f37f343 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -511,7 +511,8 @@ definitions.")
(("^FONTFORGE_MODTIME_STR=.*$")
"FONTFORGE_MODTIME_STR=\"20:25 CDT 4-Apr-2016\"\n")
(("^FONTFORGE_VERSIONDATE=.*$")
- "FONTFORGE_VERSIONDATE=\"20160404\"\n"))))))
+ "FONTFORGE_VERSIONDATE=\"20160404\"\n"))))
+ (patches (list (search-patch "fontforge-svg-modtime.patch")))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
diff --git a/gnu/packages/patches/fontforge-svg-modtime.patch
b/gnu/packages/patches/fontforge-svg-modtime.patch
new file mode 100644
index 0000000..fd960ae
--- /dev/null
+++ b/gnu/packages/patches/fontforge-svg-modtime.patch
@@ -0,0 +1,35 @@
+Propagate source font modification time to svg during conversion. Similar to
+what upstream commit 95a470e941d9a20fbdaca51334e8b6b9d93cfae4 did for TTF
+files.
+
+Submitted upstream at http://github.com/fontforge/fontforge/pull/2696
+
+--- a/fontforge/svg.c
++++ b/fontforge/svg.c
+@@ -27,7 +27,6 @@
+ #include "fontforgevw.h"
+ #include <unistd.h>
+ #include <math.h>
+-#include <time.h>
+ #include <locale.h>
+ #include <utype.h>
+ #include <chardata.h>
+@@ -62,7 +61,6 @@ static int svg_outfontheader(FILE *file, SplineFont *sf,int
layer) {
+ BlueData bd;
+ char *hash, *hasv, ch;
+ int minu, maxu, i;
+- time_t now;
+ const char *author = GetAuthor();
+
+ memset(&info,0,sizeof(info));
+@@ -78,9 +76,8 @@ static int svg_outfontheader(FILE *file, SplineFont *sf,int
layer) {
+ fprintf( file, "\n-->\n" );
+ }
+ fprintf( file, "<svg xmlns=\"http://www.w3.org/2000/svg\"
xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\">\n" );
+- time(&now);
+ fprintf( file, "<metadata>\nCreated by FontForge %d at %s",
+- FONTFORGE_VERSIONDATE_RAW, ctime(&now) );
++ FONTFORGE_VERSIONDATE_RAW, ctime((time_t*)&sf->modificationtime) );
+ if ( author!=NULL )
+ fprintf(file," By %s\n", author);
+ else
- branch master updated (08fbfa8 -> de94602), Eric Bavier, 2016/04/15
- 03/11: gnu: Add ttf2eot., Eric Bavier, 2016/04/15
- 02/11: gnu: Add woff-tools., Eric Bavier, 2016/04/15
- 04/11: gnu: Add brotli., Eric Bavier, 2016/04/15
- 09/11: gnu: fontforge: Install 'showttf' tool., Eric Bavier, 2016/04/15
- 11/11: gnu: fontforge: Swap giflib input for libungif., Eric Bavier, 2016/04/15
- 05/11: gnu: Add woff2., Eric Bavier, 2016/04/15
- 10/11: gnu: fontforge: Remove 'patch-configure' phase., Eric Bavier, 2016/04/15
- 06/11: gnu: fontforge: Make SVG builds reproducible.,
Eric Bavier <=
- 01/11: gnu: Add ttfautohint., Eric Bavier, 2016/04/15
- 07/11: gnu: Add font-fantasque-sans., Eric Bavier, 2016/04/15
- 08/11: gnu: fontforge: Use modify-phases., Eric Bavier, 2016/04/15