mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-16 03:24:07 +00:00
Use xmlcatmgr to register the catalogs correctly.
Submitted by: Rui Lopes <rui@ruilopes.com> PR: ports/54042
This commit is contained in:
parent
a8103b2285
commit
86e5aef105
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=84459
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= docbook-xsl
|
||||
PORTVERSION= 1.61.3
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= textproc
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= docbook
|
||||
@ -14,15 +15,20 @@ MASTER_SITE_SUBDIR= docbook
|
||||
MAINTAINER= des@freebsd.org
|
||||
COMMENT= XSL DocBook stylesheets
|
||||
|
||||
RUN_DEPENDS= ${XMLDIR}/docbook/catalog:${PORTSDIR}/textproc/docbook-xml \
|
||||
RUN_DEPENDS= ${XMLDIR}/docbook/4.2/catalog.xml:${PORTSDIR}/textproc/docbook-xml \
|
||||
${XMLDIR}/sdocbook/catalog:${PORTSDIR}/textproc/sdocbook-xml
|
||||
|
||||
XMLDIR= ${LOCALBASE}/share/xml
|
||||
INSTDIR= ${PREFIX}/share/xsl/docbook
|
||||
INSTDIR= share/xsl/docbook
|
||||
PINSTDIR= ${PREFIX}/${INSTDIR}
|
||||
COPYDIRS= common fo extensions html htmlhelp images \
|
||||
javahelp lib manpages params template xhtml
|
||||
PKGINSTALL= ${WRKSRC}/pkg-install
|
||||
PKGDEINSTALL= ${WRKSRC}/pkg-deinstall
|
||||
|
||||
NO_BUILD= yes
|
||||
XMLCATMGR= ${LOCALBASE}/bin/xmlcatmgr
|
||||
CATALOG_PORTS= ${XMLDIR}/catalog.ports
|
||||
|
||||
post-extract:
|
||||
${FIND} ${WRKSRC} -name '.#*' -delete
|
||||
@ -33,8 +39,18 @@ do-install:
|
||||
(cd ${WRKSRC}/doc && ${TAR} -cf - . |\
|
||||
${TAR} -xf - -C${DOCSDIR})
|
||||
.endif
|
||||
${MKDIR} ${INSTDIR}
|
||||
${MKDIR} ${PINSTDIR}
|
||||
(cd ${WRKSRC} && ${TAR} -cf - VERSION ${COPYDIRS} |\
|
||||
${TAR} -xf - -C${INSTDIR})
|
||||
${TAR} -xf - -C${PINSTDIR})
|
||||
|
||||
post-install:
|
||||
@${SED} -e 's,@INSTDIR@,${INSTDIR},g ; \
|
||||
s,@XMLCATMGR@,${XMLCATMGR},g ; \
|
||||
s,@CATALOG_PORTS_XML@,${CATALOG_PORTS},g' \
|
||||
< ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
|
||||
@${SED} -e 's,@XMLCATMGR@,${XMLCATMGR},g ; \
|
||||
s,@CATALOG_PORTS_XML@,${CATALOG_PORTS},g' \
|
||||
< ${FILESDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
12
textproc/docbook-xsl/files/pkg-deinstall.in
Normal file
12
textproc/docbook-xsl/files/pkg-deinstall.in
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# This script will remove the docbook-xsl entries added to xml catalog.
|
||||
# -- Rui Lopes <rui@ruilopes.com>
|
||||
|
||||
XMLCATMGR=@XMLCATMGR@
|
||||
CATALOG_PORTS_XML=@CATALOG_PORTS_XML@
|
||||
|
||||
if [ "$2" != "POST-DEINSTALL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
${XMLCATMGR} -c "${CATALOG_PORTS_XML}" remove http://docbook.sourceforge.net/release/xsl/
|
43
textproc/docbook-xsl/files/pkg-install.in
Normal file
43
textproc/docbook-xsl/files/pkg-install.in
Normal file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
# This script will create the docbook-xsl catalog and will add entries to xml catalog.
|
||||
# WARNING: If you change this script, be sure to check pkg-deinstall.in!
|
||||
#
|
||||
# Based on http://xmlsoft.org/buildDocBookCatalog file.
|
||||
#
|
||||
# in vi/vim grab VERSIONS string with command:
|
||||
# !!echo -n "VERSIONS='current ";fetch -qo - http://cvs.sf.net/cgi-bin/viewcvs.cgi/docbook/xsl/VERSION|sed -nE 's/.*Version (.*) released./\1/gp'|sort|sed -e '1,3d'|paste -sd ' ' -|tr \\n \'
|
||||
#
|
||||
# -- Rui Lopes <rui@ruilopes.com>
|
||||
|
||||
XMLCATMGR=@XMLCATMGR@
|
||||
CATALOG_PORTS_XML=@CATALOG_PORTS_XML@
|
||||
XSL_DIR=${PKG_PREFIX}/@INSTDIR@
|
||||
CATALOG_XSL=${XSL_DIR}/catalog
|
||||
|
||||
if [ "$2" != "POST-INSTALL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
VERSIONS='current 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.50.0 1.50.1-EXP 1.50.1-EXP2 1.51.0 1.51.1 1.52.0 1.52.1 1.52.2 1.53.0 1.54.0 1.54.1 1.55.0 1.56.0 1.56.1 1.57.0 1.58.0 1.58.1 1.59.0 1.59.1 1.59.2 1.60.0 1.60.1 1.60.1 1.61.0 1.61.1 1.61.2 1.61.3'
|
||||
|
||||
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/xsl/$version \
|
||||
"file://${XSL_DIR}"
|
||||
${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteURI \
|
||||
http://docbook.sourceforge.net/release/xsl/$version \
|
||||
"file://${XSL_DIR}"
|
||||
done
|
||||
|
||||
${XMLCATMGR} -c "${CATALOG_PORTS_XML}" add delegateSystem \
|
||||
http://docbook.sourceforge.net/release/xsl/ \
|
||||
"file://${CATALOG_XSL}"
|
||||
${XMLCATMGR} -c "${CATALOG_PORTS_XML}" add delegateURI \
|
||||
http://docbook.sourceforge.net/release/xsl/ \
|
||||
"file://${CATALOG_XSL}"
|
||||
|
@ -1328,6 +1328,7 @@ share/xsl/docbook/xhtml/titlepage.xsl
|
||||
share/xsl/docbook/xhtml/toc.xsl
|
||||
share/xsl/docbook/xhtml/verbatim.xsl
|
||||
share/xsl/docbook/xhtml/xref.xsl
|
||||
@unexec rm -f %D/share/xsl/docbook/catalog
|
||||
@dirrm share/xsl/docbook/xhtml
|
||||
@dirrm share/xsl/docbook/template
|
||||
@dirrm share/xsl/docbook/params
|
||||
|
Loading…
Reference in New Issue
Block a user