* [PATCH 1/9] gnu: Add ttfautohint.
@ 2016-04-06 4:32 ericbavier
2016-04-06 4:32 ` [PATCH 2/9] gnu: Add woff-tools ericbavier
` (9 more replies)
0 siblings, 10 replies; 34+ messages in thread
From: ericbavier @ 2016-04-06 4:32 UTC (permalink / raw)
To: guix-devel; +Cc: Eric Bavier
From: Eric Bavier <bavier@member.fsf.org>
* gnu/packages/fontutils.scm (ttfautohint): New variable.
* gnu/packages/patches/ttfautohint-source-date-epoch.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
---
gnu-system.am | 1 +
gnu/packages/fontutils.scm | 36 ++++++++++-
.../patches/ttfautohint-source-date-epoch.patch | 70 ++++++++++++++++++++++
3 files changed, 106 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/ttfautohint-source-date-epoch.patch
diff --git a/gnu-system.am b/gnu-system.am
index c8048b7..764e564 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -747,6 +747,7 @@ dist_patch_DATA = \
gnu/packages/patches/tidy-CVE-2015-5522+5523.patch \
gnu/packages/patches/tinyxml-use-stl.patch \
gnu/packages/patches/tk-find-library.patch \
+ gnu/packages/patches/ttfautohint-source-date-epoch.patch \
gnu/packages/patches/tophat-build-with-later-seqan.patch \
gnu/packages/patches/torsocks-dns-test.patch \
gnu/packages/patches/tvtime-gcc41.patch \
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index ff10a4a..a0701d5 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
@@ -29,6 +29,8 @@
#:use-module (gnu packages gettext)
#:use-module (gnu packages python)
#:use-module (gnu packages image)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages glib)
#:use-module (gnu packages xorg)
#:use-module (gnu packages gtk)
@@ -70,6 +72,38 @@ anti-aliased glyph bitmap generation with 256 gray levels.")
(license license:freetype) ; some files have other licenses
(home-page "http://www.freetype.org/")))
+(define-public ttfautohint
+ (package
+ (name "ttfautohint")
+ (version "1.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://savannah/freetype/ttfautohint-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ ;; /gnu/store/5kzmy7061aimljpga9qfz49227283sfr-ttfautohint-1.5.tar.gz
+ "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
+ (patches (map search-patch '("ttfautohint-source-date-epoch.patch")))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("flex" ,flex)
+ ("bison" ,bison)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("freetype" ,freetype)
+ ("harfbuzz" ,harfbuzz)))
+ (arguments
+ `(#:configure-flags '("--with-qt=no"))) ;no gui
+ (synopsis "Automated font hinting")
+ (description
+ "ttfautohint provides a 99% automated hinting process and a platform for
+finely hand-hinting the last 1%. It is ideal for web fonts and supports many
+scripts.")
+ (license license:gpl2+) ;or FreeType license
+ (home-page "http://www.freetype.org/ttfautohint/")))
+
(define-public fontconfig
(package
(name "fontconfig")
diff --git a/gnu/packages/patches/ttfautohint-source-date-epoch.patch b/gnu/packages/patches/ttfautohint-source-date-epoch.patch
new file mode 100644
index 0000000..e42fdbf
--- /dev/null
+++ b/gnu/packages/patches/ttfautohint-source-date-epoch.patch
@@ -0,0 +1,70 @@
+Honour an external definition of SOURCE_DATE_EPOCH when updating the embedded
+modification date in TTF/TTC files.
+
+--- a/lib/tatime.c
++++ b/lib/tatime.c
+@@ -15,6 +15,8 @@
+
+ #include <time.h>
+ #include <stdint.h>
++#include <errno.h>
++#include <limits.h>
+
+ #include "ta.h"
+
+@@ -27,12 +29,51 @@ TA_get_current_time(FT_ULong* high,
+ {
+ /* there have been 24107 days between January 1st, 1904 (the epoch of */
+ /* OpenType), and January 1st, 1970 (the epoch of the `time' function) */
+- TA_ULongLong seconds_to_1970 = 24107 * 24 * 60 * 60;
+- TA_ULongLong seconds_to_today = seconds_to_1970 + (TA_ULongLong)time(NULL);
++ const TA_ULongLong seconds_to_1970 = 24107 * 24 * 60 * 60;
++ TA_ULongLong seconds_to_build;
+
++ time_t now;
++ char *source_date_epoch, *endptr;
++ TA_ULongLong epoch;
++ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
++ if (source_date_epoch) {
++ errno = 0;
++ epoch = strtoull(source_date_epoch, &endptr, 10);
++ if ((errno == ERANGE && (epoch == ULLONG_MAX || epoch == 0))
++ || (errno != 0 && epoch == 0)) {
++ fprintf(stderr,
++ "Environment variable $SOURCE_DATE_EPOCH: strtoull: %s\n",
++ strerror(errno));
++ exit(EXIT_FAILURE);
++ }
++ if (endptr == source_date_epoch) {
++ fprintf(stderr,
++ "Environment variable $SOURCE_DATE_EPOCH: No digits were found: %s\n",
++ endptr);
++ exit(EXIT_FAILURE);
++ }
++ if (*endptr != '\0') {
++ fprintf(stderr,
++ "Environment variable $SOURCE_DATE_EPOCH: Trailing garbage: %s\n",
++ endptr);
++ exit(EXIT_FAILURE);
++ }
++ if (epoch > ULONG_MAX) {
++ fprintf(stderr,
++ "Environment variable $SOURCE_DATE_EPOCH: value must be smaller "
++ "than or equal to: %lu but was found to be: %llu \n",
++ ULONG_MAX, epoch);
++ exit(EXIT_FAILURE);
++ }
++ now = epoch;
++ } else {
++ now = time(NULL);
++ }
+
+- *high = (FT_ULong)(seconds_to_today >> 32);
+- *low = (FT_ULong)seconds_to_today;
++ seconds_to_build = seconds_to_1970 + (TA_ULongLong)now;
++
++ *high = (FT_ULong)(seconds_to_build >> 32);
++ *low = (FT_ULong)seconds_to_build;
+ }
+
+ /* end of tatime.c */
--
2.7.3
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 2/9] gnu: Add woff-tools.
2016-04-06 4:32 [PATCH 1/9] gnu: Add ttfautohint ericbavier
@ 2016-04-06 4:32 ` ericbavier
2016-04-07 6:18 ` Efraim Flashner
2016-04-06 4:32 ` [PATCH 3/9] gnu: Add ttf2eot ericbavier
` (8 subsequent siblings)
9 siblings, 1 reply; 34+ messages in thread
From: ericbavier @ 2016-04-06 4:32 UTC (permalink / raw)
To: guix-devel; +Cc: Eric Bavier
From: Eric Bavier <bavier@member.fsf.org>
* gnu/packages/fontutils.scm (woff-tools): New variable.
---
gnu/packages/fontutils.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index a0701d5..614aac5 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -104,6 +104,47 @@ scripts.")
(license license:gpl2+) ;or FreeType license
(home-page "http://www.freetype.org/ttfautohint/")))
+(define-public woff-tools
+ (package
+ (name "woff-tools")
+ (version "2009.10.04")
+ (source
+ (origin
+ (method url-fetch)
+ ;; Upstream source is unversioned, so use Debian's versioned tarball
+ (uri (string-append "mirror://debian/pool/main/w/woff-tools/"
+ "woff-tools_" version ".orig.tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1i97gkqa6jfzlslsngqf556kx60knlgf7yc9pzsq2pizc6f0d4zl"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("zlib" ,zlib)))
+ (arguments
+ `(#:make-flags '("CC=gcc")
+ #:tests? #f ;no tests
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ;no configuration
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "sfnt2woff" bin)
+ (install-file "woff2sfnt" bin)))))))
+ (synopsis "Convert between OpenType and WOFF formats")
+ (description
+ "This package provides two tools:
+@table @code
+@item sfnt2woff
+Converts OpenType fonts to WOFF fonts
+@item woff2sfnt
+Converts WOFF fonts to OpenType fonts
+@end table")
+ (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))
+ (home-page "https://people.mozilla.com/~jkew/woff/")))
+
(define-public fontconfig
(package
(name "fontconfig")
--
2.7.3
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 3/9] gnu: Add ttf2eot.
2016-04-06 4:32 [PATCH 1/9] gnu: Add ttfautohint ericbavier
2016-04-06 4:32 ` [PATCH 2/9] gnu: Add woff-tools ericbavier
@ 2016-04-06 4:32 ` ericbavier
2016-04-07 6:24 ` Efraim Flashner
2016-04-06 4:32 ` [PATCH 4/9] gnu: Add brotli ericbavier
` (7 subsequent siblings)
9 siblings, 1 reply; 34+ messages in thread
From: ericbavier @ 2016-04-06 4:32 UTC (permalink / raw)
To: guix-devel; +Cc: Eric Bavier
From: Eric Bavier <bavier@member.fsf.org>
* gnu/packages/fontutils.scm (ttf2eot): New variable.
* gnu/packages/patches/ttf2eot-cstddef.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
---
gnu-system.am | 1 +
gnu/packages/fontutils.scm | 34 ++++++++++++++++++++++++++++++
gnu/packages/patches/ttf2eot-cstddef.patch | 12 +++++++++++
3 files changed, 47 insertions(+)
create mode 100644 gnu/packages/patches/ttf2eot-cstddef.patch
diff --git a/gnu-system.am b/gnu-system.am
index 764e564..d3d08da 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -747,6 +747,7 @@ dist_patch_DATA = \
gnu/packages/patches/tidy-CVE-2015-5522+5523.patch \
gnu/packages/patches/tinyxml-use-stl.patch \
gnu/packages/patches/tk-find-library.patch \
+ gnu/packages/patches/ttf2eot-cstddef.patch \
gnu/packages/patches/ttfautohint-source-date-epoch.patch \
gnu/packages/patches/tophat-build-with-later-seqan.patch \
gnu/packages/patches/torsocks-dns-test.patch \
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 614aac5..1e2424b 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -145,6 +145,40 @@ Converts WOFF fonts to OpenType fonts
(license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))
(home-page "https://people.mozilla.com/~jkew/woff/")))
+(define-public ttf2eot
+ (package
+ (name "ttf2eot")
+ (version "0.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://storage.googleapis.com/"
+ "google-code-archive-downloads/v2/"
+ "code.google.com/ttf2eot/"
+ "ttf2eot-" version "-2.tar.gz"))
+ (sha256
+ (base32
+ "1f4dzzmhn0208dvbm3ia5ar6ls9apwc6ampy5blmfxkigi6z0g02"))
+ (patches (map search-patch '("ttf2eot-cstddef.patch")))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;no tests
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ;no configuration
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "ttf2eot" bin)))))))
+ (synopsis "Convert from TrueType to Embeddable Open Type")
+ (description
+ "This package contains a commandline wrapper around OpenTypeUtilities.cpp
+from Chromium, used to make EOT (Embeddable Open Type) files from
+TTF (TrueType/OpenType Font) files.")
+ (license license:bsd-2)
+ (home-page "https://code.google.com/archive/p/ttf2eot/")))
+
(define-public fontconfig
(package
(name "fontconfig")
diff --git a/gnu/packages/patches/ttf2eot-cstddef.patch b/gnu/packages/patches/ttf2eot-cstddef.patch
new file mode 100644
index 0000000..af76898
--- /dev/null
+++ b/gnu/packages/patches/ttf2eot-cstddef.patch
@@ -0,0 +1,12 @@
+From resolution of https://code.google.com/p/ttf2eot/issues/detail?id=26
+
+--- ttf2eot-0.0.2-2/OpenTypeUtilities.cpp 2009-04-30 04:18:46.000000000 -0500
++++ ttf2eot-0.0.2-2/OpenTypeUtilities.cpp 2016-03-31 01:06:39.109996011 -0500
+@@ -25,6 +25,7 @@
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
++#include <cstddef>
+ #include <string.h>
+ #include <vector>
+
--
2.7.3
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 4/9] gnu: Add brotli.
2016-04-06 4:32 [PATCH 1/9] gnu: Add ttfautohint ericbavier
2016-04-06 4:32 ` [PATCH 2/9] gnu: Add woff-tools ericbavier
2016-04-06 4:32 ` [PATCH 3/9] gnu: Add ttf2eot ericbavier
@ 2016-04-06 4:32 ` ericbavier
2016-04-13 21:44 ` Ludovic Courtès
2016-04-06 4:32 ` [PATCH 5/9] gnu: Add woff2 ericbavier
` (6 subsequent siblings)
9 siblings, 1 reply; 34+ messages in thread
From: ericbavier @ 2016-04-06 4:32 UTC (permalink / raw)
To: guix-devel; +Cc: Eric Bavier
From: Eric Bavier <bavier@member.fsf.org>
* gnu/packages/compression.scm (brotli): New variable.
---
gnu/packages/compression.scm | 41 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 938d4b8..5c9c00c 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
-;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
@@ -33,6 +33,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages backup)
#:use-module (gnu packages base)
#:use-module (gnu packages perl)
@@ -688,3 +689,41 @@ a collection of smaller blocks which makes random access to the original data
possible and can compress in parallel. This is especially useful for large
tarballs.")
(license license:bsd-2)))
+
+(define-public brotli
+ (let ((commit "e992cce7a174d6e2b3486616499d26bb0bad6448"))
+ (package
+ (name "brotli")
+ (version "0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bagder/libbrotli.git")
+ (commit commit)
+ (recursive? #t)))
+ (file-name (string-append name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1qxxsasvwbbbh6dl3138y9h3fg0q2v7xdk5jjc690bdg7g1wrj6n"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; This is a recursive submodule that is unnecessary for this
+ ;; package, so delete it.
+ '(delete-file-recursively "brotli/terryfy"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'autogen
+ (lambda _
+ (mkdir "m4")
+ (system* "autoreconf" "-vfi"))))))
+ (home-page "https://github.com/bagder/libbrotli/")
+ (synopsis "Brotli encoder/decoder libraries")
+ (description
+ "This package provides Brotli encoder and decoder libraries: libbrotlienc
+and libbrotlidec, respectively.")
+ (license license:expat))))
--
2.7.3
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 5/9] gnu: Add woff2.
2016-04-06 4:32 [PATCH 1/9] gnu: Add ttfautohint ericbavier
` (2 preceding siblings ...)
2016-04-06 4:32 ` [PATCH 4/9] gnu: Add brotli ericbavier
@ 2016-04-06 4:32 ` ericbavier
2016-04-06 4:32 ` [PATCH 6/9] gnu: fontforge: Make SVG builds reproducible ericbavier
` (5 subsequent siblings)
9 siblings, 0 replies; 34+ messages in thread
From: ericbavier @ 2016-04-06 4:32 UTC (permalink / raw)
To: guix-devel; +Cc: Eric Bavier
From: Eric Bavier <bavier@member.fsf.org>
* gnu/packages/fontutils.scm (woff2): New variable.
* gnu/packages/patches/woff2-libbrotli.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
---
gnu-system.am | 1 +
gnu/packages/fontutils.scm | 39 ++++++++++++++
gnu/packages/patches/woff2-libbrotli.patch | 84 ++++++++++++++++++++++++++++++
3 files changed, 124 insertions(+)
create mode 100644 gnu/packages/patches/woff2-libbrotli.patch
diff --git a/gnu-system.am b/gnu-system.am
index d3d08da..977a898 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -785,6 +785,7 @@ dist_patch_DATA = \
gnu/packages/patches/wicd-urwid-1.3.patch \
gnu/packages/patches/wicd-wpa2-ttls.patch \
gnu/packages/patches/wmctrl-64-fix.patch \
+ gnu/packages/patches/woff2-libbrotli.patch \
gnu/packages/patches/wpa-supplicant-CVE-2015-5310.patch \
gnu/packages/patches/wpa-supplicant-CVE-2015-5314.patch \
gnu/packages/patches/wpa-supplicant-CVE-2015-5315.patch \
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 1e2424b..75edd55 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -39,6 +39,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix svn-download)
+ #:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu))
@@ -179,6 +180,44 @@ TTF (TrueType/OpenType Font) files.")
(license license:bsd-2)
(home-page "https://code.google.com/archive/p/ttf2eot/")))
+(define-public woff2
+ (let ((commit "4e698b8c6c5e070d53c340db9ddf160e21070ede"))
+ (package
+ (name "woff2")
+ (version (string-append "20160306." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/woff2.git")
+ (commit commit)))
+ (file-name (string-append name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0wka0yhf0cjmd4rv2jckxpyv6lb5ckj4nj0k1ajq5hrjy7f30lcp"))
+ (patches (map search-patch '("woff2-libbrotli.patch")))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("brotli" ,brotli)))
+ (arguments
+ `(#:tests? #f ;no tests
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "woff2_compress" bin)
+ (install-file "woff2_decompress" bin)
+ #t))))))
+ (synopsis "Compress TrueType fonts to WOFF2")
+ (description
+ "This package provides utilities for compressing/decompressing TrueType
+fonts to/from the WOFF2 format.")
+ (license license:asl2.0)
+ (home-page "https://github.com/google/woff2"))))
+
(define-public fontconfig
(package
(name "fontconfig")
diff --git a/gnu/packages/patches/woff2-libbrotli.patch b/gnu/packages/patches/woff2-libbrotli.patch
new file mode 100644
index 0000000..47539c8
--- /dev/null
+++ b/gnu/packages/patches/woff2-libbrotli.patch
@@ -0,0 +1,84 @@
+From: Eric Bavier <bavier@member.fsf.org>
+Date: Sat, 2 Apr 2016 01:31:03 -0500
+Subject: [PATCH] Build against external libbrotli.
+
+---
+ Makefile | 20 ++++----------------
+ src/woff2_dec.cc | 2 +-
+ src/woff2_enc.cc | 2 +-
+ 3 files changed, 6 insertions(+), 18 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 92b8d54..618a751 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ OS := $(shell uname)
+
+-CPPFLAGS = -I./brotli/dec/ -I./brotli/enc/ -I./src
++CPPFLAGS := -I./src $(shell pkg-config --cflags libbrotlienc libbrotlidec)
+
+ CC ?= gcc
+ CXX ?= g++
+@@ -22,29 +22,17 @@ OUROBJ = font.o glyph.o normalize.o table_tags.o transform.o \
+ woff2_dec.o woff2_enc.o woff2_common.o woff2_out.o \
+ variable_length.o
+
+-BROTLI = brotli
+-ENCOBJ = $(BROTLI)/enc/*.o
+-DECOBJ = $(BROTLI)/dec/*.o
++BROTLI_LIBS := $(shell pkg-config --libs libbrotlienc libbrotlidec)
+
+ OBJS = $(patsubst %, $(SRCDIR)/%, $(OUROBJ))
+ EXECUTABLES=woff2_compress woff2_decompress
+
+ EXE_OBJS=$(patsubst %, $(SRCDIR)/%.o, $(EXECUTABLES))
+
+-ifeq (,$(wildcard $(BROTLI)/*))
+- $(error Brotli dependency not found : you must initialize the Git submodule)
+-endif
+-
+ all : $(OBJS) $(EXECUTABLES)
+
+-$(EXECUTABLES) : $(EXE_OBJS) deps
+- $(CXX) $(LFLAGS) $(OBJS) $(ENCOBJ) $(DECOBJ) $(SRCDIR)/$@.o -o $@
+-
+-deps :
+- $(MAKE) -C $(BROTLI)/dec
+- $(MAKE) -C $(BROTLI)/enc
++$(EXECUTABLES) : $(EXE_OBJS)
++ $(CXX) $(LDFLAGS) $(OBJS) $(SRCDIR)/$@.o -o $@ $(BROTLI_LIBS) $(LIBS)
+
+ clean :
+ rm -f $(OBJS) $(EXE_OBJS) $(EXECUTABLES)
+- $(MAKE) -C $(BROTLI)/dec clean
+- $(MAKE) -C $(BROTLI)/enc clean
+diff --git a/src/woff2_dec.cc b/src/woff2_dec.cc
+index 837eede..98c01ce 100644
+--- a/src/woff2_dec.cc
++++ b/src/woff2_dec.cc
+@@ -27,7 +27,7 @@
+ #include <memory>
+ #include <utility>
+
+-#include "./decode.h"
++#include "brotli/dec/decode.h"
+ #include "./buffer.h"
+ #include "./port.h"
+ #include "./round.h"
+diff --git a/src/woff2_enc.cc b/src/woff2_enc.cc
+index 920c614..00d74da 100644
+--- a/src/woff2_enc.cc
++++ b/src/woff2_enc.cc
+@@ -23,7 +23,7 @@
+ #include <string>
+ #include <vector>
+
+-#include "./encode.h"
++#include "brotli/enc/encode.h"
+ #include "./buffer.h"
+ #include "./font.h"
+ #include "./normalize.h"
+--
+2.7.3
+
--
2.7.3
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 6/9] gnu: fontforge: Make SVG builds reproducible.
2016-04-06 4:32 [PATCH 1/9] gnu: Add ttfautohint ericbavier
` (3 preceding siblings ...)
2016-04-06 4:32 ` [PATCH 5/9] gnu: Add woff2 ericbavier
@ 2016-04-06 4:32 ` ericbavier
2016-04-06 17:36 ` Leo Famulari
2016-04-06 4:32 ` [PATCH 7/9] gnu: Add font-fantasque-sans ericbavier
` (4 subsequent siblings)
9 siblings, 1 reply; 34+ messages in thread
From: ericbavier @ 2016-04-06 4:32 UTC (permalink / raw)
To: guix-devel; +Cc: Eric Bavier
From: Eric Bavier <bavier@member.fsf.org>
* gnu/packages/fontutils.scm (fontforge)[source]: Add snippet to clear
timestamp in svg.c.
---
gnu/packages/fontutils.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 75edd55..5ca9835 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -512,7 +512,12 @@ definitions.")
;; 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"))))))
+ (("cvt_unix_to_1904\\(now") "cvt_unix_to_1904(0"))
+
+ ;; Make SVG builds bit-reproducible by clearing the timestamp
+ ;; that goes in SVG files.
+ (substitute* "fontforge/svg.c"
+ (("ctime\\(&now\\)") "ctime(0)"))))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
--
2.7.3
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 7/9] gnu: Add font-fantasque-sans.
2016-04-06 4:32 [PATCH 1/9] gnu: Add ttfautohint ericbavier
` (4 preceding siblings ...)
2016-04-06 4:32 ` [PATCH 6/9] gnu: fontforge: Make SVG builds reproducible ericbavier
@ 2016-04-06 4:32 ` ericbavier
2016-04-06 4:33 ` [PATCH 8/9] gnu: fontforge: Use modify-phases ericbavier
` (3 subsequent siblings)
9 siblings, 0 replies; 34+ messages in thread
From: ericbavier @ 2016-04-06 4:32 UTC (permalink / raw)
To: guix-devel; +Cc: Eric Bavier
From: Eric Bavier <bavier@member.fsf.org>
* gnu/packages/fonts.scm (font-fantasque-sans): New variable.
---
gnu/packages/fonts.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 3d75591..2ed11d4 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Nils Gillmann <niasterisk@grrlz.net>
;;; Copyright © 2016 Jookia <166291@gmail.com>
+;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -759,3 +760,49 @@ It contains the following fonts and styles:
@item UnGungseo: cursive, brush-stroke.
@end enumerate\n")
(license license:gpl2+)))
+
+(define-public font-fantasque-sans
+ (package
+ (name "font-fantasque-sans")
+ (version "1.7.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/belluzj/fantasque-sans/"
+ "archive/v" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1nr5sy34ih3hlf1fkcrp398k4vpcsvl0yfy6kv50jirrjfy66d1h"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("ttfautohint" ,ttfautohint)
+ ("woff-tools" ,woff-tools)
+ ("fontforge" ,fontforge)
+ ("woff2" ,woff2)
+ ("ttf2eot" ,ttf2eot)))
+ (arguments
+ `(#:tests? #f ;test target intended for visual inspection
+ #:phases (modify-phases %standard-phases
+ (delete 'configure) ;no configuration
+ (replace 'install
+ ;; 'make install' wants to install to ~/.fonts, install to
+ ;; output instead.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (font-dir (string-append out "/share/fonts"))
+ (truetype-dir (string-append font-dir "/truetype"))
+ (opentype-dir (string-append font-dir "/opentype"))
+ (webfonts-dir (string-append font-dir "/webfonts")))
+ (copy-recursively "OTF" opentype-dir)
+ (for-each (lambda (f) (install-file f truetype-dir))
+ (find-files "." "\\.ttf$"))
+ (copy-recursively "Webfonts" webfonts-dir)
+ #t))))))
+ (synopsis "Font family with a monospaced variant for programmers")
+ (description
+ "Fantasque Sans Mono is a programming font designed with functionality in
+mind. The font includes a bold version and a good italic version with new
+glyph designs, not just an added slant.")
+ (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono")
+ (license license:silofl1.1)))
--
2.7.3
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 8/9] gnu: fontforge: Use modify-phases.
2016-04-06 4:32 [PATCH 1/9] gnu: Add ttfautohint ericbavier
` (5 preceding siblings ...)
2016-04-06 4:32 ` [PATCH 7/9] gnu: Add font-fantasque-sans ericbavier
@ 2016-04-06 4:33 ` ericbavier
2016-04-06 4:33 ` [PATCH 9/9] gnu: fontforge: Install 'showttf' tool ericbavier
` (2 subsequent siblings)
9 siblings, 0 replies; 34+ messages in thread
From: ericbavier @ 2016-04-06 4:33 UTC (permalink / raw)
To: guix-devel; +Cc: Eric Bavier
From: Eric Bavier <bavier@member.fsf.org>
* gnu/packages/fontutils.scm (fontforge)[arguments]: Use modify-phases.
---
gnu/packages/fontutils.scm | 64 ++++++++++++++++++++++------------------------
1 file changed, 31 insertions(+), 33 deletions(-)
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 5ca9835..5b3247b 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -546,39 +546,37 @@ definitions.")
(arguments
'(#:tests? #f
#:phases
- (alist-cons-before
- 'configure 'patch-configure
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((libxml2 (assoc-ref inputs "libxml2"))
- (cairo (assoc-ref inputs "cairo"))
- (pango (assoc-ref inputs "pango")))
- (substitute* "configure"
- ;; configure looks for a directory to be present to determine
- ;; whether libxml2 is available, rather than checking for the
- ;; library or headers. Point it to the correct directory.
- (("/usr/include/libxml2")
- (string-append libxml2 "/include/libxml2"))
- ;; Similary, the search directories for cairo and pango are
- ;; hard-coded.
- (("gww_prefix in.*") (string-append "gww_prefix in "
- cairo " " pango "\n")))))
- (alist-cons-after
- 'install 'set-library-path
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (potrace (string-append (assoc-ref inputs "potrace") "/bin")))
- (wrap-program (string-append out "/bin/fontforge")
- ;; Fontforge dynamically opens libraries.
- `("LD_LIBRARY_PATH" ":" prefix
- ,(map (lambda (input)
- (string-append (assoc-ref inputs input)
- "/lib"))
- '("libtiff" "libjpeg" "libpng" "giflib"
- "libxml2" "zlib" "libspiro" "freetype"
- "pango" "cairo" "fontconfig")))
- ;; Checks for potrace program at runtime
- `("PATH" ":" prefix (,potrace)))))
- %standard-phases))))
+ (modify-phases %standard-phases
+ (add-before 'configure 'patch-configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((libxml2 (assoc-ref inputs "libxml2"))
+ (cairo (assoc-ref inputs "cairo"))
+ (pango (assoc-ref inputs "pango")))
+ (substitute* "configure"
+ ;; configure looks for a directory to be present to determine
+ ;; whether libxml2 is available, rather than checking for the
+ ;; library or headers. Point it to the correct directory.
+ (("/usr/include/libxml2")
+ (string-append libxml2 "/include/libxml2"))
+ ;; Similary, the search directories for cairo and pango are
+ ;; hard-coded.
+ (("gww_prefix in.*") (string-append "gww_prefix in "
+ cairo " " pango "\n"))))))
+ (add-after 'install 'set-library-path
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (potrace (string-append (assoc-ref inputs "potrace") "/bin")))
+ (wrap-program (string-append out "/bin/fontforge")
+ ;; Fontforge dynamically opens libraries.
+ `("LD_LIBRARY_PATH" ":" prefix
+ ,(map (lambda (input)
+ (string-append (assoc-ref inputs input)
+ "/lib"))
+ '("libtiff" "libjpeg" "libpng" "giflib"
+ "libxml2" "zlib" "libspiro" "freetype"
+ "pango" "cairo" "fontconfig")))
+ ;; Checks for potrace program at runtime
+ `("PATH" ":" prefix (,potrace)))))))))
(synopsis "Outline font editor")
(description
"FontForge allows you to create and modify postscript, truetype and
--
2.7.3
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 9/9] gnu: fontforge: Install 'showttf' tool.
2016-04-06 4:32 [PATCH 1/9] gnu: Add ttfautohint ericbavier
` (6 preceding siblings ...)
2016-04-06 4:33 ` [PATCH 8/9] gnu: fontforge: Use modify-phases ericbavier
@ 2016-04-06 4:33 ` ericbavier
2016-04-06 12:13 ` [PATCH 1/9] gnu: Add ttfautohint Alex Kost
2016-04-13 21:36 ` Ludovic Courtès
9 siblings, 0 replies; 34+ messages in thread
From: ericbavier @ 2016-04-06 4:33 UTC (permalink / raw)
To: guix-devel; +Cc: Eric Bavier
From: Eric Bavier <bavier@member.fsf.org>
* gnu/packages/fontutils.scm (fontforge)[arguments]: Add 'build-contrib'
phase.
---
gnu/packages/fontutils.scm | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 5b3247b..f120aef 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -562,6 +562,14 @@ definitions.")
;; hard-coded.
(("gww_prefix in.*") (string-append "gww_prefix in "
cairo " " pango "\n"))))))
+ (add-after 'build 'build-contrib
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (and (zero? (system* "make" "-Ccontrib/fonttools"
+ "CC=gcc" "showttf"))
+ (begin (install-file "contrib/fonttools/showttf" bin)
+ #t)))))
(add-after 'install 'set-library-path
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
--
2.7.3
^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: [PATCH 1/9] gnu: Add ttfautohint.
2016-04-06 4:32 [PATCH 1/9] gnu: Add ttfautohint ericbavier
` (7 preceding siblings ...)
2016-04-06 4:33 ` [PATCH 9/9] gnu: fontforge: Install 'showttf' tool ericbavier
@ 2016-04-06 12:13 ` Alex Kost
2016-04-06 14:57 ` Eric Bavier
2016-04-13 21:36 ` Ludovic Courtès
9 siblings, 1 reply; 34+ messages in thread
From: Alex Kost @ 2016-04-06 12:13 UTC (permalink / raw)
To: ericbavier; +Cc: guix-devel, Eric Bavier
ericbavier@openmailbox.org (2016-04-06 07:32 +0300) wrote:
> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/fontutils.scm (ttfautohint): New variable.
> * gnu/packages/patches/ttfautohint-source-date-epoch.patch: New patch.
> * gnu-system.am (dist_patch_DATA): Add it.
> ---
> gnu-system.am | 1 +
> gnu/packages/fontutils.scm | 36 ++++++++++-
> .../patches/ttfautohint-source-date-epoch.patch | 70 ++++++++++++++++++++++
> 3 files changed, 106 insertions(+), 1 deletion(-)
> create mode 100644 gnu/packages/patches/ttfautohint-source-date-epoch.patch
[...]
> +(define-public ttfautohint
> + (package
> + (name "ttfautohint")
> + (version "1.5")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "mirror://savannah/freetype/ttfautohint-"
> + version ".tar.gz"))
> + (sha256
> + (base32
> + ;; /gnu/store/5kzmy7061aimljpga9qfz49227283sfr-ttfautohint-1.5.tar.gz
^^^^^^^^^^
Leftover line?
> + "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
> + (patches (map search-patch '("ttfautohint-source-date-epoch.patch")))))
Since it's just a single patch, I don't see a reason to use 'map' here.
> + (build-system gnu-build-system)
> + (native-inputs
> + `(("flex" ,flex)
> + ("bison" ,bison)
> + ("pkg-config" ,pkg-config)))
> + (inputs
> + `(("freetype" ,freetype)
> + ("harfbuzz" ,harfbuzz)))
> + (arguments
> + `(#:configure-flags '("--with-qt=no"))) ;no gui
> + (synopsis "Automated font hinting")
> + (description
> + "ttfautohint provides a 99% automated hinting process and a platform for
> +finely hand-hinting the last 1%. It is ideal for web fonts and supports many
> +scripts.")
> + (license license:gpl2+) ;or FreeType license
Or FreeType? Sorry, what does it mean? If some files are under GPL2+
and some under FreeType, then why don't you use a list of licenses?
--
Alex
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 1/9] gnu: Add ttfautohint.
2016-04-06 12:13 ` [PATCH 1/9] gnu: Add ttfautohint Alex Kost
@ 2016-04-06 14:57 ` Eric Bavier
2016-04-07 9:52 ` Specifying package patches in a more convenient form Alex Kost
2016-04-13 21:40 ` [PATCH 1/9] gnu: Add ttfautohint Ludovic Courtès
0 siblings, 2 replies; 34+ messages in thread
From: Eric Bavier @ 2016-04-06 14:57 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
On Wed, 06 Apr 2016 15:13:47 +0300
Alex Kost <alezost@gmail.com> wrote:
> ericbavier@openmailbox.org (2016-04-06 07:32 +0300) wrote:
>
> > From: Eric Bavier <bavier@member.fsf.org>
> >
> > * gnu/packages/fontutils.scm (ttfautohint): New variable.
> > * gnu/packages/patches/ttfautohint-source-date-epoch.patch: New patch.
> > * gnu-system.am (dist_patch_DATA): Add it.
> > ---
> > gnu-system.am | 1 +
> > gnu/packages/fontutils.scm | 36 ++++++++++-
> > .../patches/ttfautohint-source-date-epoch.patch | 70 ++++++++++++++++++++++
> > 3 files changed, 106 insertions(+), 1 deletion(-)
> > create mode 100644 gnu/packages/patches/ttfautohint-source-date-epoch.patch
> [...]
> > +(define-public ttfautohint
> > + (package
> > + (name "ttfautohint")
> > + (version "1.5")
> > + (source
> > + (origin
> > + (method url-fetch)
> > + (uri (string-append "mirror://savannah/freetype/ttfautohint-"
> > + version ".tar.gz"))
> > + (sha256
> > + (base32
> > + ;; /gnu/store/5kzmy7061aimljpga9qfz49227283sfr-ttfautohint-1.5.tar.gz
> ^^^^^^^^^^
> Leftover line?
Yes, thanks for catching it.
> > + "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
> > + (patches (map search-patch '("ttfautohint-source-date-epoch.patch")))))
>
> Since it's just a single patch, I don't see a reason to use 'map' here.
Just that it's less to change if more patches are added later. The
same has been used in other packages.
>
> > + (build-system gnu-build-system)
> > + (native-inputs
> > + `(("flex" ,flex)
> > + ("bison" ,bison)
> > + ("pkg-config" ,pkg-config)))
> > + (inputs
> > + `(("freetype" ,freetype)
> > + ("harfbuzz" ,harfbuzz)))
> > + (arguments
> > + `(#:configure-flags '("--with-qt=no"))) ;no gui
> > + (synopsis "Automated font hinting")
> > + (description
> > + "ttfautohint provides a 99% automated hinting process and a platform for
> > +finely hand-hinting the last 1%. It is ideal for web fonts and supports many
> > +scripts.")
> > + (license license:gpl2+) ;or FreeType license
>
> Or FreeType? Sorry, what does it mean? If some files are under GPL2+
> and some under FreeType, then why don't you use a list of licenses?
>
The license text says to pick one, and I wanted to indicate that in
some way in the absense of more descriptive license operators.
`~Eric
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 6/9] gnu: fontforge: Make SVG builds reproducible.
2016-04-06 4:32 ` [PATCH 6/9] gnu: fontforge: Make SVG builds reproducible ericbavier
@ 2016-04-06 17:36 ` Leo Famulari
2016-04-06 17:44 ` Eric Bavier
0 siblings, 1 reply; 34+ messages in thread
From: Leo Famulari @ 2016-04-06 17:36 UTC (permalink / raw)
To: ericbavier; +Cc: guix-devel, Eric Bavier
On Tue, Apr 05, 2016 at 11:32:58PM -0500, ericbavier@openmailbox.org wrote:
> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/fontutils.scm (fontforge)[source]: Add snippet to clear
> timestamp in svg.c.
> ---
> gnu/packages/fontutils.scm | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
> index 75edd55..5ca9835 100644
> --- a/gnu/packages/fontutils.scm
> +++ b/gnu/packages/fontutils.scm
> @@ -512,7 +512,12 @@ definitions.")
> ;; 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"))))))
> + (("cvt_unix_to_1904\\(now") "cvt_unix_to_1904(0"))
> +
> + ;; Make SVG builds bit-reproducible by clearing the timestamp
> + ;; that goes in SVG files.
> + (substitute* "fontforge/svg.c"
> + (("ctime\\(&now\\)") "ctime(0)"))))))
Could you use the value of the environment variable SOURCE_DATE_EPOCH
instead of 0?
> (build-system gnu-build-system)
> (native-inputs
> `(("pkg-config" ,pkg-config)))
> --
> 2.7.3
>
>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 6/9] gnu: fontforge: Make SVG builds reproducible.
2016-04-06 17:36 ` Leo Famulari
@ 2016-04-06 17:44 ` Eric Bavier
2016-04-06 17:56 ` Leo Famulari
0 siblings, 1 reply; 34+ messages in thread
From: Eric Bavier @ 2016-04-06 17:44 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
On 2016-04-06 12:36, Leo Famulari wrote:
> On Tue, Apr 05, 2016 at 11:32:58PM -0500, ericbavier@openmailbox.org
> wrote:
>> From: Eric Bavier <bavier@member.fsf.org>
>>
>> * gnu/packages/fontutils.scm (fontforge)[source]: Add snippet to clear
>> timestamp in svg.c.
>> ---
>> gnu/packages/fontutils.scm | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
>> index 75edd55..5ca9835 100644
>> --- a/gnu/packages/fontutils.scm
>> +++ b/gnu/packages/fontutils.scm
>> @@ -512,7 +512,12 @@ definitions.")
>> ;; 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"))))))
>> + (("cvt_unix_to_1904\\(now") "cvt_unix_to_1904(0"))
>> +
>> + ;; Make SVG builds bit-reproducible by clearing the
>> timestamp
>> + ;; that goes in SVG files.
>> + (substitute* "fontforge/svg.c"
>> + (("ctime\\(&now\\)") "ctime(0)"))))))
>
> Could you use the value of the environment variable SOURCE_DATE_EPOCH
> instead of 0?
Probably. But I'd save that for a later update, since it would be a
much bigger change (that we could hopefully move upstream).
`~Eric
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 6/9] gnu: fontforge: Make SVG builds reproducible.
2016-04-06 17:44 ` Eric Bavier
@ 2016-04-06 17:56 ` Leo Famulari
0 siblings, 0 replies; 34+ messages in thread
From: Leo Famulari @ 2016-04-06 17:56 UTC (permalink / raw)
To: Eric Bavier; +Cc: guix-devel
On Wed, Apr 06, 2016 at 12:44:31PM -0500, Eric Bavier wrote:
> On 2016-04-06 12:36, Leo Famulari wrote:
> >On Tue, Apr 05, 2016 at 11:32:58PM -0500, ericbavier@openmailbox.org
> >wrote:
> >>From: Eric Bavier <bavier@member.fsf.org>
> >>
> >>* gnu/packages/fontutils.scm (fontforge)[source]: Add snippet to clear
> >> timestamp in svg.c.
> >>---
> >> gnu/packages/fontutils.scm | 7 ++++++-
> >> 1 file changed, 6 insertions(+), 1 deletion(-)
> >>
> >>diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
> >>index 75edd55..5ca9835 100644
> >>--- a/gnu/packages/fontutils.scm
> >>+++ b/gnu/packages/fontutils.scm
> >>@@ -512,7 +512,12 @@ definitions.")
> >> ;; 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"))))))
> >>+ (("cvt_unix_to_1904\\(now") "cvt_unix_to_1904(0"))
> >>+
> >>+ ;; Make SVG builds bit-reproducible by clearing the
> >>timestamp
> >>+ ;; that goes in SVG files.
> >>+ (substitute* "fontforge/svg.c"
> >>+ (("ctime\\(&now\\)") "ctime(0)"))))))
> >
> >Could you use the value of the environment variable SOURCE_DATE_EPOCH
> >instead of 0?
>
> Probably. But I'd save that for a later update, since it would be a much
> bigger change (that we could hopefully move upstream).
You could put the logic in the package definition and string-append the
value into svg.c.
If not, can you set the ctime to '1'? That is what we are using as the
value of SOURCE_DATE_EPOCH on Guix:
http://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/gnu-build-system.scm#n46
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 2/9] gnu: Add woff-tools.
2016-04-06 4:32 ` [PATCH 2/9] gnu: Add woff-tools ericbavier
@ 2016-04-07 6:18 ` Efraim Flashner
2016-04-07 14:25 ` Eric Bavier
2016-04-13 21:37 ` Ludovic Courtès
0 siblings, 2 replies; 34+ messages in thread
From: Efraim Flashner @ 2016-04-07 6:18 UTC (permalink / raw)
To: ericbavier; +Cc: guix-devel, Eric Bavier
[-- Attachment #1: Type: text/plain, Size: 2817 bytes --]
On Tue, Apr 05, 2016 at 11:32:54PM -0500, ericbavier@openmailbox.org wrote:
> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/fontutils.scm (woff-tools): New variable.
> ---
> gnu/packages/fontutils.scm | 41 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
> index a0701d5..614aac5 100644
> --- a/gnu/packages/fontutils.scm
> +++ b/gnu/packages/fontutils.scm
> @@ -104,6 +104,47 @@ scripts.")
> (license license:gpl2+) ;or FreeType license
> (home-page "http://www.freetype.org/ttfautohint/")))
>
> +(define-public woff-tools
> + (package
> + (name "woff-tools")
> + (version "2009.10.04")
> + (source
> + (origin
> + (method url-fetch)
> + ;; Upstream source is unversioned, so use Debian's versioned tarball
> + (uri (string-append "mirror://debian/pool/main/w/woff-tools/"
> + "woff-tools_" version ".orig.tar.gz"))
2009 is a long time ago, but woff-tools are still in Debian Sid so we
don't have to worry about needing to go to archive.debian.org/... for
the sources any time soon. By the way, is there a more recent version?
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "1i97gkqa6jfzlslsngqf556kx60knlgf7yc9pzsq2pizc6f0d4zl"))))
> + (build-system gnu-build-system)
> + (inputs
> + `(("zlib" ,zlib)))
> + (arguments
> + `(#:make-flags '("CC=gcc")
> + #:tests? #f ;no tests
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure) ;no configuration
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin")))
> + (install-file "sfnt2woff" bin)
> + (install-file "woff2sfnt" bin)))))))
> + (synopsis "Convert between OpenType and WOFF formats")
> + (description
> + "This package provides two tools:
> +@table @code
> +@item sfnt2woff
> +Converts OpenType fonts to WOFF fonts
> +@item woff2sfnt
> +Converts WOFF fonts to OpenType fonts
> +@end table")
> + (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))
> + (home-page "https://people.mozilla.com/~jkew/woff/")))
> +
> (define-public fontconfig
> (package
> (name "fontconfig")
> --
> 2.7.3
>
Looks good to me
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 3/9] gnu: Add ttf2eot.
2016-04-06 4:32 ` [PATCH 3/9] gnu: Add ttf2eot ericbavier
@ 2016-04-07 6:24 ` Efraim Flashner
2016-04-07 14:30 ` Eric Bavier
2016-04-08 3:49 ` Eric Bavier
0 siblings, 2 replies; 34+ messages in thread
From: Efraim Flashner @ 2016-04-07 6:24 UTC (permalink / raw)
To: ericbavier; +Cc: guix-devel, Eric Bavier
[-- Attachment #1: Type: text/plain, Size: 4252 bytes --]
On Tue, Apr 05, 2016 at 11:32:55PM -0500, ericbavier@openmailbox.org wrote:
> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/fontutils.scm (ttf2eot): New variable.
> * gnu/packages/patches/ttf2eot-cstddef.patch: New patch.
> * gnu-system.am (dist_patch_DATA): Add it.
> ---
> gnu-system.am | 1 +
> gnu/packages/fontutils.scm | 34 ++++++++++++++++++++++++++++++
> gnu/packages/patches/ttf2eot-cstddef.patch | 12 +++++++++++
> 3 files changed, 47 insertions(+)
> create mode 100644 gnu/packages/patches/ttf2eot-cstddef.patch
>
> diff --git a/gnu-system.am b/gnu-system.am
> index 764e564..d3d08da 100644
> --- a/gnu-system.am
> +++ b/gnu-system.am
> @@ -747,6 +747,7 @@ dist_patch_DATA = \
> gnu/packages/patches/tidy-CVE-2015-5522+5523.patch \
> gnu/packages/patches/tinyxml-use-stl.patch \
> gnu/packages/patches/tk-find-library.patch \
> + gnu/packages/patches/ttf2eot-cstddef.patch \
> gnu/packages/patches/ttfautohint-source-date-epoch.patch \
> gnu/packages/patches/tophat-build-with-later-seqan.patch \
> gnu/packages/patches/torsocks-dns-test.patch \
> diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
> index 614aac5..1e2424b 100644
> --- a/gnu/packages/fontutils.scm
> +++ b/gnu/packages/fontutils.scm
> @@ -145,6 +145,40 @@ Converts WOFF fonts to OpenType fonts
> (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))
> (home-page "https://people.mozilla.com/~jkew/woff/")))
>
> +(define-public ttf2eot
> + (package
> + (name "ttf2eot")
> + (version "0.0.2")
What about version 0.0.2-2?
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://storage.googleapis.com/"
> + "google-code-archive-downloads/v2/"
> + "code.google.com/ttf2eot/"
> + "ttf2eot-" version "-2.tar.gz"))
I checked and it doesn't look like this project was exported to github
> + (sha256
> + (base32
> + "1f4dzzmhn0208dvbm3ia5ar6ls9apwc6ampy5blmfxkigi6z0g02"))
> + (patches (map search-patch '("ttf2eot-cstddef.patch")))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ;no tests
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure) ;no configuration
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin")))
> + (install-file "ttf2eot" bin)))))))
> + (synopsis "Convert from TrueType to Embeddable Open Type")
> + (description
> + "This package contains a commandline wrapper around OpenTypeUtilities.cpp
> +from Chromium, used to make EOT (Embeddable Open Type) files from
> +TTF (TrueType/OpenType Font) files.")
> + (license license:bsd-2)
Issue 30[0] says that the readme says its bsd/lgpl licensed.
> + (home-page "https://code.google.com/archive/p/ttf2eot/")))
> +
> (define-public fontconfig
> (package
> (name "fontconfig")
> diff --git a/gnu/packages/patches/ttf2eot-cstddef.patch b/gnu/packages/patches/ttf2eot-cstddef.patch
> new file mode 100644
> index 0000000..af76898
> --- /dev/null
> +++ b/gnu/packages/patches/ttf2eot-cstddef.patch
> @@ -0,0 +1,12 @@
> +From resolution of https://code.google.com/p/ttf2eot/issues/detail?id=26
> +
> +--- ttf2eot-0.0.2-2/OpenTypeUtilities.cpp 2009-04-30 04:18:46.000000000 -0500
> ++++ ttf2eot-0.0.2-2/OpenTypeUtilities.cpp 2016-03-31 01:06:39.109996011 -0500
> +@@ -25,6 +25,7 @@
> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> ++#include <cstddef>
> + #include <string.h>
> + #include <vector>
> +
> --
> 2.7.3
>
[0] https://code.google.com/archive/p/ttf2eot/issues/30
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Specifying package patches in a more convenient form
2016-04-06 14:57 ` Eric Bavier
@ 2016-04-07 9:52 ` Alex Kost
2016-04-07 10:08 ` Andy Wingo
2016-04-07 21:54 ` Ludovic Courtès
2016-04-13 21:40 ` [PATCH 1/9] gnu: Add ttfautohint Ludovic Courtès
1 sibling, 2 replies; 34+ messages in thread
From: Alex Kost @ 2016-04-07 9:52 UTC (permalink / raw)
To: Eric Bavier; +Cc: guix-devel
Eric Bavier (2016-04-06 17:57 +0300) wrote:
> On Wed, 06 Apr 2016 15:13:47 +0300
> Alex Kost <alezost@gmail.com> wrote:
[...]
>> > + "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
>> > + (patches (map search-patch '("ttfautohint-source-date-epoch.patch")))))
>>
>> Since it's just a single patch, I don't see a reason to use 'map' here.
>
> Just that it's less to change if more patches are added later. The
> same has been used in other packages.
I strongly disagree with this policy. More patches may never be added,
but mapping through a list of a single element looks redundant for me.
Talking about how we specify package patches currently, I think it would
be better to do it in a more clean and general way. What about adding
the following macro to (gnu packages)?
(define-syntax-rule (search-patches file-name ...)
"Return a list of patches for each FILE-NAME."
(list (search-patch file-name) ...))
So instead of things like this:
(list (search-patch "foo.patch")
(search-patch "bar.patch"))
or this:
(map search-patch '("foo.patch"
"bar.patch"))
we'll have:
(search-patches "foo.patch"
"bar.patch")
If it is acceptable, I can make patches to add this macro and to change
package recipes to use it.
P.S. Actually, I don't like 'search-patches' name. Better ideas?
--
Alex
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: Specifying package patches in a more convenient form
2016-04-07 9:52 ` Specifying package patches in a more convenient form Alex Kost
@ 2016-04-07 10:08 ` Andy Wingo
2016-04-07 14:41 ` Eric Bavier
2016-04-08 8:05 ` Alex Kost
2016-04-07 21:54 ` Ludovic Courtès
1 sibling, 2 replies; 34+ messages in thread
From: Andy Wingo @ 2016-04-07 10:08 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
On Thu 07 Apr 2016 11:52, Alex Kost <alezost@gmail.com> writes:
> Eric Bavier (2016-04-06 17:57 +0300) wrote:
>
>> On Wed, 06 Apr 2016 15:13:47 +0300
>> Alex Kost <alezost@gmail.com> wrote:
> [...]
>>> > + "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
>>> > + (patches (map search-patch '("ttfautohint-source-date-epoch.patch")))))
>>>
>>> Since it's just a single patch, I don't see a reason to use 'map' here.
>>
>> Just that it's less to change if more patches are added later. The
>> same has been used in other packages.
>
> I strongly disagree with this policy. More patches may never be added,
> but mapping through a list of a single element looks redundant for me.
What if the "patches" field just applied `search-path' to each of the
items in the list if the path is not absolute? Use
`absolute-file-name?' to check if this is needed or not.
Andy
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 2/9] gnu: Add woff-tools.
2016-04-07 6:18 ` Efraim Flashner
@ 2016-04-07 14:25 ` Eric Bavier
2016-04-13 21:37 ` Ludovic Courtès
1 sibling, 0 replies; 34+ messages in thread
From: Eric Bavier @ 2016-04-07 14:25 UTC (permalink / raw)
To: Efraim Flashner; +Cc: guix-devel
On 2016-04-07 01:18, Efraim Flashner wrote:
> On Tue, Apr 05, 2016 at 11:32:54PM -0500, ericbavier@openmailbox.org
> wrote:
>> From: Eric Bavier <bavier@member.fsf.org>
>>
>> * gnu/packages/fontutils.scm (woff-tools): New variable.
>> ---
>> gnu/packages/fontutils.scm | 41
>> +++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 41 insertions(+)
>>
>> diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
>> index a0701d5..614aac5 100644
>> --- a/gnu/packages/fontutils.scm
>> +++ b/gnu/packages/fontutils.scm
>> @@ -104,6 +104,47 @@ scripts.")
>> (license license:gpl2+) ;or FreeType license
>> (home-page "http://www.freetype.org/ttfautohint/")))
>>
>> +(define-public woff-tools
>> + (package
>> + (name "woff-tools")
>> + (version "2009.10.04")
>> + (source
>> + (origin
>> + (method url-fetch)
>> + ;; Upstream source is unversioned, so use Debian's versioned
>> tarball
>> + (uri (string-append "mirror://debian/pool/main/w/woff-tools/"
>> + "woff-tools_" version ".orig.tar.gz"))
>
> 2009 is a long time ago, but woff-tools are still in Debian Sid so we
> don't have to worry about needing to go to archive.debian.org/... for
> the sources any time soon. By the way, is there a more recent version?
Not that I can find.
Thanks for the review,
`~Eric
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 3/9] gnu: Add ttf2eot.
2016-04-07 6:24 ` Efraim Flashner
@ 2016-04-07 14:30 ` Eric Bavier
2016-04-08 3:49 ` Eric Bavier
1 sibling, 0 replies; 34+ messages in thread
From: Eric Bavier @ 2016-04-07 14:30 UTC (permalink / raw)
To: Efraim Flashner; +Cc: guix-devel
On 2016-04-07 01:24, Efraim Flashner wrote:
> On Tue, Apr 05, 2016 at 11:32:55PM -0500, ericbavier@openmailbox.org
> wrote:
>> From: Eric Bavier <bavier@member.fsf.org>
>>
>> * gnu/packages/fontutils.scm (ttf2eot): New variable.
>> * gnu/packages/patches/ttf2eot-cstddef.patch: New patch.
>> * gnu-system.am (dist_patch_DATA): Add it.
>> ---
>> gnu-system.am | 1 +
>> gnu/packages/fontutils.scm | 34
>> ++++++++++++++++++++++++++++++
>> gnu/packages/patches/ttf2eot-cstddef.patch | 12 +++++++++++
>> 3 files changed, 47 insertions(+)
>> create mode 100644 gnu/packages/patches/ttf2eot-cstddef.patch
>>
>> diff --git a/gnu-system.am b/gnu-system.am
>> index 764e564..d3d08da 100644
>> --- a/gnu-system.am
>> +++ b/gnu-system.am
>> @@ -747,6 +747,7 @@ dist_patch_DATA = \
>> gnu/packages/patches/tidy-CVE-2015-5522+5523.patch \
>> gnu/packages/patches/tinyxml-use-stl.patch \
>> gnu/packages/patches/tk-find-library.patch \
>> + gnu/packages/patches/ttf2eot-cstddef.patch \
>> gnu/packages/patches/ttfautohint-source-date-epoch.patch \
>> gnu/packages/patches/tophat-build-with-later-seqan.patch \
>> gnu/packages/patches/torsocks-dns-test.patch \
>> diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
>> index 614aac5..1e2424b 100644
>> --- a/gnu/packages/fontutils.scm
>> +++ b/gnu/packages/fontutils.scm
>> @@ -145,6 +145,40 @@ Converts WOFF fonts to OpenType fonts
>> (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))
>> (home-page "https://people.mozilla.com/~jkew/woff/")))
>>
>> +(define-public ttf2eot
>> + (package
>> + (name "ttf2eot")
>> + (version "0.0.2")
>
> What about version 0.0.2-2?
Yes, that might be better.
>
>> + (source
>> + (origin
>> + (method url-fetch)
>> + (uri (string-append "https://storage.googleapis.com/"
>> + "google-code-archive-downloads/v2/"
>> + "code.google.com/ttf2eot/"
>> + "ttf2eot-" version "-2.tar.gz"))
>
> I checked and it doesn't look like this project was exported to github
>
>> + (sha256
>> + (base32
>> + "1f4dzzmhn0208dvbm3ia5ar6ls9apwc6ampy5blmfxkigi6z0g02"))
>> + (patches (map search-patch '("ttf2eot-cstddef.patch")))))
>> + (build-system gnu-build-system)
>> + (arguments
>> + `(#:tests? #f ;no tests
>> + #:phases
>> + (modify-phases %standard-phases
>> + (delete 'configure) ;no configuration
>> + (replace 'install
>> + (lambda* (#:key outputs #:allow-other-keys)
>> + (let* ((out (assoc-ref outputs "out"))
>> + (bin (string-append out "/bin")))
>> + (install-file "ttf2eot" bin)))))))
>> + (synopsis "Convert from TrueType to Embeddable Open Type")
>> + (description
>> + "This package contains a commandline wrapper around
>> OpenTypeUtilities.cpp
>> +from Chromium, used to make EOT (Embeddable Open Type) files from
>> +TTF (TrueType/OpenType Font) files.")
>> + (license license:bsd-2)
>
> Issue 30[0] says that the readme says its bsd/lgpl licensed.
I'll look into it.
Thanks,
`~Eric
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: Specifying package patches in a more convenient form
2016-04-07 10:08 ` Andy Wingo
@ 2016-04-07 14:41 ` Eric Bavier
2016-04-08 8:05 ` Alex Kost
1 sibling, 0 replies; 34+ messages in thread
From: Eric Bavier @ 2016-04-07 14:41 UTC (permalink / raw)
To: Andy Wingo; +Cc: guix-devel, Alex Kost
On 2016-04-07 05:08, Andy Wingo wrote:
> On Thu 07 Apr 2016 11:52, Alex Kost <alezost@gmail.com> writes:
>
>> Eric Bavier (2016-04-06 17:57 +0300) wrote:
>>
>>> On Wed, 06 Apr 2016 15:13:47 +0300
>>> Alex Kost <alezost@gmail.com> wrote:
>> [...]
>>>> > + "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
>>>> > + (patches (map search-patch '("ttfautohint-source-date-epoch.patch")))))
>>>>
>>>> Since it's just a single patch, I don't see a reason to use 'map'
>>>> here.
>>>
>>> Just that it's less to change if more patches are added later. The
>>> same has been used in other packages.
>>
>> I strongly disagree with this policy. More patches may never be
>> added,
>> but mapping through a list of a single element looks redundant for me.
Sure. I'm persuaded.
>
> What if the "patches" field just applied `search-path' to each of the
> items in the list if the path is not absolute? Use
> `absolute-file-name?' to check if this is needed or not.
This sounds like a promising idea to me.
--
`~Eric
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: Specifying package patches in a more convenient form
2016-04-07 9:52 ` Specifying package patches in a more convenient form Alex Kost
2016-04-07 10:08 ` Andy Wingo
@ 2016-04-07 21:54 ` Ludovic Courtès
2016-04-09 8:22 ` Alex Kost
2016-04-09 11:42 ` Andreas Enge
1 sibling, 2 replies; 34+ messages in thread
From: Ludovic Courtès @ 2016-04-07 21:54 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> Eric Bavier (2016-04-06 17:57 +0300) wrote:
>
>> On Wed, 06 Apr 2016 15:13:47 +0300
>> Alex Kost <alezost@gmail.com> wrote:
> [...]
>>> > + "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
>>> > + (patches (map search-patch '("ttfautohint-source-date-epoch.patch")))))
>>>
>>> Since it's just a single patch, I don't see a reason to use 'map' here.
>>
>> Just that it's less to change if more patches are added later. The
>> same has been used in other packages.
>
> I strongly disagree with this policy.
I think “strongly” and “policy” are a bit… too strong. ;-)
> More patches may never be added, but mapping through a list of a
> single element looks redundant for me.
>
> Talking about how we specify package patches currently, I think it would
> be better to do it in a more clean and general way. What about adding
> the following macro to (gnu packages)?
>
> (define-syntax-rule (search-patches file-name ...)
> "Return a list of patches for each FILE-NAME."
> (list (search-patch file-name) ...))
>
> So instead of things like this:
>
> (list (search-patch "foo.patch")
> (search-patch "bar.patch"))
>
> or this:
>
> (map search-patch '("foo.patch"
> "bar.patch"))
>
> we'll have:
>
> (search-patches "foo.patch"
> "bar.patch")
I like it!
> P.S. Actually, I don't like 'search-patches' name. Better ideas?
No! I like it.
Andy Wingo <wingo@igalia.com> skribis:
> What if the "patches" field just applied `search-path' to each of the
> items in the list if the path is not absolute? Use
> `absolute-file-name?' to check if this is needed or not.
FWIW I have a preference for keeping things explicit.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 3/9] gnu: Add ttf2eot.
2016-04-07 6:24 ` Efraim Flashner
2016-04-07 14:30 ` Eric Bavier
@ 2016-04-08 3:49 ` Eric Bavier
2016-04-13 21:39 ` Ludovic Courtès
1 sibling, 1 reply; 34+ messages in thread
From: Eric Bavier @ 2016-04-08 3:49 UTC (permalink / raw)
To: Efraim Flashner; +Cc: guix-devel, Eric Bavier
On Thu, 7 Apr 2016 09:24:35 +0300
Efraim Flashner <efraim@flashner.co.il> wrote:
> On Tue, Apr 05, 2016 at 11:32:55PM -0500, ericbavier@openmailbox.org wrote:
> > From: Eric Bavier <bavier@member.fsf.org>
> >
> > * gnu/packages/fontutils.scm (ttf2eot): New variable.
> > * gnu/packages/patches/ttf2eot-cstddef.patch: New patch.
> > * gnu-system.am (dist_patch_DATA): Add it.
[...]
> > + (license license:bsd-2)
>
> Issue 30[0] says that the readme says its bsd/lgpl licensed.
[...]
>
> [0] https://code.google.com/archive/p/ttf2eot/issues/30
I recall now: I listed bsd-2 as the license, because, while the README
says "License: Derived from WebKit, so BSD/LGPL 2/LGPL 2.1",
the single derived source file includes only BSD in its license
header, and the wrapper source contains no license header at all. Does
this seem alright?
`~Eric
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: Specifying package patches in a more convenient form
2016-04-07 10:08 ` Andy Wingo
2016-04-07 14:41 ` Eric Bavier
@ 2016-04-08 8:05 ` Alex Kost
2016-04-09 14:43 ` Ludovic Courtès
1 sibling, 1 reply; 34+ messages in thread
From: Alex Kost @ 2016-04-08 8:05 UTC (permalink / raw)
To: Andy Wingo; +Cc: guix-devel
Andy Wingo (2016-04-07 13:08 +0300) wrote:
> On Thu 07 Apr 2016 11:52, Alex Kost <alezost@gmail.com> writes:
>
>> Eric Bavier (2016-04-06 17:57 +0300) wrote:
>>
>>> On Wed, 06 Apr 2016 15:13:47 +0300
>>> Alex Kost <alezost@gmail.com> wrote:
>> [...]
>>>> > + "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
>>>> > + (patches (map search-patch '("ttfautohint-source-date-epoch.patch")))))
>>>>
>>>> Since it's just a single patch, I don't see a reason to use 'map' here.
>>>
>>> Just that it's less to change if more patches are added later. The
>>> same has been used in other packages.
>>
>> I strongly disagree with this policy. More patches may never be added,
>> but mapping through a list of a single element looks redundant for me.
>
> What if the "patches" field just applied `search-path' to each of the
> items in the list if the path is not absolute? Use
> `absolute-file-name?' to check if this is needed or not.
I think it is a good choice that 'patches' field takes a list of file
names. For example, currently a user can do:
(patches (find-my-patches "package-name"))
With what you suggest, it would not be possible.
--
Alex
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: Specifying package patches in a more convenient form
2016-04-07 21:54 ` Ludovic Courtès
@ 2016-04-09 8:22 ` Alex Kost
2016-04-09 11:42 ` Andreas Enge
1 sibling, 0 replies; 34+ messages in thread
From: Alex Kost @ 2016-04-09 8:22 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-04-08 00:54 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
[...]
>> Talking about how we specify package patches currently, I think it would
>> be better to do it in a more clean and general way. What about adding
>> the following macro to (gnu packages)?
>>
>> (define-syntax-rule (search-patches file-name ...)
>> "Return a list of patches for each FILE-NAME."
>> (list (search-patch file-name) ...))
>>
>> So instead of things like this:
>>
>> (list (search-patch "foo.patch")
>> (search-patch "bar.patch"))
>>
>> or this:
>>
>> (map search-patch '("foo.patch"
>> "bar.patch"))
>>
>> we'll have:
>>
>> (search-patches "foo.patch"
>> "bar.patch")
>
> I like it!
OK, I've sent the patches for this change.
> Andy Wingo <wingo@igalia.com> skribis:
>
>> What if the "patches" field just applied `search-path' to each of the
>> items in the list if the path is not absolute? Use
>> `absolute-file-name?' to check if this is needed or not.
>
> FWIW I have a preference for keeping things explicit.
Another argument is 'glibc-locales' packages which has:
(patches (cons (search-patch "glibc-locales.patch")
(origin-patches (package-source glibc))))
--
Alex
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: Specifying package patches in a more convenient form
2016-04-07 21:54 ` Ludovic Courtès
2016-04-09 8:22 ` Alex Kost
@ 2016-04-09 11:42 ` Andreas Enge
2016-04-09 16:40 ` Alex Kost
1 sibling, 1 reply; 34+ messages in thread
From: Andreas Enge @ 2016-04-09 11:42 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel, Alex Kost
On Thu, Apr 07, 2016 at 11:54:49PM +0200, Ludovic Courtès wrote:
> Alex Kost <alezost@gmail.com> skribis:
> > P.S. Actually, I don't like 'search-patches' name. Better ideas?
> No! I like it.
How about "find-patches"? This would be analogous to "find-files".
Andreas
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: Specifying package patches in a more convenient form
2016-04-08 8:05 ` Alex Kost
@ 2016-04-09 14:43 ` Ludovic Courtès
0 siblings, 0 replies; 34+ messages in thread
From: Ludovic Courtès @ 2016-04-09 14:43 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> Andy Wingo (2016-04-07 13:08 +0300) wrote:
>
>> On Thu 07 Apr 2016 11:52, Alex Kost <alezost@gmail.com> writes:
>>
>>> Eric Bavier (2016-04-06 17:57 +0300) wrote:
>>>
>>>> On Wed, 06 Apr 2016 15:13:47 +0300
>>>> Alex Kost <alezost@gmail.com> wrote:
>>> [...]
>>>>> > + "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
>>>>> > + (patches (map search-patch '("ttfautohint-source-date-epoch.patch")))))
>>>>>
>>>>> Since it's just a single patch, I don't see a reason to use 'map' here.
>>>>
>>>> Just that it's less to change if more patches are added later. The
>>>> same has been used in other packages.
>>>
>>> I strongly disagree with this policy. More patches may never be added,
>>> but mapping through a list of a single element looks redundant for me.
>>
>> What if the "patches" field just applied `search-path' to each of the
>> items in the list if the path is not absolute? Use
>> `absolute-file-name?' to check if this is needed or not.
>
> I think it is a good choice that 'patches' field takes a list of file
> names. For example, currently a user can do:
>
> (patches (find-my-patches "package-name"))
>
> With what you suggest, it would not be possible.
It would still be possible, provided ‘find-my-patches’ returns absolute
file names. But yeah, there would always be this extra pass of
guesswork under the hood.
Ludo’.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: Specifying package patches in a more convenient form
2016-04-09 11:42 ` Andreas Enge
@ 2016-04-09 16:40 ` Alex Kost
0 siblings, 0 replies; 34+ messages in thread
From: Alex Kost @ 2016-04-09 16:40 UTC (permalink / raw)
To: Andreas Enge; +Cc: guix-devel
Andreas Enge (2016-04-09 14:42 +0300) wrote:
> On Thu, Apr 07, 2016 at 11:54:49PM +0200, Ludovic Courtès wrote:
>> Alex Kost <alezost@gmail.com> skribis:
>> > P.S. Actually, I don't like 'search-patches' name. Better ideas?
>> No! I like it.
>
> How about "find-patches"? This would be analogous to "find-files".
Since it is build on 'search-patch' procedure, 'search-patches' name
looks like a more natural choice to me, but I don't have a preference.
I agree on any name (I just like none of them :-)).
--
Alex
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 1/9] gnu: Add ttfautohint.
2016-04-06 4:32 [PATCH 1/9] gnu: Add ttfautohint ericbavier
` (8 preceding siblings ...)
2016-04-06 12:13 ` [PATCH 1/9] gnu: Add ttfautohint Alex Kost
@ 2016-04-13 21:36 ` Ludovic Courtès
2016-04-14 14:43 ` Eric Bavier
9 siblings, 1 reply; 34+ messages in thread
From: Ludovic Courtès @ 2016-04-13 21:36 UTC (permalink / raw)
To: ericbavier; +Cc: guix-devel, Eric Bavier
ericbavier@openmailbox.org skribis:
> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/fontutils.scm (ttfautohint): New variable.
> * gnu/packages/patches/ttfautohint-source-date-epoch.patch: New patch.
> * gnu-system.am (dist_patch_DATA): Add it.
LGTM!
Did you submit the SOURCE_DATE_EPOCH patch upstream? Good work!
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 2/9] gnu: Add woff-tools.
2016-04-07 6:18 ` Efraim Flashner
2016-04-07 14:25 ` Eric Bavier
@ 2016-04-13 21:37 ` Ludovic Courtès
1 sibling, 0 replies; 34+ messages in thread
From: Ludovic Courtès @ 2016-04-13 21:37 UTC (permalink / raw)
To: Efraim Flashner; +Cc: guix-devel, Eric Bavier
Efraim Flashner <efraim@flashner.co.il> skribis:
> On Tue, Apr 05, 2016 at 11:32:54PM -0500, ericbavier@openmailbox.org wrote:
>> From: Eric Bavier <bavier@member.fsf.org>
>>
>> * gnu/packages/fontutils.scm (woff-tools): New variable.
[...]
> Looks good to me
+1
Ludo’.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 3/9] gnu: Add ttf2eot.
2016-04-08 3:49 ` Eric Bavier
@ 2016-04-13 21:39 ` Ludovic Courtès
0 siblings, 0 replies; 34+ messages in thread
From: Ludovic Courtès @ 2016-04-13 21:39 UTC (permalink / raw)
To: Eric Bavier; +Cc: guix-devel, Eric Bavier
Eric Bavier <ericbavier@openmailbox.org> skribis:
> On Thu, 7 Apr 2016 09:24:35 +0300
> Efraim Flashner <efraim@flashner.co.il> wrote:
>
>> On Tue, Apr 05, 2016 at 11:32:55PM -0500, ericbavier@openmailbox.org wrote:
>> > From: Eric Bavier <bavier@member.fsf.org>
>> >
>> > * gnu/packages/fontutils.scm (ttf2eot): New variable.
>> > * gnu/packages/patches/ttf2eot-cstddef.patch: New patch.
>> > * gnu-system.am (dist_patch_DATA): Add it.
> [...]
>> > + (license license:bsd-2)
>>
>> Issue 30[0] says that the readme says its bsd/lgpl licensed.
> [...]
>>
>> [0] https://code.google.com/archive/p/ttf2eot/issues/30
>
> I recall now: I listed bsd-2 as the license, because, while the README
> says "License: Derived from WebKit, so BSD/LGPL 2/LGPL 2.1",
> the single derived source file includes only BSD in its license
> header, and the wrapper source contains no license header at all. Does
> this seem alright?
I think so. Just briefly mention this as a comment for future
reference.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 1/9] gnu: Add ttfautohint.
2016-04-06 14:57 ` Eric Bavier
2016-04-07 9:52 ` Specifying package patches in a more convenient form Alex Kost
@ 2016-04-13 21:40 ` Ludovic Courtès
1 sibling, 0 replies; 34+ messages in thread
From: Ludovic Courtès @ 2016-04-13 21:40 UTC (permalink / raw)
To: Eric Bavier; +Cc: guix-devel, Alex Kost
Eric Bavier <ericbavier@openmailbox.org> skribis:
> On Wed, 06 Apr 2016 15:13:47 +0300
> Alex Kost <alezost@gmail.com> wrote:
>
>> ericbavier@openmailbox.org (2016-04-06 07:32 +0300) wrote:
[...]
>> > + (license license:gpl2+) ;or FreeType license
>>
>> Or FreeType? Sorry, what does it mean? If some files are under GPL2+
>> and some under FreeType, then why don't you use a list of licenses?
>>
>
> The license text says to pick one, and I wanted to indicate that in
> some way in the absense of more descriptive license operators.
You can use ‘list’ and indicate in a comment above that it’s up to the
recipient to choose one of these two licenses.
Ludo’.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 4/9] gnu: Add brotli.
2016-04-06 4:32 ` [PATCH 4/9] gnu: Add brotli ericbavier
@ 2016-04-13 21:44 ` Ludovic Courtès
0 siblings, 0 replies; 34+ messages in thread
From: Ludovic Courtès @ 2016-04-13 21:44 UTC (permalink / raw)
To: ericbavier; +Cc: guix-devel, Eric Bavier
ericbavier@openmailbox.org skribis:
> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/compression.scm (brotli): New variable.
[...]
> + (let ((commit "e992cce7a174d6e2b3486616499d26bb0bad6448"))
> + (package
> + (name "brotli")
> + (version "0.1")
Please use a version string as noted in the guidelines (info "(guix)
Version Numbers").
[...]
> + `(#:phases (modify-phases %standard-phases
> + (add-after 'unpack 'autogen
> + (lambda _
> + (mkdir "m4")
> + (system* "autoreconf" "-vfi"))))))
(zero? (system* …))
> + (synopsis "Brotli encoder/decoder libraries")
Maybe “Implementation of the Brotli compression algorithm” or something
like this to hint at the application domain?
> + (description
> + "This package provides Brotli encoder and decoder libraries: libbrotlienc
> +and libbrotlidec, respectively.")
Could you expound the description a little bit? :-)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 1/9] gnu: Add ttfautohint.
2016-04-13 21:36 ` Ludovic Courtès
@ 2016-04-14 14:43 ` Eric Bavier
0 siblings, 0 replies; 34+ messages in thread
From: Eric Bavier @ 2016-04-14 14:43 UTC (permalink / raw)
To: ludo; +Cc: guix-devel
On 2016-04-13 16:36, ludo@gnu.org wrote:
> ericbavier@openmailbox.org skribis:
>
>> From: Eric Bavier <bavier@member.fsf.org>
>>
>> * gnu/packages/fontutils.scm (ttfautohint): New variable.
>> * gnu/packages/patches/ttfautohint-source-date-epoch.patch: New patch.
>> * gnu-system.am (dist_patch_DATA): Add it.
>
> LGTM!
Great. Thanks for reviewing.
>
> Did you submit the SOURCE_DATE_EPOCH patch upstream? Good work!
>
I just sent the patch to Werner Lemberg.
`~Eric
--
`~Eric
^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2016-04-14 14:44 UTC | newest]
Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-06 4:32 [PATCH 1/9] gnu: Add ttfautohint ericbavier
2016-04-06 4:32 ` [PATCH 2/9] gnu: Add woff-tools ericbavier
2016-04-07 6:18 ` Efraim Flashner
2016-04-07 14:25 ` Eric Bavier
2016-04-13 21:37 ` Ludovic Courtès
2016-04-06 4:32 ` [PATCH 3/9] gnu: Add ttf2eot ericbavier
2016-04-07 6:24 ` Efraim Flashner
2016-04-07 14:30 ` Eric Bavier
2016-04-08 3:49 ` Eric Bavier
2016-04-13 21:39 ` Ludovic Courtès
2016-04-06 4:32 ` [PATCH 4/9] gnu: Add brotli ericbavier
2016-04-13 21:44 ` Ludovic Courtès
2016-04-06 4:32 ` [PATCH 5/9] gnu: Add woff2 ericbavier
2016-04-06 4:32 ` [PATCH 6/9] gnu: fontforge: Make SVG builds reproducible ericbavier
2016-04-06 17:36 ` Leo Famulari
2016-04-06 17:44 ` Eric Bavier
2016-04-06 17:56 ` Leo Famulari
2016-04-06 4:32 ` [PATCH 7/9] gnu: Add font-fantasque-sans ericbavier
2016-04-06 4:33 ` [PATCH 8/9] gnu: fontforge: Use modify-phases ericbavier
2016-04-06 4:33 ` [PATCH 9/9] gnu: fontforge: Install 'showttf' tool ericbavier
2016-04-06 12:13 ` [PATCH 1/9] gnu: Add ttfautohint Alex Kost
2016-04-06 14:57 ` Eric Bavier
2016-04-07 9:52 ` Specifying package patches in a more convenient form Alex Kost
2016-04-07 10:08 ` Andy Wingo
2016-04-07 14:41 ` Eric Bavier
2016-04-08 8:05 ` Alex Kost
2016-04-09 14:43 ` Ludovic Courtès
2016-04-07 21:54 ` Ludovic Courtès
2016-04-09 8:22 ` Alex Kost
2016-04-09 11:42 ` Andreas Enge
2016-04-09 16:40 ` Alex Kost
2016-04-13 21:40 ` [PATCH 1/9] gnu: Add ttfautohint Ludovic Courtès
2016-04-13 21:36 ` Ludovic Courtès
2016-04-14 14:43 ` Eric Bavier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.