summaryrefslogtreecommitdiffstats
path: root/textproc/xerces-j/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/xerces-j/Makefile')
-rw-r--r--textproc/xerces-j/Makefile46
1 files changed, 31 insertions, 15 deletions
diff --git a/textproc/xerces-j/Makefile b/textproc/xerces-j/Makefile
index 2db66b2..556ade8 100644
--- a/textproc/xerces-j/Makefile
+++ b/textproc/xerces-j/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xerces-j
PORTVERSION= 2.6.2
+PORTREVISION= 1
CATEGORIES= textproc java
MASTER_SITES= ${MASTER_SITE_APACHE_XML}
MASTER_SITE_SUBDIR= xerces-j/source
@@ -23,7 +24,7 @@ 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
+ SAMPLES "build/install the samples" on
.include <bsd.port.pre.mk>
@@ -35,11 +36,11 @@ PORTDOCS= api dom3-api other xerces2 xni xs
.endif
JARFILES+= xercesImpl.jar xml-apis.jar
-.if defined(WITH_DEPRECATED_JARS)
+.if !defined(WITHOUT_DEPRECATED_JARS)
ANT_TARGETS+= deprecatedjars
JARFILES+= xerces.jar xmlParserAPIs.jar resolver.jar
.endif
-.if defined(WITH_SAMPLES_JAR)
+.if !defined(WITHOUT_SAMPLES)
JARFILES+= xercesSamples.jar
.endif
@@ -51,24 +52,39 @@ post-extract:
@cd ${WRKSRC} && ${MV} ../tools .
do-build:
- @cd ${WRKSRC} && ${SETENV} CLASSPATH=`echo ${TOOLS_JARFILES:S,^,tools/,} | ${TR} " " ":"` ${ANT} ${ANT_TARGETS}
+ @cd ${WRKSRC} && \
+ ${SETENV} CLASSPATH=`echo ${TOOLS_JARFILES:S,^,tools/,} | \
+ ${TR} " " ":"` ${ANT} ${ANT_TARGETS}
do-install:
- @${ECHO_CMD} -n ">> Installing JAR files in ${JAVAJARDIR}..."
+ @${ECHO_MSG} -n ">> Installing JAR files in ${JAVAJARDIR}..."
@${MKDIR} ${JAVAJARDIR}
.for JARFILE in ${JARFILES}
- @cd ${WRKSRC}/build && ${CP} ${JARFILE} ${JAVAJARDIR}/
- @${ECHO_CMD} -n " ${JARFILE}"
+ @cd ${WRKSRC}/build && ${INSTALL_DATA} ${JARFILE} ${JAVAJARDIR}/${JARFILE}
+ @${ECHO_MSG} -n " ${JARFILE}"
.endfor
- @${ECHO_CMD} " [ DONE ]"
+ @${ECHO_MSG} " [ DONE ]"
.if !defined(NOPORTDOCS)
- @${ECHO_CMD} -n ">> Installing documentation in ${DOCSDIR}..."
- @${MKDIR} ${DOCSDIR}
-.for DOCFILE in ${PORTDOCS}
- @cd ${WRKSRC}/build/docs/javadocs && ${CP} -r ${DOCFILE} ${DOCSDIR}/
- @${ECHO_CMD} -n " ${DOCFILE}"
-.endfor
- @${ECHO_CMD} " [ DONE ]"
+ @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..."
+ @cd ${WRKSRC}/build/docs/javadocs && \
+ ${FIND} ${PORTDOCS} -type d -exec ${MKDIR} "${DOCSDIR}/{}" \; && \
+ ${FIND} ${PORTDOCS} -not -type d -exec ${INSTALL_DATA} "{}" "${DOCSDIR}/{}" \;
+ @${ECHO_MSG} " [ DONE ]"
+.endif
+.if !defined(WITHOUT_SAMPLES)
+ @${ECHO_MSG} -n ">> Installing samples in ${EXAMPLESDIR}..."
+ @cd ${WRKSRC}/samples && \
+ ${FIND} . -type d -exec ${MKDIR} "${EXAMPLESDIR}/{}" \; && \
+ ${FIND} . -not -type d -exec ${INSTALL_DATA} "{}" "${EXAMPLESDIR}/{}" \;
+ @${ECHO_MSG} " [ DONE ]"
+.endif
+
+.if !defined(WITHOUT_SAMPLES)
+post-install:
+ @${FIND} -s ${WRKSRC}/samples -not -type d | \
+ ${SED} -ne 's,^${WRKSRC}/samples,${EXAMPLESDIR:S,${PREFIX}/,,},p' >> ${TMPPLIST}
+ @${FIND} -s -d ${WRKSRC}/samples -type d | \
+ ${SED} -ne 's,^${WRKSRC}/samples,@dirrm ${EXAMPLESDIR:S,${PREFIX}/,,},p' >> ${TMPPLIST}
.endif
.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud