summaryrefslogtreecommitdiff
path: root/app-text/docbook-sgml-utils
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/docbook-sgml-utils')
-rw-r--r--app-text/docbook-sgml-utils/Manifest2
-rw-r--r--app-text/docbook-sgml-utils/docbook-sgml-utils-0.6.14-r6.ebuild76
-rw-r--r--app-text/docbook-sgml-utils/files/0001-Migrate-from-1998-style-which-progname-lookup-to-com.patch90
3 files changed, 168 insertions, 0 deletions
diff --git a/app-text/docbook-sgml-utils/Manifest b/app-text/docbook-sgml-utils/Manifest
index fd67467c3dcd..55c4a5ad7614 100644
--- a/app-text/docbook-sgml-utils/Manifest
+++ b/app-text/docbook-sgml-utils/Manifest
@@ -1,6 +1,8 @@
+AUX 0001-Migrate-from-1998-style-which-progname-lookup-to-com.patch 2802 BLAKE2B 569f9e77f0e7c93393d48c5215de72e13b6159b908195e92881bd33def2d88b1a238aaa244923b73e14a1fcc425febada0a9d6c25c5fff467c44494631b0b286 SHA512 5280ed937fccf69ee8a41f9eb11db1635ac336c820036830c2c628280020065533f8555b2890253da9984ed7a386c02b5d80b002f65f597fbc9afdda75631ed2
AUX docbook-sgml-utils-0.6.14-grep-2.7.patch 565 BLAKE2B c68fca7e9f273a6d32b9689fc436dffb77ffcaea2a91894b2bd7f8a48208df5562be01bf171fc65b27789948422cf6e3d1392d565205bca633cc22ef6e61d09f SHA512 2ec794bf1a6189633043366ac3eef72b6c792833ff3f2262c016af61c8256e654915656b7f7eb6c75b4df78ecb01790bd0fba231bdf46c5545931b0351d6cead
AUX docbook-utils-0.6.14-elinks.patch 239 BLAKE2B 3f2b99e9afe33849af50428053cd057e96420f9a2e004b4193afd8ca5b43b7795ec852cfd5e511b5c2aff8013092c805b0c46b3d334148eb915fab2b2793c315 SHA512 d8848ff585a3db20b95d58f6eb249dcbea039e303f21ae047946e809e734824227a2fab8ff5d5366bba4a66650ccc7f1a0e3b3e11fa1f8b8173c2ae308844b5a
AUX docbook-utils-0.6.14-prefix.patch 2810 BLAKE2B 1dcb7b40cabc930f96d2caa3c541dba42c7ab380a08cbaf6bf87b9c84dbb13f976c7f1dc05883c308b789c5295fd5ec97c2ef2aa8cf5046c9f302e3d8c873fe8 SHA512 c0fcd0575b031c9dba6ca42cac7e46bfeb687279006b69ba931dbbd546234309f9667e9a6bdd355bd518d8346589a68e1c453b36239fcb158899693819c41f70
DIST docbook-utils-0.6.14.tar.gz 124998 BLAKE2B c0ae31adbbbf78732362638bdc73638cd67205b4ce2b2ac4e740334fd230c8cb031e5ba3ee9e34110c48ea42115f2f5f4dab4b4b6dd45d963976d2b48d7836a2 SHA512 8052316a643b5eaa6c0373a9ed7f2406e7c3cb3da9d3c955a271c89813a8f3196fcd9e6c8385c7b6b7ecb916515e3ec7897aece4473989f0e4dc52a2bc8bbfdf
EBUILD docbook-sgml-utils-0.6.14-r5.ebuild 1853 BLAKE2B 06ea398147d39a5a970415c5cf61f35f7a33caa4e2e342eecdf4d68b4e089f2b22d738be3e17eedbd95b51bc3a31402e18db6d432f5fdefda940da9fd24c8d41 SHA512 a894ae7b80702844bbb9d9a13ab85e2e697f9098d3fc578468e8814ee012591373172bac51fed47315b3520ea7daef1554bfab7611ec520036e6fab0cb5aa2d1
+EBUILD docbook-sgml-utils-0.6.14-r6.ebuild 1961 BLAKE2B 0dc44ade5a776590746756f2aa305b5585978d5f8618ba91e1e51ad38b7e0d551265ef2f9c7652399d02186fc6e0a1d5fc777ef06f319816760f815b7bfbfd34 SHA512 cf7358232d77718d2559f4ce86ddf09fa319de2e4369f498cc98c41ff779727866bd423f29ce540945b13890892d1f8251d6546af2020239e84d5289aee1d76b
MISC metadata.xml 376 BLAKE2B 41601b1cfab5c502384fe8f8d13e1404d91434eb58573a527d6999d82c26761bce727f42e467f6336c41220d1dc4446b4ff020f3fa66b7ff1c968bf3f688717b SHA512 750848b4e8edd39b3032e4c10f0c3bcb1d5e2251c2faab08cea9effd19ae67263d956dfae37677770fc1a6cce434b3d89b209f78fc164ed48b3fb86968eda59f
diff --git a/app-text/docbook-sgml-utils/docbook-sgml-utils-0.6.14-r6.ebuild b/app-text/docbook-sgml-utils/docbook-sgml-utils-0.6.14-r6.ebuild
new file mode 100644
index 000000000000..8a3acfb1438d
--- /dev/null
+++ b/app-text/docbook-sgml-utils/docbook-sgml-utils-0.6.14-r6.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools prefix
+
+MY_P=${PN/-sgml/}-${PV}
+DESCRIPTION="Shell scripts to manage DocBook documents"
+HOMEPAGE="https://sourceware.org/docbook-tools/"
+SRC_URI="https://sourceware.org/pub/docbook-tools/new-trials/SOURCES/${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="jadetex"
+
+DEPEND=">=dev-lang/perl-5
+ app-text/docbook-dsssl-stylesheets
+ app-text/docbook-xml-dtd:4.2
+ app-text/openjade
+ app-text/xhtml1
+ dev-perl/SGMLSpm
+ ~app-text/docbook-sgml-dtd-3.0
+ ~app-text/docbook-sgml-dtd-3.1
+ ~app-text/docbook-sgml-dtd-4.0
+ ~app-text/docbook-sgml-dtd-4.1
+ ~app-text/docbook-sgml-dtd-4.2
+ ~app-text/docbook-sgml-dtd-4.4
+ ~app-text/docbook-xml-simple-dtd-1.0
+ ~app-text/docbook-xml-simple-dtd-4.1.2.4
+ jadetex? ( dev-texlive/texlive-formatsextra )
+ || (
+ www-client/lynx
+ www-client/links
+ www-client/elinks
+ virtual/w3m
+ )"
+RDEPEND="${DEPEND}"
+
+# including both xml-simple-dtd 4.1.2.4 and 1.0, to ease
+# transition to simple-dtd 1.0, <obz@gentoo.org>
+
+PATCHES=(
+ "${FILESDIR}"/${MY_P}-elinks.patch
+ "${FILESDIR}"/${P}-grep-2.7.patch
+
+ # drop dependency on sys-apps/which
+ "${FILESDIR}"/0001-Migrate-from-1998-style-which-progname-lookup-to-com.patch
+)
+
+src_prepare() {
+ default
+ if use prefix; then
+ eapply "${FILESDIR}"/${MY_P}-prefix.patch
+ eprefixify doc/{man,HTML}/Makefile.am bin/jw.in backends/txt configure.in
+ eautoreconf
+ fi
+}
+
+src_install() {
+ make DESTDIR="${D}" \
+ htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ install
+
+ if ! use jadetex; then
+ local i
+ for i in dvi pdf ps; do
+ rm "${ED}"/usr/bin/docbook2${i} || die
+ rm "${ED}"/usr/share/sgml/docbook/utils-${PV}/backends/${i} || die
+ rm "${ED}"/usr/share/man/man1/docbook2${i}.1 || die
+ done
+ fi
+ einstalldocs
+}
diff --git a/app-text/docbook-sgml-utils/files/0001-Migrate-from-1998-style-which-progname-lookup-to-com.patch b/app-text/docbook-sgml-utils/files/0001-Migrate-from-1998-style-which-progname-lookup-to-com.patch
new file mode 100644
index 000000000000..764d06ad4d78
--- /dev/null
+++ b/app-text/docbook-sgml-utils/files/0001-Migrate-from-1998-style-which-progname-lookup-to-com.patch
@@ -0,0 +1,90 @@
+From a5956fccad44bed98b5de22a6169e0aa098d169f Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Mon, 4 Mar 2024 18:16:32 -0500
+Subject: [PATCH] Migrate from 1998 style "which progname" lookup to command -v
+
+The "which" utility is not guaranteed to be installed either, and if it
+is, its behavior is not portable either. This means that when sgml tools
+are installed, the `which` check will report a fatal error because the
+which tool did not exist and the shell returned a nonzero status when
+attempting to fork+exec. If it did exist, it might not be an
+implementation of `which` that returns nonzero when commands do not
+exist.
+
+The general scripting suggestion is to use the "command -v" shell
+builtin that is required to exist in all POSIX 2008 compliant shells,
+and is thus guaranteed to work everywhere.
+
+For some in-depth discussions on the topic, see:
+- https://mywiki.wooledge.org/BashFAQ/081
+- https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then/85250#85250
+
+Examples of open-source shells likely to be installed as /bin/sh on
+Linux, which implement the 15-year-old standard: ash, bash, busybox,
+dash, ksh, mksh and zsh.
+
+However, in this case there's a pretty good exuse for not using a 2008
+standard. The docbook-utils project is dead since 2004. So we patch it
+(and scratch our heads about where to try sending patches).
+
+Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
+---
+ bin/jw.in | 16 ++++++----------
+ 1 file changed, 6 insertions(+), 10 deletions(-)
+
+diff --git a/bin/jw.in b/bin/jw.in
+index 4bfb312..82bd497 100644
+--- a/bin/jw.in
++++ b/bin/jw.in
+@@ -58,8 +58,7 @@ SGML_ERRORS_LIST="\n\
+ \040 no-valid \t Do not require the document to be type-valid"
+
+ # Get name of main SGML configuration file
+-which sgmlwhich >/dev/null 2>/dev/null
+-if [ $? -eq 0 ]
++if command -v sgmlwhich >/dev/null
+ then
+ SGML_CONF=`sgmlwhich`
+ else
+@@ -296,10 +295,10 @@ fi
+ # Try to find the SGML normalizer
+ if [ -z "$SGML_NORM" ]
+ then
+- SGML_NORM=`which sgmlnorm 2>/dev/null`
++ SGML_NORM=`command -v sgmlnorm`
+ if [ -z "SGML_NORM" ]
+ then
+- SGML_NORM=`which osgmlnorm 2>/dev/null`
++ SGML_NORM=`command -v osgmlnorm`
+ fi
+ fi
+
+@@ -376,13 +375,11 @@ esac
+ # Choose a parser
+ if [ -z "$SGML_JADE" ]
+ then
+- which jade >/dev/null 2>/dev/null
+- if [ $? -eq 0 ]
++ if command -v jade >/dev/null
+ then
+ SGML_JADE="jade"
+ else
+- which openjade >/dev/null 2>/dev/null
+- if [ $? -eq 0 ]
++ if command -v openjade >/dev/null
+ then
+ SGML_JADE="openjade"
+ else
+@@ -391,8 +388,7 @@ then
+ fi
+ fi
+ else
+- which $SGML_JADE >/dev/null 2>/dev/null
+- if [ $? -ne 0 ]
++ if ! command -v $SGML_JADE >/dev/null
+ then
+ echo "`basename $0`: parser $SGML_JADE is not available" >&2
+ exit 6
+--
+2.43.0
+