From a1797f3244232946cfc65b49882dc44a564471e6 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 4 Mar 2020 16:19:22 +0100 Subject: gnu: Add libraqm. * gnu/packages/fontutils.scm (libraqm): New variable. --- gnu/packages/fontutils.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'gnu/packages/fontutils.scm') diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index a8c9e3ddc0..fcdf767e0f 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018, 2019 Ludovic Courtès ;;; Copyright © 2019 Marius Bakke ;;; Copyright © 2020 Roel Janssen +;;; Copyright © 2020 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -45,6 +46,7 @@ #:use-module (gnu packages glib) #:use-module (gnu packages gperf) #:use-module (gnu packages xorg) + #:use-module (gnu packages fribidi) #:use-module (gnu packages gtk) #:use-module (gnu packages xml) #:use-module (gnu packages sqlite) @@ -836,3 +838,37 @@ work well with other GTK+ desktop environments.") samples that show coverage of the font and are similar in appearance to Unicode Charts. It was developed for use with DejaVu Fonts project.") (license license:gpl3+))) + +(define-public libraqm + (package + (name "libraqm") + (version "0.7.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/HOST-Oman/libraqm/" + "releases/download/v" version "/" + "raqm-0.7.0.tar.gz")) + (sha256 + (base32 "0hgry3fj2y3qaq2fnmdgd93ixkk3ns5jds4vglkiv2jfvpn7b1g2")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags (list "--disable-static"))) + (native-inputs + `(("gtk-doc" ,gtk-doc) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper))) + (inputs + `(("freetype" ,freetype) + ("fribidi" ,fribidi) + ("harfbuzz" ,harfbuzz))) + (home-page "https://github.com/HOST-Oman/libraqm") + (synopsis "Library for complex text layout") + (description + "Raqm is a small library that encapsulates the logic for complex text +layout and provides a convenient API. + +It currently provides bidirectional text support (using FriBiDi), +shaping (using HarfBuzz), and proper script itemization. As a result, Raqm +can support most writing systems covered by Unicode.") + (license license:expat))) -- cgit v1.2.3 From 67c525035f803fe9b17629c28a4fcfdbbefa63c3 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 5 Mar 2020 18:43:09 +0100 Subject: gnu: libraqm: Parametrize version. * gnu/packages/fontutils.scm (libraqm)[source]: Parametrize version. --- gnu/packages/fontutils.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/fontutils.scm') diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index fcdf767e0f..d802feb1da 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -848,7 +848,7 @@ Unicode Charts. It was developed for use with DejaVu Fonts project.") (method url-fetch) (uri (string-append "https://github.com/HOST-Oman/libraqm/" "releases/download/v" version "/" - "raqm-0.7.0.tar.gz")) + "raqm-" version ".tar.gz")) (sha256 (base32 "0hgry3fj2y3qaq2fnmdgd93ixkk3ns5jds4vglkiv2jfvpn7b1g2")))) (build-system gnu-build-system) -- cgit v1.2.3 From d9476a3700e23b2fad145cb3f90d84a7fcf3ed59 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 4 Mar 2020 10:46:36 +0100 Subject: gnu: woff2: Update to 1.0.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/fontutils.scm (woff2): Update to 1.0.2 and switch to cmake * gnu/packages/patches/woff2-libbrotli.patch: Remove * gnu/local.mk (dist_patch_DATA): Remove patch Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 - gnu/packages/fontutils.scm | 65 ++++++++++------------- gnu/packages/patches/woff2-libbrotli.patch | 84 ------------------------------ 3 files changed, 28 insertions(+), 122 deletions(-) delete mode 100644 gnu/packages/patches/woff2-libbrotli.patch (limited to 'gnu/packages/fontutils.scm') diff --git a/gnu/local.mk b/gnu/local.mk index bd4522162b..50a2602a44 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1488,7 +1488,6 @@ dist_patch_DATA = \ %D%/packages/patches/wicd-wpa2-ttls.patch \ %D%/packages/patches/wmctrl-64-fix.patch \ %D%/packages/patches/wmfire-update-for-new-gdk-versions.patch \ - %D%/packages/patches/woff2-libbrotli.patch \ %D%/packages/patches/wordnet-CVE-2008-2149.patch \ %D%/packages/patches/wordnet-CVE-2008-3908-pt1.patch \ %D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch \ diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index d802feb1da..3daa5187b9 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -257,44 +257,35 @@ work with most software requiring Type 1 fonts.") (license license:bsd-3))) (define-public woff2 - (let ((commit "4e698b8c6c5e070d53c340db9ddf160e21070ede") - (revision "1")) - (package - (name "woff2") - (version (string-append "20160306-" revision "." - (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 (list (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 + (package + (name "woff2") + (version "1.0.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/woff2.git") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version ".git")) + (sha256 + (base32 + "13l4g536h0pr84ww4wxs2za439s0xp1va55g6l478rfbb1spp44y")))) + (build-system cmake-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("google-brotli" ,google-brotli))) + (arguments + ;; package has no tests + `(#:tests? #f + ;; we can’t have both, shared libraries and binaries, so turn off the + ;; former + #:configure-flags (list "-DBUILD_SHARED_LIBS=OFF"))) + (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")))) + (license license:asl2.0) + (home-page "https://github.com/google/woff2"))) (define-public fontconfig (package diff --git a/gnu/packages/patches/woff2-libbrotli.patch b/gnu/packages/patches/woff2-libbrotli.patch deleted file mode 100644 index ffa941cf92..0000000000 --- a/gnu/packages/patches/woff2-libbrotli.patch +++ /dev/null @@ -1,84 +0,0 @@ -From: Eric Bavier -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) $(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 - #include - --#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 - #include - --#include "./encode.h" -+#include "brotli/enc/encode.h" - #include "./buffer.h" - #include "./font.h" - #include "./normalize.h" --- -2.7.3 - -- cgit v1.2.3