aboutsummaryrefslogtreecommitdiffstats
path: root/math/jakarta-commons-math3/Makefile
blob: 49d4819e9611a4687b14e53534fc42995fc0923d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Created by: Muhammad Moinur Rahmanh <5u623l20@gmail.com>
# $FreeBSD$

PORTNAME=   commons-math3
PORTVERSION=    3.3
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

BROKEN_armv6=       fails to compile: build.xml: Compile failed; see the compiler error output for details

USE_ANT=    yes
USE_JAVA=   yes
JAVA_VERSION=   1.6+
USE_LOCALE= en_US.ISO8859-1

ALL_TARGET= jar
MAKE_ARGS=  -Dlibdir=${WRKDIR} -Dnoget=true

JARFILE=    ${PORTNAME:S,3,,}-${PORTVERSION}-SNAPSHOT.jar
DESTJARFILE=    ${PORTNAME}.jar
PLIST_FILES+=   %%JAVAJARDIR%%/${DESTJARFILE}

OPTIONS_DEFINE= DOCS

.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:
    ${MKDIR} ${STAGEDIR}${JAVAJARDIR}
    ${INSTALL_DATA} ${WRKSRC}/target/${JARFILE} ${STAGEDIR}${JAVAJARDIR}/${DESTJARFILE}

.if ${PORT_OPTIONS:MDOCS}
    ${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}/
.endif

.include <bsd.port.mk>