gnu: Add vtk-6.
[jackhill/guix/guix.git] / gnu / packages / fontutils.scm
index 725387c..e64f3b0 100644 (file)
@@ -5,8 +5,10 @@
 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017 ng0 <ng0@n0.is>
+;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -34,6 +36,7 @@
   #: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)
 (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
@@ -155,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
@@ -187,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")
@@ -232,14 +291,14 @@ fonts to/from the WOFF2 format.")
 (define-public fontconfig
   (package
    (name "fontconfig")
-   (version "2.13.0")
+   (version "2.13.1")
    (source (origin
             (method url-fetch)
             (uri (string-append
                    "https://www.freedesktop.org/software/fontconfig/release/fontconfig-"
                    version ".tar.bz2"))
             (sha256 (base32
-                     "1fgf28zgsqh7x6dw30n6zi9z679gx6dyfyahp55z7dsm454yipci"))))
+                     "0hb700a68kk0ip51wdlnjjc682kvlrmb6q920mzajykdk0mdsmgn"))))
    (build-system gnu-build-system)
    ;; In Requires or Requires.private of fontconfig.pc.
    (propagated-inputs `(("expat" ,expat)
@@ -329,29 +388,24 @@ X11-system or any other graphical user interface.")
 
 (define-public teckit
   (package
-   (name "teckit")
-   (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)
-      ("expat" ,expat)))
-   (native-inputs
-    `(("autoconf" ,autoconf)
-      ("automake" ,automake)
-      ("libtool" ,libtool)
-      ("perl" ,perl))) ; for the tests
-   (synopsis "Toolkit for encoding conversions")
-   (description
-    "TECkit is a low-level toolkit intended to be used by other applications
+    (name "teckit")
+    (version "2.5.9")                   ;signed by key 0xC9183BEA0288CDEE
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/silnrsi/teckit/releases/"
+                           "download/v" version "/teckit-" version ".tar.gz"))
+       (sha256
+        (base32 "0gbxyip4wdibirdg2pvzayzyy927vxyd6dfyfiflx8zg88qzn8v8"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("zlib" ,zlib)
+       ("expat" ,expat)))
+    (native-inputs
+     `(("perl" ,perl)))                 ;for the tests
+    (synopsis "Toolkit for encoding conversions")
+    (description
+     "TECkit is a low-level toolkit intended to be used by other applications
 that need to perform encoding conversions (e.g., when importing legacy data
 into a Unicode-based application).  The primary component of the TECkit
 package is therefore a library that performs conversions; this is the
@@ -368,13 +422,13 @@ TECkit compiler.  However, it is not intended that these tools will be the
 primary means by which end users perform conversions, and they have not
 been designed, tested, and debugged to the extent that general-purpose
 applications should be.")
-   (license license:lgpl2.1+)
-   (home-page "http://scripts.sil.org/cms/scripts/page.php?cat_id=teckit")))
+    (license license:lgpl2.1+)
+    (home-page "http://scripts.sil.org/cms/scripts/page.php?cat_id=teckit")))
 
 (define-public graphite2
   (package
    (name "graphite2")
-   (version "1.3.11")
+   (version "1.3.12")
    (source
      (origin
        (method url-fetch)
@@ -382,7 +436,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
@@ -475,7 +529,7 @@ smooth contours with constant curvature at the spline joins.")
 (define-public libuninameslist
   (package
     (name "libuninameslist")
-    (version "20180701")
+    (version "20190305")
     (home-page "https://github.com/fontforge/libuninameslist")
     (source
      (origin
@@ -484,7 +538,7 @@ smooth contours with constant curvature at the spline joins.")
                            "/libuninameslist-dist-" version ".tar.gz"))
        (sha256
         (base32
-         "141wh2f5jsaw84mgw6vf2c9hd2wm957a2hpnicyqjbc7pk89gvca"))))
+         "1rwd2bgcyvign9agyjsr3v2fr9j1cg2wi6g0z2wwg1az32scknwq"))))
     (build-system gnu-build-system)
     (synopsis "Unicode names and annotation list")
     (description
@@ -501,14 +555,14 @@ definitions.")
 (define-public fontforge
   (package
    (name "fontforge")
-   (version "20170731")
+   (version "20190317")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "https://github.com/fontforge/fontforge/releases/download/"
-                  version "/fontforge-dist-" version ".tar.xz"))
+                  version "/fontforge-" version ".tar.gz"))
             (sha256 (base32
-                     "08l8h3yvk4v7652jvmd3ls7nf5miybkx2fmkf1mpwwfixpxxw2l4"))))
+                     "1ddqbpc32cgbccdnv0lfw0qhj59hcqzb7616ph5lkvm91pnas4dp"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("pkg-config" ,pkg-config)))
@@ -532,7 +586,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
@@ -552,18 +609,14 @@ definitions.")
                           "pango" "cairo" "fontconfig")))
                 ;; Checks for potrace program at runtime
                 `("PATH" ":" prefix (,potrace)))
-              #t))))
-
-      ;; Skip test 40 "FontForge .sfd file open check" to work around
-      ;; <https://github.com/fontforge/fontforge/issues/3246>.
-      #:make-flags '("TESTSUITEFLAGS=-k '!\\.sfd'")))
+              #t))))))
    (synopsis "Outline font editor")
    (description
     "FontForge allows you to create and modify postscript, truetype and
 opentype fonts.  You can save fonts in many different outline formats, and
 generate bitmaps.")
    (license license:gpl3+)
-   (home-page "https://fontforge.github.io/en-US/")))
+   (home-page "https://fontforge.github.io")))
 
 (define-public python2-ufolib
   (package