2008-01-09 19:54:41 +00:00
|
|
|
# New ports collection makefile for: vtk5
|
2003-12-26 20:03:41 +00:00
|
|
|
# Date created: 10 Oct 2003
|
|
|
|
# Whom: Mykola Khotyaintsev <ko@irfu.se>
|
2008-01-09 19:54:41 +00:00
|
|
|
# Repocopied from math/vtk by: Jason W. Bacon <bacon@smithers.neuro.mcw.edu>
|
1999-06-01 13:16:47 +00:00
|
|
|
#
|
1999-08-25 07:23:21 +00:00
|
|
|
# $FreeBSD$
|
1999-06-01 13:16:47 +00:00
|
|
|
#
|
|
|
|
|
2000-04-14 07:20:58 +00:00
|
|
|
PORTNAME= vtk
|
2010-10-15 07:28:54 +00:00
|
|
|
PORTVERSION= 5.6.1
|
2011-01-05 17:05:00 +00:00
|
|
|
PORTREVISION= 1
|
2003-12-26 20:03:41 +00:00
|
|
|
CATEGORIES= math graphics
|
2009-03-23 23:40:49 +00:00
|
|
|
MASTER_SITES= http://www.vtk.org/files/release/${PORTVERSION:R}/ \
|
2008-01-09 19:54:41 +00:00
|
|
|
http://www.neuro.mcw.edu/Ports/distfiles/VTK5/
|
|
|
|
|
2010-04-03 15:34:44 +00:00
|
|
|
MAINTAINER= gahr@FreeBSD.org
|
2008-01-09 19:54:41 +00:00
|
|
|
COMMENT= The Visualization Toolkit
|
|
|
|
|
|
|
|
LIB_DEPENDS= expat.[5-6]:${PORTSDIR}/textproc/expat2 \
|
2010-02-05 11:46:55 +00:00
|
|
|
jpeg.11:${PORTSDIR}/graphics/jpeg \
|
2010-03-28 06:47:48 +00:00
|
|
|
png.6:${PORTSDIR}/graphics/png \
|
2008-01-09 19:54:41 +00:00
|
|
|
tiff.4:${PORTSDIR}/graphics/tiff
|
|
|
|
|
|
|
|
LATEST_LINK= vtk5
|
1999-06-01 13:16:47 +00:00
|
|
|
|
2010-04-03 15:34:44 +00:00
|
|
|
WRKSRC= ${WRKDIR}/VTK
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2010-04-07 14:38:01 +00:00
|
|
|
CONFLICTS= vtk-4* vtk-5.0.[012356789]* paraview-3*
|
2004-02-13 03:53:48 +00:00
|
|
|
|
2010-04-03 15:34:44 +00:00
|
|
|
SUB_FILES= vtk.3
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2008-05-27 22:12:09 +00:00
|
|
|
USE_CMAKE= yes
|
2008-01-09 19:54:41 +00:00
|
|
|
USE_GMAKE= yes
|
|
|
|
USE_GL= yes
|
2010-08-26 10:11:05 +00:00
|
|
|
USE_XORG= xt
|
2010-04-07 14:38:01 +00:00
|
|
|
USE_LDCONFIG= ${PREFIX}/lib/vtk-${PORTVERSION:R}
|
2010-04-09 09:03:30 +00:00
|
|
|
MAKE_JOBS_SAFE= yes
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2010-08-26 10:11:05 +00:00
|
|
|
OPTIONS= SHARED "Build shared libraries" On \
|
|
|
|
VTKMPEG2 "Install patented MPEG2 encoder module" Off \
|
2010-04-03 15:34:44 +00:00
|
|
|
GL2PS "Install support conversion OpenGL to PostScript" On \
|
2010-04-09 09:03:30 +00:00
|
|
|
OSMESA "Use Mesa for off-screen rendering" Off \
|
2010-04-03 15:34:44 +00:00
|
|
|
QT "Enable Qt gui support" On \
|
2010-04-09 09:03:30 +00:00
|
|
|
WRAP_JAVA "Enable Java wrapping" Off \
|
2010-04-03 15:34:44 +00:00
|
|
|
WRAP_PYTHON "Enable Python wrapping" On \
|
|
|
|
WRAP_TCLTK "Enable Tcl/Tk wrapping" On
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2010-08-26 10:11:05 +00:00
|
|
|
PLIST_SUB+= VER1="${PORTVERSION}" \
|
2010-04-07 14:38:01 +00:00
|
|
|
VER2="${PORTVERSION:R}" \
|
|
|
|
VER3="${PORTVERSION:R:R}"
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2008-01-09 19:54:41 +00:00
|
|
|
MAN3= vtk.3
|
2010-04-03 15:34:44 +00:00
|
|
|
PORTDOCS= README.html
|
1999-06-01 13:16:47 +00:00
|
|
|
|
2008-05-27 22:12:09 +00:00
|
|
|
CMAKE_USE_PTHREAD= yes
|
2010-04-03 15:34:44 +00:00
|
|
|
CMAKE_OUTSOURCE= yes
|
|
|
|
|
2010-04-07 14:38:01 +00:00
|
|
|
# Set this when testing port changes
|
|
|
|
#-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
|
2010-08-26 10:11:05 +00:00
|
|
|
CMAKE_ARGS+= -DBUILD_DOCUMENTATION:BOOL=ON \
|
2008-01-09 19:54:41 +00:00
|
|
|
-DBUILD_TESTING:BOOL=OFF \
|
2010-06-10 15:48:08 +00:00
|
|
|
-DKWSYS_LFS_DISABLE:BOOL=ON \
|
2010-04-09 09:03:30 +00:00
|
|
|
-DVTK_USE_PARALLEL:BOOL=ON \
|
2008-01-09 19:54:41 +00:00
|
|
|
-DVTK_USE_GUISUPPORT:BOOL=ON \
|
|
|
|
-DVTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T:BOOL=ON \
|
2010-04-03 15:34:44 +00:00
|
|
|
-DVTK_DATA_ROOT:PATH=${EXAMPLESDIR}/VTKData \
|
2008-11-03 14:09:16 +00:00
|
|
|
-DOPENGL_INCLUDE_DIR:PATH=${LOCALBASE}/include \
|
|
|
|
-DOPENGL_gl_LIBRARY:FILEPATH=${LOCALBASE}/lib/libGL.so \
|
|
|
|
-DOPENGL_glu_LIBRARY:FILEPATH=${LOCALBASE}/lib/libGLU.so
|
|
|
|
|
2010-04-03 15:34:44 +00:00
|
|
|
.include <bsd.port.options.mk>
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2010-08-26 10:11:05 +00:00
|
|
|
.if defined(WITH_SHARED)
|
2011-01-05 17:05:00 +00:00
|
|
|
CMAKE_ARGS+= -DBUILD_SHARED_LIBS:BOOL=ON \
|
|
|
|
-DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
|
|
|
|
-DVTK_USE_SYSTEM_JPEG:BOOL=ON \
|
|
|
|
-DVTK_USE_SYSTEM_PNG:BOOL=ON \
|
|
|
|
-DVTK_USE_SYSTEM_TIFF:BOOL=ON \
|
|
|
|
-DVTK_USE_SYSTEM_ZLIB:BOOL=ON
|
2010-08-26 10:11:05 +00:00
|
|
|
PLIST_SUB+= SHARED="" \
|
|
|
|
STATIC="@comment "
|
|
|
|
.else
|
2011-01-05 17:05:00 +00:00
|
|
|
CMAKE_ARGS+= -DBUILD_SHARED_LIBS:BOOL=OFF \
|
|
|
|
-DVTK_USE_SYSTEM_EXPAT:BOOL=OFF \
|
|
|
|
-DVTK_USE_SYSTEM_JPEG:BOOL=OFF \
|
|
|
|
-DVTK_USE_SYSTEM_PNG:BOOL=OFF \
|
|
|
|
-DVTK_USE_SYSTEM_TIFF:BOOL=OFF \
|
|
|
|
-DVTK_USE_SYSTEM_ZLIB:BOOL=OFF
|
2010-08-26 10:11:05 +00:00
|
|
|
PLIST_SUB+= SHARED="@comment " \
|
|
|
|
STATIC=""
|
|
|
|
.endif
|
|
|
|
|
2008-01-09 19:54:41 +00:00
|
|
|
.if defined(WITH_VTKMPEG2)
|
2008-02-03 10:45:15 +00:00
|
|
|
LIB_DEPENDS+= vtkMPEG2Encode.5:${PORTSDIR}/multimedia/vtkmpeg2encode
|
2010-04-03 15:34:44 +00:00
|
|
|
PLIST_SUB+= MPEG=""
|
|
|
|
CMAKE_ARGS+= -DVTK_USE_PATENTED:BOOL=ON \
|
|
|
|
-DVTK_USE_MPEG2_ENCODER:BOOL=ON \
|
2010-06-10 15:48:08 +00:00
|
|
|
-DvtkMPEG2Encode_INCLUDE_PATH=${LOCALBASE}/include/vtk-5.6 \
|
2010-04-03 15:34:44 +00:00
|
|
|
-DvtkMPEG2Encode_LIBRARIES=${LOCALBASE}/lib/libvtkMPEG2Encode.so
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MPEG="@comment "
|
2000-03-30 08:25:16 +00:00
|
|
|
.endif
|
1999-06-01 13:16:47 +00:00
|
|
|
|
2009-08-07 17:04:10 +00:00
|
|
|
.if defined(WITH_GL2PS)
|
|
|
|
LIB_DEPENDS+= gl2ps.1:${PORTSDIR}/print/gl2ps
|
|
|
|
CMAKE_ARGS+= -DVTK_USE_GL2PS:BOOL=ON
|
2010-04-03 15:34:44 +00:00
|
|
|
PLIST_SUB+= GL2PS=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= GL2PS="@comment "
|
2009-08-07 17:04:10 +00:00
|
|
|
.endif
|
|
|
|
|
2010-04-09 09:03:30 +00:00
|
|
|
.if defined(WITH_OSMESA)
|
|
|
|
LIB_DEPENDS+= OSMesa32.7:${PORTSDIR}/graphics/libosmesa
|
|
|
|
CMAKE_ARGS+= -DVTK_OPENGL_HAS_OSMESA:BOOL=ON \
|
|
|
|
-DOSMESA_INCLUDE_DIR:PATH=${LOCALBASE}/include/Mesa \
|
|
|
|
-DOSMESA_LIBRARY:FILEPATH=${LOCALBASE}/lib/libOSMesa32.so
|
|
|
|
.endif
|
|
|
|
|
2010-04-03 15:34:44 +00:00
|
|
|
.if defined(WITH_QT)
|
|
|
|
USE_QT_VER= 4
|
2010-04-07 14:38:01 +00:00
|
|
|
QT_COMPONENTS= corelib assistant assistantclient designer \
|
|
|
|
gui opengl qtestlib sql dbus \
|
|
|
|
qmake_build uic_build moc_build rcc_build
|
2010-04-03 15:34:44 +00:00
|
|
|
CMAKE_ARGS+= -DVTK_USE_GUISUPPORT:BOOL=ON \
|
|
|
|
-DVTK_USE_QVTK:BOOL=ON \
|
2010-06-10 15:48:08 +00:00
|
|
|
-DVTK_USE_QT:BOOL=ON \
|
2010-04-03 15:34:44 +00:00
|
|
|
-DDESIRED_QT_VERSION:STRING=4 \
|
2010-04-07 14:38:01 +00:00
|
|
|
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QMAKE} \
|
|
|
|
-DVTK_INSTALL_QT_DIR:FILEPATH=/lib/qt4/plugins/designer
|
2010-04-03 15:34:44 +00:00
|
|
|
PLIST_SUB+= QT=""
|
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -DVTK_USE_GUISUPPORT:BOOL=OFF
|
|
|
|
PLIST_SUB+= QT="@comment "
|
|
|
|
.endif
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2010-04-03 15:34:44 +00:00
|
|
|
.if defined(WITH_WRAP_PYTHON)
|
2010-08-26 10:11:05 +00:00
|
|
|
.if !defined(WITH_SHARED)
|
|
|
|
IGNORE= python wrapping requires shared libraries.\
|
|
|
|
Run make config again and enable the SHARED option
|
|
|
|
.endif
|
2010-04-03 15:34:44 +00:00
|
|
|
USE_PYTHON= yes
|
|
|
|
PYDISTUTILS_PKGNAME= VTK
|
|
|
|
INSTALLS_EGGINFO= yes
|
|
|
|
CMAKE_ARGS+= -DVTK_WRAP_PYTHON:BOOL=ON \
|
|
|
|
-DVTK_PYTHON_SETUP_ARGS:STRING='--prefix="${PREFIX}"'
|
|
|
|
PLIST_SUB+= PYTHON=""
|
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -DVTK_WRAP_PYTHON:BOOL=OFF
|
|
|
|
PLIST_SUB+= PYTHON="@comment "
|
|
|
|
.endif
|
2010-03-30 07:18:04 +00:00
|
|
|
|
2010-04-03 15:34:44 +00:00
|
|
|
.if defined(WITH_WRAP_TCLTK)
|
2010-06-10 15:48:08 +00:00
|
|
|
CMAKE_ARGS+= -DVTK_WRAP_TCL:BOOL=ON
|
|
|
|
PLIST_SUB+= TCLTK=""
|
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -DVTK_WRAP_TCL:BOOL=OFF
|
|
|
|
PLIST_SUB+= TCLTK="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Used by both tcl/tk and python
|
|
|
|
.if defined(WITH_WRAP_TCLTK) || defined(WITH_WRAP_PYTHON)
|
2010-04-03 15:34:44 +00:00
|
|
|
USE_TCL= 84+
|
|
|
|
USE_TK= 84+
|
2010-06-10 15:48:08 +00:00
|
|
|
CMAKE_ARGS+= -DVTK_USE_TK:BOOL=ON \
|
2010-04-03 15:34:44 +00:00
|
|
|
-DTCL_INCLUDE_PATH=${TCL_INCLUDEDIR} \
|
|
|
|
-DTK_INCLUDE_PATH=${TK_INCLUDEDIR}
|
2010-06-10 15:48:08 +00:00
|
|
|
PLIST_SUB+= WRAP_PYTHON_OR_TCLTK="" \
|
2010-04-03 15:34:44 +00:00
|
|
|
TCLTK_VER="${TCL_VER}"
|
|
|
|
.else
|
2010-06-10 15:48:08 +00:00
|
|
|
PLIST_SUB+= WRAP_PYTHON_OR_TCLTK="@comment "
|
2010-04-03 15:34:44 +00:00
|
|
|
.endif
|
|
|
|
|
2010-04-09 09:03:30 +00:00
|
|
|
.if defined(WITH_WRAP_JAVA)
|
2010-08-26 10:11:05 +00:00
|
|
|
.if !defined(WITH_SHARED)
|
|
|
|
IGNORE= java wrapping requires shared libraries.\
|
|
|
|
Run make config again and enable the SHARED option
|
|
|
|
.endif
|
|
|
|
.if ${ARCH} == "amd64"
|
|
|
|
CXXFLAGS+= -fPIC
|
|
|
|
.endif
|
2010-04-09 09:03:30 +00:00
|
|
|
USE_JAVA= yes
|
|
|
|
JAVA_VENDOR= freebsd
|
|
|
|
JAVA_VERSION= 1.5+
|
|
|
|
CMAKE_ARGS+= -DVTK_WRAP_JAVA:BOOL=ON \
|
|
|
|
-DJAVA_AWT_INCLUDE_PATH:FILEPATH=${JAVA_HOME}/include \
|
|
|
|
-DJAVA_INCLUDE_PATH:FILEPATH=${JAVA_HOME}/include \
|
|
|
|
-DJAVA_INCLUDE_PATH2:FILEPATH=${JAVA_HOME}/include/freebsd \
|
2010-08-26 10:11:05 +00:00
|
|
|
-DJAVA_AWT_LIBRARY:FILEPATH=${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so \
|
|
|
|
-DJAVA_JVM_LIBRARY:FILEPATH=${JAVA_HOME}/jre/lib/${ARCH}/server/libjvm.so
|
2010-04-09 09:03:30 +00:00
|
|
|
PLIST_SUB+= JAVA=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= JAVA="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Wrapping
|
|
|
|
.if defined(WITH_WRAP_PYTHON) || defined(WITH_WRAP_TCLTK) || defined(WITH_WRAP_JAVA)
|
|
|
|
PLIST_SUB+= WRAPPING=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WRAPPING="@comment "
|
|
|
|
.endif
|
|
|
|
|
2010-04-03 15:34:44 +00:00
|
|
|
post-patch:
|
|
|
|
${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' \
|
|
|
|
${WRKSRC}/Hybrid/vtkVRMLImporter.cxx
|
|
|
|
${REINPLACE_CMD} -e '222s|)|) \&\& !defined(__FreeBSD__)|' \
|
|
|
|
${WRKSRC}/Utilities/kwsys/SharedForward.h.in
|
|
|
|
${REINPLACE_CMD} -e '25,30d' ${WRKSRC}/Wrapping/Python/setup.py.in
|
2011-01-05 17:05:00 +00:00
|
|
|
.if !defined(WITH_SHARED)
|
2010-06-10 15:48:08 +00:00
|
|
|
${REINPLACE_CMD} -e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|g' \
|
2010-04-03 15:34:44 +00:00
|
|
|
${WRKSRC}/IO/vtkPNGReader.cxx
|
2011-01-05 17:05:00 +00:00
|
|
|
.endif
|
2010-03-30 07:18:04 +00:00
|
|
|
|
2010-04-09 15:00:57 +00:00
|
|
|
post-configure:
|
|
|
|
.if defined(WITH_WRAP_JAVA)
|
2010-08-26 10:11:05 +00:00
|
|
|
${REINPLACE_CMD} -e 's|-ljawt$$||' \
|
2010-04-09 15:00:57 +00:00
|
|
|
${CONFIGURE_WRKSRC}/Wrapping/Java/CMakeFiles/VTKJavaExecutable.dir/link.txt
|
|
|
|
.endif
|
|
|
|
|
2008-01-09 19:54:41 +00:00
|
|
|
pre-install:
|
2010-04-09 09:03:30 +00:00
|
|
|
.if defined(WITH_PYTHON)
|
2010-04-03 15:34:44 +00:00
|
|
|
${MKDIR} ${PYTHONPREFIX_SITELIBDIR}
|
2010-04-09 09:03:30 +00:00
|
|
|
.endif
|
2010-04-03 15:34:44 +00:00
|
|
|
${MKDIR} ${MANPREFIX}/man/man3
|
2008-11-03 14:09:16 +00:00
|
|
|
${INSTALL_MAN} ${WRKDIR}/vtk.3 ${MANPREFIX}/man/man3
|
2008-01-09 19:54:41 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2008-11-03 14:09:16 +00:00
|
|
|
${MKDIR} ${DOCSDIR}
|
2010-04-03 15:34:44 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/README.html ${DOCSDIR}
|
2003-12-26 20:03:41 +00:00
|
|
|
.endif
|
2008-01-09 19:54:41 +00:00
|
|
|
|
2010-10-20 10:28:46 +00:00
|
|
|
LIBS_TOFIX= vtkNetCDF_cxx Cosmo VPIC
|
|
|
|
LIBDIR= ${PREFIX}/lib/vtk-${PORTVERSION:R}/
|
|
|
|
|
2008-01-09 19:54:41 +00:00
|
|
|
post-install:
|
2010-04-07 14:38:01 +00:00
|
|
|
# Ports system wants us to conform to lib.so.x format, but VTK5
|
|
|
|
# only installs lib.so.x.y and lib.so.x.y.z.
|
2010-08-26 10:11:05 +00:00
|
|
|
.if defined(WITH_SHARED)
|
2010-10-20 10:28:46 +00:00
|
|
|
@for lib in ${LIBS_TOFIX}; do \
|
|
|
|
${CP} ${LIBDIR}/lib$$lib.so ${LIBDIR}/lib$$lib.so.${PORTVERSION}; \
|
|
|
|
done
|
|
|
|
@for lib in ${LIBDIR}/*.so; do \
|
2010-04-07 14:38:01 +00:00
|
|
|
${RM} -f $$lib; \
|
2010-10-20 10:28:46 +00:00
|
|
|
${LN} -sf $$lib.${PORTVERSION} $$lib.${PORTVERSION:R}; \
|
|
|
|
${LN} -sf $$lib.${PORTVERSION:R} $$lib.${PORTVERSION:R:R}; \
|
|
|
|
${LN} -sf $$lib.${PORTVERSION:R:R} $$lib; \
|
2010-04-07 14:38:01 +00:00
|
|
|
done
|
2010-04-09 09:03:30 +00:00
|
|
|
.if defined(WITH_QT)
|
2010-10-20 10:28:46 +00:00
|
|
|
@for lib in ${LIBDIR}/libQVTK*.so; do \
|
2010-04-09 09:03:30 +00:00
|
|
|
${RM} -f $$lib; \
|
|
|
|
${LN} -sf $$lib.${PORTVERSION} $$lib; \
|
|
|
|
${LN} -sf $$lib.${PORTVERSION} $$lib.${PORTVERSION:R:R}; \
|
|
|
|
done
|
|
|
|
.endif
|
2010-08-26 10:11:05 +00:00
|
|
|
.endif
|
2008-01-09 19:54:41 +00:00
|
|
|
.if defined(WITH_VTKMPEG2)
|
2010-04-03 15:34:44 +00:00
|
|
|
@${ECHO_CMD}
|
2008-01-09 19:54:41 +00:00
|
|
|
@${ECHO_CMD} "This port uses the patented MPEG2 encoder."
|
|
|
|
@${ECHO_CMD}
|
2003-12-26 20:03:41 +00:00
|
|
|
.endif
|
|
|
|
|
2010-04-03 15:34:44 +00:00
|
|
|
.include <bsd.port.mk>
|