void-packages/srcpkgs/docbook-xsl/patches/0002_docbook-xsl-mandir.patch
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid is kept at -Np0

```sh

git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

25 lines
1.1 KiB
Diff

From: Michael Biebl <biebl@debian.org>
Date: Wed, 7 Sep 2016 01:37:47 +0200
Subject: Fix bad .so links in man pages
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=%23727251
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831831
--- a/manpages/other.xsl
+++ b/manpages/other.xsl
@@ -558,7 +558,14 @@
<xsl:with-param name="message-prolog">Note: </xsl:with-param>
<xsl:with-param name="message-epilog"> (soelim stub)</xsl:with-param>
<xsl:with-param name="content">
- <xsl:value-of select="'.so '"/>
+ <xsl:choose>
+ <xsl:when test="$man.output.in.separate.dir = 0">
+ <xsl:value-of select="concat('.so man', $section, '/')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'.so '"/> <!-- added case -->
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:variable name="full.filename">
<xsl:call-template name="make.adjusted.man.filename">
<xsl:with-param name="name" select="$first.refname"/>