aboutsummaryrefslogtreecommitdiffstats
path: root/java/jfreechart/Makefile
blob: 5a40fe688c0d1f0789f23803a87b400bd0d3361e (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# ex:ts=8
# Ports collection makefile for:    jfreechart
# Date created:         Nov 11, 2003
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   jfreechart
PORTVERSION=    0.9.18
CATEGORIES= java
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= sepherosa@softhome.net
COMMENT=    A free Java class library for generating charts

USE_JAVA=   yes
JAVA_VERSION=   1.2+

RUN_DEPENDS=    ${JAVAJARDIR}/log4j.jar:${PORTSDIR}/java/jakarta-log4j \
        ${JAVAJARDIR}/jcommon.jar:${PORTSDIR}/java/jcommon

.if !defined(WITHOUT_COMPILE) || !defined(NOPORTDOCS)
BUILD_DEPENDS=  ${ANT_CMD}:${PORTSDIR}/devel/apache-ant
ANT_CMD?=   ${LOCALBASE}/bin/ant
ANT=        ${SETENV} JAVA_HOME=${JAVA_HOME} ${ANT_CMD}
.endif

.if !defined(WITHOUT_COMPILE)
JAVA_BUILD= yes
ANT_TARGETS=    compile
.else
JAVA_RUN=   yes
.endif

.if !defined(NOPORTDOCS)
ANT_TARGETS+=   javadoc
PORTDOCS=   *
.endif

EXTRAJARS=  gnujaxp.jar

PLIST_FILES=    share/java/classes/jfreechart.jar \
        share/java/classes/gnujaxp.jar

pre-fetch:
    @${ECHO_MSG} ""
    @${ECHO_MSG} "You may use the following build options:"
    @${ECHO_MSG} ""
    @${ECHO_MSG} "    WITHOUT_COMPILE=yes    Install the pre-compiled .jar file"
    @${ECHO_MSG} ""

do-build:
.if !defined(WITHOUT_COMPILE) || !defined(NOPORTDOCS)
    @cd ${WRKSRC}/ant && ${ANT} ${ANT_TARGETS}
.endif

do-install: do-install-jar do-install-javadoc

do-install-jar:
    @${ECHO_CMD} -n  ">> Installing .jar file..."
    @${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-${PORTVERSION}.jar ${JAVAJARDIR}/${PORTNAME}.jar
    @for exjar in ${EXTRAJARS}; do                  \
        ${INSTALL_DATA} ${WRKSRC}/lib/$$exjar ${JAVAJARDIR} ;   \
    done
    @${ECHO_CMD} " [DONE]"

do-install-javadoc:
.if !defined(NOPORTDOCS)
    @${ECHO_CMD} -n ">> Installing documentation in ${DOCSDIR}..."
    @${MKDIR} ${DOCSDIR}
    @cd ${WRKSRC}/javadoc && ${FIND} . \
      | ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
    @${ECHO_CMD} " [DONE]"
.endif

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>