From patchwork Wed Sep 6 14:06:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: cage X-Patchwork-Id: 53594 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 BC1F127BBE9; Wed, 6 Sep 2023 15:08:24 +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_INVALID, DKIM_SIGNED,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 3649327BBE2 for ; Wed, 6 Sep 2023 15:08:23 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdtCN-0001w0-PV; Wed, 06 Sep 2023 10:08:03 -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 1qdtCK-0001vf-OB for guix-patches@gnu.org; Wed, 06 Sep 2023 10:08:00 -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 1qdtCK-0000WK-GQ for guix-patches@gnu.org; Wed, 06 Sep 2023 10:08:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdtCL-0003J1-J5 for guix-patches@gnu.org; Wed, 06 Sep 2023 10:08:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65097] [PATCH] gnu: Add tk-img. References: <637de43ce6edf9cebaf84d3b456901a184e6de82.1691242776.git.cage-dev@twistfold.it> In-Reply-To: <637de43ce6edf9cebaf84d3b456901a184e6de82.1691242776.git.cage-dev@twistfold.it> Resent-From: cage Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Sep 2023 14:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65097 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65097@debbugs.gnu.org Cc: maxim.cournoyer@gmail.com Received: via spool by 65097-submit@debbugs.gnu.org id=B65097.169400924612662 (code B ref 65097); Wed, 06 Sep 2023 14:08:01 +0000 Received: (at 65097) by debbugs.gnu.org; 6 Sep 2023 14:07:26 +0000 Received: from localhost ([127.0.0.1]:37061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdtBm-0003IA-0R for submit@debbugs.gnu.org; Wed, 06 Sep 2023 10:07:26 -0400 Received: from smtpcmd03117.aruba.it ([62.149.158.117]:53317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdtBi-0003Hm-60 for 65097@debbugs.gnu.org; Wed, 06 Sep 2023 10:07:24 -0400 Received: from shimizu.casa.net ([94.34.23.103]) by Aruba Outgoing Smtp with ESMTPSA id dtBZqnp7SqAKqdtBZqZ4u1; Wed, 06 Sep 2023 16:07:14 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1694009234; bh=Q0INMPCJuEXkEsDg55z/AEDYCze0XVHIi0y1j+9tMI8=; h=Date:From:To:Subject:MIME-Version:Content-Type; b=m/fAKerfSa0ts00lqksVybRoBP4Sb2ZGaS2yX/306BLR8G3X3JYgWWX+csw6jLCoV Jtw2XVNaLhIIg2iLItzD+dBgtjicWirskSsre+Byyy15O8K6RYq7Xslp82j1nkPoXy E5oDQCc+x+SJza9UsZSwDUcOFcFRhDwq/lhLsmLlrE1E663hYsLwxyEVsYGASxZ15n MQbl00or9b4g0CO0pTmRzyZgKJMuzozPM/qBU4j6NFyw+M+ySSwuHV2NcIxCEhr2Gr DO9bCcL21MCufqiczxtO1nnFyLq2yAZh+GXcifsFyLCwKBYfUw/lEMkAlRMOCnMJhz uLyBiBrPrm06g== Received: by shimizu.casa.net (Postfix, from userid 1000) id 4DF5FDA05C8; Wed, 6 Sep 2023 16:06:59 +0200 (CEST) Date: Wed, 6 Sep 2023 16:06:59 +0200 From: cage Message-ID: <2a54087d189965c4a6ee73d8b24b3b594bb0d5f4.1694008299.git.cage-dev@twistfold.it> MIME-Version: 1.0 Content-Disposition: inline X-CMAE-Envelope: MS4xfBmFoFjIv1Mj8z4JIIHf7Gctng7kxjOeNJ5GDXQ70R3XHL8elVRH1ioFI9PfwN2VLdy5EwT0I89CZjQ4yEiw7ZYR2x9vvqofiGIcn136Q7UfpJJ2WI+S b1Wmquuzl5Q4qcsBi6Lyu25+AyeXxou3IHeV0+Srz/rwLBCPAYiZHDW6sCgxCbL/7QQJlEtn3pf/Cuw4poNUgc9zQ7uhX3qcQHAmZMRqRpn1n8dk5FKygV3p 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 Hi! With this patch I tried to address all the issues that was pointed out (hope they are fine :)) except one: > One last thing, the source of tk-img carries many 'contrib' sources; > they should be removed in a snippet to ensure only Guix-provided system > libraries are used instead. Because I was not able to find out the contribs sources. Also, for the record, the problem with tests is not that the Tk (as I erroneously thought) executable can not be found but that, for some reasons, the tcl script seems to fails to resolve Tk as dependency: $ tclsh % package require Tk → raise an error the same line works on my other system (Debian) Bye! C. --- gnu/packages/tcl.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) base-commit: 42ae42cf41e8f5e88422e30d801251a3427d7f3b -- 2.34.0 diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index b69dba2254..22602c177a 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -36,6 +36,7 @@ (define-module (gnu packages tcl) #:use-module (gnu packages) #:use-module (gnu packages image) #:use-module (gnu packages fontutils) + #:use-module (gnu packages ghostscript) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages tls) @@ -509,3 +510,42 @@ (define-public go-github.com-nsf-gothic (description "Gothic contains Go bindings for Tcl/Tk. The package contains only one type and one function that can be used to create a Tk interpreter.") (license license:expat)))) + +(define-public tk-img + (package + (name "tk-img") + (version "1.4.14") + (source + (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/tkimg/tkimg/1.4/tkimg%20" + version + "/Img-" version "-Source.tar.gz")) + (file-name (string-append "tkimg-" version ".tar.gz")) + (sha256 + (base32 "08dvb8bfkxr919wp6fq14cfb9lz1v59jx1la4a6j4ks636wb243m")))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ; tests fails because the tcl shell can not find Tk ("package require Tk" fails) + #:phases + #~(modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "make" "install-libraries")))) + #:configure-flags + #~(list + (string-append "--exec-prefix=" #$output) + (string-append "--with-tcl=" + (assoc-ref %build-inputs "tcl") "/lib") + (string-append "--with-tk=" + (assoc-ref %build-inputs "tk") "/lib")))) + (native-inputs + (list tcl tk ghostscript)) + (home-page "https://sourceforge.net/projects/tkimg/") + (synopsis "Increase the number bitmap file formats supported by TK.") + (description + "The Img package adds supports for several image formats to TCl/TK; notably JPEG, ICO, BMP, TGA and PostScript (using an external PostScript interpreter).") + (license (license:non-copyleft + "file://license.terms" + "See license.terms in the distribution."))))