blob: 2c96ac593852350b3a53bbcdb477581307a9ae84 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
# New ports collection makefile for: vtk5
# Date created: 10 Oct 2003
# Whom: Mykola Khotyaintsev <ko@irfu.se>
# Repocopied from math/vtk by: Jason W. Bacon <bacon@smithers.neuro.mcw.edu>
#
# $FreeBSD$
#
PORTNAME= vtk
PORTVERSION= 5.0.3
CATEGORIES= math graphics
MASTER_SITES= http://www.vtk.org/files/release/5.0/ \
http://www.neuro.mcw.edu/Ports/distfiles/VTK5/
DISTNAME?= vtk-${PORTVERSION}
MAINTAINER= bacon@smithers.neuro.mcw.edu
COMMENT= The Visualization Toolkit
BUILD_DEPENDS= cmake>=2.2:${PORTSDIR}/devel/cmake
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
USE_QT_VER= 3
USE_TCL= yes
USE_TK= yes
USE_PYTHON= yes
INSTALLS_EGGINFO= yes
VTKSRCDIR= ${WRKDIR}/VTK
VTKDATAROOT= ${EXAMPLESDIR}/VTKData
PYDISTUTILS_PKGNAME= VTK
CONFLICTS= vtk-4* vtk-5.0.[012456789]*
NO_FILTER_SHLIBS= yes
VTK_KITS= Common Filtering GenericFiltering Graphics \
Hybrid IO Imaging Parallel Rendering VolumeRendering \
Widgets
SUB_FILES= pkg-message vtk.3
PKGMESSAGE= ${WRKDIR}/pkg-message
PATCH_WRKSRC= ${WRKDIR}/VTK
WRKSRC= ${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}-build
USE_GMAKE= yes
USE_GL= yes
USE_LDCONFIG= yes
OPTIONS= VTKMPEG2 "Install patented MPEG2 encoder module" Off
PLIST_SUB= VER=${PORTVERSION} VER1=${PORTVERSION:R} VER2=${PORTVERSION:R:R}
MAN3= vtk.3
.include <bsd.port.pre.mk>
CMAKE?= ${LOCALBASE}/bin/cmake
CXXFLAGS+= -Wno-deprecated
CMAKE_DEFS+= -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX} \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_DOCUMENTATION:BOOL=ON \
-DBUILD_TESTING:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_SHARED_LINKER_FLAGS:STRING="${LINKERFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS:STRING="${LINKERFLAGS} ${PTHREAD_LIBS}" \
-DCMAKE_THREAD_LIBS:STRING="${PTHREAD_LIBS}"\
-DCMAKE_USE_PTHREADS:BOOL=ON \
-DCMAKE_C_COMPILER:STRING='${CC}' \
-DCMAKE_CXX_COMPILER:STRING=${CXX} \
-DCMAKE_C_FLAGS:STRING="${CFLAGS} ${PTHREAD_CFLAGS}" \
-DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS} ${PTHREAD_CFLAGS}" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
-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 \
-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 \
-DVTK_DATA_ROOT:PATH=${VTKDATAROOT}
.if defined(WITH_VTKMPEG2)
LIB_DEPENDS+= vtkMPEG2Encode.5:${PORTSDIR}/multimedia/vtkmpeg2encode
PLIST_FILES+= include/vtk-5.0/vtkMPEG2Writer.h
CMAKE_DEFS+= -DvtkMPEG2Encode_INCLUDE_PATH=${LOCALBASE}/include/vtk-5.0 \
-DvtkMPEG2Encode_LIBRARIES=vtkMPEG2Encode \
-DVTK_USE_PATENTED:BOOL=ON \
-DVTK_USE_MPEG2_ENCODER:BOOL=ON
.endif
post-extract:
${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' \
${VTKSRCDIR}/Hybrid/vtkVRMLImporter.cxx
do-configure:
${MKDIR} ${WRKSRC}
cd ${WRKSRC} && ${CMAKE} ${VTKSRCDIR} ${CMAKE_DEFS}
# FSL links directly to libQVTKWidgetPlugin.so, so put it in a standard
# library directory.
pre-install:
${MKDIR} ${DOCSDIR}
${MKDIR} ${PREFIX}/lib/vtk-5.0
.if !defined(NOPORTDOCS)
${INSTALL_DATA} ${VTKSRCDIR}/README.html ${DOCSDIR}
.endif
${INSTALL_DATA} ${WRKSRC}/bin/libQVTKWidgetPlugin.so ${PREFIX}/lib
${INSTALL_MAN} ${WRKDIR}/vtk.3 ${MANPREFIX}/man/man3
# 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}
.endif
.include <bsd.port.post.mk>
|