1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/graphics/opendx/Makefile
Stephen Montgomery-Smith da19de7cdd - Implement staging.
2014-01-26 21:16:43 +00:00

101 lines
2.8 KiB
Makefile

# Created by: Thomas Gellekum <tg@FreeBSD.org>
# $FreeBSD$
PORTNAME= opendx
PORTVERSION= 4.4.4
PORTREVISION= 14
CATEGORIES= graphics math java
MASTER_SITES= http://www.sfr-fresh.com/unix/misc/
DISTNAME= dx-${PORTVERSION}
MAINTAINER= stephen@FreeBSD.org
COMMENT= IBM's Open Visualization Data Explorer
LIB_DEPENDS= MagickWand:${PORTSDIR}/graphics/ImageMagick \
tiff:${PORTSDIR}/graphics/tiff \
cdf:${PORTSDIR}/science/cdf
USE_XORG= xinerama xext xpm xmu sm ice
USES= bison motif gmake
USE_GCC= any
USE_GL= yes
USE_AUTOTOOLS= libtool
USE_LDCONFIG= yes
CFLAGS+= ${PTHREAD_CFLAGS}
CONFIGURE_ENV= ARCH="${OPSYS:L}"
CPPFLAGS+= ${CXXFLAGS} -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
NO_MTREE= yes
PLIST_SUB= ARCH=${OPSYS:L}
PKGMESSAGE= ${WRKDIR}/pkg-message
.if defined(WITH_HDF) && !defined(WITHOUT_NETCDF)
IGNORE= HDF and NETCDF are conflicting
.endif
.if defined(WITH_HDF)
LIB_DEPENDS+= mfhdf:${PORTSDIR}/science/hdf
.else
CONFIGURE_ARGS+= --without-hdf
.endif
.if !defined(WITHOUT_NETCDF)
LIB_DEPENDS+= netcdf:${PORTSDIR}/science/netcdf4
.else
CONFIGURE_ARGS+= --without-netcdf
.endif
.if defined(WITH_JAVA)
USE_JAVA= yes
JAVA_VERSION= 1.6+
BUILD_DEPENDS+= ${JAVALIBDIR}/npcosmop211.jar:${PORTSDIR}/graphics/cosmoplayer
RUN_DEPENDS+= ${JAVALIBDIR}/npcosmop211.jar:${PORTSDIR}/graphics/cosmoplayer
CONFIGURE_ARGS+= --with-cosmojar-path=${JAVALIBDIR}/npcosmop211.jar \
--with-java40jar-path=${JAVALIBDIR}/java40.jar \
--with-jni-path=${JAVA_HOME}/include:${JAVA_HOME}/include/freebsd
PLIST_SUB+= JAVA=""
DIR2PRUNE= dx/java/user dx/java/server/nets
.else
CONFIGURE_ARGS+= --without-javadx
PLIST_SUB+= JAVA="@comment "
.endif
PLIST_SUB+= UNAMEP=${ARCH}
.include <bsd.port.pre.mk>
.if defined(WITH_JAVA) && ${ARCH} != "i386"
BROKEN= does not build
.endif
post-patch:
@${RM} -f ${WRKSRC}/include/stamp-h.in
.for dir in doc help html man
@${FIND} ${WRKSRC}/${dir} -type f | ${XARGS} \
${REINPLACE_CMD} -e "s;/usr/lpp;${PREFIX};g"
.endfor
@${REINPLACE_CMD} -e "s;-lpthread;${PTHREAD_LIBS};g" \
-e "s;/usr/X11R6;${LOCALBASE};g" \
${WRKSRC}/configure
@${REINPLACE_CMD} -e "s|startserver.bat||" \
${WRKSRC}/src/uipp/java/server/Makefile.in
@${REINPLACE_CMD} -e 's|$$(ARCH)|@ARCH@|' \
${WRKSRC}/src/misc/Makefile.*
post-install:
@${CP} ${FILESDIR}/pkg-message.in ${PKGMESSAGE}
.if defined(WITH_JAVA)
${CHMOD} 0775 ${STAGEDIR}${PREFIX}/dx/java/server/nets
${TOUCH} ${DIR2PRUNE:S|^|${STAGEDIR}${PREFIX}/|:S|$|/.keepme|}
@${ECHO} "---------------------------------------------------------" \
>> ${PKGMESSAGE}
@${ECHO} "Before starting ${PREFIX}/dx/java/server/bin/startserver" \
>> ${PKGMESSAGE}
@${ECHO} "you must install the port graphics/opendx-samples." \
>> ${PKGMESSAGE}
.endif
@${ECHO} "---------------------------------------------------------" \
>> ${PKGMESSAGE}
.include <bsd.port.post.mk>