aboutsummaryrefslogtreecommitdiffstats
path: root/math/vtk5
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2008-05-28 06:12:09 +0800
committermiwi <miwi@FreeBSD.org>2008-05-28 06:12:09 +0800
commitc486a60f04933c8227640b8faca0f931afbe32ef (patch)
tree827b6cdb889eaa1ccc00ca4598ae40dee1a42a50 /math/vtk5
parent888eabb1977d6504355090d942963975c8d755ed (diff)
downloadfreebsd-ports-gnome-c486a60f04933c8227640b8faca0f931afbe32ef.tar.gz
freebsd-ports-gnome-c486a60f04933c8227640b8faca0f931afbe32ef.tar.zst
freebsd-ports-gnome-c486a60f04933c8227640b8faca0f931afbe32ef.zip
- Add common code to support for cmake based ports.
- Update devel/cmake to 2.6.0 (also fix ports/123092) - Use the new CMAKE build framework in all ports using cmake Approved by: portmgr (pav)
Diffstat (limited to 'math/vtk5')
-rw-r--r--math/vtk5/Makefile29
1 files changed, 7 insertions, 22 deletions
diff --git a/math/vtk5/Makefile b/math/vtk5/Makefile
index 2c96ac593852..d5ef078ed59f 100644
--- a/math/vtk5/Makefile
+++ b/math/vtk5/Makefile
@@ -16,7 +16,6 @@ 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 \
@@ -44,9 +43,7 @@ VTK_KITS= Common Filtering GenericFiltering Graphics \
SUB_FILES= pkg-message vtk.3
PKGMESSAGE= ${WRKDIR}/pkg-message
-PATCH_WRKSRC= ${WRKDIR}/VTK
-WRKSRC= ${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}-build
-
+USE_CMAKE= yes
USE_GMAKE= yes
USE_GL= yes
USE_LDCONFIG= yes
@@ -59,22 +56,13 @@ MAN3= vtk.3
.include <bsd.port.pre.mk>
-CMAKE?= ${LOCALBASE}/bin/cmake
+CMAKE_USE_PTHREAD= yes
+CMAKE_SOURCE_PATH= ../VTK
CXXFLAGS+= -Wno-deprecated
-CMAKE_DEFS+= -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX} \
+CMAKE_ARGS+= ${VTKSRCDIR} \
-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 \
@@ -96,20 +84,17 @@ CMAKE_DEFS+= -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX} \
.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 \
+CMAKE_ARGS+= -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' \
+ ${MKDIR} ${WRKSRC}
+ ${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: