- Update to bsd.java.mk 2.0

- Do not build anything (everything is shipped within the release)
- Add launcher shell scripts (xincluder-*) to process files from the
  command-line
- Register run dependencies on JDom and Xerces-J
- Dynamic plist
- ECHO -> ECHO_MSG
- CP -> INSTALL_DATA
This commit is contained in:
Herve Quiroz 2005-02-06 02:22:00 +00:00
parent e8675d3b86
commit f5eaf7496c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=128112
3 changed files with 45 additions and 94 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= xincluder
PORTVERSION= 1.0.d11
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= textproc java
MASTER_SITES= ftp://ftp.ibiblio.org/pub/languages/java/javafaq/
DISTNAME= ${PORTNAME}-1.0d11
@ -15,33 +15,42 @@ DISTNAME= ${PORTNAME}-1.0d11
MAINTAINER= ports@FreeBSD.org
COMMENT= Java-based XInclude processors
BUILD_DEPENDS= ${ANT}:${PORTSDIR}/devel/apache-ant
RUN_DEPENDS= ${JAVALIBDIR}/jdom.jar:${PORTSDIR}/java/jdom \
${JAVALIBDIR}/xercesImpl.jar:${PORTSDIR}/textproc/xerces-j \
java:${PORTSDIR}/java/javavmwrapper
USE_JAVA= 1.2+
USE_JAVA= yes
JAVA_VERSION= 1.2+
NO_BUILD= yes
ANT?= ${LOCALBASE}/bin/ant
.if defined(NOPORTDOCS)
ANT_TARGET= jar
.else
ANT_TARGET= jar javadoc
.endif
JAVASHAREDIR= ${PREFIX}/share/java
JARDIR= ${JAVASHAREDIR}/classes
WRKSRC= ${WRKDIR}/${PORTNAME}
do-build:
@cd ${WRKSRC} && ${ANT} ${ANT_TARGET}
SUFFIXES= -sax -dom -jdom
PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar bin/xincluder ${SUFFIXES:S,^,bin/xincluder,}
.if !defined(NOPORTDOCS)
PORTDOCS= apidoc index.html
.endif
SUB_FILES= xincluder.sh
do-install:
@${ECHO} -n ">> Installing JAR as ${JARDIR}/${PORTNAME}.jar..."
@${CP} ${WRKSRC}/${PORTNAME}.jar ${JARDIR}/
@${ECHO} " [ DONE ]"
@${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${PORTNAME}.jar..."
@${MKDIR} ${JAVAJARDIR}
@${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.jar ${JAVAJARDIR}/
@${ECHO_MSG} " [ DONE ]"
@${ECHO_MSG} -n ">> Installing scripts in ${PREFIX}/bin..."
@${ECHO_MSG} -n " xincluder"
@${INSTALL_SCRIPT} ${WRKDIR}/xincluder.sh ${PREFIX}/bin/xincluder
.for suffix in ${SUFFIXES}
@${ECHO_MSG} -n " xincluder${suffix}"
@${LN} ${PREFIX}/bin/xincluder ${PREFIX}/bin/xincluder${suffix}
.endfor
@${ECHO_MSG} " [ DONE ]"
.if !defined(NOPORTDOCS)
@${ECHO} -n ">> Installing documentation in ${DOCSDIR}..."
@${MKDIR} ${DOCSDIR}
@${CP} -r ${WRKSRC}/apidoc/* ${DOCSDIR}
@${ECHO} " [ DONE ]"
@${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..."
@cd ${WRKSRC} \
&& ${FIND} ${PORTDOCS} -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \
&& ${FIND} ${PORTDOCS} -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
@${ECHO_MSG} " [ DONE ]"
.endif
.include <bsd.port.mk>

View file

@ -0,0 +1,15 @@
#!/bin/sh
#
# $FreeBSD$
IAM=`basename "$0"`
case "${IAM}" in
xincluder-sax) MAIN_CLASS=SAXXIncluder ;;
xincluder-dom) MAIN_CLASS=DOMXIncluder ;;
xincluder-jdom) MAIN_CLASS=JDOMXIncluder ;;
xincluder) MAIN_CLASS=SAXXIncluder ;;
*) echo "ERROR!" ; false ;;
esac
JAVA_VERSION="1.2+" "%%LOCALBASE%%/bin/java" -cp "`"%%LOCALBASE%%/bin/classpath"`" "com.elharo.xml.xinclude.${MAIN_CLASS}" "$@"

View file

@ -1,73 +0,0 @@
%%DOCSDIR%%/com/elharo/xml/xinclude/test/class-use/SAXXIncluderTest.html
%%DOCSDIR%%/com/elharo/xml/xinclude/test/package-use.html
%%DOCSDIR%%/com/elharo/xml/xinclude/test/package-summary.html
%%DOCSDIR%%/com/elharo/xml/xinclude/test/package-tree.html
%%DOCSDIR%%/com/elharo/xml/xinclude/test/package-frame.html
%%DOCSDIR%%/com/elharo/xml/xinclude/test/SAXXIncluderTest.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/MissingHrefException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/UnavailableResourceException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/XIncludeFilter.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/JDOMXIncluder.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/MalformedResourceException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/SAXXIncluder.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/EncodingHeuristics.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/BadParseAttributeException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/DOMXIncluder.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/XPointerException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/CircularIncludeException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/class-use/XIncludeException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/package-summary.html
%%DOCSDIR%%/com/elharo/xml/xinclude/package-tree.html
%%DOCSDIR%%/com/elharo/xml/xinclude/package-frame.html
%%DOCSDIR%%/com/elharo/xml/xinclude/DOMXIncluder.html
%%DOCSDIR%%/com/elharo/xml/xinclude/EncodingHeuristics.html
%%DOCSDIR%%/com/elharo/xml/xinclude/JDOMXIncluder.html
%%DOCSDIR%%/com/elharo/xml/xinclude/SAXXIncluder.html
%%DOCSDIR%%/com/elharo/xml/xinclude/XIncludeFilter.html
%%DOCSDIR%%/com/elharo/xml/xinclude/BadParseAttributeException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/CircularIncludeException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/MalformedResourceException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/MissingHrefException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/XIncludeException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/XPointerException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/UnavailableResourceException.html
%%DOCSDIR%%/com/elharo/xml/xinclude/package-use.html
%%DOCSDIR%%/index-files/index-14.html
%%DOCSDIR%%/index-files/index-2.html
%%DOCSDIR%%/index-files/index-3.html
%%DOCSDIR%%/index-files/index-4.html
%%DOCSDIR%%/index-files/index-5.html
%%DOCSDIR%%/index-files/index-6.html
%%DOCSDIR%%/index-files/index-7.html
%%DOCSDIR%%/index-files/index-8.html
%%DOCSDIR%%/index-files/index-9.html
%%DOCSDIR%%/index-files/index-10.html
%%DOCSDIR%%/index-files/index-11.html
%%DOCSDIR%%/index-files/index-12.html
%%DOCSDIR%%/index-files/index-13.html
%%DOCSDIR%%/index-files/index-1.html
%%DOCSDIR%%/packages.html
%%DOCSDIR%%/package-list
%%DOCSDIR%%/resources/inherit.gif
%%DOCSDIR%%/overview-tree.html
%%DOCSDIR%%/overview-summary.html
%%DOCSDIR%%/overview-frame.html
%%DOCSDIR%%/index.html
%%DOCSDIR%%/help-doc.html
%%DOCSDIR%%/deprecated-list.html
%%DOCSDIR%%/stylesheet.css
%%DOCSDIR%%/allclasses-frame.html
%%DOCSDIR%%/allclasses-noframe.html
%%DOCSDIR%%/constant-values.html
%%DOCSDIR%%/serialized-form.html
share/java/classes/xincluder.jar
@dirrm %%DOCSDIR%%/com/elharo/xml/xinclude/test/class-use
@dirrm %%DOCSDIR%%/com/elharo/xml/xinclude/test
@dirrm %%DOCSDIR%%/com/elharo/xml/xinclude/class-use
@dirrm %%DOCSDIR%%/com/elharo/xml/xinclude
@dirrm %%DOCSDIR%%/com/elharo/xml
@dirrm %%DOCSDIR%%/com/elharo
@dirrm %%DOCSDIR%%/com
@dirrm %%DOCSDIR%%/index-files
@dirrm %%DOCSDIR%%/resources
@dirrm %%DOCSDIR%%