From patchwork Mon Apr 25 03:56:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 38867 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5CBCC27BBEA; Mon, 25 Apr 2022 05:23:49 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BD32C27BBE9 for ; Mon, 25 Apr 2022 05:23:48 +0100 (BST) Received: from localhost ([::1]:47206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niqGJ-0003CX-TG for patchwork@mira.cbaines.net; Mon, 25 Apr 2022 00:23:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nipvb-00080T-Bz for guix-patches@gnu.org; Mon, 25 Apr 2022 00:02:27 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nipvX-0001nE-Q0 for guix-patches@gnu.org; Mon, 25 Apr 2022 00:02:19 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nipvX-0008Et-NZ for guix-patches@gnu.org; Mon, 25 Apr 2022 00:02:19 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55104] [PATCH 078/232] gnu: Add python-afdko. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Apr 2022 04:02:19 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55104 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55104@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 55104-submit@debbugs.gnu.org id=B55104.165085932831436 (code B ref 55104); Mon, 25 Apr 2022 04:02:19 +0000 Received: (at 55104) by debbugs.gnu.org; 25 Apr 2022 04:02:08 +0000 Received: from localhost ([127.0.0.1]:60879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nipvK-0008Ak-R7 for submit@debbugs.gnu.org; Mon, 25 Apr 2022 00:02:07 -0400 Received: from mail-qk1-f179.google.com ([209.85.222.179]:44653) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nipu0-0007sp-Fp for 55104@debbugs.gnu.org; Mon, 25 Apr 2022 00:00:46 -0400 Received: by mail-qk1-f179.google.com with SMTP id b189so9954089qkf.11 for <55104@debbugs.gnu.org>; Sun, 24 Apr 2022 21:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pJdHCU8ALIxn6gW+hOu6E8TTsfQibej4lVjKv6zHsBg=; b=Wp1njJSmuWZrz/yVNPD/BY9zk4sziP13s2JyjaOO61B0pUXxCMtsafCz8XzrjjYsuc NrzPXmzlwPSR0H9/9nSiOMN44xpWqhPKHkrUH8vpy3VnM54TUA81DIOoq1sHPsS5PZtA s/vLzccRkno1f2y0Okcoh6X/sUujtTSxdJycVSVcdSh1v1+k4E3+gsAKoD6FAikfitHw L3fZK6v6RpowBsFRdYdQA2WMf7iSsKCnayj1gyjnUp7Aa7W0aoLX9gCq7iPEggSC5M43 wUdmKH5uK6C2Uy13/drjSNVYSq6pyu8Ej6AZe0p6DZSwj4ePsY0V/14R82V5GrOTGYtp kUfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pJdHCU8ALIxn6gW+hOu6E8TTsfQibej4lVjKv6zHsBg=; b=Msh9n+rQ/PGFXBn9x0czaKz7IfdjMxwc5uxO6TS+8s8PakoH5X5R6RD/VBQcfA3jf4 +fsjPs2uiExxffd9ieB15VpJZWVczv8ZM79tov1rCRn6ob9nnkDKfXtbCA25hVvuQP4N CFvIV4wbn8uS5c0rVrRzHMF88svsGh7xyZ1d3DwJTz7fN/f9ZaKkpE2PXUuym5vZu1sL H4ADT4983MHwldMNHGadjOpDpV0eNWNDElPjkFPMDo838LNfKyDII5tLtVjS4wajZVkZ /oh1itOEL/LFO0Cx1ZRg7Z8APd/lc/VmrA4vMSQDHw8cbDt+PPV57tiiJG9I6Ov33QoC iKXg== X-Gm-Message-State: AOAM5321Vd+8sRdjDnVuwTQigWE+kWoAvO+j4Pe5bFtZoctEsfO8c/2L L7mordRmdQU1OyelSnJCz2ll6uy4lx9ZYA== X-Google-Smtp-Source: ABdhPJworWT1hqk7fxgAtyLtOuVbunlFavgudMNQZXXgZWJYrcQuXPcdqCmQeW0GCZq5towpCbHJKg== X-Received: by 2002:a05:620a:4305:b0:67e:8b39:201d with SMTP id u5-20020a05620a430500b0067e8b39201dmr8827339qko.741.1650859238851; Sun, 24 Apr 2022 21:00:38 -0700 (PDT) Received: from localhost.localdomain (dsl-150-232.b2b2c.ca. [66.158.150.232]) by smtp.gmail.com with ESMTPSA id w82-20020a376255000000b0069ee3f0ae63sm4478142qkb.45.2022.04.24.21.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Apr 2022 21:00:38 -0700 (PDT) From: Maxim Cournoyer Date: Sun, 24 Apr 2022 23:56:44 -0400 Message-Id: <20220425035918.25683-78-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220425035918.25683-1-maxim.cournoyer@gmail.com> References: <20220425035918.25683-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/fontutils.scm (python-afdko): New variable. --- gnu/packages/fontutils.scm | 139 +++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index e128ed1003..0c479cd5de 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -53,8 +53,10 @@ (define-module (gnu packages fontutils) #:use-module (gnu packages graphics) #:use-module (gnu packages gtk) #:use-module (gnu packages image) + #:use-module (gnu packages java) #:use-module (gnu packages linux) #:use-module (gnu packages man) + #:use-module (gnu packages ninja) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -134,6 +136,143 @@ (define-public opentype-sanitizer them as it goes.") (license license:bsd-3))) +(define-public python-afdko + (package + (name "python-afdko") + (version "3.8.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "afdko" version)) + (sha256 + (base32 "171r9f7n8fgz37dkcgpzj508lxfafcyzzx43ps12j1z2nk1sk905")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-problematic-requirements + (lambda _ + (substitute* "requirements.txt" + ;; Remove lxml because the version requested here is different + ;; than the one propagated by the python-fonttools package. + (("^lxml==.*") "")))) + (add-after 'unpack 'patch-setup.py + (lambda _ + ;; There is no use for Python-provided CMake nor Ninja binaries. + (substitute* '("pyproject.toml" "setup.py") + ((".*cmake.*") "") + ((".*ninja.*") "")))) + (add-after 'unpack 'unbundle-antlr4-cpp + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "CMakeLists.txt" + (("^include\\(ExternalAntlr4Cpp).*") + (format #f "include_directories(SYSTEM ~a)" + (search-input-directory inputs + "include/antlr4-runtime")))) + (substitute* "c/makeotf/lib/hotconv/CMakeLists.txt" + (("antlr4_static") + "antlr4-runtime")))) + ;; The test suite expects the commands to be Python rather than + ;; shell scripts, so move the wrap phase after the tests. + (delete 'wrap) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "HOME" "/tmp") + (invoke "pytest" "-vv")))) + (add-after 'check 'wrap + (assoc-ref %standard-phases 'wrap)) + (add-before 'wrap 'wrap-PATH + (lambda _ + ;; The commands execute other commands from this package from + ;; PATH; by wrapping them with bindir, they can be found even + ;; when the command is run from its store location. + (let* ((bindir (string-append #$output "/bin")) + (commands (find-files bindir))) + (for-each (lambda (c) + (wrap-program c + `("PATH" prefix (,bindir)))) + commands))))))) + (native-inputs + (list ninja python-pytest python-scikit-build python-wheel)) + (inputs (list java-antlr4-runtime-cpp `(,util-linux "lib"))) + (propagated-inputs + (list psautohint + python-booleanoperations + python-defcon + python-fontmath + python-fonttools-next + python-lxml + python-tqdm + python-ufonormalizer + python-ufoprocessor)) + (home-page "https://github.com/adobe-type-tools/afdko") + (synopsis "Adobe Font Development Kit for OpenType") + (description "The Adobe Font Development Kit for OpenType (AFDKO) is a set +of tools for building OpenType font (OTF) files from PostScript and TrueType +font data. It includes the following commands: +@table @command +@item buildcff2vf +Assemble a CFF2 variable font from a .designspace file. +@item buildmasterotfs +Build master source OpenType/CFF fonts from a @file{.designspace} file +and UFO master source fonts. +@item charplot +@itemx digiplot +@itemx fontplot +@itemx fontsetplot +@itemx hintplot +@itemx waterfallplot +Aliases for the corresponding options of the @command{proofpdf} command. +@item checkoutlinesufo +Perform outline quality checks. It can also remove path overlaps. +@item comparefamily +Look in a specific directory, examine and report on all the OpenType fonts found. +@item type1 +@itemx detype1 +Compile and decompile, respectively, a Type 1 font to and from a plain-text +representation. +@item makeinstancesufo +Generate UFO font instances from a set of master UFO fonts. +@item makeotfexe +Read all the font data and build the final OpenType font. +@item makeotf +This command can be used to prepare the input files needed by +@command{makeotfexe}. +@item mergefonts +Merge one or more fonts into a parent font. +@item otc2otf +Extract all OpenType fonts from the parent OpenType Collection font. +@item otf2otc +Build an OpenType Collection font file from two or more OpenType font +files. +@item otf2ttf +Converts OpenType-CFF fonts to TrueType. +@item rotatefont +Apply a Postscript transform matrix to the source font files. +@item sfntdiff +Low-level comparison of two OpenType font files. +@item sfntedit +Support table-editing, listing, and checksumming options on +sfnt-formatted files such as OpenType Format (OTF) or TrueType. +@item spot +Dump sfnt data from plain files or Macintosh resource files. +@item ttfcomponentizer +Take in a TrueType font and look for a UFO font stored in the same directory. +Use the UFO's components data to compose matching TrueType glyphs. +@item ttfdecomponentizer +Take in a TrueType font and decompose any composite glyphs into simple glyphs. +@item ttxn +Make a normalized dump of the font, or of selected tables. +@item tx +The @command{tx} (Type eXchange) is a test harness for the CoreType libraries +but also provides many useful font conversion and analysis facilities. +@end table") + (license license:asl2.0))) + + (license license:asl2.0))) + (define-public python-cu2qu (package (name "python-cu2qu")