[PATCH:libXi] Make shadow man pages generated by asciidoc work with Solaris man

Gaetan Nadon memsize at videotron.ca
Sat Sep 17 13:59:59 PDT 2011

On Fri, 2011-09-16 at 21:00 -0700, Alan Coopersmith wrote:

> Solaris man requires .so entries in man pages include the man section
> directory, not just the man page filename, even when it's in the same
> directory, so use sed to add it in.
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  man/Makefile.am |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> diff --git a/man/Makefile.am b/man/Makefile.am
> index d4c37b3..28211a1 100644
> --- a/man/Makefile.am
> +++ b/man/Makefile.am
> @@ -159,6 +159,9 @@ MAN_SUBSTS += -e 's/libmansuffix/$(LIB_MAN_SUFFIX)/g'
>  MAN_SUBSTS += -e 's/\[FIXME: source\]/$(XORG_MAN_PAGE)/'
>  MAN_SUBSTS += -e 's/\[FIXME: manual\]/XINPUT FUNCTIONS/'
> +# asciidoc generates shadow page references without the man section directory
> +MAN_SUBSTS += -e 's/^\.so X/.so man$(LIB_MAN_SUFFIX)\/X/'
> +
>  .man.$(LIB_MAN_SUFFIX):
>  	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@

On Debian, the patch is a noop. I see no difference in the generated
shadow man pages. That would mean that what asciidoc or xmlto generates
is different on Solaris.

The screen output of the test .so man page I used, after erasing *.man
and *.3 and applying the patch:

        nadon at ubuntu:~/xorg/src/lib/libXi/man$ make XFreeDeviceList.3
         cd .. && /bin/bash /home/nadon/xorg/src/lib/libXi/missing --run automake-1.11 --foreign man/Makefile
         cd .. && /bin/bash ./config.status man/Makefile 
        config.status: creating man/Makefile
        /usr/bin/asciidoc -b docbook -d manpage -o XListInputDevices.xml XListInputDevices.txt
        /usr/bin/xmlto man XListInputDevices.xml
        Warn: meta author : no refentry/info/author                        XListInputDevices
        Note: meta author : see http://docbook.sf.net/el/author            XListInputDevices
        Warn: meta author : no author data, so inserted a fixme            XListInputDevices
        Note: Writing XListInputDevices.libmansuffix
        Note: Writing XFreeDeviceList.libmansuffix (soelim stub)
        mv -f XListInputDevices.libmansuffix XListInputDevices.man
        mv -f XFreeDeviceList.libmansuffix XFreeDeviceList.man
        /bin/sed -e 's|__vendorversion__|"libXi 1.4.99" "X Version 11"|' 
        	-e 's|__xorgversion__|"libXi 1.4.99" "X Version 11"|' 	
        	-e 's|__xservername__|Xorg|g' 	
        	-e 's|__xconfigfile__|xorg.conf|g' 	
        	-e 's|__projectroot__|/home/nadon/xorg/src/inst|g' 	
        	-e 's|__apploaddir__||g' 	
        	-e 's|__appmansuffix__|1|g' 	
        	-e 's|__drivermansuffix__|4|g' 	
        	-e 's|__adminmansuffix__|8|g' 	
        	-e 's|__libmansuffix__|3|g' 	
        	-e 's|__miscmansuffix__|7|g' 	
        	-e 's|__filemansuffix__|5|g' 
        	-e 's/libmansuffix/3/g' 
        	-e 's/\[FIXME: source\]/X Version 11/' 
        	-e 's/\[FIXME: manual\]/XINPUT FUNCTIONS/' 
        	-e 's/^\.so X/.so man3\/X/' 
        	< XFreeDeviceList.man > XFreeDeviceList.3
        rm XListInputDevices.xml

The content of the .man and .3 files:

        .so manlibmansuffix/XListInputDevices.libmansuffix
        .so man3/XListInputDevices.3

I attached the generated xml file in case.

        I use asciidoc 8.6.3 and xmlto 0.0.23
        xsltproc --version
        Using libxml 20708, libxslt 10126 and libexslt 815
        xsltproc was compiled against libxml 20708, libxslt 10126 and libexslt 815
        libxslt 10126 was compiled against libxml 20708
        libexslt 815 was compiled against libxml 20708

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110917/40f063d5/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XListInputDevices.xml
Type: application/xml
Size: 10790 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110917/40f063d5/attachment-0001.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110917/40f063d5/attachment-0001.pgp>

More information about the xorg-devel mailing list