# New ports collection makefile for: vtk # Date created: 10 Oct 2003 # Whom: Mykola Khotyaintsev # # $FreeBSD$ # # By default # # There are some options to tune VTK towards your specific needs. # You can activate a feature by typing something like # "make -DKNOB" or "make KNOB=yes" instead of just "make" # # WITH_TESTING build the testing binaries (only for vtk and vtk-java port) # PORTNAME= vtk PORTVERSION= 4.3.0 PORTREVISION= 3 CATEGORIES= math graphics MASTER_SITES= http://ovt.irfu.se/vtk/files/ DISTFILES?= VTK-${PORTVERSION}-cvs${CVSDATE}.tar.gz MAINTAINER= ko@irfu.se COMMENT?= The Visualization Toolkit shared libs USE_REINPLACE= yes LIBVER= 1 CVSDATE= 20031006 VTKSRCDIR= ${WRKDIR}/VTK TESTINGDIR= ${EXAMPLESDIR}/Testing VTKDATAROOT= ${EXAMPLESDIR}/VTKData DOCSDIR= ${PREFIX}/share/doc/${PKGNAME} PLIST= ${.CURDIR}/pkg-plist FILESDIR= ${.CURDIR}/files RESTRICTED= yes VTK_KITS= Common Filtering Graphics Hybrid IO Imaging Rendering Parallel Patented PLIST_SUB+= LIBVER=${LIBVER} PKGNAME=${PKGNAME} .include .if defined(WRAP) || !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX}=="-headers" PATCH_WRKSRC= ${WRKDIR}/VTK WRKSRC= ${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}-build BUILD_DEPENDS+= ${CMAKE}:${PORTSDIR}/devel/cmake LIB_DEPENDS+= expat.5:${PORTSDIR}/textproc/expat2 \ jpeg.9:${PORTSDIR}/graphics/jpeg \ png.5:${PORTSDIR}/graphics/png \ tiff.4:${PORTSDIR}/graphics/tiff .if defined(WITH_TESTING) && (!defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX}=="-java") RUN_DEPENDS+= ${VTKDATAROOT}/VTKData.readme:${PORTSDIR}/math/vtk-data BUILD_DEPENDS+= ${VTKDATAROOT}/VTKData.readme:${PORTSDIR}/math/vtk-data .endif ONLY_FOR_ARCHS= i386 # was not tested on other ARCHS USE_GMAKE= yes USE_GL= yes INSTALLS_SHLIB= yes # if optimization flag -O2 or -O3 is present - use g++33 # There is a problem compiling Imaging/vtkImageEuclideanDistance.o by gcc 3.2.2 # with -02 -march=pentium3 .if defined(CXXFLAGS) TTT= "${CXXFLAGS}" # this quotes are VERY important! OPTFLAGPRESENT= ${TTT:C/^.*-O[23].*$/yes/} .if ${OPTFLAGPRESENT} == "yes" USE_GCC= 3.3 .endif .endif .if ${OSVERSION} < 500016 ADDITIONAL_EXE_LINKER_FLAGS= ${PTHREAD_LIBS} .endif CMAKE?= ${LOCALBASE}/bin/cmake CXXFLAGS+= -Wno-deprecated CMAKE_DEFS+= -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX} \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_SHARED_LINKER_FLAGS:STRING="${LINKERFLAGS}" \ -DCMAKE_EXE_LINKER_FLAGS:STRING="${LINKERFLAGS} ${ADDITIONAL_EXE_LINKER_FLAGS}" \ -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}" \ -DVTK_USE_RENDERING:BOOL=ON \ -DVTK_USE_HYBRID:BOOL=ON \ -DVTK_USE_PARALLEL:BOOL=ON \ -DVTK_USE_PATENTED: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_DATA_ROOT:PATH=${VTKDATAROOT} .if defined(WITH_TESTING) CMAKE_DEFS+= -DBUILD_TESTING:BOOL=ON PLIST_SUB+= TESTING_ONLY="" .else CMAKE_DEFS+= -DBUILD_TESTING:BOOL=OFF PLIST_SUB+= TESTING_ONLY="@comment " .endif ################################# vtk port start ############################################# .ifndef(PKGNAMESUFFIX) EXTRA_LIBS= DICOMParser freetype ftgl .if defined(WITH_TESTING) BINARIES= ${VTK_KITS:C/Parallel//:C/Patented//:S/$/CxxTests/} BINARIES+= TestCxxFeatures TestInstantiator TimeRenderer TimeRenderer2 ParallelIsoTest BINARIES+= SocketClient SocketServer GenericCommunicator ThreadedCommunicator TestPStream .endif .ifndef(WITH_TESTING) pre-everything:: @${ECHO_MSG} "---------------------- N O T E ------------------------" @${ECHO_MSG} "" @${ECHO_MSG} "If you want to build C++ Testing binaries press Ctrl-C now" @${ECHO_MSG} "and execute \"make WITH_TESTING=yes\"" @${ECHO_MSG} "" @${ECHO_MSG} "-------------------------------------------------------------" .endif post-patch: patch-common do-install: install-cnotice install-binaries install-libs .endif ################################# vtk port end ############################################# pre-configure: ${MKDIR} ${WRKSRC} do-configure: cd ${WRKSRC} && ${CMAKE} ${VTKSRCDIR} ${CMAKE_DEFS} patch-common: @${FIND} ${VTKSRCDIR} -name "*.cxx" | ${XARGS} ${REINPLACE_CMD} -e \ 's|malloc.h|stdlib.h|g' @${REINPLACE_CMD} -E 's|lib/vtk\)|lib\)|g' \ ${VTKSRCDIR}/vtkGenerateVTKConfig.cmake .if defined(WRAP) # No need to build many libs, such as: vtkCommon,... Better link to those ones installed by vtk port. # Patch (MAIN_KIT_LIB = [Common_LIB Filtering_LIB ...]: # ${VTKSRCDIR}/CMakeLists.txt : # -SUBDIRS(Wrapping Utilities) # +SUBDIRS(Wrapping) # # ${VTKSRCDIR}/[Common Filtering IO ...]/CMakeLists.txt : # -ADD_LIBRARY(vtk${KIT} ... # +FIND_LIBRARY(MAIN_KIT_LIB NAMES vtk${KIT} PATHS ${PREFIX}/lib) # # -TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT} ... # +TARGET_LINK_LIBRARIES(vtk${KIT}Python ${MAIN_KIT_LIB} ... # # Sometimes TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT} can be separated to two lines: # TARGET_LINK_LIBRARIES(vtk${KIT}Python # vtk${KIT} # -^[spaces or tabs]vtk${KIT}[spaces or tabs]$ # +[space]${MAIN_KIT_LIB} # # -TARGET_LINK_LIBRARIES(vtk${KIT} ${KIT_LIBS}) # # ${VTKSRCDIR}/[Common Filtering IO ...]/Tests/CMakeLists.txt : # -SUBDIRS(Cxx) # @${REINPLACE_CMD} -E 's|SUBDIRS\(Wrapping Utilities\)|SUBDIRS\(Wrapping\)|g' \ ${VTKSRCDIR}/CMakeLists.txt @for dir in ${VTK_KITS} ; do \ ${ECHO_MSG} "Patching ${WRKDIR}/${VTKSRCDIR}/$$dir/CMakeLists.txt ..." ; \ ${REINPLACE_CMD} -E 's|ADD_LIBRARY *\(vtk\$$\{KIT\} .*$$|FIND_LIBRARY\('$$dir'_LIB NAMES vtk\$$\{KIT\} PATHS ${PREFIX}/lib\)|g ; s|TARGET_LINK_LIBRARIES *\(vtk\$$\{KIT\}${WRAP} vtk\$$\{KIT\}|TARGET_LINK_LIBRARIES\(vtk\$$\{KIT\}${WRAP} \$$\{'$$dir'_LIB\}|g ; s|^[ \t]*vtk\$$\{KIT\}[ \t]*$$| \$$\{'$$dir'_LIB\}|g ; s|TARGET_LINK_LIBRARIES *\(vtk\$$\{KIT\} .*$$||g' \ ${VTKSRCDIR}/$$dir/CMakeLists.txt ; \ done .if defined(WITH_TESTING) @for dir in ${VTK_KITS} ; do \ ${ECHO_MSG} "Patching ${VTKSRCDIR}/$$dir/Testing/CMakeLists.txt ..." ; \ ${REINPLACE_CMD} -E 's|SUBDIRS *\(Cxx\).*$$||g' \ ${VTKSRCDIR}/$$dir/Testing/CMakeLists.txt ; \ done .endif .endif #end of patch-common install-binaries: .if defined(BINARIES) @${ECHO_MSG} "Installing binaries to ${PREFIX}/bin :" .for i in ${BINARIES} @${ECHO_MSG} "Installing ${i} ..." @${INSTALL_PROGRAM} ${WRKSRC}/bin/${i} ${PREFIX}/bin .endfor .endif install-libs: @${ECHO_MSG} "Installing shared libraries to ${PREFIX}/lib ..." .for i in ${VTK_KITS:S/$/${WRAP}/} ${EXTRA_LIBS} @${ECHO_MSG} "Installing libvtk${i}.so ..." @${INSTALL_PROGRAM} ${WRKSRC}/bin/libvtk${i}.so \ ${PREFIX}/lib/libvtk${i}.so.${LIBVER} @${LN} -sf ${PREFIX}/lib/libvtk${i}.so.${LIBVER} \ ${PREFIX}/lib/libvtk${i}.so .endfor .endif install-cnotice: @${ECHO_MSG} "Installing copyright notice to ${DOCSDIR} ..." @${MKDIR} ${DOCSDIR} @${INSTALL_DATA} ${VTKSRCDIR}/README.html ${DOCSDIR} @${INSTALL_DATA} ${VTKSRCDIR}/vtkLogo.jpg ${DOCSDIR} @${ECHO_MSG} -e "A list of the patented classes.\n\n" > ${WRKDIR}/README.patented-classes @cd ${VTKSRCDIR} ; ${LS} Patented/*.h >> ${WRKDIR}/README.patented-classes @${INSTALL_DATA} ${WRKDIR}/README.patented-classes ${DOCSDIR} print-pkg-message: @if ${TEST} -f ${PKGMESSAGE} ; then \ ${ECHO_MSG} -e "-- V T K - N O T E ----------------------------------------------------\n\n" ; \ ${CAT} ${PKGMESSAGE} | ${SED} -e 's|%%PREFIX%%|${PREFIX}|' ; \ ${ECHO_MSG} -e "\n\n-----------------------------------------------------------------------" ; \ fi post-install: print-pkg-message .ifndef(PKGNAMESUFFIX) .include .endif -1.3.8&id=fbb51f9b7c410f77450566744e2e6bd9807dc034&showmsg=1'>Expand)AuthorAgeFilesLines * Horde package update:mm2017-09-032-4/+4 * Horde package update:mm2017-08-032-4/+4 * Horde package update:mm2017-06-272-4/+4 * Horde package update:mm2016-12-182-4/+4 * Horde package update:mm2016-12-122-4/+4 * Horde package update:mm2016-11-09rs/bochs?h=gstreamer0.10-removal&id=e87a561085b7e82456b6b2c5df13632700b3fe3c'>- Update to 2.6.1miwi2013-04-262-16/+20 * Convert SINGLE to RADIO optionbapt2012-12-111-3/+3 * - Replace usage of !${PORT_OPTIONS:MFOO} with empty(PORT_OPTIONS:MFOO)madpilot2012-11-011-1/+1 * - Update to 2.6madpilot2012-11-013-34/+50 * Convert to new options framework.madpilot2012-06-081-116/+122 * - Update devel/sdl12 to 1.2.15mva2012-02-181-0/+1 * - Update to 2.5.1miwi2012-01-294-60/+50 * - Add LDFLAGS to CONFIGURE_ENV and MAKE_ENV (as it was done with LDFLAGS)amdmi32011-09-241-3/+2 * Add dependency on alsa-lib. Port picks it up with configure if installedarved2011-08-071-2/+5 * - Update to 1.4.6miwi2011-06-252-15/+28 * Sync to new bsd.autotools.mkade2010-12-041-1/+1 * - Update to 2.4.5miwi2010-07-152-127/+13 * -Repocopy devel/libtool15 -> libtool22 and libltdl15 -> libltdl22.mezz2009-08-031-1/+1 * - Update to 2.4miwi2009-05-233-31/+259 * - Add option to enable ACPI emulationgahr2008-09-241-1/+6 * - Fix build with SDLpav2008-09-051-1/+1 * - Update to version 2.3.7lwhsu2008-06-153-15/+26 * - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-201-1/+1 * - Chase devel/sdl12 shlib version bumpmiwi2008-03-131-0/+1 * - Update to 2.3.6mm2007-12-302-9/+26 * - Update to 2.3.5miwi2007-12-153-11/+10 * - Welcome X.org 7.2 \o/.flz2007-05-201-1/+1 * - If you use ne2k driver for FreeBSD, bochs will not receive incoming packetspav2006-11-192-0/+18 * - Use SF macro in MASTER_SITES.alepulver2006-11-016-175/+198 * - Update to 2.3rafan2006-09-265-50/+16 * Enable --port-e9-hack optionvs2006-05-171-0/+9 * Use SUB_FILES instead of pre-patch commands.lawrance2006-05-143-9/+9 * - Fix build on 4.xmnag2006-03-182-7/+9 * - Update to 2.2.6pav2006-03-175-34/+52 * Replace the dangerous .error with IGNORE.linimon2006-01-271