gnu: Add libxmlplusplus.

* gnu/packages/xml.scm (libxmlplusplus): New variable.
This commit is contained in:
Ricardo Wurmus 2020-08-04 15:09:36 +02:00
parent 062448f359
commit cc53718760
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -3,7 +3,7 @@
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com>
@ -45,7 +45,12 @@ (define-module (gnu packages xml)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages gnome)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages java)
#:use-module (gnu packages nss)
#:use-module (gnu packages perl)
@ -167,6 +172,64 @@ (define-public libxml2
project (but it is usable outside of the Gnome platform).")
(license license:x11)))
;; This is the latest stable release.
(define-public libxmlplusplus
(package
(name "libxmlplusplus")
(version "3.2.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/libxmlplusplus/libxmlplusplus.git")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0wjz591rjlgbah7dcq8i0yn0zw9d62b7g6r0pppx81ic0cx8n8ga"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-documentation
(lambda* (#:key inputs #:allow-other-keys)
(let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
"/xml/dtd/docbook"))
(xsldoc (string-append (assoc-ref inputs "docbook-xsl")
"/xml/xsl/docbook-xsl-"
,(package-version docbook-xsl))))
(substitute* '("examples/dom_xpath/example.xml"
"docs/manual/libxml++_without_code.xml")
(("http://.*/docbookx\\.dtd")
(string-append xmldoc "/docbookx.dtd")))
(setenv "SGML_CATALOG_FILES"
(string-append xmldoc "/catalog.xml"))
(substitute* "docs/manual/docbook-customisation.xsl"
(("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
(string-append xsldoc "/html/chunk.xsl"))))
#t)))))
(propagated-inputs
`(("libxml2" ,libxml2)))
(inputs
`(("glibmm" ,glibmm)))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("doxygen" ,doxygen)
("docbook-xml" ,docbook-xml)
("docbook-xsl" ,docbook-xsl)
("graphviz" ,graphviz) ; for dot
("libtool" ,libtool)
("libxslt" ,libxslt)
("mm-common" ,mm-common)
("perl" ,perl)
("pkg-config" ,pkg-config)))
(home-page "https://github.com/libxmlplusplus/libxmlplusplus/")
(synopsis "C++ bindings for libxml2")
(description
"libxml++ (a.k.a. libxmlplusplus) provides a C++ interface to XML files.
It uses libxml2 to access the XML files.")
(license license:lgpl2.1+)))
(define-public python-libxml2
(package/inherit libxml2
(name "python-libxml2")