From b84d0b81b20a1e894d2a321c16d1bdb0979c80e3 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 20 Apr 2023 16:18:14 -0400 Subject: gnu: opensp: Remove patch-docbook-xml phase. * gnu/packages/xml.scm (opensp) [arguments]: Remove patch-docbook-xml phase. Use gexps. [native-inputs]: Remove labels. --- gnu/packages/xml.scm | 92 ++++++++++++++++++++++------------------------------ 1 file changed, 39 insertions(+), 53 deletions(-) (limited to 'gnu/packages/xml.scm') diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 1841cb3bda..e9e48d01a7 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -27,7 +27,7 @@ ;;; Copyright © 2020 Brett Gilio ;;; Copyright © 2020 Pierre Langlois ;;; Copyright © 2021 Michael Rohleder -;;; Copyright © 2021, 2022 Maxim Cournoyer +;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Felix Gruber ;;; Copyright © 2021 Guillaume Le Vaillant @@ -1741,60 +1741,46 @@ modular implementation of XML-RPC for C and C++.") (outputs '("out" "doc")) (build-system gnu-build-system) (native-inputs - `(("docbook-xml" ,docbook-xml-4.1.2) - ("docbook-xsl" ,docbook-xsl) - ("libxml2" ,libxml2) ;for XML_CATALOG_DIR - ("xmlto" ,xmlto) - ;; Dependencies to regenerate the 'configure' script. - ("autoconf" ,autoconf) - ("automake" ,automake) - ("gettext" ,gettext-minimal) - ("libtool" ,libtool))) + (list docbook-xml-4.1.2 + docbook-xsl + libxml2 ;for XML_CATALOG_DIR + xmlto + ;; Dependencies to regenerate the 'configure' script. + autoconf + automake + gettext-minimal + libtool)) (arguments - `( ;; Note: we cannot use '--enable-full-doc-build' as this would require - ;; Openjade, which in turn requires this package. + (list + ;; Note: we cannot use '--enable-full-doc-build' as this would require + ;; 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 - (modify-phases %standard-phases - (add-after 'unpack 'patch-docbook-paths - (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* (find-files "docsrc" "\\.xml$") - (("/usr/share/sgml/docbook/xml-dtd-4.1.2") xmldoc) - (("http://.*/docbookx\\.dtd") - (string-append xmldoc "/docbookx.dtd"))) - #t))) - (add-after 'patch-docbook-paths 'delete-configure - ;; The configure script in the release was made with an older - ;; Autoconf and lacks support for the `--docdir' option. - (lambda _ - (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))))) + ;; Skip the tests that are known to fail (see: + ;; https://sourceforge.net/p/openjade/mailman/message/6182316/) + #:make-flags '("TESTS_THAT_FAIL=") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'delete-configure + ;; The configure script in the release was made with an older + ;; Autoconf and lacks support for the `--docdir' option. + (lambda _ + (delete-file "configure"))) + (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")))) + (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") ""))))))) ;; $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 -- cgit v1.2.3