Tweak math/geg version 1.0.2_7
[dports.git] / math / jlatexmath / Makefile
1 # Created by: rfarmer@predatorlabs.net
2 # $FreeBSD$
3
4 PORTNAME=       jlatexmath
5 PORTVERSION=    1.0.3
6 CATEGORIES=     math java
7 MASTER_SITES=   http://forge.scilab.org/upload/jlatexmath/files/
8 DISTNAME=       ${PORTNAME}-src-all-${PORTVERSION}
9
10 MAINTAINER=     makc@FreeBSD.org
11 COMMENT=        Java API to display mathematical formulas written in LaTeX
12
13 LICENSE=        GPLv2
14
15 USES=           zip
16 USE_JAVA=       yes
17 JAVA_BUILD=     yes
18 JAVA_RUN=       yes
19 USE_ANT=        yes
20
21 WRKSRC=         ${WRKDIR}/${PORTNAME}-${PORTVERSION}
22
23 OPTIONS_DEFINE= FOP EXAMPLES
24 OPTIONS_DEFAULT=        FOP
25 OPTIONS_SUB=    yes
26
27 FOP_DESC=               textproc/fop plugin (required for math/scilab)
28 FOP_BUILD_DEPENDS=      fop:${PORTSDIR}/textproc/fop \
29                         ${JAVALIBDIR}/xmlgraphics-commons.jar:${PORTSDIR}/graphics/xmlgraphics-commons
30 FOP_RUN_DEPENDS:=       ${FOP_BUILD_DEPENDS} \
31                         ${JAVASHAREDIR}/batik/batik.jar:${PORTSDIR}/graphics/batik \
32                         ${JAVALIBDIR}/avalon-framework.jar:${PORTSDIR}/devel/avalon-framework \
33                         ${JAVALIBDIR}/commons-io.jar:${PORTSDIR}/devel/jakarta-commons-io \
34                         ${JAVALIBDIR}/commons-logging.jar:${PORTSDIR}/java/jakarta-commons-logging \
35                         ${JAVALIBDIR}/xml-apis-ext.jar:${PORTSDIR}/textproc/xml-commons
36 FOP_ALL_TARGET=         fop
37
38 .include <bsd.port.options.mk>
39
40 post-patch:
41         ${REINPLACE_CMD} -e 's|/usr/share/java/fop.jar|${LOCALBASE}/share/java/fop/build/fop.jar|' ${WRKSRC}/fop.properties
42         ${REINPLACE_CMD} -e 's|/usr/share/java/batik.jar|${LOCALBASE}/share/java/batik/batik.jar|' ${WRKSRC}/fop.properties
43         ${REINPLACE_CMD} -e 's|/usr/share/java/|${JAVALIBDIR}/|' ${WRKSRC}/fop.properties
44
45 pre-install:
46 # Remove empty directory
47         -${RMDIR} ${WRKSRC}/examples/Macros/bin
48
49 do-install:
50 .if ${PORT_OPTIONS:MFOP}
51         ${INSTALL_DATA} ${WRKSRC}/dist/jlatexmath-fop-${PORTVERSION}.jar ${STAGEDIR}${JAVAJARDIR}/jlatexmath-fop.jar
52 .endif
53         ${INSTALL_DATA} ${WRKSRC}/dist/jlatexmath-${PORTVERSION}.jar ${STAGEDIR}${JAVAJARDIR}/jlatexmath.jar
54         (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR})
55
56 .include <bsd.port.mk>