diff options
author | Eric Bavier <bavier@member.fsf.org> | 2016-04-05 22:34:54 -0500 |
---|---|---|
committer | Eric Bavier <bavier@member.fsf.org> | 2016-04-15 00:23:29 -0500 |
commit | 5391be116ec454dc563d0f92aa2485e017cfbf5b (patch) | |
tree | e321b1a9477686ab4e206d704e7a5ceec93a081d /gnu/packages/patches/fontforge-svg-modtime.patch | |
parent | 579760d06e11d24ef280e5af16a2e02a98c1d77d (diff) | |
download | guix-patches-5391be116ec454dc563d0f92aa2485e017cfbf5b.tar guix-patches-5391be116ec454dc563d0f92aa2485e017cfbf5b.tar.gz |
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.
Diffstat (limited to 'gnu/packages/patches/fontforge-svg-modtime.patch')
-rw-r--r-- | gnu/packages/patches/fontforge-svg-modtime.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/patches/fontforge-svg-modtime.patch b/gnu/packages/patches/fontforge-svg-modtime.patch new file mode 100644 index 0000000000..fd960ae610 --- /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 |