freebsd-ports/math/jakarta-commons-math/Makefile
Muhammad Moinur Rahman 2b6f94cce6 math/jakarta-commons-math: Restrict build to 1.6 and 1.7 [1]
- Unmute INSTALL_ macros
- Fix patch files to reflect 'make makepatch'

PR:		201352 [1]
Submitted by:	glewis [1]
2015-07-06 08:57:43 +00:00

69 lines
1.9 KiB
Makefile

# Created by: Herve Quiroz <hq@FreeBSD.org>
# $FreeBSD$
PORTNAME= commons-math
PORTVERSION= 2.2
PORTREVISION= 1
CATEGORIES= math java
MASTER_SITES= APACHE_COMMONS_SOURCE \
http://repo1.maven.org/maven2/junit/junit/4.8.2/:source2
PKGNAMEPREFIX= jakarta-
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
junit-4.8.2.jar:source2
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= bofh@FreeBSD.org
COMMENT= Java library of self-contained mathematics and statistics components
LICENSE= APACHE20
USE_JAVA= yes
JAVA_VERSION= 1.6 1.7
USE_ANT= yes
ALL_TARGET= jar
MAKE_ARGS= -Dlibdir=${WRKDIR} -Dnoget=true
JARFILE= ${PORTNAME:S,3,,}-${PORTVERSION}.jar
DESTJARFILE= ${PORTNAME}.jar
PLIST_FILES+= %%JAVAJARDIR%%/${DESTJARFILE}
OPTIONS_DEFINE= DOCS
MAKE_ENV= LANG=en_US.ISO8859-1
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
ALL_TARGET+= javadoc
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
.if ${JDK_API} != ""
MAKE_ARGS+= -Djdk.api=$$(${JDK_API})
.endif
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} ${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} ${STAGEDIR}${DOCSDIR}
@cd ${WRKSRC}/target \
&& ${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
.include <bsd.port.mk>