aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2013-09-11 14:34:50 +0800
committermarino <marino@FreeBSD.org>2013-09-11 14:34:50 +0800
commit768989d0fe34d5d6fdbe693ef4629fd8813ec9c7 (patch)
treed0a1dc157823be539bd93b6cd9cffa0435e702c1 /textproc
parentdf474c4f0c8d1699ecfe3144d513c310e00a1d96 (diff)
downloadfreebsd-ports-gnome-768989d0fe34d5d6fdbe693ef4629fd8813ec9c7.tar.gz
freebsd-ports-gnome-768989d0fe34d5d6fdbe693ef4629fd8813ec9c7.tar.zst
freebsd-ports-gnome-768989d0fe34d5d6fdbe693ef4629fd8813ec9c7.zip
textproc/slides: move catalog generation into package
Recently textproc/docbook-xsl, and textproc/docbook-xsl-ns and textproc/website were modified such that the xmlcatmgr catalog was created during the build (once) and packaged. Before it was accidently built and package and then created again during the package install script that it had. So the catalog creation was removed from pkg-install.in script. textproc/slides really was set up in the same way but it wasn't emitting errors because the pkg-plist was slightly different. However, in the interest of uniformity, textproc/slides was updated to match the others. The missing dependency on xmlcatmgr was added and the header trimmed as well. PR: ports/179730 Submitted by: marino
Diffstat (limited to 'textproc')
-rw-r--r--textproc/slides/Makefile56
-rw-r--r--textproc/slides/files/pkg-install.in28
-rw-r--r--textproc/slides/pkg-plist4
3 files changed, 41 insertions, 47 deletions
diff --git a/textproc/slides/Makefile b/textproc/slides/Makefile
index 27f9cf62b713..e91a7d1340b4 100644
--- a/textproc/slides/Makefile
+++ b/textproc/slides/Makefile
@@ -1,27 +1,21 @@
-# New ports collection makefile for: slides
-# Date Created: 2004-04-29 13:49:33
-# Whom: Jean-Baptiste Quenot <jb.quenot@caraldi.com>
-#
-# ex:ts=22:sw=22
-#
+# Created by: Jean-Baptiste Quenot <jb.quenot@caraldi.com>
# $FreeBSD$
-#
-# Based on the textproc/website port
-#
PORTNAME= slides
PORTVERSION= 3.3.1
+PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= SF/docbook/OldFiles
MAINTAINER= ports@FreeBSD.org
COMMENT= Doctype and stylesheets for making slides
+BUILD_DEPENDS= xmlcatmgr:${PORTSDIR}/textproc/xmlcatmgr
RUN_DEPENDS= ${LOCALBASE}/share/xsl/docbook/catalog:${PORTSDIR}/textproc/docbook-xsl
RUN_DEPENDS+= ${LOCALBASE}/share/xml/docbook/4.3/catalog.xml:${PORTSDIR}/textproc/docbook-xml-430
-XMLDIR= ${LOCALBASE}/share/xml
-INSTDIR= share/xsl/${PORTNAME}
+XMLDIR= ${LOCALBASE}/share/xml
+INSTDIR= share/xsl/slides
PINSTDIR= ${PREFIX}/${INSTDIR}
COPYDIRS= browser graphics schema xsl
@@ -31,14 +25,25 @@ PKGDEINSTALL= ${WRKSRC}/pkg-deinstall
NO_BUILD= yes
XMLCATMGR= ${LOCALBASE}/bin/xmlcatmgr
CATALOG_PORTS= ${XMLDIR}/catalog.ports
+CATALOG_XSL= ${WRKSRC}/catalog
MYEXAMPLESDIR= tests
MYDOCSDIR= doc
+DXVERSIONS= 3.3.1 3.2.0 3.1.0 3.0.0 3.0b2 3.0b1 2.1b2 2.1b1 2.0a2 2.0a1 \
+ current
+
+REPLACE_EXPR= -e 's,@INSTDIR@,${INSTDIR},g ; \
+ s,@XMLCATMGR@,${XMLCATMGR},g ; \
+ s,@CATALOG_PORTS_XML@,${CATALOG_PORTS},g ; \
+ s,@PORTNAME@,slides,g'
+
+.include <bsd.port.options.mk>
+
post-patch:
${FIND} ${WRKSRC} -name '*.orig' -delete
do-install:
-.ifndef NOPORTDOCS
+.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${EXAMPLESDIR}
(cd ${WRKSRC}/${MYEXAMPLESDIR} && ${TAR} -cf - . |\
${TAR} -xf - -C${EXAMPLESDIR})
@@ -46,14 +51,31 @@ do-install:
(cd ${WRKSRC}/${MYDOCSDIR} && ${TAR} -cf - . |\
${TAR} -xf - -C${DOCSDIR})
.endif
+ ${XMLCATMGR} -c "${CATALOG_XSL}" create
+.for dxversion in ${DXVERSIONS}
+ ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteSystem \
+ http://docbook.sourceforge.net/release/slides/${dxversion}/xsl \
+ "file://${PINSTDIR}/xsl"
+ ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteURI \
+ http://docbook.sourceforge.net/release/slides/${dxversion}/xsl \
+ "file://${PINSTDIR}/xsl"
+ ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteSystem \
+ http://docbook.sourceforge.net/release/slides/${dxversion}/schema/dtd \
+ "file://${PINSTDIR}/schema/dtd"
+ ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteURI \
+ http://docbook.sourceforge.net/release/slides/${dxversion}/schema/dtd \
+ "file://${PINSTDIR}/schema/dtd"
+ ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteSystem \
+ http://docbook.sourceforge.net/release/slides/${dxversion} \
+ "file://${PINSTDIR}/schema/dtd"
+ ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteURI \
+ http://docbook.sourceforge.net/release/slides/${dxversion} \
+ "file://${PINSTDIR}/schema/dtd"
+.endfor
${MKDIR} ${PINSTDIR}
- (cd ${WRKSRC} && ${TAR} -cf - VERSION ${COPYDIRS} |\
+ (cd ${WRKSRC} && ${TAR} -cf - VERSION catalog ${COPYDIRS} |\
${TAR} -xf - -C${PINSTDIR})
-REPLACE_EXPR= -e 's,@INSTDIR@,${INSTDIR},g ; \
- s,@XMLCATMGR@,${XMLCATMGR},g ; \
- s,@CATALOG_PORTS_XML@,${CATALOG_PORTS},g ; \
- s,@PORTNAME@,${PORTNAME},g'
post-install:
@${SED} ${REPLACE_EXPR} < ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
@${SED} ${REPLACE_EXPR} < ${FILESDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
diff --git a/textproc/slides/files/pkg-install.in b/textproc/slides/files/pkg-install.in
index 1e0cc40f65a5..fe6bfa40c3bb 100644
--- a/textproc/slides/files/pkg-install.in
+++ b/textproc/slides/files/pkg-install.in
@@ -20,34 +20,6 @@ if [ "$2" != "POST-INSTALL" ]; then
exit 0
fi
-VERSIONS='current 3.3.1 3.2.0 3.1.0 3.0.0 3.0b2 3.0b1 2.1b2 2.1b1 2.0a2 2.0a1'
-
-if [ ! -f ${CATALOG_XSL} ]; then
- ${XMLCATMGR} -c "${CATALOG_XSL}" create
-fi
-
-for version in ${VERSIONS}
-do
- ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteSystem \
- http://docbook.sourceforge.net/release/${PORTNAME}/$version/xsl \
- "file://${XSL_DIR}/xsl"
- ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteURI \
- http://docbook.sourceforge.net/release/${PORTNAME}/$version/xsl \
- "file://${XSL_DIR}/xsl"
- ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteSystem \
- http://docbook.sourceforge.net/release/${PORTNAME}/$version/schema/dtd \
- "file://${XSL_DIR}/schema/dtd"
- ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteURI \
- http://docbook.sourceforge.net/release/${PORTNAME}/$version/schema/dtd \
- "file://${XSL_DIR}/schema/dtd"
- ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteSystem \
- http://docbook.sourceforge.net/release/${PORTNAME}/$version \
- "file://${XSL_DIR}/schema/dtd"
- ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteURI \
- http://docbook.sourceforge.net/release/${PORTNAME}/$version \
- "file://${XSL_DIR}/schema/dtd"
-done
-
${XMLCATMGR} -c "${CATALOG_PORTS_XML}" add delegateSystem \
http://docbook.sourceforge.net/release/${PORTNAME}/ \
"file://${CATALOG_XSL}"
diff --git a/textproc/slides/pkg-plist b/textproc/slides/pkg-plist
index 5b152647250d..68fe9bbf6b99 100644
--- a/textproc/slides/pkg-plist
+++ b/textproc/slides/pkg-plist
@@ -143,7 +143,7 @@ share/xsl/slides/xsl/xhtml/tables.xsl
share/xsl/slides/xsl/xhtml/vslides.xsl
share/xsl/slides/xsl/xhtml/w3c.xsl
share/xsl/slides/VERSION
-@unexec rm -f %D/share/xsl/slides/catalog 2>&1 >/dev/null || true
+share/xsl/slides/catalog
@dirrm share/xsl/slides/browser
@dirrm share/xsl/slides/graphics/active
@dirrm share/xsl/slides/graphics/inactive
@@ -160,6 +160,6 @@ share/xsl/slides/VERSION
@dirrm share/xsl/slides/xsl/xhtml
@dirrm share/xsl/slides/xsl
@dirrm share/xsl/slides
-@unexec test -d %D/share/xsl && rmdir %D/share/xsl 2>/dev/null || true
+@dirrmtry share/xsl
%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%