- Modularize. User can choose between the selected

modules via OPTIONS.
- Depend on the textproc/docbook meta-port. The user
  isn't forced to use DocBook 4.2 or SDocBook 1.1 any
  more, she can install the stylesheets with any
  desired DocBook version.
- Use SUB_LIST to post-edit the installation scripts.
- Bump PORTREVISION
- Style changes

PR:		ports/129309
Submitted by:	gabor
Approved by:	maintainer timeout (skv, 7 weeks)
This commit is contained in:
Gabor Kovesdan 2009-01-22 13:12:53 +00:00
parent 5728fa0eb8
commit 90927e2db8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=226674
4 changed files with 1812 additions and 385 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= docbook-xsl
PORTVERSION= 1.74.0
PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= docbook
@ -15,53 +16,191 @@ DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= skv@FreeBSD.org
COMMENT= XSL DocBook stylesheets
RUN_DEPENDS= ${XMLDIR}/docbook/4.2/catalog.xml:${PORTSDIR}/textproc/docbook-xml \
${XMLDIR}/sdocbook/1.1/catalog:${PORTSDIR}/textproc/sdocbook-xml
RUN_DEPENDS= ${LOCALBASE}/share/xml/docbook:${PORTSDIR}/textproc/docbook
.ifndef NOPORTDOCS
.if !defined(NOPORTDOCS)
DISTFILES+= ${PORTNAME}-doc-${PORTVERSION}${EXTRACT_SUFX}
.endif
USE_BZIP2= yes
NO_BUILD= yes
XMLDIR= ${LOCALBASE}/share/xml
INSTDIR= share/xsl/docbook
PINSTDIR= ${PREFIX}/${INSTDIR}
COPYDIRS= common extensions fo highlighting html htmlhelp images \
javahelp lib manpages params profiling slides \
template tools xhtml
PKGINSTALL= ${WRKDIR}/pkg-install
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
SUB_FILES= pkg-install pkg-deinstall
SUB_LIST+= INSTDIR="${INSTDIR}" \
XMLCATMGR="${XMLCATMGR}" \
CATALOG_PORTS="${LOCALBASE}/share/xml/catalog.ports"
XMLCATMGR= ${LOCALBASE}/bin/xmlcatmgr
CATALOG_PORTS= ${XMLDIR}/catalog.ports
MODULES= common images lib params
OPTIONS= ECLIPSE "Eclipse modules" on \
EPUB "Epub modules" on \
EXTENSIONS "Extensions" on \
FO "XSL-FO modules" on \
HIGHLIGHTING "highlighting modules" on \
HTML "HTML modules" on \
HTMLHELP "HTML Help modules" on \
JAVAHELP "Java Help modules" on \
MANPAGES "Manpage modules" on \
PROFILING "Profiling modules" on \
ROUNDTRIP "Roundtrip modules" on \
SLIDES "Slides modules" on \
TEMPLATE "Templates" on \
TESTS "Test tools" on \
TOOLS "Tools" on \
WEBSITE "Website modules" on \
XHTML "XHTML modules" on \
XHTML11 "XHTML 1.1 modules" on
.include <bsd.port.pre.mk>
.if defined(WITH_ECLIPSE)
PLIST_SUB+= ECLIPSE=""
MODULES+= eclipse
.else
PLIST_SUB+= ECLIPSE="@comment"
.endif
.if defined(WITH_EPUB)
PLIST_SUB+= EPUB=""
MODULES+= epub
.else
PLIST_SUB+= EPUB="@comment"
.endif
.if defined(WITH_EXTENSIONS)
PLIST_SUB+= EXTENSIONS=""
MODULES+= extensions
.else
PLIST_SUB+= EXTENSONS="@comment"
.endif
.if defined(WITH_FO)
PLIST_SUB+= FO=""
MODULES+= fo
.else
PLIST_SUB+= FO="@comment"
.endif
.if defined(WITH_HIGHLIGHTING)
PLIST_SUB+= HIGHLIGHTING=""
MODULES+= highlighting
.else
PLIST_SUB+= HIGHLIGHTING="@comment"
.endif
.if defined(WITH_HTML)
PLIST_SUB+= HTML=""
MODULES+= html
.else
PLIST_SUB+= HTML="@comment"
.endif
.if defined(WITH_HTMLHELP)
PLIST_SUB+= HTMLHELP=""
MODULES+= htmlhelp
.else
PLIST_SUB+= HTMLHELP="@comment"
.endif
.if defined(WITH_JAVAHELP)
PLIST_SUB+= JAVAHELP=""
MODULES+= javahelp
.else
PLIST_SUB+= JAVAHELP="@comment"
.endif
.if defined(WITH_MANPAGES)
PLIST_SUB+= MANPAGES=""
MODULES+= manpages
.else
PLIST_SUB+= MANPAGES="@comment"
.endif
.if defined(WITH_PROFILING)
PLIST_SUB+= PROFILING=""
MODULES+= profiling
.else
PLIST_SUB+= PROFILING="@comment"
.endif
.if defined(WITH_ROUNDTRIP)
PLIST_SUB+= ROUNDTRIP=""
MODULES+= roundtrip
.else
PLIST_SUB+= ROUNDTRIP="@comment"
.endif
.if defined(WITH_SLIDES)
PLIST_SUB+= SLIDES=""
MODULES+= slides
.else
PLIST_SUB+= SLIDES="@comment"
.endif
.if defined(WITH_TEMPLATE)
PLIST_SUB+= TEMPLATE=""
MODULES+= template
.else
PLIST_SUB+= TEMPLATE="@comment"
.endif
.if defined(WITH_TESTS)
PLIST_SUB+= TESTS=""
MODULES+= tests
.else
PLIST_SUB+= TESTS="@comment"
.endif
.if defined(WITH_TOOLS)
PLIST_SUB+= TOOLS=""
MODULES+= tools
.else
PLIST_SUB+= TOOLS="@comment"
.endif
.if defined(WITH_WEBSITE)
PLIST_SUB+= WEBSITE=""
MODULES+= website
.else
PLIST_SUB+= WEBSITE="@comment"
.endif
.if defined(WITH_XHTML)
PLIST_SUB+= XHTML=""
MODULES+= xhtml
.else
PLIST_SUB+= XHTML="@comment"
.endif
.if defined(WITH_XHTML11)
PLIST_SUB+= XHTML11=""
MODULES+= xhtml-1_1
.else
PLIST_SUB+= XHTML11="@comment"
.endif
post-extract:
${FIND} ${WRKSRC} -name '.#*' -or -name '.gitignore' -delete
${FIND} ${WRKSRC}/extensions -type d -mindepth 1 -maxdepth 1 -print0 |\
${XARGS} -0 ${RM} -rf
post-configure:
@${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}
do-install:
.ifndef NOPORTDOCS
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
(cd ${WRKSRC}/doc && ${TAR} -cf - . |\
${TAR} -xf - -C${DOCSDIR})
.endif
${MKDIR} ${PINSTDIR}
(cd ${WRKSRC} && ${TAR} -cf - VERSION ${COPYDIRS} |\
${TAR} -xf - -C${PINSTDIR})
.for m in ${MODULES}
${MKDIR} ${PREFIX}/${INSTDIR}/${m}
dirs=$$(${FIND} ${WRKSRC}/${m} -type d | ${SED} 's|^${WRKSRC}/${m}||g'); \
for d in $${dirs}; do \
files=$$(${FIND} ${WRKSRC}/${m}/$${d} -type f); \
${MKDIR} ${PREFIX}/${INSTDIR}/${m}/$${d}; \
for i in $${files}; do \
${INSTALL_DATA} $${i} ${PREFIX}/${INSTDIR}/${m}/$${d}; \
done; \
done; \
files=$$(${FIND} ${WRKSRC}/${m} -type f -depth 1); \
for i in $${files}; do \
${INSTALL_DATA} $${i} ${PREFIX}/${INSTDIR}/${m}; \
done
.endfor
files=$$(${FIND} ${WRKSRC} -type f -depth 1); \
for i in $${files}; do \
${INSTALL_DATA} $${i} ${PREFIX}/${INSTDIR}; \
done
post-install:
@${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -2,13 +2,10 @@
# 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 \
%%XMLCATMGR%% -c %%CATALOG_PORTS%% remove \
http://docbook.sourceforge.net/release/xsl/
exit 0

View File

@ -10,9 +10,7 @@
#
# -- Rui Lopes <rui@ruilopes.com>
XMLCATMGR=@XMLCATMGR@
CATALOG_PORTS_XML=@CATALOG_PORTS_XML@
XSL_DIR=${PKG_PREFIX}/@INSTDIR@
XSL_DIR=${PKG_PREFIX}/%%INSTDIR%%
CATALOG_XSL=${XSL_DIR}/catalog
if [ "$2" != "POST-INSTALL" ]; then
@ -22,23 +20,23 @@ fi
VERSIONS='1.36 1.37 1.38 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.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.61.0 1.61.1 1.61.2 1.61.3 1.62.0 1.62.1 1.62.2 1.62.3 1.62.4 1.63.0 1.64.0 1.64.1 1.65.0 1.65.1 1.66.0 1.66.1 1.67.0 1.67.2 1.68.0 1.68.1 1.69.0 1.69.1 1.70.0 1.70.1 1.71.0 1.71.1 current'
if [ ! -f ${CATALOG_XSL} ]; then
${XMLCATMGR} -c "${CATALOG_XSL}" create
%%XMLCATMGR%% -c "${CATALOG_XSL}" create
fi
for version in ${VERSIONS}
do
${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteSystem \
%%XMLCATMGR%% -c "${CATALOG_XSL}" add rewriteSystem \
http://docbook.sourceforge.net/release/xsl/$version \
"file://${XSL_DIR}"
${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteURI \
%%XMLCATMGR%% -c "${CATALOG_XSL}" add rewriteURI \
http://docbook.sourceforge.net/release/xsl/$version \
"file://${XSL_DIR}"
done
${XMLCATMGR} -c "${CATALOG_PORTS_XML}" add delegateSystem \
%%XMLCATMGR%% -c %%CATALOG_PORTS%% add delegateSystem \
http://docbook.sourceforge.net/release/xsl/ \
"file://${CATALOG_XSL}"
${XMLCATMGR} -c "${CATALOG_PORTS_XML}" add delegateURI \
%%XMLCATMGR%% -c %%CATALOG_PORTS%% add delegateURI \
http://docbook.sourceforge.net/release/xsl/ \
"file://${CATALOG_XSL}"
exit 0

File diff suppressed because it is too large Load Diff