From ed6641a62515619521bdeb6460880166518b0a1f Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Tue, 21 Jul 2020 08:52:03 -0400 Subject: [PATCH 15/36] gnu: Add sgml-common. * gnu/packages/docbook.scm (sgml-common): New variable. * gnu/packages/patches/sgml-common-manpage.patch: New file. * gnu/local.mk (sgml-common-manpage.patch): New reference. --- gnu/local.mk | 1 + gnu/packages/docbook.scm | 55 +++++++++++++++++++ .../patches/sgml-common-manpage.patch | 14 +++++ 3 files changed, 70 insertions(+) create mode 100644 gnu/packages/patches/sgml-common-manpage.patch diff --git a/gnu/local.mk b/gnu/local.mk index 0c5be2fa22..0ec7317050 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1502,6 +1502,7 @@ dist_patch_DATA = \ %D%/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ + %D%/packages/patches/sgml-common-manpage.patch \ %D%/packages/patches/sharutils-CVE-2018-1000097.patch \ %D%/packages/patches/shadow-hurd-pctrl.patch \ %D%/packages/patches/shishi-fix-libgcrypt-detection.patch \ diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index ee09b9d0b4..181699d317 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -22,6 +22,7 @@ (define-module (gnu packages docbook) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages imagemagick) #:use-module (gnu packages inkscape) @@ -32,9 +33,63 @@ #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (guix build-system python)) +(define-public sgml-common + (package + (name "sgml-common") + (version "0.6.3") + (source + (origin + (method url-fetch) + (uri + (string-append "ftp://sources.redhat.com/pub/docbook-tools/" + "new-trials/SOURCES/" name "-" version ".tgz")) + (sha256 + (base32 "0ngrn72iqf4kqjxvzl1mxfl40y95jwdizmj5bvy3y4k1sg0iii3x")) + (patches + (search-patches "sgml-common-manpage.patch")))) + (build-system gnu-build-system) + (outputs '("out" "doc")) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'trigger-bootstrap + (lambda _ + (for-each delete-file + (list + "configure" + "Makefile.in" + "bin/Makefile.in" + "config/Makefile.in" + "doc/Makefile.in" + "doc/HTML/Makefile.in" + "doc/man/Makefile.in" + "doc/refentry/Makefile.in" + "sgml-iso-entities/Makefile.in" + "xml-iso-entities/Makefile.in")) + (rename-file "configure.in" "configure.ac") + #t)) + (add-after 'install 'move-doc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc"))) + (mkdir-p (string-append doc "/share")) + (rename-file + (string-append out "/doc") + (string-append doc "/share/doc")) + #t)))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake))) + (synopsis "SGML Catalogs for DocBook-Tools") + (description "SGML-Common package gathers very basic stuff necessary to work +with SGML and XML.") + (home-page "https://www.sourceware.org/docbook-tools/") + (license gpl3+))) + (define-public docbook-xml-5 (package (name "docbook-xml") diff --git a/gnu/packages/patches/sgml-common-manpage.patch b/gnu/packages/patches/sgml-common-manpage.patch new file mode 100644 index 0000000000..c3773d14cd --- /dev/null +++ b/gnu/packages/patches/sgml-common-manpage.patch @@ -0,0 +1,14 @@ +Submitted By: Thomas Pegg +Date: 2003-11-18 +Initial Package Version: 0.6.3 +Origin: Thomas Pegg +Description: Fixes syntax of Makefile.am for installation of man pages, +for use with current automake versions 1.7.8 and higher. + +diff -Naur sgml-common-0.6.3.orig/doc/man/Makefile.am sgml-common-0.6.3/doc/man/Makefile.am +--- sgml-common-0.6.3.orig/doc/man/Makefile.am 2001-01-30 14:42:22.000000000 +0000 ++++ sgml-common-0.6.3/doc/man/Makefile.am 2003-11-18 16:48:47.000000000 +0000 +@@ -1,2 +1 @@ +-man8dir = $(mandir)/man8 +-man8_DATA = *.8 ++man_MANS = install-catalog.8 -- 2.27.0