aboutsummaryrefslogtreecommitdiff
path: root/math/vtk43
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2006-04-04 22:47:58 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2006-04-04 22:47:58 +0000
commit37468a2901713be858b0ef85728684adbe6429ca (patch)
treec8ca78b5c145d6479e1ef1244d79d190019e3f5b /math/vtk43
parentc894a71802d4e0afe946640bb153f84c774fc868 (diff)
downloadports-37468a2901713be858b0ef85728684adbe6429ca.tar.gz
ports-37468a2901713be858b0ef85728684adbe6429ca.zip
Notes
Diffstat (limited to 'math/vtk43')
-rw-r--r--math/vtk43/Makefile36
-rw-r--r--math/vtk43/distinfo6
-rw-r--r--math/vtk43/files/patch-IO-vtkBMPReader.cxx16
-rw-r--r--math/vtk43/files/patch-IO-vtkImageReader.cxx30
-rw-r--r--math/vtk43/pkg-plist2
5 files changed, 76 insertions, 14 deletions
diff --git a/math/vtk43/Makefile b/math/vtk43/Makefile
index 4d17b240062f..8ae868750ad2 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 9fa85691141b..b6e6a2ea58ce 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 000000000000..f82deeb825e5
--- /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 000000000000..3e302e72af59
--- /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 0966f8547f5c..f2d76b7fe19d 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