aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/xerces-j/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/xerces-j/Makefile')
-rw-r--r--textproc/xerces-j/Makefile71
1 files changed, 47 insertions, 24 deletions
diff --git a/textproc/xerces-j/Makefile b/textproc/xerces-j/Makefile
index 7c4a1dd7715c..57871fc87ac3 100644
--- a/textproc/xerces-j/Makefile
+++ b/textproc/xerces-j/Makefile
@@ -6,46 +6,69 @@
#
PORTNAME= xerces-j
-PORTVERSION= 2.2.0
-PORTREVISION= 1
+PORTVERSION= 2.6.2
CATEGORIES= textproc java
-MASTER_SITES= http://xml.apache.org/dist/xerces-j/old_xerces2/
-DISTNAME= Xerces-J-src.${PORTVERSION}
+MASTER_SITES= ${MASTER_SITE_APACHE_XML}
+MASTER_SITE_SUBDIR= xerces-j/source
+DISTFILES= Xerces-J-src.${PORTVERSION}${EXTRACT_SUFX} Xerces-J-tools.${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= XML parser for Java
BUILD_DEPENDS= ${ANT}:${PORTSDIR}/devel/apache-ant
-USE_JAVA= 1.3+
+USE_JAVA= yes
+JAVA_VERSION= 1.3+
WRKSRC= ${WRKDIR}/xerces-${PORTVERSION:S/./_/g}
+
+OPTIONS= DEPRECATED_JARS "build/install the deprecated JARs" on \
+ SAMPLES_JAR "build/install the samples" off
+
+.include <bsd.port.pre.mk>
+
ANT?= ${LOCALBASE}/bin/ant
-.if defined(NOPORTDOCS)
-ANT_TARGETS= jar apijar
-.else
-ANT_TARGETS= jar apijar javadocs
-# We should install other documentation too, but
-# we have no stylebook port yet
-#
-# ANT_TARGETS= jar apijar docs javadocs
+ANT_TARGETS= jars
+.if !defined(NOPORTDOCS)
+ANT_TARGETS+= javadocs #docs
+PORTDOCS= api dom3-api other xerces2 xni xs
.endif
-JAVASHAREDIR= ${PREFIX}/share/java
-JARDIR= ${JAVASHAREDIR}/classes
-JARFILES= xercesImpl.jar xmlParserAPIs.jar
+
+JARFILES+= xercesImpl.jar xml-apis.jar
+.if defined(WITH_DEPRECATED_JARS)
+ANT_TARGETS+= deprecatedjars
+JARFILES+= xerces.jar xmlParserAPIs.jar resolver.jar
+.endif
+.if defined(WITH_SAMPLES_JAR)
+JARFILES+= xercesSamples.jar
+.endif
+
+PLIST_FILES+= ${JARFILES:S,^,${JAVAJARDIR:S,${PREFIX},,}/,}
+
+TOOLS_JARFILES= resolver.jar stylebook-1.0-b2.jar bin/xjavac.jar
+
+post-extract:
+ @cd ${WRKSRC} && ${MV} ../tools .
do-build:
- @cd ${WRKSRC} && ${ANT} ${ANT_TARGETS}
+ @cd ${WRKSRC} && ${SETENV} CLASSPATH=`echo ${TOOLS_JARFILES:S,^,tools/,} | ${TR} " " ":"` ${ANT} ${ANT_TARGETS}
do-install:
- @${ECHO} -n ">> Installing JAR files in ${JARDIR}..."
- @cd ${WRKSRC}/build && ${CP} ${JARFILES} ${JARDIR}/
- @${ECHO} " [ DONE ]"
+ @${ECHO_CMD} -n ">> Installing JAR files in ${JAVAJARDIR}..."
+ @${MKDIR} ${JAVAJARDIR}
+.for JARFILE in ${JARFILES}
+ @cd ${WRKSRC}/build && ${CP} ${JARFILE} ${JAVAJARDIR}/
+ @${ECHO_CMD} -n " ${JARFILE}"
+.endfor
+ @${ECHO_CMD} " [ DONE ]"
.if !defined(NOPORTDOCS)
- @${ECHO} -n ">> Installing documentation in ${DOCSDIR}..."
+ @${ECHO_CMD} -n ">> Installing documentation in ${DOCSDIR}..."
@${MKDIR} ${DOCSDIR}
- @${CP} -r ${WRKSRC}/build/docs/javadocs/* ${DOCSDIR}
- @${ECHO} " [ DONE ]"
+.for DOCFILE in ${PORTDOCS}
+ @cd ${WRKSRC}/build/docs/javadocs && ${CP} -r ${DOCFILE} ${DOCSDIR}/
+ @${ECHO_CMD} -n " ${DOCFILE}"
+.endfor
+ @${ECHO_CMD} " [ DONE ]"
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>