diff options
author | edwin <edwin@FreeBSD.org> | 2006-04-04 22:47:58 +0000 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2006-04-04 22:47:58 +0000 |
commit | d58e3036811bfbe962fa361eb692c78abd94af2e (patch) | |
tree | 8fb6ac7a77dd26e062ddfe3727b63a1c6c8f3325 | |
parent | 4e834241d3fc115df48808cdbaada2753b3c5ee0 (diff) | |
download | FreeBSD-ports-d58e3036811bfbe962fa361eb692c78abd94af2e.zip FreeBSD-ports-d58e3036811bfbe962fa361eb692c78abd94af2e.tar.gz |
Reintroduce legacy port: vtk 4.3
I'd like to reintroduce VTK 4.3 to the ports tree to
facilitate building a new port, Caret 5.3. Starting with
VTK 4.4, support for "float" coordinates has been dropped
from many functions. The Caret code will require significant
changes to compile with VTK 4.4. Since the Caret developers
do not yet have a timeline for upgrading to VTK 4.4, I'd
like to reintroduce VTK 4.3 for the interim. Only the vtk
base and vtk-headers are essential. Below are shar files
for these two trees. They are based on the original vtk
4.3 port. The only modifications are:
1. The folder names are changed from vtk and vtk-headers
to vtk43 and vtk43-headers to prevent a collision with the
current vtk in /usr/ports/math.
2. PREFIX is set to ${LOCALBASE}/vtk43 to prevent a collision
with the current vtk installation.
PR: ports/92468
Submitted by: Jason Bacon <bacon@smithers.neuro.mcw.edu>
-rw-r--r-- | math/Makefile | 1 | ||||
-rw-r--r-- | math/vtk43/Makefile | 36 | ||||
-rw-r--r-- | math/vtk43/distinfo | 6 | ||||
-rw-r--r-- | math/vtk43/files/patch-IO-vtkBMPReader.cxx | 16 | ||||
-rw-r--r-- | math/vtk43/files/patch-IO-vtkImageReader.cxx | 30 | ||||
-rw-r--r-- | math/vtk43/pkg-plist | 2 |
6 files changed, 77 insertions, 14 deletions
diff --git a/math/Makefile b/math/Makefile index 232eb11..47b3a8e 100644 --- a/math/Makefile +++ b/math/Makefile @@ -284,6 +284,7 @@ SUBDIR += unixstat SUBDIR += vecfem SUBDIR += vtk + SUBDIR += vtk43 SUBDIR += vtk-data SUBDIR += vtk-examples SUBDIR += vtk-headers diff --git a/math/vtk43/Makefile b/math/vtk43/Makefile index 4d17b24..8ae8687 100644 --- a/math/vtk43/Makefile +++ b/math/vtk43/Makefile @@ -14,24 +14,28 @@ # PORTNAME= vtk -PORTVERSION= 4.4 -PORTREVISION= 1 +PORTVERSION= 4.3.0 +PORTREVISION= 3 CATEGORIES= math graphics MASTER_SITES= http://ovt.irfu.se/vtk/files/ -DISTFILES?= VTK-${PORTVERSION}-LatestRelease.tar.gz +DISTFILES?= VTK-${PORTVERSION}-cvs${CVSDATE}.tar.gz MAINTAINER= ko@irfu.se COMMENT?= The Visualization Toolkit shared libs USE_REINPLACE= yes +PREFIX= ${LOCALBASE}/vtk43 + LIBVER= 1 +CVSDATE= 20031006 VTKSRCDIR= ${WRKDIR}/VTK TESTINGDIR= ${EXAMPLESDIR}/Testing VTKDATAROOT= ${EXAMPLESDIR}/VTKData -DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX} +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 @@ -39,10 +43,6 @@ PLIST_SUB+= LIBVER=${LIBVER} PKGNAME=${PKGNAME} .include <bsd.port.pre.mk> -.if ${ARCH} == "amd64" -BROKEN= "does not compile on amd64" -.endif - .if defined(WRAP) || !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX}=="-headers" PATCH_WRKSRC= ${WRKDIR}/VTK @@ -50,7 +50,7 @@ WRKSRC= ${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}-build BUILD_DEPENDS+= ${CMAKE}:${PORTSDIR}/devel/cmake -LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2 \ +LIB_DEPENDS+= expat.5:${PORTSDIR}/textproc/expat2 \ jpeg.9:${PORTSDIR}/graphics/jpeg \ png.5:${PORTSDIR}/graphics/png \ tiff.4:${PORTSDIR}/graphics/tiff @@ -60,17 +60,33 @@ 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} ${PTHREAD_LIBS}" \ + -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}' \ diff --git a/math/vtk43/distinfo b/math/vtk43/distinfo index 9fa8569..b6e6a2e 100644 --- a/math/vtk43/distinfo +++ b/math/vtk43/distinfo @@ -1,3 +1,3 @@ -MD5 (VTK-4.4-LatestRelease.tar.gz) = 17a5006c4d7acca3e74d32e0e27f4739 -SHA256 (VTK-4.4-LatestRelease.tar.gz) = 4a6062ce65a0563aa7009220e1e58c3a8c1264e4d468376a20229db055d1a27b -SIZE (VTK-4.4-LatestRelease.tar.gz) = 6323955 +MD5 (VTK-4.3.0-cvs20031006.tar.gz) = 6c574972eb41c9d287fb540811d85e3a +SHA256 (VTK-4.3.0-cvs20031006.tar.gz) = 21a67c20094b1e45ac8496919988097cb516e62a4170ca17606903dbe9ed3e62 +SIZE (VTK-4.3.0-cvs20031006.tar.gz) = 6367112 diff --git a/math/vtk43/files/patch-IO-vtkBMPReader.cxx b/math/vtk43/files/patch-IO-vtkBMPReader.cxx new file mode 100644 index 0000000..f82deeb --- /dev/null +++ b/math/vtk43/files/patch-IO-vtkBMPReader.cxx @@ -0,0 +1,16 @@ +diff -u -r1.44 -r1.45 +--- IO/vtkBMPReader.cxx 2003/09/10 19:41:56 1.44 ++++ IO/vtkBMPReader.cxx 2003/10/19 14:38:03 1.45 +@@ -504,11 +504,11 @@ + outPtr0 += outIncr[0]; + } + // move to the next row in the file and data +- self->GetFile()->seekg(self->GetFile()->tellg() + streamSkip0, ios::beg); ++ self->GetFile()->seekg(static_cast<long>(self->GetFile()->tellg()) + streamSkip0, ios::beg); + outPtr1 += outIncr[1]; + } + // move to the next image in the file and data +- self->GetFile()->seekg(self->GetFile()->tellg() + streamSkip1, ios::beg); ++ self->GetFile()->seekg(static_cast<long>(self->GetFile()->tellg()) + streamSkip1, ios::beg); + outPtr2 += outIncr[2]; + } diff --git a/math/vtk43/files/patch-IO-vtkImageReader.cxx b/math/vtk43/files/patch-IO-vtkImageReader.cxx new file mode 100644 index 0000000..3e302e7 --- /dev/null +++ b/math/vtk43/files/patch-IO-vtkImageReader.cxx @@ -0,0 +1,30 @@ +diff -u -r1.109 -r1.110 +--- IO/vtkImageReader.cxx 2002/12/26 18:18:50 1.109 ++++ IO/vtkImageReader.cxx 2003/10/19 14:38:03 1.110 +@@ -166,7 +166,7 @@ + streamStart += this->GetHeaderSize(idx); + + // error checking +- this->File->seekg((long)streamStart, ios::beg); ++ this->File->seekg(static_cast<long>(streamStart), ios::beg); + if (this->File->fail()) + { + vtkErrorMacro(<< "File operation failed: " << streamStart << ", ext: " +@@ -366,7 +366,7 @@ + // if that happens, store the value in correction and apply later + if (filePos + streamSkip0 >= 0) + { +- self->GetFile()->seekg(self->GetFile()->tellg() + streamSkip0, ios::beg); ++ self->GetFile()->seekg(static_cast<long>(self->GetFile()->tellg()) + streamSkip0, ios::beg); + correction = 0; + } + else +@@ -376,7 +376,7 @@ + outPtr1 += outIncr[1]; + } + // move to the next image in the file and data +- self->GetFile()->seekg(self->GetFile()->tellg() + streamSkip1 + correction, ++ self->GetFile()->seekg(static_cast<long>(self->GetFile()->tellg()) + streamSkip1 + correction, + ios::beg); + outPtr2 += outIncr[2]; + } diff --git a/math/vtk43/pkg-plist b/math/vtk43/pkg-plist index 0966f85..f2d76b7f 100644 --- a/math/vtk43/pkg-plist +++ b/math/vtk43/pkg-plist @@ -42,4 +42,4 @@ lib/libvtkftgl.so.%%LIBVER%% %%DOCSDIR%%/README.html %%DOCSDIR%%/README.patented-classes %%DOCSDIR%%/vtkLogo.jpg -@dirrmtry %%DOCSDIR%% +@unexec rmdir %D/%%DOCSDIR%% 2>/dev/null || true |