gnu: fontforge: Build fonts bit-reproducibly.

* gnu/packages/fontutils.scm (fontforge)[source](snippet): Modify
tottf.c.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
master
alírio eyng 2016-03-24 06:17:04 +00:00 committed by Ludovic Courtès
parent 2cdeecbe4d
commit 52af45adeb
1 changed files with 14 additions and 8 deletions

View File

@ -351,14 +351,20 @@ definitions.")
"0gfcm8yn1d30giqhdwbchnfnspcqypqdzrxlhqhwy1i18wgl0v2v")) "0gfcm8yn1d30giqhdwbchnfnspcqypqdzrxlhqhwy1i18wgl0v2v"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
;; Make builds bit-reproducible by using fixed date strings. '(begin
'(substitute* "configure" ;; Make builds bit-reproducible by using fixed date strings.
(("^FONTFORGE_MODTIME=.*$") (substitute* "configure"
"FONTFORGE_MODTIME=\"1458399002\"\n") (("^FONTFORGE_MODTIME=.*$")
(("^FONTFORGE_MODTIME_STR=.*$") "FONTFORGE_MODTIME=\"1458399002\"\n")
"FONTFORGE_MODTIME_STR=\"15:50 CET 19-Mar-2016\"\n") (("^FONTFORGE_MODTIME_STR=.*$")
(("^FONTFORGE_VERSIONDATE=.*$") "FONTFORGE_MODTIME_STR=\"15:50 CET 19-Mar-2016\"\n")
"FONTFORGE_VERSIONDATE=\"20160319\"\n"))))) (("^FONTFORGE_VERSIONDATE=.*$")
"FONTFORGE_VERSIONDATE=\"20160319\"\n"))
;; Make TTF builds bit-reproducible by clearing the timestamp
;; that goes in TTF files.
(substitute* "fontforge/tottf.c"
(("cvt_unix_to_1904\\(now") "cvt_unix_to_1904(0"))))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("pkg-config" ,pkg-config))) `(("pkg-config" ,pkg-config)))