aboutsummaryrefslogtreecommitdiff
path: root/math/jakarta-commons-math3/Makefile
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2014-04-26 18:15:36 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2014-04-26 18:15:36 +0000
commite8161ca5f97f302c72ad89621add1eb4453e278c (patch)
tree5d4734df2867165924d3bafd306baa507518c1a0 /math/jakarta-commons-math3/Makefile
parent4bf171cb618fe6f69f3ee38bcbb4a8bf02dd14c9 (diff)
downloadports-e8161ca5f97f302c72ad89621add1eb4453e278c.tar.gz
ports-e8161ca5f97f302c72ad89621add1eb4453e278c.zip
Notes
Diffstat (limited to 'math/jakarta-commons-math3/Makefile')
-rw-r--r--math/jakarta-commons-math3/Makefile59
1 files changed, 22 insertions, 37 deletions
diff --git a/math/jakarta-commons-math3/Makefile b/math/jakarta-commons-math3/Makefile
index 9369a33af784..0f2d1a929114 100644
--- a/math/jakarta-commons-math3/Makefile
+++ b/math/jakarta-commons-math3/Makefile
@@ -2,47 +2,34 @@
# $FreeBSD$
PORTNAME= commons-math3
-PORTVERSION= 3.1
+PORTVERSION= 3.2
CATEGORIES= math java
-MASTER_SITES= ${MASTER_SITE_APACHE_COMMONS_SOURCE}
-MASTER_SITE_SUBDIR= ${PORTNAME:S,commons-math3,math,}
+MASTER_SITES= ${MASTER_SITE_APACHE_COMMONS_SOURCE}/:source1 \
+ http://repo1.maven.org/maven2/junit/junit/4.8.2/:source2
+MASTER_SITE_SUBDIR= ${PORTNAME:S,commons-math3,math,}/:source1
PKGNAMEPREFIX= jakarta-
-DISTNAME= ${PORTNAME}-${PORTVERSION}-src
+DISTFILES= ${PORTNAME}-${PORTVERSION}-src.tar.gz:source1 \
+ junit-4.8.2.jar:source2
+EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}-src.tar.gz
MAINTAINER= 5u623l20@gmail.com
COMMENT= Java library of self-contained mathematics and statistics components
-BUILD_DEPENDS= ${JAVAJARDIR}/commons-logging.jar:${PORTSDIR}/java/jakarta-commons-logging \
- ${JAVAJARDIR}/junit.jar:${PORTSDIR}/java/junit \
- ${JAVAJARDIR}/commons-discovery.jar:${PORTSDIR}/java/jakarta-commons-discovery
-RUN_DEPENDS= ${JAVAJARDIR}/commons-logging.jar:${PORTSDIR}/java/jakarta-commons-logging \
- ${JAVAJARDIR}/commons-discovery.jar:${PORTSDIR}/java/jakarta-commons-discovery
+LICENSE= APACHE20
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-src
USE_JAVA= yes
JAVA_VERSION= 1.6+
USE_ANT= yes
ALL_TARGET= jar
-MAKE_ARGS= -Dlibdir=${WRKDIR} -Dnoget=true \
- -Dcommons-logging.jar="file://${JAVAJARDIR}/commons-logging.jar" \
- -Dcommons-discovery.jar="file://${JAVAJARDIR}/commons-discovery.jar"
-
-COMMONS_LOGGING_API= ${LOCALBASE}/share/doc/commons-logging/api
-.if exists(${COMMONS_LOGGING_API})
-MAKE_ARGS+= -Dcommons-logging.api=${COMMONS_LOGGING_API}
-.endif
-
-COMMONS_DISCOVERY_API= ${LOCALBASE}/share/doc/commons-discovery/api
-.if exists(${COMMONS_DISCOVERY_API})
-MAKE_ARGS+= -Dcommons-logging.api=${COMMONS_DISCOVERY_API}
-.endif
+MAKE_ARGS= -Dlibdir=${WRKDIR} -Dnoget=true
JARFILE= ${PORTNAME:S,3,,}-${PORTVERSION}-SNAPSHOT.jar
DESTJARFILE= ${PORTNAME}.jar
PLIST_FILES+= %%JAVAJARDIR%%/${DESTJARFILE}
-NO_STAGE= yes
-
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
@@ -53,30 +40,28 @@ OTHERDOCS= LICENSE.txt NOTICE.txt
PORTDOCS= apidocs ${OTHERDOCS}
.endif
-JDK_API!= (${FIND} -s ${LOCALBASE}/share/doc/jdk1.? -maxdepth 1 -name api -type d 2>/dev/null || ${ECHO_CMD}) | ${TAIL} -n 1
+JDK_API= ${FIND} -s ${LOCALBASE}/share/doc/jdk1.? -maxdepth 1 -name api -type d 2>/dev/null || ${ECHO_CMD} | ${TAIL} -n 1
.if ${JDK_API} != ""
-MAKE_ARGS+= -Djdk.api=${JDK_API}
+MAKE_ARGS+= -Djdk.api=$$(${JDK_API})
.endif
-post-patch:
- ${REINPLACE_CMD} -e 's#4.4##g' \
- -e 's#junit-#junit#g' \
- -e 's#/usr/share/junit#${JAVAJARDIR}#g' \
- ${WRKSRC}/build.xml
+post-extract:
+ ${MKDIR} ${WRKSRC}/lib
+ ${CP} ${DISTDIR}/junit-4.8.2.jar ${WRKSRC}/lib/
do-install:
@${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${DESTJARFILE}..."
- @${MKDIR} ${JAVAJARDIR}
- @${INSTALL_DATA} ${WRKSRC}/target/${JARFILE} ${JAVAJARDIR}/${DESTJARFILE}
+ @${MKDIR} ${STAGEDIR}${JAVAJARDIR}
+ @${INSTALL_DATA} ${WRKSRC}/target/${JARFILE} ${STAGEDIR}${JAVAJARDIR}/${DESTJARFILE}
@${ECHO_MSG} " [ DONE ]"
.if ${PORT_OPTIONS:MDOCS}
@${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..."
- @${MKDIR} ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
@cd ${WRKSRC}/target \
- && ${FIND} -s apidocs -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \
- && ${FIND} -s apidocs -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
- @${INSTALL_DATA} ${OTHERDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
+ && ${FIND} -s apidocs -type d -exec ${MKDIR} ${STAGEDIR}${DOCSDIR}/{} \; \
+ && ${FIND} -s apidocs -type f -exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/{} \;
+ @${INSTALL_DATA} ${OTHERDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/
@${ECHO_MSG} " [ DONE ]"
.endif