2012-12-13 10:47:44 +00:00
|
|
|
# Created by: rfarmer@predatorlabs.net
|
2010-02-13 11:21:53 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= hdf-java
|
2014-03-30 21:37:40 +00:00
|
|
|
PORTVERSION= 2.10
|
2014-05-03 00:55:30 +00:00
|
|
|
PORTREVISION= 1
|
2010-02-13 11:21:53 +00:00
|
|
|
CATEGORIES= science java
|
2014-03-30 21:37:40 +00:00
|
|
|
MASTER_SITES= http://www.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdf-java-${PORTVERSION}/src/
|
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION}-source
|
2010-02-13 11:21:53 +00:00
|
|
|
|
2012-12-04 20:39:22 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2010-02-13 11:21:53 +00:00
|
|
|
COMMENT= Java interface to HDF5
|
|
|
|
|
2014-05-03 00:55:30 +00:00
|
|
|
LIB_DEPENDS= libhdf5.so:${PORTSDIR}/science/hdf5 \
|
2014-03-30 21:37:40 +00:00
|
|
|
libjpeg.so:${PORTSDIR}/graphics/jpeg
|
2010-02-13 11:21:53 +00:00
|
|
|
|
|
|
|
USE_JAVA= yes
|
2014-06-05 00:12:09 +00:00
|
|
|
JAVA_VERSION= 1.6 1.7
|
2010-02-13 11:21:53 +00:00
|
|
|
JAVA_BUILD= yes
|
|
|
|
JAVA_RUN= yes
|
|
|
|
|
2013-11-19 23:08:44 +00:00
|
|
|
USES= dos2unix gmake
|
2011-03-17 17:24:59 +00:00
|
|
|
DOS2UNIX_REGEX= .*/examples/.*Makefile.in
|
|
|
|
|
2010-02-13 11:21:53 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2014-03-30 21:37:40 +00:00
|
|
|
GNU_CONFIGURE_PREFIX=${STAGEDIR}${PREFIX}
|
|
|
|
GNU_CONFIGURE_MANPREFIX=${STAGEDIR}${PREFIX}
|
2010-02-13 11:21:53 +00:00
|
|
|
CONFIGURE_ARGS= --with-jdk=${JAVA_HOME}/include,${JAVA_HOME}/jre/lib/ \
|
|
|
|
--with-hdf5=${LOCALBASE}/include \
|
2012-02-13 05:12:38 +00:00
|
|
|
--with-libz=/lib \
|
|
|
|
--with-libjpeg=${LOCALBASE} \
|
|
|
|
--without-hdf4 \
|
|
|
|
--without-h4toh5
|
2013-06-20 13:25:04 +00:00
|
|
|
USE_LDCONFIG= yes
|
2010-02-13 11:21:53 +00:00
|
|
|
|
2012-12-13 10:47:44 +00:00
|
|
|
OPTIONS_DEFINE= SZIP DOCS
|
2014-05-03 00:55:30 +00:00
|
|
|
SZIP_DESC= SZIP support (must match with science/hdf5)
|
2010-11-04 13:05:36 +00:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2012-12-13 10:47:44 +00:00
|
|
|
.if ${PORT_OPTIONS:MSZIP}
|
2010-11-04 13:05:36 +00:00
|
|
|
CONFIGURE_ARGS+= --with-libsz=${LOCALBASE}/lib
|
2012-02-13 05:12:38 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-libsz
|
|
|
|
.endif
|
|
|
|
|
2012-12-13 10:47:44 +00:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2012-02-13 05:12:38 +00:00
|
|
|
ALL_TARGET= all javadocs
|
2010-11-04 13:05:36 +00:00
|
|
|
.endif
|
|
|
|
|
2014-06-05 00:12:09 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${JAVA_PORT_VERSION} == "1.6.0"
|
|
|
|
PLIST_SUB+= JDK6=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= JDK6="@comment "
|
|
|
|
.endif
|
|
|
|
|
2010-02-13 11:21:53 +00:00
|
|
|
post-patch:
|
2012-02-13 05:12:38 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|"/libhdf.$$LLEXT"|"${LOCALBASE}/lib"|' \
|
|
|
|
-e 's|$$z_lib"/libz."$$LLEXT|"/lib/libz.so.*"|' \
|
|
|
|
-e 's|$$sz_lib"/libsz."$$LLEXT|"${LOCALBASE}/lib/libsz.so.*"|' \
|
|
|
|
-e 's|LLEXT="a"|LLEXT="so"|g' \
|
|
|
|
-e 's|COPT="-shared"|COPT="-fPIC"|g' ${WRKSRC}/configure
|
2014-03-30 21:37:40 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|$$(JH45INSTALLDIR)/lib|${STAGEDIR}${JAVAJARDIR}|g' \
|
2012-02-13 05:12:38 +00:00
|
|
|
-e 's|INSTALL_LIB |${INSTALL_LIB} |' \
|
|
|
|
-e 's|cp |${INSTALL_DATA} |g' ${WRKSRC}/Makefile.in
|
2014-03-30 21:37:40 +00:00
|
|
|
@${REINPLACE_CMD} -e \
|
2012-02-13 05:12:38 +00:00
|
|
|
's|$$HDFJAVA"/lib/freebsd:"$$HDFJAVA"/lib/ext|${PREFIX}/lib"|' \
|
|
|
|
-e 's|$$HDFJAVA"/lib|${JAVAJARDIR}"|g' \
|
|
|
|
${WRKSRC}/bin/hdfview.sh.in
|
2010-02-13 11:21:53 +00:00
|
|
|
|
2014-03-30 21:37:40 +00:00
|
|
|
post-build:
|
|
|
|
@${REINPLACE_CMD} -e 's|${STAGEDIR}||' ${WRKSRC}/bin/hdfview.sh
|
|
|
|
|
2010-02-13 11:21:53 +00:00
|
|
|
post-install:
|
2012-12-13 10:47:44 +00:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2014-03-30 21:37:40 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}/UsersGuide
|
|
|
|
(cd ${WRKSRC}/docs/hdfview/ && ${COPYTREE_SHARE} "UsersGuide" \
|
|
|
|
${STAGEDIR}${DOCSDIR}/)
|
|
|
|
(cd ${WRKSRC}/docs/ && ${COPYTREE_SHARE} "javadocs" \
|
|
|
|
${STAGEDIR}${DOCSDIR}/)
|
2010-02-13 11:21:53 +00:00
|
|
|
.endif
|
|
|
|
|
2012-02-13 05:12:38 +00:00
|
|
|
regression-test: build
|
2014-06-25 05:35:31 +00:00
|
|
|
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} check
|
2012-02-13 05:12:38 +00:00
|
|
|
|
2014-06-05 00:12:09 +00:00
|
|
|
.include <bsd.port.post.mk>
|