From patchwork Mon Aug 7 14:05:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: gemmaro X-Patchwork-Id: 52609 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 3319A27BBE9; Mon, 7 Aug 2023 15:17:19 +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 autolearn=ham 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 3F56427BBE2 for ; Mon, 7 Aug 2023 15:17:18 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qT12n-0003RL-OR; Mon, 07 Aug 2023 10:17:13 -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 1qT11e-0000UA-NA for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:07 -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 1qT11e-0005hm-D0 for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qT11e-0004kV-12 for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64983] [PATCH v2 1/4] gnu: highlight: Update to 4.7. Resent-From: gemmaro Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Aug 2023 14:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64983 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64983@debbugs.gnu.org Cc: gemmaro Received: via spool by 64983-submit@debbugs.gnu.org id=B64983.169141771218154 (code B ref 64983); Mon, 07 Aug 2023 14:16:01 +0000 Received: (at 64983) by debbugs.gnu.org; 7 Aug 2023 14:15:12 +0000 Received: from localhost ([127.0.0.1]:34038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT10o-0004iY-E5 for submit@debbugs.gnu.org; Mon, 07 Aug 2023 10:15:12 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:48578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT10j-0004hN-Do for 64983@debbugs.gnu.org; Mon, 07 Aug 2023 10:15:09 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1bc02bd4eafso39392345ad.1 for <64983@debbugs.gnu.org>; Mon, 07 Aug 2023 07:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691417700; x=1692022500; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lXPDOmC0z4DEi2eViKA92CUDWC89M3c+Wona5AQMoZ4=; b=cmTxfOR1Rtuj2wAj0YE95hN2wNPaisZm8s0otEw+Fsrzd0LwydRNJ2CLmyYufTWsIJ dk1uZczenuAVRC6sRNXMgiQ96YOyStk5jyrhCIYivxxpLESwoq2Km/imbQnJZ4MQwlME QCJXWqNNrIYCoaDyAoBOvOS4G/8ApFhb2YgFeftd8xaT54MoH5Le/qB/zeNx5LWmNb08 N/JIHkCiGP5ATqW4cLV59y18IMID0Bi3yUjp4D6t+G4ipVfSQofWLHiz27Zlfoy1eTE8 HVNKhaPWzdSuasop8UCKiqFoTTe8GD6Osu110eXk7oqoe0+L8VgXKxoB2p+/6S6ocg6T 3cMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691417700; x=1692022500; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lXPDOmC0z4DEi2eViKA92CUDWC89M3c+Wona5AQMoZ4=; b=CIS69QuzoHxU+JcC4bKTwwrAqflAveqoojaE+wxMM3bZp85V9hT1jp0ZezFKgG08dq QQG0Vb40zLcUkpJSMTjwnteeqC9OwMSwRKOybrN3EanChahegQnH6tlLx9DcfV2uXUsy bx2DjzRG8Yl+bDZ5x5gRUdWpeggcE4vgpnZegZU0oc2wimpDqDxB/09hoaLcEs6CS5XT ExkLRDOFa/lxDwH8qlvoFW5ZltRdORYs6mAedFQje3T5/TBiXxEpooW3AmHl/RrCUlbD DUru5WO1jPy4VLqAEpSniQvG+rY+fFeehKmPfkQJYBOgM2O8Uu1/cX8DB+KXMHVztjyc czSQ== X-Gm-Message-State: AOJu0YzpG0BZReRZCuowXmvv0smCQ6o90f1cVKraYkq5HRdT6FadEhSS b4vSsmo4pyTUXpi6GuNlTLvBOXk49DU= X-Google-Smtp-Source: AGHT+IEJ047RYrPyvHlQd2Gonq0cATWIi+9oAUHIJCr90cr7j6AzaNJfRs+McG6kah+a/PicVYmeEg== X-Received: by 2002:a17:902:7615:b0:1b8:987f:3f34 with SMTP id k21-20020a170902761500b001b8987f3f34mr9225163pll.25.1691417699805; Mon, 07 Aug 2023 07:14:59 -0700 (PDT) Received: from mac.gemmaro.name (ONI-202-70-254-104.oninet.ne.jp. [202.70.254.104]) by smtp.gmail.com with ESMTPSA id ja4-20020a170902efc400b001b8013ed362sm6985191plb.96.2023.08.07.07.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 07:14:59 -0700 (PDT) From: gemmaro Date: Mon, 7 Aug 2023 23:05:39 +0900 Message-ID: <2fbe0ccbb0c580a3bf0af84720585c6cd6d6d8f1.1691417142.git.gemmaro.dev@gmail.com> X-Mailer: git-send-email 2.41.0 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/pretty-print.scm (highlight): Update to 4.7. --- gnu/packages/pretty-print.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 89e5de6278..9896824f01 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2021 Greg Hogan ;;; Copyright © 2022 Zhu Zihao ;;; Copyright © 2022, 2023 Maxim Cournoyer +;;; Copyright © 2023 gemmaro ;;; ;;; This file is part of GNU Guix. ;;; @@ -350,14 +351,14 @@ (define-public source-highlight (define-public highlight (package (name "highlight") - (version "3.62") + (version "4.7") (source (origin (method url-fetch) (uri (string-append "http://www.andre-simon.de/zip/highlight-" version ".tar.bz2")) (sha256 - (base32 "088di7qxd6b2r22qljllhnly0r9a0lfnwnfqswjn23s09awjbl6p")))) + (base32 "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests From patchwork Mon Aug 7 14:05:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gemmaro X-Patchwork-Id: 52606 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 0627627BBEA; Mon, 7 Aug 2023 15:17: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.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham 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 AFDF227BBE2 for ; Mon, 7 Aug 2023 15:17:07 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qT12K-0001Na-Mm; Mon, 07 Aug 2023 10:16:44 -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 1qT11e-0000Ud-Ux for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:07 -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 1qT11e-0005jO-LV for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qT11e-0004kj-HS for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64983] [PATCH v2 2/4] gnu: highlight: Use new package style. Resent-From: gemmaro Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Aug 2023 14:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64983 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64983@debbugs.gnu.org Cc: gemmaro Received: via spool by 64983-submit@debbugs.gnu.org id=B64983.169141771418168 (code B ref 64983); Mon, 07 Aug 2023 14:16:02 +0000 Received: (at 64983) by debbugs.gnu.org; 7 Aug 2023 14:15:14 +0000 Received: from localhost ([127.0.0.1]:34041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT10r-0004ix-LH for submit@debbugs.gnu.org; Mon, 07 Aug 2023 10:15:14 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:55691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT10l-0004hx-BD for 64983@debbugs.gnu.org; Mon, 07 Aug 2023 10:15:10 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1bc6624623cso13169905ad.3 for <64983@debbugs.gnu.org>; Mon, 07 Aug 2023 07:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691417701; x=1692022501; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=py2n9f3I1+XI2vucN+p2xhRwa6EexOQaP4JsugfFQC8=; b=FeNugh+1FiYwEL+X9MMxi24M1vft4e/xoseYgoz3pY1ujfv1Esoowm20Sm692JQXpW 4eaahn7L78ow+ZgC2I4fuiumbpQrsr+8vsT8n+1719ReDYhVvbgWappEgnb0CpJkltvE 478bXF3pPaKf0Lnq34IgrXz2sD6RRSO760GoiiNs03cn5ZWN/fJ6bqjUgpEZFhwkOKLL lEPWCOuAovzUSaIK7/zorq7Ld8Wrs5g3ljIQoW9sUxUv0aePv2SQQut4AMB7WRka3fEA tCHpLrv1tL6Gb2ohsPV/2kwI3kUnWHaqgFQli8yzcwow34DiHK31P2dhPWU4AMEsNvzm +puw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691417701; x=1692022501; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=py2n9f3I1+XI2vucN+p2xhRwa6EexOQaP4JsugfFQC8=; b=JljdKGHyYGqlSB9mQeh/KrGHxeKzIVBX90Pp4Ndp+9WsRWY5+eshztzN96SUd8tWck ZxlpdEwO1yaSbuVnpy2AxXPBRNl8gvNVjhB+qCRzqis22/+WhQWWO/kUjWWBkzKtyL22 H+UabtBkS+ORpRMPRn+S6aOlajalOuLLejSiqw8Qu+euhXhXYd3ApTkd7o+DW6gPxak5 BTwR3YHGLmLmxBR4iPASOtLbqsYhPhlQT/29yh0ZpD/5y/Y1QPsWuWqIBl/uxFfhsuc4 7k/my31sEHJUOr/2XXPP8k7w6j1LPGJIWwHTquMv9D9RYcsxQPC1UBJDr9CBSoUUAvD3 IQqA== X-Gm-Message-State: AOJu0YynnryMG5SPC7G0bDdoPWWdQz1rreHXY2QS5LGMYsi7+OtAfYMF y5HaKC52DYFDWsfiNnzM24mwG/fgzTg= X-Google-Smtp-Source: AGHT+IGI58U33h52abDliLLwjRT05Ng1RlO6XSW4gzGDIhT32RsHvJTjRxgfCbJar9L/LLeaqiyARw== X-Received: by 2002:a17:903:18c:b0:1bc:532f:1bf8 with SMTP id z12-20020a170903018c00b001bc532f1bf8mr9943398plg.45.1691417701473; Mon, 07 Aug 2023 07:15:01 -0700 (PDT) Received: from mac.gemmaro.name (ONI-202-70-254-104.oninet.ne.jp. [202.70.254.104]) by smtp.gmail.com with ESMTPSA id ja4-20020a170902efc400b001b8013ed362sm6985191plb.96.2023.08.07.07.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 07:15:01 -0700 (PDT) From: gemmaro Date: Mon, 7 Aug 2023 23:05:40 +0900 Message-ID: X-Mailer: git-send-email 2.41.0 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/pretty-print.scm (highlight) Use new package style. [arguments]: Use G-expression. Drop trailing #t from phases. [source, inputs, native-inputs, description]: Reformat with guix style. --- gnu/packages/pretty-print.scm | 89 ++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 9896824f01..1b2cf4becf 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -352,54 +352,55 @@ (define-public highlight (package (name "highlight") (version "4.7") - (source - (origin - (method url-fetch) - (uri (string-append "http://www.andre-simon.de/zip/highlight-" - version ".tar.bz2")) - (sha256 - (base32 "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")))) + (source (origin + (method url-fetch) + (uri (string-append "http://www.andre-simon.de/zip/highlight-" + version ".tar.bz2")) + (sha256 + (base32 + "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; no tests - #:make-flags - (let ((confdir (string-append %output "/share/highlight/config/"))) - (list (string-append "PREFIX=" %output) - (string-append "HL_CONFIG_DIR=" confdir) - (string-append "conf_dir=" confdir))) - #:phases - (modify-phases %standard-phases - (delete 'configure) ; no configure script - (add-after 'unpack 'fix-search-for-lua - (lambda _ - (substitute* "src/makefile" - (("(LUA_PKG_NAME=).*" _ assignment) - (string-append assignment "lua-" ,(version-major+minor - (package-version lua)) - "\n"))) - (substitute* "extras/swig/makefile" - (("lua") (string-append "lua-" ,(version-major+minor - (package-version lua))))) - #t)) - (add-after 'install 'install-perl-bindings - (lambda* (#:key outputs #:allow-other-keys) - (let* ((perldir (string-append (assoc-ref outputs "out") - "/lib/perl5/site_perl/" - ,(package-version perl))) - (autodir (string-append perldir "/auto/highlight"))) - (with-directory-excursion "extras/swig" - (invoke "make" "perl") - (invoke "perl" "-I" "." "testmod.pl") - (install-file "highlight.pm" perldir) - (install-file "highlight.so" autodir)) - #t)))))) - (inputs - (list lua boost perl)) - (native-inputs - (list pkg-config swig)) + (list #:tests? #f ;no tests + #:make-flags #~(let ((confdir (string-append %output + "/share/highlight/config/"))) + (list (string-append "PREFIX=" %output) + (string-append "HL_CONFIG_DIR=" confdir) + (string-append "conf_dir=" confdir))) + #:phases #~(modify-phases %standard-phases + (delete 'configure) ;no configure script + (add-after 'unpack 'fix-search-for-lua + (lambda _ + (substitute* "src/makefile" + (("(LUA_PKG_NAME=).*" _ assignment) + (string-append assignment "lua-" + #$(version-major+minor (package-version + lua)) + "\n"))) + (substitute* "extras/swig/makefile" + (("lua") + (string-append "lua-" + #$(version-major+minor (package-version + lua))))))) + (add-after 'install 'install-perl-bindings + (lambda* (#:key outputs #:allow-other-keys) + (let* ((perldir (string-append (assoc-ref outputs + "out") + "/lib/perl5/site_perl/" + #$(package-version perl))) + (autodir (string-append perldir + "/auto/highlight"))) + (with-directory-excursion "extras/swig" + (invoke "make" "perl") + (invoke "perl" "-I" "." "testmod.pl") + (install-file "highlight.pm" perldir) + (install-file "highlight.so" autodir)))))))) + (inputs (list lua boost perl)) + (native-inputs (list pkg-config swig)) (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php") (synopsis "Convert code to documents with syntax highlighting") - (description "Highlight converts source code to HTML, XHTML, RTF, LaTeX, + (description + "Highlight converts source code to HTML, XHTML, RTF, LaTeX, TeX, SVG, BBCode and terminal escape sequences with colored syntax highlighting. Language definitions and color themes are customizable.") (license gpl3+))) From patchwork Mon Aug 7 14:05:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gemmaro X-Patchwork-Id: 52607 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 1E28427BBEA; Mon, 7 Aug 2023 15:17:17 +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,T_PDS_PRO_TLD autolearn=ham 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 CF0C227BBE2 for ; Mon, 7 Aug 2023 15:17:15 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qT12K-0001O9-Pf; Mon, 07 Aug 2023 10:16:44 -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 1qT11g-0000Ug-KF for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:09 -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 1qT11f-0005jf-0W for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qT11e-0004kv-TF for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64983] [PATCH v2 3/4] gnu: highlight: Add gui output. Resent-From: gemmaro Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Aug 2023 14:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64983 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64983@debbugs.gnu.org Cc: gemmaro Received: via spool by 64983-submit@debbugs.gnu.org id=B64983.169141771518175 (code B ref 64983); Mon, 07 Aug 2023 14:16:02 +0000 Received: (at 64983) by debbugs.gnu.org; 7 Aug 2023 14:15:15 +0000 Received: from localhost ([127.0.0.1]:34043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT10s-0004iz-CI for submit@debbugs.gnu.org; Mon, 07 Aug 2023 10:15:15 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:48581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT10m-0004i2-SV for 64983@debbugs.gnu.org; Mon, 07 Aug 2023 10:15:12 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1bc02bd4eafso39393155ad.1 for <64983@debbugs.gnu.org>; Mon, 07 Aug 2023 07:15:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691417703; x=1692022503; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X/w5zGGD6SHkOP7v5SHS3xtl4KTjeE4lZxWSUPY+4gA=; b=jp9UUqZZvOS0LHo44PkYoeD0hauPUSTTum6KX1P78/uXM7f0XV0DrR8TJhTWFs0upR 0WNySH7ICK0XIxQlRxP5WiyLUtI/rffCrNVED5PlBisd9wbCNBKxkpFK8f9klvZT3aa0 PLuXy70VJ75OqM7WXyKy4RfQ9IB4WHIpIjM09LjU7yNSfb8UnBYxlIMIZNfUUhkxZdpS TdKPygkAJbMVzxlpLL82Vgq4rNrxvCzgcXGMGL0WfwG+nelsZ+8hiHRqaXqdVtohjjxA 3PoSImN5oWTaXevXQLdM6PuCQXxd3vA/AXNGzhJg1xVFgHqDrllG+c+2ZCPlOUNVP+yl 2UrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691417703; x=1692022503; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X/w5zGGD6SHkOP7v5SHS3xtl4KTjeE4lZxWSUPY+4gA=; b=a50QoFeQOoA0ejt2LM3THUssUuofYZVVtYpZ4jHih0k80V2i2ul78bQg3AuvLwmHwa of1AyJ6PxFZjnjPlxpgv6E2bDPWJTVI9+pWMszjIfEOSb7dzhsQGmbO7+a6vBLH0xRe1 K5JMH5xNCM1ICms5gg+OgCF1A1RT38saMGpCD6g8NGAgDEj6I25VYt7q439IdkrF8V1p PVq4JiDxq2ItZX7j64QyUExwLxVnWkcxzG3t6UCu+g81x5AjGq3D+vZ7IW1AZ8qticW9 bWXiNFrJy6pB8KxIy1wXIBIzBc8JvdirWznuGbT9yHRi38ZVXIyCBJUpH/PWtZHZ75Tx NgSQ== X-Gm-Message-State: AOJu0YwoeEhSCqhBTp2QGSHNMY4/1U7pIba1Pqjc2bNrJCeHBt9EvzIO a+Z1gw4vcyIoh+Dhg170+rhkwWWsR7c= X-Google-Smtp-Source: AGHT+IGdGqmo5E8rqL1JQq4EXMSsnUw6KYyMAJFuyeOTKeOFPRQz6vFUOdjww15wZzz/sGa5kMNmcg== X-Received: by 2002:a17:902:db06:b0:1b2:1a79:147d with SMTP id m6-20020a170902db0600b001b21a79147dmr10846789plx.2.1691417703209; Mon, 07 Aug 2023 07:15:03 -0700 (PDT) Received: from mac.gemmaro.name (ONI-202-70-254-104.oninet.ne.jp. [202.70.254.104]) by smtp.gmail.com with ESMTPSA id ja4-20020a170902efc400b001b8013ed362sm6985191plb.96.2023.08.07.07.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 07:15:02 -0700 (PDT) From: gemmaro Date: Mon, 7 Aug 2023 23:05:41 +0900 Message-ID: <86cfa707151d8ed32b9acaff3894c182747b8e3f.1691417142.git.gemmaro.dev@gmail.com> X-Mailer: git-send-email 2.41.0 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/pretty-print.scm (highlight): Add gui output. [source]: Add patch for GUI data directory. [outputs]: Add gui. [arguments]{fix-search-for-lua}: Fix Lua package name for GUI. {build-gui}: Add phase to build GUI. {install}: Set PREFIX variable. {install-gui}: Add phase to install GUI. [inputs]: Add qtbase-5. * gnu/packages/patches/highlight-gui-data-dir.patch: Add patch for GUI data directory. --- .../patches/highlight-gui-data-dir.patch | 51 ++++++++++++++ gnu/packages/pretty-print.scm | 66 ++++++++++++++----- 2 files changed, 102 insertions(+), 15 deletions(-) create mode 100644 gnu/packages/patches/highlight-gui-data-dir.patch diff --git a/gnu/packages/patches/highlight-gui-data-dir.patch b/gnu/packages/patches/highlight-gui-data-dir.patch new file mode 100644 index 0000000000..33f40d309c --- /dev/null +++ b/gnu/packages/patches/highlight-gui-data-dir.patch @@ -0,0 +1,51 @@ +This patch distinguishes between the data directory path for GUI and the one +for non-GUI by allowing to set the former path. + +highlight package has two outputs: out and gui. Both outputs have files which +will be in the same directory /share/highlight/ without this patch (see also +install and install-gui tasks in makefile). In the gui's data directory, +there are GUI specific files in /share/highlight/gui-files/{l10n,ext}/. + +diff --git a/src/gui-qt/main.cpp b/src/gui-qt/main.cpp +index 4700dc1..3567745 100644 +--- a/src/gui-qt/main.cpp ++++ b/src/gui-qt/main.cpp +@@ -47,8 +47,8 @@ int main(int argc, char *argv[]) + { + QApplication app(argc, argv); + QTranslator translator; +-#ifdef DATA_DIR +- translator.load(QString("%1/gui_files/l10n/highlight_%2").arg(DATA_DIR).arg(QLocale::system().name())); ++#ifdef GUI_DATA_DIR ++ translator.load(QString("%1/gui_files/l10n/highlight_%2").arg(GUI_DATA_DIR).arg(QLocale::system().name())); + #else + translator.load(QString("%1/gui_files/l10n/highlight_%2").arg(QDir::currentPath()).arg(QLocale::system().name())); + #endif +diff --git a/src/gui-qt/mainwindow.cpp b/src/gui-qt/mainwindow.cpp +index 3a21ad2..f060431 100644 +--- a/src/gui-qt/mainwindow.cpp ++++ b/src/gui-qt/mainwindow.cpp +@@ -2131,8 +2131,8 @@ QString MainWindow::getDistFileFilterPath(){ + #ifdef Q_OS_OSX + return QCoreApplication::applicationDirPath()+"/../Resources/gui_files/ext/fileopenfilter.conf"; + #else +- #ifdef DATA_DIR +- return QString(DATA_DIR) + "/gui_files/ext/fileopenfilter.conf"; ++ #ifdef GUI_DATA_DIR ++ return QString(GUI_DATA_DIR) + "/gui_files/ext/fileopenfilter.conf"; + #else + return QDir::currentPath()+"/gui_files/ext/fileopenfilter.conf"; + #endif +diff --git a/src/makefile b/src/makefile +index b1d7988..2963105 100644 +--- a/src/makefile ++++ b/src/makefile +@@ -118,7 +118,7 @@ gui-qt: highlight-gui + + highlight-gui: libhighlight.a ${GUI_OBJECTS} + cd gui-qt && \ +- ${QMAKE} 'DEFINES+=DATA_DIR=\\\"${HL_DATA_DIR}\\\" CONFIG_DIR=\\\"${HL_CONFIG_DIR}\\\" DOC_DIR=\\\"${HL_DOC_DIR}\\\" ' && \ ++ ${QMAKE} 'DEFINES+=DATA_DIR=\\\"${HL_DATA_DIR}\\\" CONFIG_DIR=\\\"${HL_CONFIG_DIR}\\\" DOC_DIR=\\\"${HL_DOC_DIR}\\\" GUI_DATA_DIR=\\\"${GUI_DATA_DIR}\\\" ' && \ + $(MAKE) + + $(OBJECTFILES) : makefile diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 1b2cf4becf..f8763b7b74 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -52,7 +52,8 @@ (define-module (gnu packages pretty-print) #:use-module (gnu packages lua) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages swig)) + #:use-module (gnu packages swig) + #:use-module (gnu packages qt)) (define-public a2ps (package @@ -352,13 +353,15 @@ (define-public highlight (package (name "highlight") (version "4.7") + (outputs (list "out" "gui")) (source (origin (method url-fetch) (uri (string-append "http://www.andre-simon.de/zip/highlight-" version ".tar.bz2")) (sha256 (base32 - "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")))) + "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")) + (patches (search-patches "highlight-gui-data-dir.patch")))) (build-system gnu-build-system) (arguments (list #:tests? #f ;no tests @@ -371,17 +374,44 @@ (define-public highlight (delete 'configure) ;no configure script (add-after 'unpack 'fix-search-for-lua (lambda _ - (substitute* "src/makefile" - (("(LUA_PKG_NAME=).*" _ assignment) - (string-append assignment "lua-" - #$(version-major+minor (package-version - lua)) - "\n"))) - (substitute* "extras/swig/makefile" - (("lua") - (string-append "lua-" - #$(version-major+minor (package-version - lua))))))) + (let ((ver #$(version-major+minor (package-version + lua)))) + (substitute* "src/makefile" + (("(LUA_PKG_NAME=).*" _ assignment) + (string-append assignment "lua-" ver "\n"))) + (substitute* "src/gui-qt/highlight.pro" + (("(PKGCONFIG \\+= lua)" _ assignment) + (string-append assignment "-" ver))) + (substitute* "extras/swig/makefile" + (("lua") + (string-append "lua-" ver)))))) + (add-after 'build 'build-gui + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (data (string-append out + "/share/highlight/")) + (conf (string-append out "/etc/highlight/")) + (doc (string-append out + "/share/doc/highlight/")) + (gui (assoc-ref outputs "gui")) + (gui-data (string-append gui + "/share/highlight/"))) + ;; modified version of gui task in makefile + (invoke "make" + "-C" + "./src" + "-f" + "./makefile" + (string-append "HL_DATA_DIR=" data) + (string-append "HL_CONFIG_DIR=" conf) + (string-append "HL_DOC_DIR=" doc) + (string-append "GUI_DATA_DIR=" gui-data) + "gui-qt")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "make" "install" + (string-append "PREFIX=" out))))) (add-after 'install 'install-perl-bindings (lambda* (#:key outputs #:allow-other-keys) (let* ((perldir (string-append (assoc-ref outputs @@ -394,8 +424,14 @@ (define-public highlight (invoke "make" "perl") (invoke "perl" "-I" "." "testmod.pl") (install-file "highlight.pm" perldir) - (install-file "highlight.so" autodir)))))))) - (inputs (list lua boost perl)) + (install-file "highlight.so" autodir))))) + (add-after 'install 'install-gui + (lambda* (#:key outputs #:allow-other-keys) + (let ((gui (assoc-ref outputs "gui"))) + (mkdir-p (string-append gui "/bin")) + (invoke "make" "install-gui" + (string-append "PREFIX=" gui)))))))) + (inputs (list lua boost perl qtbase-5)) (native-inputs (list pkg-config swig)) (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php") (synopsis "Convert code to documents with syntax highlighting") From patchwork Mon Aug 7 14:05:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gemmaro X-Patchwork-Id: 52608 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 85A5B27BBEC; Mon, 7 Aug 2023 15:17:18 +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 autolearn=ham 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 7B6F327BBE9 for ; Mon, 7 Aug 2023 15:17:17 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qT11q-0000pa-N1; Mon, 07 Aug 2023 10:16:15 -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 1qT11g-0000Uh-KT for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:09 -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 1qT11f-0005jo-HY for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qT11f-0004l2-Cr for guix-patches@gnu.org; Mon, 07 Aug 2023 10:16:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64983] [PATCH v2 4/4] gnu: highlight: Fix paths for Perl bindings. Resent-From: gemmaro Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Aug 2023 14:16:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64983 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64983@debbugs.gnu.org Cc: gemmaro Received: via spool by 64983-submit@debbugs.gnu.org id=B64983.169141771618185 (code B ref 64983); Mon, 07 Aug 2023 14:16:03 +0000 Received: (at 64983) by debbugs.gnu.org; 7 Aug 2023 14:15:16 +0000 Received: from localhost ([127.0.0.1]:34045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT10u-0004jF-2b for submit@debbugs.gnu.org; Mon, 07 Aug 2023 10:15:16 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:55681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT10o-0004i6-JB for 64983@debbugs.gnu.org; Mon, 07 Aug 2023 10:15:13 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1bc6624623cso13170605ad.3 for <64983@debbugs.gnu.org>; Mon, 07 Aug 2023 07:15:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691417705; x=1692022505; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bPNvXKWLEeZRjRG1IRFUOTOq92j4GtqqoHdo3KWOvyc=; b=WP0hlk3bs0yCSxIfilohLup6892udWsvG/cc4w1H4a/VsjU9aj0l0H9IloCgW4bxd3 qh8zaIiu9bvtGn4227wnC5HaijpTA8ii/XpFA56c7imGNo8k1vJP4U1XS/qldi/gr5Zg 594DYnp3uk8qaf6ilZWhe0HGut3h/LNAv1FGK2OjF/W9VLPv0fNcdj/JWocQVmo1Bq+G 5buEGaIOw0Op8TjV/LmXYmqQ+AUDBZpnkUSAS/ckQd589VFq5TsRC+tv+9b6mv37FQa+ HMfYWPs/3MhJewZLYyZDE35etZftQDSLcYTI8WTelp/6yhKbB4wv7q7CsP4x9AbFvNYY eDFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691417705; x=1692022505; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bPNvXKWLEeZRjRG1IRFUOTOq92j4GtqqoHdo3KWOvyc=; b=Ab+yn9aeCa4+qiJHdH9jBb3d0fYyRKHP7jvpgVDEiOgCHPx8M96uFnc3ktG5eXhIFp +zUrq6VCOocB6Bdfse2PhlX2gBJDKFJ/zOcE++ZbDKpAkAE+oNuVqHAtgV26zhYg3YAk vf1G+xnUc/mF+RgxlIVbk+A6fh+bqHtaiE5Px6EVKqJugxs1X1Kz0pdvasrOBx8WYodS CP76GnMziYMlxiWrkhtIHGWE6erTXejKBItR4CK4Kq2CiwaEhFXSFkTUKRz343IDusVQ LyNfcUkfzJ/7oPt+CKk9M4OSH5QLQWvbfoApJHVFnfgCsMRyo+SsPG/jB8SncPzHmca+ 2+bg== X-Gm-Message-State: AOJu0Yw5WqLuW4Tz5K5xq3b02OhdmRACvy/GCwz+FDoue2nF3HqOUU8D vwbRX2qYGvLo0SmBYQbzCFW4U4yYv/o= X-Google-Smtp-Source: AGHT+IGOJvzC1W26Zzk+tAKS7NjbmZudM1D7/dxlDsCU9VWpCN9cc9QA7USqGjZCiamRSMOgJLR7Rw== X-Received: by 2002:a17:902:bb82:b0:1b8:8223:8bdd with SMTP id m2-20020a170902bb8200b001b882238bddmr8778212pls.59.1691417704824; Mon, 07 Aug 2023 07:15:04 -0700 (PDT) Received: from mac.gemmaro.name (ONI-202-70-254-104.oninet.ne.jp. [202.70.254.104]) by smtp.gmail.com with ESMTPSA id ja4-20020a170902efc400b001b8013ed362sm6985191plb.96.2023.08.07.07.15.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 07:15:04 -0700 (PDT) From: gemmaro Date: Mon, 7 Aug 2023 23:05:42 +0900 Message-ID: X-Mailer: git-send-email 2.41.0 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/pretty-print.scm (highlight): Fix paths for Perl bindings. [arguments]: Set hl_data_dir and hl_conf_dir in install-perl-bindings phase. --- gnu/packages/pretty-print.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index f8763b7b74..5d15b160f3 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -414,14 +414,19 @@ (define-public highlight (string-append "PREFIX=" out))))) (add-after 'install 'install-perl-bindings (lambda* (#:key outputs #:allow-other-keys) - (let* ((perldir (string-append (assoc-ref outputs - "out") + (let* ((out (assoc-ref outputs "out")) + (data (string-append out + "/share/highlight/")) + (conf (string-append out "/etc/highlight/")) + (perldir (string-append out "/lib/perl5/site_perl/" #$(package-version perl))) (autodir (string-append perldir "/auto/highlight"))) (with-directory-excursion "extras/swig" - (invoke "make" "perl") + (invoke "make" "perl" + (string-append "hl_data_dir=" data) + (string-append "hl_conf_dir=" conf)) (invoke "perl" "-I" "." "testmod.pl") (install-file "highlight.pm" perldir) (install-file "highlight.so" autodir)))))