mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-27 23:02:16 -05:00
gnu: opensp: Add doc output, enable tests and add search path.
* gnu/packages/xml.scm (opensp)[outputs]: Add doc output. [inputs]: Move to... [native-inputs]: ... here. Add autoconf, automake, gettext and libtool and libxml2. [arguments]: Enable tests. {make-flags}: New argument. [phases]{patch-docbook-paths}: No longer patch XMLTO command line. {delete-configure, honor-docdir, fix-tests-makefile.am}: New phases. [native-search-paths]: Define a SGML_CATALOG_FILES search path specification. [description]: Extend description.
This commit is contained in:
parent
facccf1c0f
commit
315d42e1f4
1 changed files with 52 additions and 12 deletions
|
@ -26,6 +26,7 @@
|
||||||
;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
|
;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
|
||||||
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
|
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
|
||||||
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
|
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
|
||||||
|
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -2230,16 +2231,25 @@ (define-public opensp
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p"))))
|
"1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p"))))
|
||||||
|
(outputs '("out" "doc"))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("gettext" ,gettext-minimal)))
|
|
||||||
(inputs
|
|
||||||
`(("docbook-xml" ,docbook-xml-4.1.2)
|
`(("docbook-xml" ,docbook-xml-4.1.2)
|
||||||
("docbook-xsl" ,docbook-xsl)
|
("docbook-xsl" ,docbook-xsl)
|
||||||
("xmlto" ,xmlto)))
|
("libxml2" ,libxml2) ;for XML_CATALOG_DIR
|
||||||
|
("xmlto" ,xmlto)
|
||||||
|
;; Dependencies to regenerate the 'configure' script.
|
||||||
|
("autoconf" ,autoconf)
|
||||||
|
("automake" ,automake)
|
||||||
|
("gettext" ,gettext-minimal)
|
||||||
|
("libtool" ,libtool)))
|
||||||
(arguments
|
(arguments
|
||||||
`(;; TODO: Fix and enable tests.
|
`( ;; Note: we cannot use '--enable-full-doc-build' as this would require
|
||||||
#:tests? #f
|
;; Openjade, which in turn requires this package.
|
||||||
|
|
||||||
|
;; Skip the tests that are known to fail (see:
|
||||||
|
;; https://sourceforge.net/p/openjade/mailman/message/6182316/)
|
||||||
|
#:make-flags '("TESTS_THAT_FAIL=")
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'patch-docbook-paths
|
(add-after 'unpack 'patch-docbook-paths
|
||||||
|
@ -2253,16 +2263,46 @@ (define-public opensp
|
||||||
(("/usr/share/sgml/docbook/xml-dtd-4.1.2") xmldoc)
|
(("/usr/share/sgml/docbook/xml-dtd-4.1.2") xmldoc)
|
||||||
(("http://.*/docbookx\\.dtd")
|
(("http://.*/docbookx\\.dtd")
|
||||||
(string-append xmldoc "/docbookx.dtd")))
|
(string-append xmldoc "/docbookx.dtd")))
|
||||||
;; Directly pass the path to the stylesheet to xmlto.
|
#t)))
|
||||||
(substitute* "docsrc/Makefile.in"
|
(add-after 'patch-docbook-paths 'delete-configure
|
||||||
(("\\$\\(XMLTO\\)")
|
;; The configure script in the release was made with an older
|
||||||
(string-append "$(XMLTO) -x " xsldoc
|
;; Autoconf and lacks support for the `--docdir' option.
|
||||||
"/manpages/docbook.xsl")))
|
(lambda _
|
||||||
#t))))))
|
(delete-file "configure")
|
||||||
|
#t))
|
||||||
|
(add-after 'delete-configure 'honor-docdir
|
||||||
|
;; docdir is not honored due to being hardcoded in the various
|
||||||
|
;; Makefile.am (see: https://sourceforge.net/p/openjade/bugs/147/).
|
||||||
|
(lambda _
|
||||||
|
(substitute* '("Makefile.am" "doc/Makefile.am" "docsrc/Makefile.am")
|
||||||
|
(("^docdir = .*") "docdir = @docdir@\n"))
|
||||||
|
#t))
|
||||||
|
(add-after 'delete-configure 'fix-tests-makefile.am
|
||||||
|
;; Remove the trailing $(SHELL) from the TESTS_ENVIRONMENT variable
|
||||||
|
;; definition. Otherwise, when targets are built using
|
||||||
|
;; "$(am__check_pre) $(LOG_DRIVER) [...]", there would be two
|
||||||
|
;; $(SHELL) expansion which fails the build.
|
||||||
|
(lambda _
|
||||||
|
(substitute* "tests/Makefile.am"
|
||||||
|
(("^\tOSGMLNORM=`echo osgmlnorm\\|sed '\\$\\(transform\\)'`\\\\")
|
||||||
|
"\tOSGMLNORM=`echo osgmlnorm|sed '$(transform)'`")
|
||||||
|
(("^\t\\$\\(SHELL\\)\n") ""))
|
||||||
|
#t)))))
|
||||||
|
;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found
|
||||||
|
;; under the 'sgml' sub-directory of any given package.
|
||||||
|
(native-search-paths (list (search-path-specification
|
||||||
|
(variable "SGML_CATALOG_FILES")
|
||||||
|
(separator ":")
|
||||||
|
(files '("sgml"))
|
||||||
|
(file-pattern "^catalog$|^CATALOG$|^.*\\.cat$")
|
||||||
|
(file-type 'regular))))
|
||||||
(home-page "http://openjade.sourceforge.net/")
|
(home-page "http://openjade.sourceforge.net/")
|
||||||
(synopsis "Suite of SGML/XML processing tools")
|
(synopsis "Suite of SGML/XML processing tools")
|
||||||
(description "OpenSP is an object-oriented toolkit for SGML parsing and
|
(description "OpenSP is an object-oriented toolkit for SGML parsing and
|
||||||
entity management.")
|
entity management. It is a fork of James Clark's SP suite. The tools it
|
||||||
|
contains can be used to parse, validate, and normalize SGML and XML files.
|
||||||
|
The central program included in this package is @code{onsgmls}, which replaces
|
||||||
|
@code{sgmls}, @code{ospam}, @code{ospent}, @code{osgmlnorm}, and @code{osx}.")
|
||||||
(license
|
(license
|
||||||
;; expat license with added clause regarding advertising
|
;; expat license with added clause regarding advertising
|
||||||
(license:non-copyleft
|
(license:non-copyleft
|
||||||
|
|
Loading…
Reference in a new issue