From patchwork Tue Feb 22 18:39:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 37404 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 3C11327BBEA; Tue, 22 Feb 2022 18:44:39 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 B62AF27BBE9 for ; Tue, 22 Feb 2022 18:44:38 +0000 (GMT) Received: from localhost ([::1]:37936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMa9N-0007By-Th for patchwork@mira.cbaines.net; Tue, 22 Feb 2022 13:44:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMa4z-0005Jn-Uv for guix-patches@gnu.org; Tue, 22 Feb 2022 13:40:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nMa4w-0006an-UR for guix-patches@gnu.org; Tue, 22 Feb 2022 13:40:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nMa4w-0001sd-FH for guix-patches@gnu.org; Tue, 22 Feb 2022 13:40:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53920] [PATCH v3] gnu: lesspipe: Update to 2.03. References: <639f99264ee673157112aec54d28c80842e4be52.1644511905.git.h.goebel@crazy-compilers.com> In-Reply-To: <639f99264ee673157112aec54d28c80842e4be52.1644511905.git.h.goebel@crazy-compilers.com> Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 22 Feb 2022 18:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53920 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: moreinfo patch To: 53920@debbugs.gnu.org Received: via spool by 53920-submit@debbugs.gnu.org id=B53920.16455551597159 (code B ref 53920); Tue, 22 Feb 2022 18:40:02 +0000 Received: (at 53920) by debbugs.gnu.org; 22 Feb 2022 18:39:19 +0000 Received: from localhost ([127.0.0.1]:42650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMa4B-0001rL-Ld for submit@debbugs.gnu.org; Tue, 22 Feb 2022 13:39:19 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:37215) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMa4A-0001r6-5N for 53920@debbugs.gnu.org; Tue, 22 Feb 2022 13:39:14 -0500 Received: from hermia.goebel-consult.de ([79.211.184.220]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M7s1M-1nIka92y4w-0050a5 for <53920@debbugs.gnu.org>; Tue, 22 Feb 2022 19:39:07 +0100 Received: from thisbe.fritz.box (thisbe.fritz.box [192.168.110.24]) by hermia.goebel-consult.de (Postfix) with ESMTP id BB97F62204; Tue, 22 Feb 2022 19:39:16 +0100 (CET) From: Hartmut Goebel Date: Tue, 22 Feb 2022 19:39:05 +0100 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:eyf6f0s66LOc9jTr9Fn7V8+Zj6522RWIPuvjvA/zJ3QxOu8a4v5 t/l/UP/VGw7AGNPmrUi79jAgf/ToulLCkpENCiOO+sep0kY+pfUzI/S6c/VhgftiygU98C+ HgEJZIctcEvXfkKDcWJm+qRXQm0MGIDY98YLyP68T+kXzHlIsBhKwsLzgmRGjVOL3G5Z8FM zpXsdyI7tC0Br5xmIkZPg== X-UI-Out-Filterresults: notjunk:1;V03:K0:tTdK73NNbfI=:IWIZb9j2ctPL+GQVj4Gfqg n6ro6+7V8X1HZiXVKPEp17Rk6SYgVNFN/j3tSyVo3lcnLpaXEweaSz6dzzJGYjxAWgNrqHuiH aoz1hThcr2lDSA9sN0PDJdKqiWFf14ahvLRjPnmR7W40fxZ9PPj/gLpQKMSZnX4r3pHOznxNs hy1glYXHcfWdyyxVLYxHzUtKp0A3GJPdmGZ/zckJV6dUqUNhpk8MmWyUDOg4b0GOVr0lksk09 8udxvTgRThAhDb9MyOxR3x1GZZ6uszgkxTIGJ8l89UgC53e9xg4Jnr4Ks/+8B0K1fGOt0y3se EVrKMU2x2+Rq8460nIhVAMn7NtZzFy9y10yhq3T//EEGH6mLsJDzm73D5414dSSnUa1BrGGYh klIz/+M78bVmJZmBKTjdSD43NAFWYpYPiBvDc8LQSRS/DEH8STq/yuOTbtsa4kRli5n1pjzM3 b52DECOqzInZLhDd/catRwRVvlnAsf++oeTWKZN63nYMiP/hXZcoVDR0bEz+eNeH56niuT0C4 I1Mt/UxFbEblmOcFK5coiKoKkrx+8PjdjTxlRzAI4e37iI3KOaHPbxqz+TsOJBRNA8mIfTCfC 3AK4GG+QPWrm2IFzW4jBQ3sIrpBcyDNjIenQkmIFPMnUJtM+gtDvRQkiEYzDQ/kwVBm5PVveK TX1tJbCKKtVOIN2rtBQCyRDxVIN6zr9Y3SgjC6OT4b6tRBSGzxdJy+65KhB5X3IGLUIaBqVew 33/UHUc3LAJ552ox 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/less.scm (lesspipe): Update to 2.03. [arguments] Use new style. {configure} Adjust to updated source. {fix-makefile} New phase. {patch-tput-and-file} rename into … {patch-command-paths} this; patch other relevant scripts. [inputs] Add perl-archive-zip. --- gnu/packages/less.scm | 66 ++++++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/gnu/packages/less.scm b/gnu/packages/less.scm index e23b5d0c24..ede6238d25 100644 --- a/gnu/packages/less.scm +++ b/gnu/packages/less.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2019–2021 Tobias Geerinckx-Rice ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020, 2021 Michael Rohleder +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,10 +21,12 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages less) + #:use-module (guix gexp) #:use-module (guix licenses) #:use-module (gnu packages) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) + #:use-module (gnu packages perl-compression) #:use-module (gnu packages file) #:use-module (guix packages) #:use-module (guix download) @@ -59,38 +62,57 @@ text editors.") (define-public lesspipe (package (name "lesspipe") - (version "1.91") + (version "2.03") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/wofr06/lesspipe") - (commit version))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "04dqvq6j4h451xqbvxzv6pv679hzzfm39pdm5vg7h3r45gzg0kps")))) + "0hvqs7c2scjzyanylp7f2r1kpdp9v5qvgarhwvaisx9q1d0hiqy9")))) (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"))) - (delete-file "Makefile") ; force generating - (invoke "./configure" - (string-append "--prefix=" out) - "--yes")))) - (add-before 'install 'patch-tput-and-file - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "lesspipe.sh" - (("tput colors") - (string-append (search-input-file inputs "/bin/tput") - " colors")) - (("file -") - (string-append (search-input-file inputs "/bin/file") - " -")))))))) + (list + #:tests? #f ; no tests + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + ;; configure is a perl script which the standard configure phase + ;; fails to execute + (invoke "./configure" + (string-append "--prefix=" (assoc-ref outputs "out"))))) + (add-before 'install 'fix-makefile + (lambda _ + (substitute* "Makefile" + (("\\$\\(DESTDIR\\)/etc") "$(DESTDIR)$(PREFIX)/etc")))) + (add-before 'install 'patch-command-paths + ;; Depending on the content of the file to be displayed and some + ;; settings, lesspipe trees to use a large variety of external + ;; commands, e.g. rpm, dpkg, vimcolor. We only link the + ;; essential ones to avoid this package to pull in all these + ;; dependencies which might never ever we used. + (lambda* (#:key inputs #:allow-other-keys) + (let ((file (search-input-file inputs "/bin/file")) + (tput (search-input-file inputs "/bin/tput"))) + (substitute* "sxw2txt" + (("^use warnings;" line) + (string-append + line "\nuse lib '" #$perl-archive-zip + "/lib/perl5/site_perl';"))) + (substitute* "lesscomplete" + (("file -") (string-append file " -"))) + (substitute* "lesspipe.sh" + (("tput colors") + (string-append tput " colors")) + (("file -") + (string-append file " -"))))))))) (inputs - (list file ncurses)) ; for tput + (list file + ncurses ;; for tput + perl-archive-zip)) (native-inputs (list perl)) (home-page "https://github.com/wofr06/lesspipe") (synopsis "Input filter for less")