From patchwork Wed Jun 30 14:44:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: EuAndreh X-Patchwork-Id: 30842 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 1BC3D27BC81; Wed, 30 Jun 2021 15:47:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9734227BC78 for ; Wed, 30 Jun 2021 15:47:10 +0100 (BST) Received: from localhost ([::1]:39164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lybUb-0008J1-JO for patchwork@mira.cbaines.net; Wed, 30 Jun 2021 10:47:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lybUU-0008Id-2k for guix-patches@gnu.org; Wed, 30 Jun 2021 10:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46889) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lybUT-0000mL-R4 for guix-patches@gnu.org; Wed, 30 Jun 2021 10:47:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lybUT-0004Rp-QZ for guix-patches@gnu.org; Wed, 30 Jun 2021 10:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49294] [PATCH] gnu: po4a: Add perl-yaml-tiny to PERL5LIB Resent-From: EuAndreh Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 30 Jun 2021 14:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49294 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49294@debbugs.gnu.org Cc: EuAndreh X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162506437417041 (code B ref -1); Wed, 30 Jun 2021 14:47:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jun 2021 14:46:14 +0000 Received: from localhost ([127.0.0.1]:58435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lybTh-0004Qn-SD for submit@debbugs.gnu.org; Wed, 30 Jun 2021 10:46:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:54612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lybTg-0004Qg-JX for submit@debbugs.gnu.org; Wed, 30 Jun 2021 10:46:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lybTf-000808-3G for guix-patches@gnu.org; Wed, 30 Jun 2021 10:46:12 -0400 Received: from box.euandre.org ([46.101.160.115]:60305) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lybTY-0008RR-QL for guix-patches@gnu.org; Wed, 30 Jun 2021 10:46:10 -0400 Received: from authenticated-user (box.euandre.org [46.101.160.115]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.euandre.org (Postfix) with ESMTPSA id 4B8DAFC3F4; Wed, 30 Jun 2021 11:45:24 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=euandre.org; s=mail; t=1625064327; bh=EYatqpC0qolZV3/346HNZmbMdQM1/hdKkgkhEoLVvAI=; h=From:To:Cc:Subject:Date:From; b=WWwvjfZQVJAbLX+ZvoxVJVHoxkRKVc9bjJnI7+k3Sh7z/jE9wu9v5ZD91tW+K92TN 8AM1giq0B3AoIkEXFAIaFm8DsRbCItbBtZ78t5ov8xXBx4kwqBGY+UNRoB2IinQ8bO 4UVVNsWMGEFjskhE7GMBNxdcFr89eyl0+AFhbiQAk16lhvFSREA66UQUxnKsOp16Cv XcAHJXTytrQ21/K69vvQQDH5hfCZmMtfM2zHBJqRAIALI0xPw4GCeHHwjfiHytUXrT qMWhTwYshjw2Ks3+1f1dsCFxvwrMnUs7NyFznlsOrxQ7UhH+puBOAcMGi88N5CgTly YNbnJpqu9+9ig== Date: Wed, 30 Jun 2021 11:44:23 -0300 Message-Id: <20210630144423.3014514-1-eu@euandre.org> MIME-Version: 1.0 Received-SPF: pass client-ip=46.101.160.115; envelope-from=eu@euandre.org; helo=box.euandre.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Reply-to: EuAndreh X-ACL-Warn: , EuAndreh via Guix-patches X-Patchwork-Original-From: EuAndreh via Guix-patches via From: EuAndreh X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gettext.scm (po4a): Include perl-yaml-tiny dependency in PERL5LIB search path of executables. [native-inputs]: Remove perl-yaml-tiny. [propagated-inputs]: Add perl-yaml-tiny. --- The "use YAML::Tiny;" [0] statement is failing, because the library was included in the list of dependencies, but was not being propagated and not put in PERL5LIB, and resulted in an error: ``` $ po4a-updatepo -f text -m f.txt -p l.po -v Unknown format type: text. po4a::chooser: Module loading error: Can't locate YAML/Tiny.pm in @INC (you may need to install the YAML::Tiny module) (@INC contains: /gnu/store/6ba47ndbbaf1h8qrsss9lfji0xvmh8px-po4a-0.61/lib/perl5/site_perl/5.30.2/x86_64-linux-thread-multi /gnu/store/6ba47ndbbaf1h8qrsss9lfji0xvmh8px-po4a-0.61/lib/perl5/site_perl/5.30.2 /gnu/store/6ba47ndbbaf1h8qrsss9lfji0xvmh8px-po4a-0.61/lib/perl5/site_perl /gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/lib/perl5/site_perl/5.30.2/x86_64-linux-thread-multi /gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/lib/perl5/site_perl/5.30.2 /gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/lib/perl5/5.30.2/x86_64-linux-thread-multi /gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/lib/perl5/5.30.2) at /gnu/store/6ba47ndbbaf1h8qrsss9lfji0xvmh8px-po4a-0.61/lib/perl5/site_perl/5.30.2/Locale/Po4a/Text.pm line 60. BEGIN failed--compilation aborted at /gnu/store/6ba47ndbbaf1h8qrsss9lfji0xvmh8px-po4a-0.61/lib/perl5/site_perl/5.30.2/Locale/Po4a/Text.pm line 60. Compilation failed in require at (eval 22) line 1. BEGIN failed--compilation aborted at (eval 22) line 1. ``` This patch addresses that, and now the use statement works as expected. [0]: https://github.com/mquinson/po4a/blob/a69b48eda3ebd66eec30a34a377c7a00c6f8e36c/lib/Locale/Po4a/Text.pm#L60 gnu/packages/gettext.scm | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm index 21228694d7..e4cd139393 100644 --- a/gnu/packages/gettext.scm +++ b/gnu/packages/gettext.scm @@ -238,17 +238,19 @@ from Markdown files.") `(#:phases (modify-phases %standard-phases (add-after 'install 'wrap-programs - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key outputs inputs #:allow-other-keys) ;; Make sure all executables in "bin" find the Perl modules ;; provided by this package at runtime. - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin/")) - (path (string-append out "/lib/perl5/site_perl"))) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin/")) + (path (string-append out "/lib/perl5/site_perl")) + (deps-path (string-append (assoc-ref inputs "perl-yaml-tiny") + "/lib/perl5/site_perl"))) (for-each (lambda (file) (wrap-program file - `("PERL5LIB" ":" prefix (,path)))) - (find-files bin "\\.*$")) - #t))) + `("PERL5LIB" ":" prefix (,path + ,deps-path)))) + (find-files bin "\\.*$"))))) (add-before 'reset-gzip-timestamps 'make-compressed-files-writable (lambda* (#:key outputs #:allow-other-keys) (for-each make-file-writable @@ -284,8 +286,9 @@ from Markdown files.") ;; For tests. ("docbook-xml" ,docbook-xml-4.1.2) ("perl-test-pod" ,perl-test-pod) - ("perl-yaml-tiny" ,perl-yaml-tiny) ("texlive" ,texlive-tiny))) + (propagated-inputs + `(("perl-yaml-tiny" ,perl-yaml-tiny))) (home-page "https://po4a.org/") (synopsis "Scripts to ease maintenance of translations") (description