summary refs log tree commit diff
path: root/gnu/packages/xml.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/xml.scm')
-rw-r--r--gnu/packages/xml.scm71
1 files changed, 68 insertions, 3 deletions
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index b3c5f7d512..2c4cda54a3 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -19,6 +19,7 @@
 
 (define-module (gnu packages xml)
   #:use-module (gnu packages)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
@@ -64,7 +65,21 @@ things the parser might find in the XML document (like start tags).")
     (home-page "http://www.xmlsoft.org/")
     (synopsis "libxml2, a C parser for XML")
     (inputs `(("perl" ,perl)
-              ("python" ,python)))
+              ("python" ,python)
+              ("zlib" ,zlib)))
+    (arguments
+     `(#:phases
+        (alist-replace
+         'install
+         (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
+          (let ((install (assoc-ref %standard-phases 'install))
+                (glibc (assoc-ref inputs "libc"))
+                (out (assoc-ref outputs "out")))
+            (apply install args)
+            (chdir "python")
+            (substitute* "setup.py" (("/opt/include") (string-append glibc "/include")))
+            (system* "python" "setup.py" "install" (string-append "--prefix=" out))))
+        %standard-phases)))
     (description
      "Libxml2 is the XML C parser and toolkit developed for the Gnome project
 (but it is usable outside of the Gnome platform).")
@@ -86,7 +101,19 @@ things the parser might find in the XML document (like start tags).")
     (synopsis "libxslt, a C library for applying XSLT stylesheets to XML documents")
     (inputs `(("libgcrypt" ,libgcrypt)
               ("libxml2" ,libxml2)
-              ("python" ,python)))
+              ("python" ,python)
+              ("zlib" ,zlib)))
+    (arguments
+      `(#:phases
+         (alist-replace
+          'configure
+          (lambda* (#:key inputs #:allow-other-keys #:rest args)
+            (let ((configure (assoc-ref %standard-phases 'configure))
+                  (libxml2 (assoc-ref inputs "libxml2")))
+              ;; FIXME: This should be done more centrally.
+              (setenv "PYTHONPATH" (string-append libxml2 "/lib/python2.7/site-packages"))
+              (apply configure args)))
+         %standard-phases)))
     (description
      "Libxslt is an XSLT C library developed for the GNOME project. It is
 based on libxml for XML parsing, tree manipulation and XPath support.")
@@ -99,7 +126,7 @@ based on libxml for XML parsing, tree manipulation and XPath support.")
     (source (origin
              (method url-fetch)
              (uri (string-append
-                   "mirror://cpan/authors/id/M/MS/MSERGEANT/XML-Parser-"
+                   "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
                    version ".tar.gz"))
              (sha256
               (base32
@@ -122,3 +149,41 @@ then passed on to the Expat object on each parse call.  They can also be given
 as extra arguments to the parse methods, in which case they override options
 given at XML::Parser creation time.")
     (home-page "http://search.cpan.org/~toddr/XML-Parser-2.41/Parser.pm")))
+
+(define-public intltool
+  (package
+    (name "intltool")
+    (version "0.50.2")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://launchpad.net/intltool/trunk/"
+                                 version "/+download/intltool-"
+                                 version ".tar.gz"))
+             (sha256
+              (base32
+               "01j4yd7i84n9nk4ccs6yifg84pp68nr9by57jdbhj7dpdxf5rwk7"))))
+    (build-system gnu-build-system)
+    (propagated-inputs
+     `(("perl" ,perl)
+       ("perl-xml-parser" ,perl-xml-parser)))
+    (arguments
+      `(#:phases
+         (alist-replace
+          'configure
+          (lambda* (#:key inputs #:allow-other-keys #:rest args)
+            (let ((configure (assoc-ref %standard-phases 'configure))
+                  (perl-xml-parser (assoc-ref inputs "perl-xml-parser")))
+              ;; FIXME: This should be done more centrally.
+              (setenv "PERL5LIB" (string-append perl-xml-parser "/lib/perl5/site_perl"))
+              (apply configure args)))
+         %standard-phases)))
+    (home-page "https://launchpad.net/intltool/+download")
+    (synopsis "Utility scripts for internationalising xml")
+    (description
+     "intltool automatically extracts translatable strings from oaf, glade,
+bonobo ui, nautilus theme and other XML files into the po files.
+It automatically merges translations from po files back into .oaf files
+(encoding to be 7-bit clean). The merging mechanism can also be extended to
+support other types of XML files.")
+    (license license:gpl2+)))
+