# Ports collection makefile for:	Jaxup
# Date created:				17 November 2004
# Whom:					Herve Quiroz <hq@FreeBSD.org>
#
# $FreeBSD$

PORTNAME=	jaxup
PORTVERSION=	1.01
PORTREVISION=	1
CATEGORIES=	textproc java
MASTER_SITES=	http://klomp.org/jaxup/
DISTNAME=	${PORTNAME}-${PORTVERSION}-src

MAINTAINER=	hq@FreeBSD.org
COMMENT=	Java XUpdate engine

BUILD_DEPENDS=	${JAR_DEPENDS}
RUN_DEPENDS=	${JAR_DEPENDS} \
		java:${PORTSDIR}/java/javavmwrapper

JAR_DEPENDS=	${JAVALIBDIR}/jdom.jar:${PORTSDIR}/java/jdom \
		${JAVALIBDIR}/jaxen-full.jar:${PORTSDIR}/java/jaxen \
		${JAVALIBDIR}/xercesImpl.jar:${PORTSDIR}/textproc/xerces-j

USE_ZIP=	yes
WRKSRC=		${WRKDIR}/${PORTNAME}

USE_JAVA=	yes
JAVA_VERSION=	1.4+

DATADIR=	${JAVASHAREDIR}/${PORTNAME}

USE_ANT=	yes
ALL_TARGET=	jar
.if !defined(NOPORTDOCS)
ALL_TARGET+=	docs
.endif

PLIST_FILES+=	%%DATADIR%%/jaxup-xupdater.jar bin/jaxup-xupdater \
		%%JAVAJARDIR%%/${PORTNAME}.jar
PLIST_DIRS=	%%DATADIR%%

.if !defined(NOPORTDOCS)
PORTDOCS=	LICENSE.txt api index.html jaxup_files xupdate-wd.html xupdate-wd_files
.endif

.include <bsd.port.pre.mk>

UTIL_CLASSPATH_JARS=	jaxen-full saxpath xercesImpl
UTIL_CLASSPATH!=	${ECHO_CMD} ${UTIL_CLASSPATH_JARS:S,^,${JAVALIBDIR}/,:S,$,.jar,} | ${TR} " " ":"

.if !defined(NOPORTDOCS)
JDK_API!=	(${FIND} -s ${LOCALBASE}/share/doc/jdk1.[4-5] -maxdepth 1 -name api -type d 2>/dev/null || ${TRUE}) | ${TAIL} -n 1
.if ${JDK_API} != ""
MAKE_ARGS+=	-Dj2se.apidocs="${JDK_API}"
.endif
JAXEN_API!=	(${FIND} -s ${LOCALBASE}/share/doc/jaxen -maxdepth 1 -name javadoc -type d 2>/dev/null || ${TRUE}) | ${TAIL} -n 1
.if ${JAXEN_API} != ""
MAKE_ARGS+=	-Djaxen.apidocs="${JAXEN_API}"
.endif
.endif

post-extract:
	@${CP} ${FILESDIR}/build.xml ${WRKSRC}/
	@${CP} ${FILESDIR}/DOMXUpdater.java ${WRKDIR}/
	@${SED} -e 's,%%LOCALBASE%%,${LOCALBASE},g ; s,%%DATADIR%%,${DATADIR},g' \
	  ${FILESDIR}/jaxup-xupdater.sh >${WRKDIR}/jaxup-xupdater

post-build:
	@${ECHO_MSG} ">> Building utility classes..."
	cd ${WRKDIR} && ${JAVAC} -classpath "${UTIL_CLASSPATH}:${WRKSRC}/build/lib/jaxup.jar" DOMXUpdater.java
	${ECHO_CMD} "Main-Class: DOMXUpdater" >${WRKDIR}/MANIFEST
	cd ${WRKDIR} && ${JAR} -cmf MANIFEST jaxup-xupdater.jar DOMXUpdater.class

