From patchwork Mon Sep 11 18:54:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 53735 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 D9E9327BBE9; Mon, 11 Sep 2023 19:56:10 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS 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 04AD227BBE2 for ; Mon, 11 Sep 2023 19:56:09 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfm4q-0002uT-H3; Mon, 11 Sep 2023 14:56:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qfm4m-0002sQ-IT for guix-patches@gnu.org; Mon, 11 Sep 2023 14:56:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfm4k-000483-O0 for guix-patches@gnu.org; Mon, 11 Sep 2023 14:55:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfm4o-0001q8-Sy for guix-patches@gnu.org; Mon, 11 Sep 2023 14:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65873] [PATCH 2/5] gnu: Add fig2dev. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 11 Sep 2023 18:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65873 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65873@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 65873-submit@debbugs.gnu.org id=B65873.16944585126982 (code B ref 65873); Mon, 11 Sep 2023 18:56:02 +0000 Received: (at 65873) by debbugs.gnu.org; 11 Sep 2023 18:55:12 +0000 Received: from localhost ([127.0.0.1]:54840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfm3z-0001oW-Vc for submit@debbugs.gnu.org; Mon, 11 Sep 2023 14:55:12 -0400 Received: from smtpm2.myservices.hosting ([185.26.105.233]:52214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfm3t-0001nw-SW for 65873@debbugs.gnu.org; Mon, 11 Sep 2023 14:55:09 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id 9368620FA5 for <65873@debbugs.gnu.org>; Mon, 11 Sep 2023 20:55:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 01A5A8009C; Mon, 11 Sep 2023 20:55:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AMkSqzWRqStr; Mon, 11 Sep 2023 20:54:59 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 6D2628009A; Mon, 11 Sep 2023 20:54:59 +0200 (CEST) From: Bruno Victal Date: Mon, 11 Sep 2023 19:54:50 +0100 Message-Id: <314135730d67064978288e115ad334d9ee546e8a.1694458076.git.mirai@makinata.eu> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/xfig.scm: Import all of (guix licenses). (xfig, transfig)[license]: Adjust accordingly. (fig2dev): New variable. --- gnu/packages/xfig.scm | 64 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm index f68ddb01f9..51791a1696 100644 --- a/gnu/packages/xfig.scm +++ b/gnu/packages/xfig.scm @@ -23,7 +23,7 @@ (define-module (gnu packages xfig) #:use-module (guix packages) - #:use-module ((guix licenses) #:select (bsd-2)) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix build-system gnu) @@ -32,8 +32,66 @@ (define-module (gnu packages xfig) #:use-module (gnu packages ghostscript) #:use-module (gnu packages xorg) #:use-module (gnu packages image) + #:use-module (gnu packages ghostscript) + #:use-module (gnu packages imagemagick) + #:use-module (gnu packages netpbm) #:use-module (gnu packages compression)) +(define-public fig2dev + (package + (name "fig2dev") + (version "3.2.9") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/mcj/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1cch429zbmrg2zy1mkx9xwnpvkjhmlw40c88bvi2virws744dqhm")))) + (build-system gnu-build-system) + (arguments + (list + #:modules '((guix build gnu-build-system) + (guix build utils) + (srfi srfi-26)) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'wrap-program + (lambda* (#:key inputs #:allow-other-keys) + (let ((programs + (find-files (string-append #$output "/bin"))) + (path + (search-path-as-list + '("bin") + (map (cut assoc-ref inputs <>) + (list "ghostscript" "imagemagick"))))) + (for-each (lambda (program) + (wrap-program program + `("PATH" ":" prefix ,path))) + programs))))))) + (inputs + (list libpng zlib + ;; Quoth INSTALL: + ;; “To run fig2dev, the packages + ;; ghostscript, and one out of + ;; netpbm | ImageMagick | GraphicsMagick + ;; are needed to produce various bitmap output formats, or process + ;; fig files with embedded images.” + ghostscript + imagemagick)) + (native-inputs + ;; XXX: Tests fail if netpbm is absent. + (list netpbm)) + (home-page "https://sourceforge.net/projects/mcj") + (synopsis "Translate Fig to other graphic description formats") + (description "Fig2dev is a set of tools for creating TeX documents with +graphics which are portable, in the sense that they can be printed in a wide +variety of environments.") + (license + (license:non-copyleft "file://Makefile.am" + "See .")))) + (define-public xfig (package (name "xfig") @@ -71,7 +129,7 @@ (define-public xfig such as GIF, JPEG, EPSF (PostScript), etc. Those objects can be created, deleted, moved or modified. Attributes such as colors or line styles can be selected in various ways. For text, 35 fonts are available.") - (license bsd-2))) + (license license:bsd-2))) (define-public transfig (package @@ -152,4 +210,4 @@ (define-public transfig the suffix \".pic\"; Fig files can be specified either with or without the suffix \".fig\". Transfig also creates a TeX macro file appropriate to the target language.") - (license bsd-2))) + (license license:bsd-2)))