guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/06: gnu: Add po4a.


From: Ricardo Wurmus
Subject: 03/06: gnu: Add po4a.
Date: Wed, 02 Sep 2015 06:46:15 +0000

rekado pushed a commit to branch master
in repository guix.

commit 97f70018b04d5e91133fd88577612397b5f8e350
Author: Ricardo Wurmus <address@hidden>
Date:   Mon Aug 31 08:46:12 2015 +0200

    gnu: Add po4a.
    
    * gnu/packages/gettext.scm (po4a): New variable.
---
 gnu/packages/gettext.scm |   63 +++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 62 insertions(+), 1 deletions(-)

diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index 6be3093..f1b0221 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012 Nikita Karetnikov <address@hidden>
 ;;; Copyright © 2014 Mark H Weaver <address@hidden>
+;;; Copyright © 2015 Ricardo Wurmus <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,11 +19,15 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages gettext)
-  #:use-module ((guix licenses) #:select (gpl3+))
+  #:use-module ((guix licenses) #:select (gpl2+ gpl3+))
   #:use-module (gnu packages)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system perl)
+  #:use-module (gnu packages docbook)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages texlive)
   #:use-module (gnu packages xml))
 
 ;; Use that name to avoid clashes with Guile's 'gettext' procedure.
@@ -91,3 +96,59 @@ with the means to create message catalogs, as well as an 
Emacs mode to work
 with them, and a runtime library to load translated messages from the
 catalogs.  Nearly all GNU packages use Gettext.")
     (license gpl3+)))                             ;some files are under GPLv2+
+
+(define-public po4a
+  (package
+    (name "po4a")
+    (version "0.47")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://alioth.debian.org/frs/download.php";
+                                  "/file/4142/po4a-" version ".tar.gz"))
+              (sha256
+               (base32
+                "01vm0750aq0h2lphrflv3wq9gz7y0py8frglfpacn58ivyvy242h"))))
+    (build-system perl-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; FIXME: One test fails as we don't have SGMLS.pm
+         (add-before 'check 'disable-sgml-test
+          (lambda _
+            (delete-file "t/20-sgml.t")
+            #t))
+         (add-after 'unpack 'fix-builder
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (substitute* "Po4aBuilder.pm"
+              ;; By default it tries to install into perl's manpath.
+              (("my \\$mandir = .*$")
+               (string-append "my $mandir = \"" (assoc-ref outputs "out")
+                              "/share/man\";\n")))
+            #t))
+         (add-after 'install 'wrap-programs
+          (lambda* (#:key outputs #: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")))
+              (for-each (lambda (file)
+                          (wrap-program file
+                            `("PERL5LIB" ":" prefix (,path))))
+                        (find-files bin "\\.*$"))
+              #t))))))
+    (native-inputs
+     `(("gettext" ,gnu-gettext)
+       ("perl-module-build" ,perl-module-build)
+       ("docbook-xsl" ,docbook-xsl)
+       ("docbook-xml" ,docbook-xml) ;for tests
+       ("texlive-bin" ,texlive-bin) ;for tests
+       ("libxml2" ,libxml2)
+       ("xsltproc" ,libxslt)))
+    (home-page "http://po4a.alioth.debian.org/";)
+    (synopsis "Scripts to ease maintenance of translations")
+    (description
+     "The po4a (PO for anything) project goal is to ease translations (and
+more interestingly, the maintenance of translations) using gettext tools on
+areas where they were not expected like documentation.")
+    (license gpl2+)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]