do-install:
	@${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${PORTNAME}.jar..."
	@${MKDIR} ${JAVAJARDIR}
	@${INSTALL_DATA} ${WRKSRC}/build/lib/${PORTNAME}.jar ${JAVAJARDIR}/
	@${ECHO_MSG} " [ DONE ]"
	@${ECHO_MSG} ">> Installing utility scripts and classes..."
	${MKDIR} ${DATADIR}
	${INSTALL_DATA} ${WRKDIR}/jaxup-xupdater.jar ${DATADIR}/
	${INSTALL_SCRIPT} ${WRKDIR}/jaxup-xupdater ${PREFIX}/bin/
	@${ECHO_MSG} "  [ DONE ]"
.if !defined(NOPORTDOCS)
	@${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..."
	@${MKDIR} ${DOCSDIR}
	@cd ${WRKSRC}/build/docs \
	  && ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \
	  && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
	@${INSTALL_DATA} ${WRKSRC}/LICENSE.txt ${DOCSDIR}/
	@${ECHO_MSG} " [ DONE ]"
.endif

.include <bsd.port.post.mk>
ectron4/files/y18n-3.2.2'>dependabot/npm_and_yarn/devel/electron4/files/y18n-3.2.2</option>
<option value='dependabot/npm_and_yarn/devel/electron6/files/elliptic-6.5.3'>dependabot/npm_and_yarn/devel/electron6/files/elliptic-6.5.3</option>
<option value='dependabot/npm_and_yarn/devel/electron6/files/elliptic-6.5.4'>dependabot/npm_and_yarn/devel/electron6/files/elliptic-6.5.4</option>
<option value='dependabot/npm_and_yarn/devel/electron6/files/ini-1.3.8'>dependabot/npm_and_yarn/devel/electron6/files/ini-1.3.8</option>
<option value='dependabot/npm_and_yarn/devel/electron6/files/lodash-4.17.19'>dependabot/npm_and_yarn/devel/electron6/files/lodash-4.17.19</option>
<option value='dependabot/npm_and_yarn/devel/electron6/files/lodash.merge-4.6.2'>dependabot/npm_and_yarn/devel/electron6/files/lodash.merge-4.6.2</option>
<option value='dependabot/npm_and_yarn/devel/electron6/files/node-fetch-2.6.1'>dependabot/npm_and_yarn/devel/electron6/files/node-fetch-2.6.1</option>
<option value='dependabot/npm_and_yarn/devel/electron6/files/serve-10.1.2'>dependabot/npm_and_yarn/devel/electron6/files/serve-10.1.2</option>
<option value='gnome-3.22'>gnome-3.22</option>
<option value='gnome-3.24' selected='selected'>gnome-3.24</option>
<option value='gnome-3.26'>gnome-3.26</option>
<option value='gnome-3.28'>gnome-3.28</option>
<option value='gnome-3.32'>gnome-3.32</option>
<option value='gnome-3.36'>gnome-3.36</option>
<option value='gstreamer'>gstreamer</option>
<option value='gstreamer-1.16'>gstreamer-1.16</option>
<option value='gstreamer0.10-removal'>gstreamer0.10-removal</option>
<option value='main'>main</option>
<option value='master'>master</option>
<option value='mate-1.16'>mate-1.16</option>
<option value='mate-1.18'>mate-1.18</option>
<option value='mate-1.20'>mate-1.20</option>
<option value='mate-1.22'>mate-1.22</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)</td><td class='sub right'></td></tr></table>
<table class='tabs'><tr><td>
<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/about/?h=gnome-3.24'>about</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/?h=gnome-3.24'>summary</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/refs/?h=gnome-3.24&amp;id=8e2da239f74a82ad1c98b69bd27abb3f4e40ecf3'>refs</a><a class='active' href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/www/p5-W3C-LinkChecker?h=gnome-3.24'>log</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/tree/www/p5-W3C-LinkChecker?h=gnome-3.24&amp;id=8e2da239f74a82ad1c98b69bd27abb3f4e40ecf3'>tree</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/www/p5-W3C-LinkChecker?h=gnome-3.24&amp;id=8e2da239f74a82ad1c98b69bd27abb3f4e40ecf3'>commit</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/diff/www/p5-W3C-LinkChecker?h=gnome-3.24&amp;id=8e2da239f74a82ad1c98b69bd27abb3f4e40ecf3'>diff</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/stats/www/p5-W3C-LinkChecker?h=gnome-3.24'>stats</a></td><td class='form'><form class='right' method='get' action='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/www/p5-W3C-LinkChecker'>
<input type='hidden' name='h' value='gnome-3.24'/><input type='hidden' name='id' value='8e2da239f74a82ad1c98b69bd27abb3f4e40ecf3'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/?h=gnome-3.24&amp;id=8e2da239f74a82ad1c98b69bd27abb3f4e40ecf3'>root</a>/<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/www?h=gnome-3.24&amp;id=8e2da239f74a82ad1c98b69bd27abb3f4e40ecf3'>www</a>/<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/www/p5-W3C-LinkChecker?h=gnome-3.24&amp;id=8e2da239f74a82ad1c98b69bd27abb3f4e40ecf3'>p5-W3C-LinkChecker</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th></th><th class='left'>Commit message (<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/www/p5-W3C-LinkChecker?h=gnome-3.24&amp;id=8e2da239f74a82ad1c98b69bd27abb3f4e40ecf3&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Age</th><th class='left'>Files</th><th class='left'>Lines</th></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/www/p5-W3C-LinkChecker?h=gnome-3.24&amp;id=e280dbe3dfa51b8ad24bc119ff164bdb9117b433'>Update to v4.3</a></td><td>aaron</td><td><span title='2006-12-26 04:36:36 +0800'>2006-12-26</span></td><td>2</td><td><span class='deletions'>-5</span>/<span class='insertions'>+11</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/www/p5-W3C-LinkChecker?h=gnome-3.24&amp;id=5916330a76a49493eb8e92fadff90d99cb1a6445'>SHA256ify</a></td><td>edwin</td><td><span title='2006-01-24 11:16:52 +0800'>2006-01-24</span></td><td>1</td><td><span class='deletions'>-0</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/www/p5-W3C-LinkChecker?h=gnome-3.24&amp;id=e31bed690b2fba4714686b691a351a51b98d80e8'>Replace ugly "@unexec rmdir %D... 2&gt;/dev/null || true" with @dirrmtry</a></td><td>edwin</td><td><span title='2006-01-22 11:01:03 +0800'>2006-01-22</span>