X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/7428581f8d2a7b637a912a9681e2360bffbfae59..44d10b1f722856ab8e9b942804aa7ef33e2ef739:/gnu/packages/fontutils.scm diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index fb9f98dc9f..274efe5fd8 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -5,8 +5,10 @@ ;;; Copyright © 2016, 2017 Efraim Flashner ;;; Copyright © 2017 Rene Saavedra ;;; Copyright © 2017 Leo Famulari -;;; Copyright © 2017 ng0 -;;; Copyright © 2017 Tobias Geerinckx-Rice +;;; Copyright © 2017 Nils Gillmann +;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice +;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2018 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,11 +30,13 @@ #:use-module (gnu packages compression) #:use-module (gnu packages check) #:use-module (gnu packages ghostscript) + #:use-module (gnu packages linux) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages autotools) #:use-module (gnu packages gettext) #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages image) #:use-module (gnu packages bison) #:use-module (gnu packages flex) @@ -53,15 +57,18 @@ (define-public freetype (package (name "freetype") - (version "2.9") + (version "2.9.1") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/freetype/freetype-" version ".tar.bz2")) (sha256 (base32 - "12jcdz1in20yaa55izxalg3hm1pf7nydfrzps5bzb4zgihybmzz6")) - (patches (search-patches "freetype-CVE-2018-6942.patch")))) + "0kg8w6qyiizlyzh4a8lpzslipcbv96hcg3rqqpnxba8ffbm8g3fv")))) (build-system gnu-build-system) + (arguments + ;; The use of "freetype-config" is deprecated, but other packages still + ;; depend on it. + `(#:configure-flags (list "--enable-freetype-config"))) (native-inputs `(("pkg-config" ,pkg-config))) (propagated-inputs @@ -154,29 +161,30 @@ Converts WOFF fonts to OpenType fonts (define-public ttf2eot (package (name "ttf2eot") - (version "0.0.2-2") + (version "0.0.3") (source (origin - (method url-fetch) - (uri (string-append "https://storage.googleapis.com/" - "google-code-archive-downloads/v2/" - "code.google.com/ttf2eot/" - "ttf2eot-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/wget/ttf2eot.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1f4dzzmhn0208dvbm3ia5ar6ls9apwc6ampy5blmfxkigi6z0g02")) + "0l2yh2ialx7135pjzhjs204kk3br7zxjr09zwaia493by2adzigr")) (patches (list (search-patch "ttf2eot-cstddef.patch"))))) (build-system gnu-build-system) (arguments - `(#:tests? #f ;no tests + `(#:tests? #f ; no tests #:phases (modify-phases %standard-phases - (delete 'configure) ;no configuration - (replace 'install + (delete 'configure) ; no configuration + (replace 'install ; no install target (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin"))) - (install-file "ttf2eot" bin))))))) + (install-file "ttf2eot" bin) + #t)))))) (synopsis "Convert from TrueType to Embeddable Open Type") (description "This package contains a commandline wrapper around OpenTypeUtilities.cpp @@ -186,7 +194,59 @@ TTF (TrueType/OpenType Font) files.") ;; 2/LGPL 2.1", the single derived source file includes only BSD in its ;; license header, and the wrapper source contains no license header. (license license:bsd-2) - (home-page "https://code.google.com/archive/p/ttf2eot/"))) + (home-page "https://github.com/wget/ttf2eot"))) + +(define-public ttf2pt1 + (package + (name "ttf2pt1") + (version "3.4.4") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/ttf2pt1/ttf2pt1/" + version "/ttf2pt1-" version ".tgz")) + (sha256 + (base32 + "1l718n4k4widx49xz7qrj4mybzb8q67kp2jw7f47604ips4654mf")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove trailing backslashes in the sed expression of the + ;; 'install' rule since sed would otherwise fail. + (substitute* "Makefile" + (("\\|;\\\\[[:space:]]*$") "|; ")) + #t)))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ;no tests + #:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "Makefile" + (("INSTDIR =.*") + (string-append "INSTDIR = " out "\n")) + (("OWNER = .*") + "OWNER = `id -un`\n") + (("GROUP = .*") + "GROUP = `id -g`\n")) + #t))) + (replace 'build + (lambda _ + (invoke "make" "-j" + (number->string (parallel-job-count)) + "all" "CC=gcc")))))) + (inputs `(("perl" ,perl))) + (synopsis "Convert TrueType fonts to Postscript Type 1") + (description + "TTF2PT1 provides tools to convert most TrueType fonts (or other formats +supported by the FreeType library) to an Adobe Type 1 @file{.pfa} or +@file{.pfb} file. Another use is as a hinting engine: feed it an unhinted or +poorly hinted Adobe Type 1 font through the FreeType library and get it back +with freshly generated hints. The files produced by default are in +human-readable form, which further needs to be encoded with t1utilities to +work with most software requiring Type 1 fonts.") + (home-page "http://ttf2pt1.sourceforge.net/") + (license license:bsd-3))) (define-public woff2 (let ((commit "4e698b8c6c5e070d53c340db9ddf160e21070ede") @@ -231,18 +291,19 @@ fonts to/from the WOFF2 format.") (define-public fontconfig (package (name "fontconfig") - (version "2.12.6") + (version "2.13.1") (source (origin (method url-fetch) (uri (string-append "https://www.freedesktop.org/software/fontconfig/release/fontconfig-" version ".tar.bz2")) - (patches (search-patches "fontconfig-remove-debug-printf.patch")) (sha256 (base32 - "05zh65zni11kgnhg726gjbrd55swspdvhqbcnj5a5xh8gn03036g")))) + "0hb700a68kk0ip51wdlnjjc682kvlrmb6q920mzajykdk0mdsmgn")))) (build-system gnu-build-system) + ;; In Requires or Requires.private of fontconfig.pc. (propagated-inputs `(("expat" ,expat) - ("freetype" ,freetype))) + ("freetype" ,freetype) + ("libuuid" ,util-linux))) (inputs `(("gs-fonts" ,gs-fonts))) (native-inputs `(("gperf" ,gperf) @@ -267,9 +328,9 @@ fonts to/from the WOFF2 format.") (replace 'install (lambda _ ;; Don't try to create /var/cache/fontconfig. - (zero? (system* "make" "install" - "fc_cachedir=$(TMPDIR)" - "RUN_FC_CACHE_TEST=false"))))))) + (invoke "make" "install" + "fc_cachedir=$(TMPDIR)" + "RUN_FC_CACHE_TEST=false")))))) (synopsis "Library for configuring and customizing font access") (description "Fontconfig can discover new fonts when installed automatically; @@ -328,15 +389,16 @@ X11-system or any other graphical user interface.") (define-public teckit (package (name "teckit") - (version "2.5.7") - (source (origin - (method url-fetch) - (uri (string-append - "https://github.com/silnrsi/teckit/releases/download/v" - version "/teckit-" version ".tar.gz")) - (sha256 - (base32 - "1pbp97vcpj6x4yixx6ww0vsi1rrr99fksxdjafs6gdargzd24cj4")))) + (version "2.5.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/silnrsi/teckit") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1jmsdmfz7bgq1n5qsqgpq1b1n77f1hll0czfw5wkxz4knzb14ndn")))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib) @@ -371,7 +433,7 @@ applications should be.") (define-public graphite2 (package (name "graphite2") - (version "1.3.11") + (version "1.3.12") (source (origin (method url-fetch) @@ -379,7 +441,7 @@ applications should be.") "download/" version "/" name "-" version ".tgz")) (sha256 (base32 - "0z5dcgh8r3678awq6fb8igik7xmar5m6z9xxwpkkhradhk8jxfds")))) + "1l1940d8fz67jm6a0x8cjb5p2dv48cvz3wcskwa83hamd70k15fd")))) (build-system cmake-build-system) (native-inputs `(("python" ,python-2) ; because of "import imap" in tests @@ -429,13 +491,13 @@ resolution.") (define-public libotf (package (name "libotf") - (version "0.9.13") + (version "0.9.16") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/m17n/libotf-" version ".tar.gz")) (sha256 - (base32 "0239zvfan56w7vrppriwy77fzb10ag9llaz15nsraps2a2x6di3v")))) + (base32 "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) @@ -452,17 +514,16 @@ using the above tables.") (define-public libspiro (package (name "libspiro") - (version "20071029") + (version "0.5.20150702") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/libspiro/libspiro/" - version "/libspiro_src-" version ".tar.bz2")) + (uri (string-append "https://github.com/fontforge/libspiro/releases" + "/download/" version "/libspiro-dist-" version ".tar.gz")) (sha256 (base32 - "1kylz8pvwnb85yya150r9i6mhbpzx38f32qy523qg3ylgd9b3zhy")))) + "153ckwj6h3wwlsgcppzqj8cymv1927hi8ar8fzpchq5q89cj2kai")))) (build-system gnu-build-system) - (arguments `(#:tests? #f)) ;no tests (synopsis "Clothoid to bezier conversion library") (description "Raph Levien's Spiro package as a library. A mechanism for drawing @@ -473,27 +534,28 @@ smooth contours with constant curvature at the spline joins.") (define-public libuninameslist (package (name "libuninameslist") - (version "20170807") + (version "20180701") + (home-page "https://github.com/fontforge/libuninameslist") (source (origin (method url-fetch) - (uri (string-append "https://github.com/fontforge/libuninameslist/" - "archive/" version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (uri (string-append home-page "/releases/download/" version + "/libuninameslist-dist-" version ".tar.gz")) (sha256 (base32 - "0axwxjgcrwms9682vmpsq1x4swdx6q6qk6997rkfr8xrgi124c6a")))) + "141wh2f5jsaw84mgw6vf2c9hd2wm957a2hpnicyqjbc7pk89gvca")))) (build-system gnu-build-system) - (native-inputs `(("autoconf" ,autoconf) - ("automake" ,automake) - ("libtool" ,libtool))) (synopsis "Unicode names and annotation list") (description "LibUniNamesList holds www.unicode.org Nameslist.txt data which can be useful for programs that need Unicode \"Names\", \"Annotations\", and block definitions.") - (license license:gpl2) - (home-page "https://github.com/fontforge/libuninameslist"))) + ;; COPYING specifies GPL2, but according to LICENSE it only covers the + ;; configure script. The actual code is BSD-3, and the Unicode data + ;; is governed by an X11-style license only found on the web. + (license (list license:bsd-3 + (license:x11-style + "https://www.unicode.org/copyright.html#License"))))) (define-public fontforge (package @@ -529,7 +591,10 @@ definitions.") ("libxml2" ,libxml2) ("pango" ,pango) ("potrace" ,potrace) - ("python" ,python-wrapper) + ;; FIXME: We use Python 2 here because there is a bug in Python + ;; 3.7 that is triggered when Py_Main is called after Py_Init, as + ;; is done by fontforge. This will be fixed in Python 3.7.1. + ("python" ,python-2) ("zlib" ,zlib))) (arguments '(#:phases @@ -548,7 +613,8 @@ definitions.") "libxml2" "zlib" "libspiro" "freetype" "pango" "cairo" "fontconfig"))) ;; Checks for potrace program at runtime - `("PATH" ":" prefix (,potrace))))))) + `("PATH" ":" prefix (,potrace))) + #t)))) ;; Skip test 40 "FontForge .sfd file open check" to work around ;; .