Subject: pkg/20339: textproc/docbook installs uncomplete catalog for version 4.2
To: None <>
From: None <>
List: netbsd-bugs
Date: 02/14/2003 16:53:29
>Number:         20339
>Category:       pkg
>Synopsis:       textproc/docbook installs uncomplete catalog for version 4.2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 14 07:55:00 PST 2003
>Originator:     Joachim Koenig-Baltes
>Release:        NetBSD 1.6N
System: NetBSD compaq 1.6N NetBSD 1.6N (JOACHIM_ISDN) #0: Mon Feb 3 11:36:17 CET 2003 joachim@compaq:/usr/src/sys/arch/i386/compile/JOACHIM_ISDN i386
Architecture: i386
Machine: i386
textproc/docbook installs SGML catalog files for the DTD files for supporting 
tools to get from public to system identifiers. The installation rules work
correct for the catalogs up to and including version 4.1, but fail for version
4.2, because the information in the latter case is split over two successive
lines and so a simple egrep does not catch all the required information
% cd /usr/pkgsrc/textbrok/docbook
% make install
% jade <some sgml file>

and see it fail on parsing /usr/pkg/share/sgml/docbook/4.2/catalog
The following patch also includes the adjacent line of the original catalog
file and removes '--'-lines, added by egrep for the -A option by an additional
egrep. This is not very NetBSD-ic, but works on NetBSD, don't know about the
availability for other OSs such as SunOS and Linux.

--- Makefile.orig       2003-02-14 16:29:28.000000000 +0100
+++ Makefile    2003-02-14 16:30:22.000000000 +0100
@@ -87,7 +87,7 @@
        # 4.2:
        @(cd ${INSTDIR}/4.2; unzip ${DISTDIR}/
-       @${EGREP} '^PUBLIC.*(DocBook|Table)' ${INSTDIR}/4.2/ >${INSTDIR}/4.2/catalog
+       @${EGREP} -A 1 '^PUBLIC.*(DocBook|Table)' ${INSTDIR}/4.2/ | ${EGREP} -v '^--' >${INSTDIR}/4.2/catalog
        @${ECHO} "CATALOG \"${ISOCAT}\"" >> ${INSTDIR}/4.2/catalog
        @${CHMOD} ${SHAREMODE} ${INSTDIR}/4.2/*