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
|
2008-11-03 14:09:16 +00:00
|
|
|
PORTVERSION= 5.0.4
|
2009-03-24 19:13:32 +00:00
|
|
|
PORTREVISION= 3
|
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/
|
|
|
|
DISTNAME?= vtk-${PORTVERSION}
|
|
|
|
|
2009-03-23 23:40:49 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2008-01-09 19:54:41 +00:00
|
|
|
COMMENT= The Visualization Toolkit
|
|
|
|
|
|
|
|
LIB_DEPENDS= expat.[5-6]:${PORTSDIR}/textproc/expat2 \
|
|
|
|
jpeg.9:${PORTSDIR}/graphics/jpeg \
|
|
|
|
png.5:${PORTSDIR}/graphics/png \
|
|
|
|
tiff.4:${PORTSDIR}/graphics/tiff
|
|
|
|
|
|
|
|
LATEST_LINK= vtk5
|
1999-06-01 13:16:47 +00:00
|
|
|
|
2008-01-09 19:54:41 +00:00
|
|
|
USE_QT_VER= 3
|
2009-02-25 20:41:06 +00:00
|
|
|
USE_TCL= 84
|
|
|
|
USE_TK= 84
|
2008-01-09 19:54:41 +00:00
|
|
|
USE_PYTHON= yes
|
|
|
|
INSTALLS_EGGINFO= yes
|
1999-06-01 13:16:47 +00:00
|
|
|
|
2003-12-26 20:03:41 +00:00
|
|
|
VTKSRCDIR= ${WRKDIR}/VTK
|
|
|
|
VTKDATAROOT= ${EXAMPLESDIR}/VTKData
|
2008-01-09 19:54:41 +00:00
|
|
|
PYDISTUTILS_PKGNAME= VTK
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2008-11-03 14:09:16 +00:00
|
|
|
CONFLICTS= vtk-4* vtk-5.0.[012356789]*
|
2008-01-09 19:54:41 +00:00
|
|
|
NO_FILTER_SHLIBS= yes
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2008-01-09 19:54:41 +00:00
|
|
|
VTK_KITS= Common Filtering GenericFiltering Graphics \
|
|
|
|
Hybrid IO Imaging Parallel Rendering VolumeRendering \
|
|
|
|
Widgets
|
2004-02-13 03:53:48 +00:00
|
|
|
|
2008-01-09 19:54:41 +00:00
|
|
|
SUB_FILES= pkg-message vtk.3
|
|
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
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
|
|
|
|
USE_LDCONFIG= yes
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2008-11-03 14:09:16 +00:00
|
|
|
OPTIONS= MANGLEDMESA "Use off-screen (Mangled) Mesa" Off \
|
|
|
|
VTKMPEG2 "Install patented MPEG2 encoder module" Off
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2008-01-09 19:54:41 +00:00
|
|
|
PLIST_SUB= VER=${PORTVERSION} VER1=${PORTVERSION:R} VER2=${PORTVERSION:R:R}
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2008-01-09 19:54:41 +00:00
|
|
|
MAN3= vtk.3
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
1999-06-01 13:16:47 +00:00
|
|
|
|
2008-05-27 22:12:09 +00:00
|
|
|
CMAKE_USE_PTHREAD= yes
|
|
|
|
CMAKE_SOURCE_PATH= ../VTK
|
|
|
|
CMAKE_ARGS+= ${VTKSRCDIR} \
|
2003-12-26 20:03:41 +00:00
|
|
|
-DBUILD_SHARED_LIBS:BOOL=ON \
|
2008-01-09 19:54:41 +00:00
|
|
|
-DBUILD_DOCUMENTATION:BOOL=ON \
|
|
|
|
-DBUILD_TESTING:BOOL=OFF \
|
2003-12-26 20:03:41 +00:00
|
|
|
-DVTK_USE_RENDERING:BOOL=ON \
|
|
|
|
-DVTK_USE_HYBRID:BOOL=ON \
|
|
|
|
-DVTK_USE_PARALLEL: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 \
|
2008-01-09 19:54:41 +00:00
|
|
|
-DVTK_USE_GUISUPPORT:BOOL=ON \
|
|
|
|
-DVTK_USE_QVTK:BOOL=ON \
|
|
|
|
-DVTK_WRAP_PYTHON:BOOL=ON \
|
|
|
|
-DVTK_WRAP_TCL:BOOL=ON \
|
|
|
|
-DTCL_INCLUDE_PATH=${TCL_INCLUDEDIR} \
|
|
|
|
-DTK_INCLUDE_PATH=${TK_INCLUDEDIR} \
|
|
|
|
-DDESIRED_QT_VERSION:STRING=3 \
|
|
|
|
-DVTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T:BOOL=ON \
|
2008-11-03 14:09:16 +00:00
|
|
|
-DVTK_DATA_ROOT:PATH=${VTKDATAROOT} \
|
|
|
|
-DOPENGL_INCLUDE_DIR:PATH=${LOCALBASE}/include \
|
|
|
|
-DOPENGL_gl_LIBRARY:FILEPATH=${LOCALBASE}/lib/libGL.so \
|
|
|
|
-DOPENGL_glu_LIBRARY:FILEPATH=${LOCALBASE}/lib/libGLU.so
|
|
|
|
|
|
|
|
.if defined(WITH_MANGLEDMESA)
|
|
|
|
LIB_DEPENDS+= MesaGL.14:${PORTSDIR}/graphics/mesagl
|
|
|
|
CMAKE_ARGS+= -DVTK_OPENGL_HAS_OSMESA:BOOL=OFF \
|
|
|
|
-DVTK_USE_MANGLED_MESA:BOOL=ON \
|
|
|
|
-DMANGLED_MESA_INCLUDE_DIR:PATH=${LOCALBASE}/include/Mesa \
|
|
|
|
-DMANGLED_MESA_LIBRARY:FILEPATH=${LOCALBASE}/lib/libMesaGL.so \
|
|
|
|
-DMANGLED_OSMESA_INCLUDE_DIR:PATH=${LOCALBASE}/include/Mesa \
|
|
|
|
-DMANGLED_OSMESA_LIBRARY:FILEPATH=${LOCALBASE}/lib/libMesaOSMesa.so
|
|
|
|
#.else
|
|
|
|
#CMAKE_ARGS+= -DVTK_OPENGL_HAS_OSMESA:BOOL=ON \
|
|
|
|
# -DOSMESA_LIBRARY:FILEPATH=${LOCALBASE}/lib/libOSMesa.so
|
|
|
|
.endif
|
2003-12-26 20:03:41 +00:00
|
|
|
|
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
|
2008-01-09 19:54:41 +00:00
|
|
|
PLIST_FILES+= include/vtk-5.0/vtkMPEG2Writer.h
|
2008-05-27 22:12:09 +00:00
|
|
|
CMAKE_ARGS+= -DvtkMPEG2Encode_INCLUDE_PATH=${LOCALBASE}/include/vtk-5.0 \
|
2008-01-09 19:54:41 +00:00
|
|
|
-DvtkMPEG2Encode_LIBRARIES=vtkMPEG2Encode \
|
|
|
|
-DVTK_USE_PATENTED:BOOL=ON \
|
|
|
|
-DVTK_USE_MPEG2_ENCODER:BOOL=ON
|
2000-03-30 08:25:16 +00:00
|
|
|
.endif
|
1999-06-01 13:16:47 +00:00
|
|
|
|
2008-01-09 19:54:41 +00:00
|
|
|
post-extract:
|
2008-05-27 22:12:09 +00:00
|
|
|
${MKDIR} ${WRKSRC}
|
|
|
|
${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' \
|
2008-01-09 19:54:41 +00:00
|
|
|
${VTKSRCDIR}/Hybrid/vtkVRMLImporter.cxx
|
2003-12-26 20:03:41 +00:00
|
|
|
|
2008-01-09 19:54:41 +00:00
|
|
|
# FSL links directly to libQVTKWidgetPlugin.so, so put it in a standard
|
|
|
|
# library directory.
|
|
|
|
pre-install:
|
|
|
|
${MKDIR} ${PREFIX}/lib/vtk-5.0
|
2008-11-03 14:09:16 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/bin/libQVTKWidgetPlugin.so ${PREFIX}/lib
|
|
|
|
${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}
|
2008-01-09 19:54:41 +00:00
|
|
|
${INSTALL_DATA} ${VTKSRCDIR}/README.html ${DOCSDIR}
|
2003-12-26 20:03:41 +00:00
|
|
|
.endif
|
2008-01-09 19:54:41 +00:00
|
|
|
|
|
|
|
# Ports system wants us to conform to lib.so.x format, but VTK5
|
|
|
|
# only installs lib.so.x.y and lib.so.5.x.y.z.
|
|
|
|
post-install:
|
|
|
|
@for lib in ${PREFIX}/lib/libvtk*.so ${PREFIX}/lib/libQVTK*.so; do \
|
|
|
|
${RM} -f $$lib; \
|
|
|
|
${LN} -sf $$lib.${PORTVERSION} $$lib; \
|
|
|
|
${LN} -sf $$lib.${PORTVERSION} $$lib.5; \
|
|
|
|
done
|
|
|
|
@${ECHO_CMD}
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
@${ECHO_CMD}
|
|
|
|
.if defined(WITH_VTKMPEG2)
|
|
|
|
@${ECHO_CMD} "This port uses the patented MPEG2 encoder."
|
|
|
|
@${ECHO_CMD}
|
2003-12-26 20:03:41 +00:00
|
|
|
.endif
|
|
|
|
|
2004-02-13 03:53:48 +00:00
|
|
|
.include <bsd.port.post.mk>
|