Index: Makefile
===================================================================
--- Makefile	(revision 328982)
+++ Makefile	(working copy)
@@ -5,43 +5,39 @@
 PORTVERSION=	4.2
 CATEGORIES=	textproc
 MASTER_SITES=	http://www.docbook.org/sgml/4.2/
-EXTRACT_ONLY=	# empty
 
 MAINTAINER=	kutulu@kutulu.org
 COMMENT=	V4.2 of the DocBook DTD, designed for technical documentation
 
+EXTRACT_DEPENDS=${UNZIP_CMD}:${PORTSDIR}/archivers/unzip
 RUN_DEPENDS=	${ISOCAT}:${PORTSDIR}/textproc/iso8879 \
 		${XMLCATMGR}:${PORTSDIR}/textproc/xmlcatmgr
 
-BUILD_DEPENDS=	unzip:${PORTSDIR}/archivers/unzip
 USE_ZIP=	yes
 NO_MTREE=	yes
 NO_BUILD=	yes
-NO_WRKSUBDIR=	yes
 PLIST_SUB=	DTD_NAME=${PORTNAME}
 PLIST_SUB+=	DTD_VERSION=${PORTVERSION}
 PLIST_SUB+=	XMLCATMGR=${XMLCATMGR}
 PLIST_SUB+=	CATALOG_PORTS_SGML=${CATALOG_PORTS_SGML}
+SUB_FILES+=	catalog
+SUB_LIST+=	ISOCAT=${ISOCAT}
 
-INSTDIR=	${PREFIX}/share/sgml/docbook
-ISOCAT=		${PREFIX}/share/sgml/iso8879/catalog
+INSTDIR=	${STAGEDIR}${PREFIX}/share/sgml/docbook
+ISOCAT=		${LOCALBASE}/share/sgml/iso8879/catalog
 XMLCATMGR=	${LOCALBASE}/bin/xmlcatmgr
-CATALOG_PORTS_SGML=	${PREFIX}/share/sgml/catalog.ports
+CATALOG_PORTS_SGML=	${LOCALBASE}/share/sgml/catalog.ports
 
 LATEST_LINK=	docbook-420
 
-NO_STAGE=	yes
-pre-su-install:
-	@[ -d ${INSTDIR}/${PORTVERSION} ] || ${MKDIR} ${INSTDIR}/${PORTVERSION}
+do-extract:
+	${MKDIR} ${WRKSRC}
+	${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} \
+		-d ${WRKSRC}
 
 do-install:
-	@unzip ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} -d ${INSTDIR}/${PORTVERSION}
-	@${INSTALL_DATA} ${FILESDIR}/catalog ${INSTDIR}/${PORTVERSION}/catalog
-	@${ECHO_CMD} "CATALOG \"${ISOCAT}\"" >> ${INSTDIR}/${PORTVERSION}/catalog
-	@${CHMOD} ${SHAREMODE} ${INSTDIR}/${PORTVERSION}/*
-	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${INSTDIR}
+	@${MKDIR} ${INSTDIR}/${PORTVERSION}
+	${INSTALL_DATA} ${WRKSRC}/* ${WRKDIR}/catalog \
+		${INSTDIR}/${PORTVERSION}/
 
-post-install:
-	@-${XMLCATMGR} -sc ${CATALOG_PORTS_SGML} add CATALOG ${PORTNAME}/${PORTVERSION}/catalog
-
 .include <bsd.port.mk>
Index: files/catalog
===================================================================
--- files/catalog	(revision 328982)
+++ files/catalog	(working copy)
@@ -1,85 +0,0 @@
-  -- ...................................................................... --
-  -- Catalog data for DocBook V4.2 ........................................ --
-  -- File docbook.cat ..................................................... --
-
-  -- Please direct all questions, bug reports, or suggestions for
-     changes to the docbook@lists.oasis-open.org mailing list. For more
-     information, see http://www.oasis-open.org/.
-  --
-
-  -- This is the catalog data file for DocBook V4.2. It is provided as
-     a convenience in building your own catalog files. You need not use
-     the filenames listed here, and need not use the filename method of
-     identifying storage objects at all.  See the documentation for
-     detailed information on the files associated with the DocBook DTD.
-     See SGML Open Technical Resolution 9401 for detailed information
-     on supplying and using catalog data.
-  --
-
-  -- ...................................................................... --
-  -- DocBook driver file .................................................. --
-
-PUBLIC "-//OASIS//DTD DocBook V4.2//EN" "docbook.dtd"
-
-PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "docbookx.dtd"
-
-  -- ...................................................................... --
-  -- DocBook modules ...................................................... --
-
-PUBLIC "-//OASIS//DTD DocBook CALS Table Model V4.2//EN" "calstblx.dtd"
-
-PUBLIC "-//OASIS//DTD XML Exchange Table Model 19990315//EN" "soextblx.dtd"
-
-PUBLIC "-//OASIS//ELEMENTS DocBook Information Pool V4.2//EN" "dbpoolx.mod"
-
-PUBLIC "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.2//EN" "dbhierx.mod"
-
-PUBLIC "-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" "dbgenent.mod"
-
-PUBLIC "-//OASIS//ENTITIES DocBook Notations V4.2//EN" "dbnotnx.mod"
-
-PUBLIC "-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" "dbcentx.mod"
-
-  -- ...................................................................... --
-  -- ISO entity sets ...................................................... --
-
-PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN" "iso-dia.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" "iso-num.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN" "iso-pub.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN" "iso-tech.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" "iso-lat1.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN" "iso-lat2.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Greek Letters//EN" "iso-grk1.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" "iso-grk2.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Greek Symbols//EN" "iso-grk3.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" "iso-grk4.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" "iso-amsa.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" "iso-amsb.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" "iso-amsc.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" "iso-amsn.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" "iso-amso.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" "iso-amsr.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" "iso-box.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" "iso-cyr1.gml"
-
-PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" "iso-cyr2.gml"
-
-  -- End of catalog data for DocBook V4.2 ................................. --
-  -- ...................................................................... --
Index: files/catalog.in
===================================================================
--- files/catalog.in	(revision 328982)
+++ files/catalog.in	(working copy)
@@ -83,3 +83,5 @@
 
   -- End of catalog data for DocBook V4.2 ................................. --
   -- ...................................................................... --
+
+CATALOG "%%ISOCAT%%"
