gnu: deutex: Update to 5.2.1.
[jackhill/guix/guix.git] / gnu / packages / fontutils.scm
index f9e117b..aba6f07 100644 (file)
@@ -5,9 +5,11 @@
 ;;; 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, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,6 +37,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)
@@ -43,6 +46,9 @@
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages freedesktop)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
-  #:use-module (guix build-system python))
+  #:use-module (guix build-system python)
+  #:use-module (guix build-system meson))
 
 (define-public freetype
   (package
    (name "freetype")
-   (version "2.9.1")
+   (version "2.10.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://savannah/freetype/freetype-"
-                                version ".tar.bz2"))
+                                version ".tar.xz"))
             (sha256 (base32
-                     "0kg8w6qyiizlyzh4a8lpzslipcbv96hcg3rqqpnxba8ffbm8g3fv"))))
+                     "0vx2dg1jh5kq34dd6ifpjywkpapp8a7p1bvyq9yq5zi1i94gmnqn"))))
    (build-system gnu-build-system)
    (arguments
     ;; The use of "freetype-config" is deprecated, but other packages still
@@ -159,29 +166,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
@@ -191,7 +199,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")
@@ -236,14 +296,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)
@@ -333,29 +393,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
@@ -372,13 +427,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.12")
+   (version "1.3.13")
    (source
      (origin
        (method url-fetch)
@@ -386,11 +441,22 @@ applications should be.")
                            "download/" version "/" name "-" version ".tgz"))
        (sha256
         (base32
-         "1l1940d8fz67jm6a0x8cjb5p2dv48cvz3wcskwa83hamd70k15fd"))))
+         "01jzhwnj1c3d68dmw15jdxly0hwkmd8ja4kw755rbkykn1ly2qyx"))))
    (build-system cmake-build-system)
+   (arguments
+    `(#:phases (modify-phases %standard-phases
+                 (add-after 'unpack 'adjust-test-PYTHONPATH
+                   (lambda _
+                     ;; Tell the build system not to override PYTHONPATH
+                     ;; while running the Python tests.
+                     (substitute* "Graphite.cmake"
+                       (("ENVIRONMENT PYTHONPATH=")
+                        (string-append "ENVIRONMENT PYTHONPATH="
+                                       (getenv "PYTHONPATH") ":")))
+                     #t)))))
    (native-inputs
-    `(("python" ,python-2) ; because of "import imap" in tests
-      ("python-fonttools" ,python2-fonttools)))
+    `(("python" ,python)
+      ("python-fonttools" ,python-fonttools)))
    (inputs
     `(("freetype" ,freetype)))
    (synopsis "Reimplementation of the SIL Graphite text processing engine")
@@ -479,7 +545,7 @@ smooth contours with constant curvature at the spline joins.")
 (define-public libuninameslist
   (package
     (name "libuninameslist")
-    (version "20180701")
+    (version "20190701")
     (home-page "https://github.com/fontforge/libuninameslist")
     (source
      (origin
@@ -488,7 +554,7 @@ smooth contours with constant curvature at the spline joins.")
                            "/libuninameslist-dist-" version ".tar.gz"))
        (sha256
         (base32
-         "141wh2f5jsaw84mgw6vf2c9hd2wm957a2hpnicyqjbc7pk89gvca"))))
+         "18c9pcz81wm26q2m7npmvh9j3ibjs2hycxfh5xic2xgjfw40v2qn"))))
     (build-system gnu-build-system)
     (synopsis "Unicode names and annotation list")
     (description
@@ -505,14 +571,14 @@ definitions.")
 (define-public fontforge
   (package
    (name "fontforge")
-   (version "20170731")
+   (version "20190801")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "https://github.com/fontforge/fontforge/releases/download/"
-                  version "/fontforge-dist-" version ".tar.xz"))
-            (sha256 (base32
-                     "08l8h3yvk4v7652jvmd3ls7nf5miybkx2fmkf1mpwwfixpxxw2l4"))))
+                  version "/fontforge-" version ".tar.gz"))
+            (sha256
+             (base32 "0lh8yx01asbzxm6car5cfi64njh5p4lxc7iv8dldr5rwg357a86r"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("pkg-config" ,pkg-config)))
@@ -520,7 +586,6 @@ definitions.")
              ("fontconfig"      ,fontconfig) ;dlopen'd
              ("freetype"        ,freetype)
              ("gettext"         ,gettext-minimal)
-             ("glib"            ,glib) ;needed for pango detection
              ("libICE"          ,libice)
              ("libSM"           ,libsm)
              ("libX11"          ,libx11)
@@ -536,10 +601,7 @@ definitions.")
              ("libxml2"         ,libxml2)
              ("pango"           ,pango)
              ("potrace"         ,potrace)
-             ;; 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)
+             ("python"          ,python)
              ("zlib"            ,zlib)))
    (arguments
     '(#:phases
@@ -559,18 +621,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
@@ -671,3 +729,48 @@ maintain the Noto Fonts project.")
                    (license:non-copyleft
                     "file://sample_texts/attributions.txt"
                     "See sample_texts/attributions.txt in the distribution.")))))
+
+(define-public fontmanager
+  (package
+   (name "fontmanager")
+   (version "0.7.5")
+   (source
+    (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/FontManager/font-manager")
+            (commit version)))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32
+        "16hma8rrkam6ngn5vbdaryn31vdixvii6920g9z928gylz9xkd3g"))))
+   (build-system meson-build-system)
+   (arguments
+    `(#:glib-or-gtk? #t
+      #:build-type "release"
+      #:configure-flags
+      (list (string-append "-Dc_link_args=-Wl,-rpath="
+                           (assoc-ref %outputs "out")
+                           "/lib/font-manager"))))
+   (native-inputs
+    `(("pkg-config" ,pkg-config)
+      ("vala" ,vala)
+      ("yelp-tools" ,yelp-tools)
+      ("gettext" ,gettext-minimal)
+      ("glib" ,glib "bin")
+      ("gobject-introspection" ,gobject-introspection)
+      ("desktop-file-utils" ,desktop-file-utils)))
+   (inputs
+    `(("json-glib" ,json-glib)
+      ("sqlite-with-column-metadata" ,sqlite-with-column-metadata)
+      ("fonconfig" ,fontconfig)
+      ("freetype" ,freetype)
+      ("gtk+" ,gtk+)))
+   (home-page "https://fontmanager.github.io/")
+   (synopsis "Simple font management for GTK+ desktop environments")
+   (description "Font Manager is intended to provide a way for users to
+easily manage desktop fonts, without having to resort to command-line
+tools or editing configuration files by hand.
+While designed primarily with the GNOME Desktop Environment in mind, it should
+work well with other GTK+ desktop environments.")
+   (license license:gpl3+)))