aboutsummaryrefslogtreecommitdiff
path: root/src/xyz/euandreh/pending.scm
blob: 8f6e56db3b0de465e625c599079413c7ce566f59 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
(define-module (xyz euandreh pending)
  #:use-module (guix licenses)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix build-system perl)
  #:use-module (gnu packages)
  #:use-module (gnu packages docbook)
  #:use-module (gnu packages gettext)
  #:use-module (gnu packages tex)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages perl-check))

(define-public po4a-text
  (package
    (name "po4a-text")
    (version "0.63")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/mquinson/po4a/releases/download/v"
                                  version "/po4a-" version ".tar.gz"))
              (sha256
               (base32
                "1kmlfpdl1i1wrcdn0k1frh44fq10sfwswi3azvibli2lakpf66z2"))))
    (build-system perl-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'install 'wrap-programs
          (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"
					":"
					(assoc-ref inputs "perl-yaml-tiny")
                                        "/lib/perl5/site_perl"
					":"
					(assoc-ref inputs "perl-pod-parser")
					"/lib/perl5/site_perl")))
              (for-each (lambda (file)
                          (wrap-program file
                            `("PERL5LIB" ":" prefix (,path))))
                        (find-files bin "\\.*$")))))
         (add-before 'reset-gzip-timestamps 'make-compressed-files-writable
           (lambda* (#:key outputs #:allow-other-keys)
             (for-each make-file-writable
                       (find-files (string-append (assoc-ref outputs "out")
                                                  "/share/man")
                                   ".*\\.gz$"))))
         (add-after 'unpack 'patch-docbook-xml
           (lambda* (#:key inputs #:allow-other-keys)
             (substitute* (find-files "." ".*\\.xml(-good)?")
               (("http://www.oasis-open.org/docbook/xml/4.1.2/")
                (string-append (assoc-ref inputs "docbook-xml")
                               "/xml/dtd/docbook/")))))
         (add-before 'check 'disable-failing-tests
           (lambda _
             (delete-file "t/01-classes.t")

             (delete-file "t/add.t")
             (delete-file "t/core-porefs.t")
             (delete-file "t/fmt-asciidoc.t")
             (delete-file "t/fmt-sgml.t"))))))
    (native-inputs
     `(("gettext" ,gettext-minimal)
       ("perl-module-build" ,perl-module-build)
       ("docbook-xsl" ,docbook-xsl)
       ("libxml2" ,libxml2)
       ("xsltproc" ,libxslt)

       ;; For tests.
       ("docbook-xml" ,docbook-xml-4.1.2)
       ("perl-test-pod" ,perl-test-pod)
       ("texlive" ,texlive-tiny)))
    (propagated-inputs
     `(("perl-yaml-tiny" ,perl-yaml-tiny)
       ("perl-pod-parser" ,perl-pod-parser)))
    (home-page "https://po4a.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+)))

(list
 po4a-text)