diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest index b122b7bdd..c976646ba 100644 --- a/sci-libs/vtk/Manifest +++ b/sci-libs/vtk/Manifest @@ -1,3 +1,2 @@ -DIST vtk-5.10.1.tar.gz 24804193 SHA256 f1a240c1f5f0d84e27b57e962f8e4a78b166b25bf4003ae16def9874947ebdbb SHA512 2e4ab39293620b553c91e2275a813ce88eaa39c7f4c3ec6041d88a71fa736ee38aad31ec66897440d4025d5c0933d16c1d421ac5b91cd8a362f6f2e6569bde22 WHIRLPOOL 4b7aef091b2a1d9c14b0f2ba9495b1809771c92c6c2c242ce3a723b43878f9c79d21214f6db8b16c726542f6375d8932c7ed50ceadc3a07724f6ecdb46492e0e -DIST vtkDocHtml-5.10.1.tar.gz 178278963 SHA256 1447d7e07a615c0c6d66cce2bfc6b2f4a6eaec03c132d13345d225ee6f309944 SHA512 c1c8bf1b3c94ab79b1661b3197788ded31c3aef5114d830866ed0a6dd90d3a6c50ed27cd7840a512065ad2b15fd8bcbc61787fbbd00216a1becb2419eb172735 WHIRLPOOL b3ba92938fb4894522c5b930767b4e4c11756e1aae1c100a42ab4a592f7d4a848ea1996b3956c26cb17cce4cb0fd43d8c92efec42a802e318439a653bcc398e9 -DIST vtkdata-5.10.1.tar.gz 88642678 SHA256 c526a5eeb73693597043a89d401ef5b8f0c6f6eddb82e03ad205f013ee9edf7c SHA512 3655ecd4bd6f05e3266c19d67c59867e12d4681e159869b7673948a8ba3966f958bd1a1ef024321b66f3ad649b80fc62e5323f8bd700d34fdd95645e7fe5ef32 WHIRLPOOL b65e533dc3a092ae4944bfd1ca850ab3b7ba95c62c654e0c03ac8c689d4270eaf58ae91519200c00b94ad3108f4ce3bc16656bf62a7e10dc627dea736594831d +DIST vtk-6.0.0.tar.gz 24170173 SHA256 426df543cffeacf21154dddcd2a6efbd91a586570a07a0db4c426d3e0acd10e4 SHA512 ac238e2d228df4fc4d324826b8729af9ab3274039d5abf834f013fb4deaddc116ba2b1b24fb93aaf4b1bfc4bb321d19bc05566883cf3db1f982c9650d77583e8 WHIRLPOOL b8619e254f97392dae01b8e2376bd70a07ce21504580d29844fcf1ab5621d85ba12bfd6047b4f90afd2b648d8b6c17e4ce5d789d6e1f84b5a4f847de5ee376b9 +DIST vtkDocHtml-6.0.0.tar.gz 204228463 SHA256 f5324c4c197b0cacd19bf1e5721bb012d753d49526e224d9f2dd7412f34e4434 SHA512 b6d5660f3ae6046c63b22b613cab6822f45f6b30a09522277e32f941c75dc48e8c92abc4d7f02b17e3f4d8e625de6dce7f000acc79e2d588a13d1577c139291a WHIRLPOOL b951c4ee62639c6bada2e02c2fceddbdb730c76d80c61a6ed013d8d9878b78a697158f41f53d68b5d62e4baa1f9ecb88e2437490da7610970622a40ecb14db1f diff --git a/sci-libs/vtk/files/vtk-5.10.1-ffmpeg-1.patch b/sci-libs/vtk/files/vtk-5.10.1-ffmpeg-1.patch deleted file mode 100644 index 2cefb1259..000000000 --- a/sci-libs/vtk/files/vtk-5.10.1-ffmpeg-1.patch +++ /dev/null @@ -1,49 +0,0 @@ -https://bugs.gentoo.org/show_bug.cgi?id=450464 - -Index: VTK5.10.1/IO/vtkFFMPEGWriter.cxx -=================================================================== ---- VTK5.10.1.orig/IO/vtkFFMPEGWriter.cxx -+++ VTK5.10.1/IO/vtkFFMPEGWriter.cxx -@@ -192,13 +192,6 @@ int vtkFFMPEGWriterInternal::Start() - c->bit_rate_tolerance = this->Writer->GetBitRateTolerance(); - } - -- //apply the chosen parameters -- if (av_set_parameters(this->avFormatContext, NULL) < 0) -- { -- vtkGenericWarningMacro (<< "Invalid output format parameters." ); -- return 0; -- } -- - //manufacture a codec with the chosen parameters - AVCodec *codec = avcodec_find_encoder(c->codec_id); - if (!codec) -@@ -259,14 +252,17 @@ int vtkFFMPEGWriterInternal::Start() - - - //Finally, open the file and start it off. -- if (url_fopen(&this->avFormatContext->pb, this->avFormatContext->filename, URL_WRONLY) < 0) -+ if (avio_open(&this->avFormatContext->pb, this->avFormatContext->filename, AVIO_FLAG_WRITE) < 0) - { - vtkGenericWarningMacro (<< "Could not open " << this->Writer->GetFileName() << "." ); - return 0; - } - this->openedFile = 1; - -- av_write_header(this->avFormatContext); -+ if(avformat_write_header(this->avFormatContext, NULL) < 0) { -+ vtkGenericWarningMacro (<< "Failed to write header." ); -+ return 0; -+ } - return 1; - } - -@@ -391,7 +387,7 @@ void vtkFFMPEGWriterInternal::End() - #ifdef VTK_FFMPEG_OLD_URL_FCLOSE - url_fclose(&this->avFormatContext->pb); - #else -- url_fclose(this->avFormatContext->pb); -+ avio_close(this->avFormatContext->pb); - #endif - this->openedFile = 0; - } diff --git a/sci-libs/vtk/files/vtk-5.10.1-freetype-hack.patch b/sci-libs/vtk/files/vtk-5.10.1-freetype-hack.patch deleted file mode 100644 index 62aa67bca..000000000 --- a/sci-libs/vtk/files/vtk-5.10.1-freetype-hack.patch +++ /dev/null @@ -1,21 +0,0 @@ -Fix compilation failure. -https://bugs.gentoo.org/show_bug.cgi?id=520310 -taken from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732059 -Index: vtk-5.8.0/CMake/FindFREETYPE.cmake -=================================================================== ---- vtk-5.8.0.orig/CMake/FindFREETYPE.cmake 2013-12-23 11:38:25.000000000 +0100 -+++ vtk-5.8.0/CMake/FindFREETYPE.cmake 2013-12-23 12:27:47.208086774 +0100 -@@ -10,9 +10,11 @@ - # also defined, but not for general use are - # FREETYPE_LIBRARY, where to find the FREETYPE library. - --FIND_PATH(FREETYPE_INCLUDE_DIR_FT2BUILD ft2build.h) -+FIND_PATH(FREETYPE_INCLUDE_DIR_FT2BUILD ft2build.h -+ /usr/include/freetype2 -+) - --FIND_PATH(FREETYPE_INCLUDE_DIR_FTHEADER freetype/config/ftheader.h -+FIND_PATH(FREETYPE_INCLUDE_DIR_FTHEADER config/ftheader.h - /usr/include/freetype2 - /usr/local/include/freetype2 - ) diff --git a/sci-libs/vtk/files/vtk-5.10.1-libav-9.patch b/sci-libs/vtk/files/vtk-5.10.1-libav-9.patch deleted file mode 100644 index eb7b71c5e..000000000 --- a/sci-libs/vtk/files/vtk-5.10.1-libav-9.patch +++ /dev/null @@ -1,117 +0,0 @@ -diff -burN VTK5.10.1.old/IO/vtkFFMPEGWriter.cxx VTK5.10.1/IO/vtkFFMPEGWriter.cxx ---- VTK5.10.1.old/IO/vtkFFMPEGWriter.cxx 2013-05-25 01:26:52.768954436 +0200 -+++ VTK5.10.1/IO/vtkFFMPEGWriter.cxx 2013-05-25 11:13:53.112672449 +0200 -@@ -60,9 +60,6 @@ - - AVStream *avStream; - -- unsigned char *codecBuf; -- int codecBufSize; -- - AVFrame *rgbInput; - AVFrame *yuvOutput; - -@@ -83,7 +80,6 @@ - - this->avStream = NULL; - -- this->codecBuf = NULL; - this->rgbInput = NULL; - this->yuvOutput = NULL; - -@@ -140,7 +136,7 @@ - strcpy(this->avFormatContext->filename, this->Writer->GetFileName()); - - //create a stream for that file -- this->avStream = av_new_stream(this->avFormatContext, 0); -+ this->avStream = avformat_new_stream(this->avFormatContext, NULL); - if (!this->avStream) - { - vtkGenericWarningMacro (<< "Could not create video stream."); -@@ -199,7 +195,7 @@ - vtkGenericWarningMacro (<< "Codec not found." ); - return 0; - } -- if (avcodec_open(c, codec) < 0) -+ if (avcodec_open2(c, codec, NULL) < 0) - { - vtkGenericWarningMacro (<< "Could not open codec."); - return 0; -@@ -207,15 +203,6 @@ - - //create buffers for the codec to work with. - -- //working compression space -- this->codecBufSize = 2*c->width*c->height*4; //hopefully this is enough -- this->codecBuf = new unsigned char[this->codecBufSize]; -- if (!this->codecBuf) -- { -- vtkGenericWarningMacro (<< "Could not make codec working space." ); -- return 0; -- } -- - //for the output of the writer's input... - this->rgbInput = avcodec_alloc_frame(); - if (!this->rgbInput) -@@ -316,38 +303,24 @@ - return 0; - } - #endif -- -+ AVPacket pkt = { 0 }; -+ int got_frame; - - //run the encoder -- int toAdd = avcodec_encode_video(cc, -- this->codecBuf, -- this->codecBufSize, -- this->yuvOutput); -+ int ret = avcodec_encode_video2(cc, -+ &pkt, -+ this->yuvOutput, -+ &got_frame); - - //dump the compressed result to file -- if (toAdd) -+ if (got_frame) - { -- //create an avpacket to output the compressed result -- AVPacket pkt; -- av_init_packet(&pkt); -- -- //to do playback at actual recorded rate, this will need more work -- pkt.pts = cc->coded_frame->pts; -- //pkt.dts = ?; not dure what decompression time stamp should be -- pkt.data = this->codecBuf; -- pkt.size = toAdd; - pkt.stream_index = this->avStream->index; -- if (cc->coded_frame->key_frame) //treat keyframes well -- { -- pkt.flags |= AV_PKT_FLAG_KEY; -- } -- pkt.duration = 0; //presentation duration in time_base units or 0 if NA -- pkt.pos = -1; //byte position in stream or -1 if NA - -- toAdd = av_write_frame(this->avFormatContext, &pkt); -+ ret = av_write_frame(this->avFormatContext, &pkt); - } - -- if (toAdd) //should not have anything left over -+ if (ret < 0) //should not have anything left over - { - vtkGenericWarningMacro (<< "Problem encoding frame." ); - return 0; -@@ -373,12 +346,6 @@ - this->rgbInput = NULL; - } - -- if (this->codecBuf) -- { -- av_free(this->codecBuf); -- this->codecBuf = NULL; -- } -- - if (this->avFormatContext) - { - if (this->openedFile) -Binary files VTK5.10.1.old/IO/.vtkFFMPEGWriter.cxx.swp and VTK5.10.1/IO/.vtkFFMPEGWriter.cxx.swp differ diff --git a/sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch b/sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch deleted file mode 100644 index ed7ec08c2..000000000 --- a/sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch +++ /dev/null @@ -1,57 +0,0 @@ - Common/vtkTclUtil.cxx | 19 ++++++++++++++----- - 1 file changed, 14 insertions(+), 5 deletions(-) - -diff --git a/Common/vtkTclUtil.cxx b/Common/vtkTclUtil.cxx -index 390b0a4..2b7bccb 100644 ---- a/Common/vtkTclUtil.cxx -+++ b/Common/vtkTclUtil.cxx -@@ -21,6 +21,12 @@ - #include - #include - -+#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6) -+#define vtkTclGetErrorLine(m) (m->errorLine) -+#else -+#define vtkTclGetErrorLine(m) (Tcl_GetErrorLine(m)) -+#endif -+ - extern "C" - { - #if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4) -@@ -490,13 +496,15 @@ VTKTCL_EXPORT void vtkTclVoidFunc(void *arg) - vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" << - arg2->command << endl << - Tcl_GetVar(arg2->interp,(char *)("errorInfo"),0) << -- " at line number " << arg2->interp->errorLine); -+ " at line number " << -+ vtkTclGetErrorLine(arg2->interp)); - } - else - { - vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" << - arg2->command << endl << -- " at line number " << arg2->interp->errorLine); -+ " at line number " << -+ vtkTclGetErrorLine(arg2->interp)); - } - } - } -@@ -723,14 +731,15 @@ void vtkTclCommand::Execute(vtkObject *, unsigned long, void *) - vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" << - this->StringCommand << endl << - Tcl_GetVar(this->Interp,(char *)("errorInfo"),0) << -- " at line number " << this->Interp->errorLine); -+ " at line number " << -+ vtkTclGetErrorLine(this->Interp)); - } - else - { - vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" << - this->StringCommand << endl << -- " at line number " << -- this->Interp->errorLine); -+ " at line number " << -+ vtkTclGetErrorLine(this->Interp)); - } - } - else if (res == -1) diff --git a/sci-libs/vtk/files/vtk-5.2.0-tcl-install.patch b/sci-libs/vtk/files/vtk-5.2.0-tcl-install.patch deleted file mode 100644 index c7da78678..000000000 --- a/sci-libs/vtk/files/vtk-5.2.0-tcl-install.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur VTK/CMakeLists.txt VTK.new/CMakeLists.txt ---- VTK/CMakeLists.txt 2008-05-13 17:50:09.000000000 -0400 -+++ VTK.new/CMakeLists.txt 2008-10-05 10:34:42.000000000 -0400 -@@ -182,7 +182,7 @@ - # Compute the proper location for installing the Tcl package. This - # must be a fixed relative path below the library install location and - # is therefore not settable by parent projects. --SET(VTK_INSTALL_TCL_DIR ${VTK_INSTALL_LIB_DIR}) -+SET(VTK_INSTALL_TCL_DIR ${VTK_INSTALL_PACKAGE_DIR}) - - IF(NOT VTK_INSTALL_JAVA_DIR) - SET(VTK_INSTALL_JAVA_DIR ${VTK_INSTALL_PACKAGE_DIR}/java) diff --git a/sci-libs/vtk/files/vtk-5.6.0-cg-path.patch b/sci-libs/vtk/files/vtk-5.6.0-cg-path.patch deleted file mode 100644 index 984bf5008..000000000 --- a/sci-libs/vtk/files/vtk-5.6.0-cg-path.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/CMake/FindCg.cmake b/CMake/FindCg.cmake -index ceb41de..5eb6003 100644 ---- a/CMake/FindCg.cmake -+++ b/CMake/FindCg.cmake -@@ -82,6 +82,7 @@ ELSE (APPLE) - FIND_PROGRAM( CG_COMPILER cgc - /usr/bin - /usr/local/bin -+ /opt/nvidia-cg-toolkit/bin - DOC "The Cg Compiler" - ) - GET_FILENAME_COMPONENT(CG_COMPILER_DIR "${CG_COMPILER}" PATH) -@@ -89,6 +90,7 @@ ELSE (APPLE) - FIND_PATH( CG_INCLUDE_PATH Cg/cg.h - /usr/include - /usr/local/include -+ /opt/nvidia-cg-toolkit/include - ${CG_COMPILER_SUPER_DIR}/include - DOC "The directory where Cg/cg.h resides" - ) -@@ -98,6 +100,7 @@ ELSE (APPLE) - /usr/lib - /usr/local/lib64 - /usr/local/lib -+ /opt/nvidia-cg-toolkit/lib - ${CG_COMPILER_SUPER_DIR}/lib64 - ${CG_COMPILER_SUPER_DIR}/lib - DOC "The Cg runtime library" -@@ -108,6 +111,7 @@ ELSE (APPLE) - /usr/lib - /usr/local/lib64 - /usr/local/lib -+ /opt/nvidia-cg-toolkit/lib - ${CG_COMPILER_SUPER_DIR}/lib64 - ${CG_COMPILER_SUPER_DIR}/lib - DOC "The Cg runtime library" diff --git a/sci-libs/vtk/files/vtk-5.6.0-odbc.patch b/sci-libs/vtk/files/vtk-5.6.0-odbc.patch deleted file mode 100644 index be24af11a..000000000 --- a/sci-libs/vtk/files/vtk-5.6.0-odbc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur CMake/FindODBC.cmake.orig CMake/FindODBC.cmake ---- CMake/FindODBC.cmake.orig 2008-10-08 13:51:36.000000000 -0400 -+++ CMake/FindODBC.cmake 2010-01-21 22:11:26.000000000 -0500 -@@ -30,7 +30,7 @@ - ) - - FIND_LIBRARY( ODBC_LIBRARY -- NAMES iodbc unixodbc -+ NAMES iodbc unixodbc odbc - PATHS - /usr/lib - /usr/lib/odbc diff --git a/sci-libs/vtk/files/vtk-5.6.1-ffmpeg.patch b/sci-libs/vtk/files/vtk-5.6.1-ffmpeg.patch deleted file mode 100644 index 34ec52885..000000000 --- a/sci-libs/vtk/files/vtk-5.6.1-ffmpeg.patch +++ /dev/null @@ -1,42 +0,0 @@ - CMake/vtkFFMPEGTestAvAlloc.cxx | 2 +- - CMake/vtkFFMPEGTestURLFClose.cxx | 2 +- - IO/vtkFFMPEGWriter.cxx | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/CMake/vtkFFMPEGTestAvAlloc.cxx b/CMake/vtkFFMPEGTestAvAlloc.cxx -index ad691e3..32489d5 100644 ---- a/CMake/vtkFFMPEGTestAvAlloc.cxx -+++ b/CMake/vtkFFMPEGTestAvAlloc.cxx -@@ -1,6 +1,6 @@ - extern "C" { - #ifdef HAS_OLD_HEADER --# include -+# include - #else - # include - #endif -diff --git a/CMake/vtkFFMPEGTestURLFClose.cxx b/CMake/vtkFFMPEGTestURLFClose.cxx -index 0bf4314..1c10a93 100644 ---- a/CMake/vtkFFMPEGTestURLFClose.cxx -+++ b/CMake/vtkFFMPEGTestURLFClose.cxx -@@ -1,6 +1,6 @@ - extern "C" { - #ifdef HAS_OLD_HEADER --# include -+# include - #else - # include - #endif -diff --git a/IO/vtkFFMPEGWriter.cxx b/IO/vtkFFMPEGWriter.cxx -index 52673ef..ffbb78f 100644 ---- a/IO/vtkFFMPEGWriter.cxx -+++ b/IO/vtkFFMPEGWriter.cxx -@@ -22,7 +22,7 @@ - - extern "C" { - #ifdef VTK_FFMPEG_HAS_OLD_HEADER --# include -+# include - #else - # include - #endif diff --git a/sci-libs/vtk/files/vtk-5.6.1-libav-0.8.patch b/sci-libs/vtk/files/vtk-5.6.1-libav-0.8.patch deleted file mode 100644 index 523919d6f..000000000 --- a/sci-libs/vtk/files/vtk-5.6.1-libav-0.8.patch +++ /dev/null @@ -1,66 +0,0 @@ -Description: Upstream changes introduced in version 5.6.1-6.1 - This patch has been created by dpkg-source during the package build. - Here's the last changelog entry, hopefully it gives details on why - those changes were made: - . - vtk (5.6.1-6.1) unstable; urgency=low - . - [ Michael Schutte ] - * Non-maintainer upload. - * Remove absolute paths to required libraries from - /usr/lib/vtk-5.6/VTKLibraryDepends.cmake after building, closes: - #506992. Due to the multiarch transition, the original behavior - frequently causes reverse build-deps to FTBFS. This change should - probably be reverted once all required libraries are multiarched. - . - [ Steve M. Robbins ] - * Override lintian diagnostic about embedded libraries ftgl and sqlite. - * IO/vtkFFMPEGWriter.cxx: Applied fix from #638246 to build with libav - 0.7. - . - The person named in the Author field signed this changelog entry. -Author: Steve M. Robbins -Bug-Debian: http://bugs.debian.org/506992 - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: , -Bug: -Bug-Debian: http://bugs.debian.org/ -Bug-Ubuntu: https://launchpad.net/bugs/ -Forwarded: -Reviewed-By: -Last-Update: - ---- vtk-5.6.1.orig/IO/vtkFFMPEGWriter.cxx -+++ vtk-5.6.1/IO/vtkFFMPEGWriter.cxx -@@ -123,7 +123,7 @@ int vtkFFMPEGWriterInternal::Start() - } - - //choose avi media file format -- this->avOutputFormat = guess_format("avi", NULL, NULL); -+ this->avOutputFormat = av_guess_format("avi", NULL, NULL); - if (!this->avOutputFormat) - { - vtkGenericWarningMacro (<< "Could not open the avi media file format."); -@@ -150,7 +150,7 @@ int vtkFFMPEGWriterInternal::Start() - //Set up the codec. - AVCodecContext *c = this->avStream->codec; - c->codec_id = (CodecID)this->avOutputFormat->video_codec; -- c->codec_type = CODEC_TYPE_VIDEO; -+ c->codec_type = AVMEDIA_TYPE_VIDEO; - c->width = this->Dim[0]; - c->height = this->Dim[1]; - c->pix_fmt = PIX_FMT_YUVJ420P; -@@ -329,7 +329,7 @@ int vtkFFMPEGWriterInternal::Write(vtkIm - pkt.stream_index = this->avStream->index; - if (cc->coded_frame->key_frame) //treat keyframes well - { -- pkt.flags |= PKT_FLAG_KEY; -+ pkt.flags |= AV_PKT_FLAG_KEY; - } - pkt.duration = 0; //presentation duration in time_base units or 0 if NA - pkt.pos = -1; //byte position in stream or -1 if NA diff --git a/sci-libs/vtk/files/vtk-5.8.0-R.patch b/sci-libs/vtk/files/vtk-5.8.0-R.patch deleted file mode 100644 index ce6dcde59..000000000 --- a/sci-libs/vtk/files/vtk-5.8.0-R.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/CMake/FindR.cmake b/CMake/FindR.cmake -index ee49570..c830db0 100644 ---- a/CMake/FindR.cmake -+++ b/CMake/FindR.cmake -@@ -18,13 +18,12 @@ IF (R_COMMAND) - ENDIF (R_COMMAND) - SET(CMAKE_FIND_APPBUNDLE ${TEMP_CMAKE_FIND_APPBUNDLE}) - --FIND_PATH(R_INCLUDE_DIR R.h PATHS /usr/local/lib /usr/local/lib64 PATH_SUFFIXES R/include DOC "Path to file R.h") -+FIND_PATH(R_INCLUDE_DIR R.h PATHS /usr/lib /usr/lib64 PATH_SUFFIXES R/include DOC "Path to file R.h") - FIND_LIBRARY(R_LIBRARY_BASE R PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "R library (example libR.a, libR.dylib, etc.).") --FIND_LIBRARY(R_LIBRARY_BLAS Rblas PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "Rblas library (example libRblas.a, libRblas.dylib, etc.).") --FIND_LIBRARY(R_LIBRARY_LAPACK Rlapack PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "Rlapack library (example libRlapack.a, libRlapack.dylib, etc.).") -+FIND_LIBRARY(R_LIBRARY_MATH Rmath PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "Rmath library (example libRmath.a, libRmath.dylib, etc.).") - FIND_LIBRARY(R_LIBRARY_READLINE readline DOC "(Optional) system readline library. Only required if the R libraries were build with readline support.") - --SET(R_LIBRARIES ${R_LIBRARY_BASE} ${R_LIBRARY_BLAS} ${R_LIBRARY_LAPACK} ${R_LIBRARY_BASE}) -+SET(R_LIBRARIES ${R_LIBRARY_BASE} ${R_LIBRARY_MATH} ${R_LIBRARY_BASE}) - IF (R_LIBRARY_READLINE) - SET(R_LIBRARIES ${R_LIBRARIES} ${R_LIBRARY_READLINE}) - ENDIF (R_LIBRARY_READLINE) -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9d4e881..1a828a4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1054,8 +1054,18 @@ IF(VTK_WRAP_JAVA) - ENDIF(JAVA_AWT_LIBRARY) - ENDIF(VTK_WRAP_JAVA) - -+IF(VTK_USE_GNU_R) -+ FIND_PACKAGE(R) -+ENDIF(VTK_USE_GNU_R) - -- -+IF(VTK_USE_BOOST) -+ if (VTK_USE_PARALLEL_BGL) -+ FIND_PACKAGE(Boost 1.39.0 REQUIRED -+ COMPONENTS mpi serialization filesystem system graph_parallel) -+ else (VTK_USE_PARALLEL_BGL) -+ FIND_PACKAGE(Boost REQUIRED) -+ endif (VTK_USE_PARALLEL_BGL) -+ENDIF(VTK_USE_BOOST) - #----------------------------------------------------------------------------- - # The entire VTK tree should use the same include path. - diff --git a/sci-libs/vtk/files/vtk-6.0.0-OpenGL.patch b/sci-libs/vtk/files/vtk-6.0.0-OpenGL.patch new file mode 100644 index 000000000..af481f13c --- /dev/null +++ b/sci-libs/vtk/files/vtk-6.0.0-OpenGL.patch @@ -0,0 +1,36 @@ +From: Marcus D. Hanwell +Date: Tue, 9 Sep 2014 17:39:13 +0000 (-0400) +Subject: Actually define GLX_GLXEXT_LEGACY to prevent the include +X-Git-Url: http://www.vtk.org/gitweb?p=VTK.git;a=commitdiff_plain;h=800282f289e3ebeb2873f7914ed560282b482448 + +Actually define GLX_GLXEXT_LEGACY to prevent the include + +Change-Id: I394afaf8a550f5c7b06ceca0898c316e5f2568c9 +--- + +diff --git a/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx b/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx +index 64c9375..7bd9f0e 100644 +--- a/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx ++++ b/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx +@@ -24,9 +24,9 @@ + + #include "vtkOpenGL.h" + +-// define GLX_GLXEXT_LEGACY to prevent glx.h to include glxext.h provided by +-// the system +-//#define GLX_GLXEXT_LEGACY ++// Define GLX_GLXEXT_LEGACY to prevent glx.h from including the glxext.h ++// provided by the system. ++#define GLX_GLXEXT_LEGACY + #include "GL/glx.h" + + #include "vtkgl.h" +@@ -34,7 +34,7 @@ + #include "vtkToolkits.h" + + #ifdef VTK_OPENGL_HAS_OSMESA +-#include ++# include + #endif + + #include "vtkCommand.h" diff --git a/sci-libs/vtk/files/vtk-6.0.0-cg-path.patch b/sci-libs/vtk/files/vtk-6.0.0-cg-path.patch new file mode 100644 index 000000000..c83a06b2f --- /dev/null +++ b/sci-libs/vtk/files/vtk-6.0.0-cg-path.patch @@ -0,0 +1,16 @@ + Utilities/MaterialLibrary/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Utilities/MaterialLibrary/CMakeLists.txt b/Utilities/MaterialLibrary/CMakeLists.txt +index 330a189..ede97be 100644 +--- a/Utilities/MaterialLibrary/CMakeLists.txt ++++ b/Utilities/MaterialLibrary/CMakeLists.txt +@@ -116,7 +116,7 @@ MACRO(get_modules modules prefix files ) + ENDMACRO(get_modules) + + SET(CMD_DEP ProcessShader) +-SET(CMD ProcessShader) ++SET(CMD ./ProcessShader.sh) + + IF (VTK_USE_CG_SHADERS) + # Create the Cg library. diff --git a/sci-libs/vtk/files/vtk-6.0.0-install.patch b/sci-libs/vtk/files/vtk-6.0.0-install.patch new file mode 100644 index 000000000..a97755ab6 --- /dev/null +++ b/sci-libs/vtk/files/vtk-6.0.0-install.patch @@ -0,0 +1,19 @@ +diff -up VTK6.0.0/CMake/vtkModuleTop.cmake.install VTK6.0.0/CMake/vtkModuleTop.cmake +--- VTK6.0.0/CMake/vtkModuleTop.cmake.install 2013-06-12 13:47:10.000000000 -0600 ++++ VTK6.0.0/CMake/vtkModuleTop.cmake 2013-07-12 16:15:15.706008475 -0600 +@@ -330,10 +330,15 @@ if (NOT VTK_INSTALL_NO_DEVELOPMENT) + CMake/pythonmodules.h.in + CMake/UseVTK.cmake + CMake/FindTCL.cmake ++ CMake/TopologicalSort.cmake + CMake/vtkTclTkMacros.cmake + CMake/vtk-forward.c.in + CMake/vtkForwardingExecutable.cmake ++ CMake/vtkGroups.cmake + CMake/vtkJavaWrapping.cmake ++ CMake/vtkMakeInstantiator.cmake ++ CMake/vtkMakeInstantiator.cxx.in ++ CMake/vtkMakeInstantiator.h.in + CMake/vtkModuleAPI.cmake + CMake/vtkModuleHeaders.cmake.in + CMake/vtkModuleInfo.cmake.in diff --git a/sci-libs/vtk/files/vtk-6.0.0-netcdf.patch b/sci-libs/vtk/files/vtk-6.0.0-netcdf.patch new file mode 100644 index 000000000..df0ef9489 --- /dev/null +++ b/sci-libs/vtk/files/vtk-6.0.0-netcdf.patch @@ -0,0 +1,75 @@ +diff -up VTK/IO/NetCDF/CMakeLists.txt.netcdf VTK/IO/NetCDF/CMakeLists.txt +--- VTK/IO/NetCDF/CMakeLists.txt.netcdf 2013-01-28 14:44:35.000000000 -0700 ++++ VTK/IO/NetCDF/CMakeLists.txt 2013-01-28 15:40:00.825176295 -0700 +@@ -10,5 +10,5 @@ set(Module_SRCS + + vtk_module_library(vtkIONetCDF ${Module_SRCS}) + +-target_link_libraries(vtkIONetCDF vtkNetCDF_cxx) ++target_link_libraries(vtkIONetCDF netcdf_c++ netcdf) + set_target_properties(vtkIONetCDF PROPERTIES LINK_INTERFACE_LIBRARIES "") +diff -up VTK/IO/ParallelNetCDF/CMakeLists.txt.netcdf VTK/IO/ParallelNetCDF/CMakeLists.txt +--- VTK/IO/ParallelNetCDF/CMakeLists.txt.netcdf 2013-01-28 14:44:35.000000000 -0700 ++++ VTK/IO/ParallelNetCDF/CMakeLists.txt 2013-01-28 15:40:00.825176295 -0700 +@@ -8,4 +8,4 @@ set(Module_SRCS + + vtk_module_library(vtkIOParallelNetCDF ${Module_SRCS}) + +-target_link_libraries(vtkIOParallelNetCDF vtkNetCDF_cxx) ++target_link_libraries(vtkIOParallelNetCDF netcdf) +diff -up VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt.netcdf VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt +--- VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt.netcdf 2013-01-28 14:44:36.000000000 -0700 ++++ VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt 2013-01-28 15:40:27.534030910 -0700 +@@ -241,7 +241,7 @@ ENDIF(APPLE) + + + VTK_ADD_LIBRARY(vtkexoIIc ${cbind_SRCS}) +-TARGET_LINK_LIBRARIES(vtkexoIIc vtkNetCDF) ++TARGET_LINK_LIBRARIES(vtkexoIIc netcdf) + + #INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake) + +diff -up VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf VTK/ThirdParty/netcdf/CMakeLists.txt +--- VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf 2013-01-28 14:44:36.000000000 -0700 ++++ VTK/ThirdParty/netcdf/CMakeLists.txt 2013-01-28 15:40:00.825176295 -0700 +@@ -1,8 +1,12 @@ + set(vtknetcdf_THIRD_PARTY 1) +-set(vtknetcdf_LIBRARIES vtkNetCDF vtkNetCDF_cxx) +-set(vtknetcdf_INCLUDE_DIRS +- ${vtknetcdf_SOURCE_DIR}/vtknetcdf/include +- ${vtknetcdf_BINARY_DIR}/vtknetcdf +- ) ++if(NOT VTK_USE_SYSTEM_NETCDF) ++ set(vtknetcdf_LIBRARIES vtkNetCDF vtkNetCDF_cxx) ++ set(vtknetcdf_INCLUDE_DIRS ++ ${vtknetcdf_SOURCE_DIR}/vtknetcdf/include ++ ${vtknetcdf_BINARY_DIR}/vtknetcdf ++ ) ++ add_subdirectory(vtknetcdf) ++else(NOT VTK_USE_SYSTEM_NETCDF) ++ set(vtknetcdf_LIBRARIES netcdf) ++endif() + vtk_module_export_info() +-add_subdirectory(vtknetcdf) +diff -up VTK/ThirdParty/netcdf/vtk_netcdfcpp.h.netcdf VTK/ThirdParty/netcdf/vtk_netcdfcpp.h +--- VTK/ThirdParty/netcdf/vtk_netcdfcpp.h.netcdf 2013-01-28 14:44:36.000000000 -0700 ++++ VTK/ThirdParty/netcdf/vtk_netcdfcpp.h 2013-01-28 15:40:00.826176289 -0700 +@@ -16,6 +16,6 @@ + #define __vtk_netcdfcpp_h + + /* Use the netcdf library configured for VTK. */ +-#include ++#include + + #endif +diff -up VTK/ThirdParty/netcdf/vtk_netcdf.h.netcdf VTK/ThirdParty/netcdf/vtk_netcdf.h +--- VTK/ThirdParty/netcdf/vtk_netcdf.h.netcdf 2013-01-28 14:44:36.000000000 -0700 ++++ VTK/ThirdParty/netcdf/vtk_netcdf.h 2013-01-28 15:40:00.826176289 -0700 +@@ -16,6 +16,6 @@ + #define __vtk_netcdf_h + + /* Use the netcdf library configured for VTK. */ +-#include ++#include + + #endif diff --git a/sci-libs/vtk/files/vtk-6.0.0-system.patch b/sci-libs/vtk/files/vtk-6.0.0-system.patch new file mode 100644 index 000000000..3e5762fe5 --- /dev/null +++ b/sci-libs/vtk/files/vtk-6.0.0-system.patch @@ -0,0 +1,27 @@ +diff -up VTK6.0.0/CMake/vtkModuleMacros.cmake.system VTK6.0.0/CMake/vtkModuleMacros.cmake +--- VTK6.0.0/CMake/vtkModuleMacros.cmake.system 2013-06-12 13:47:10.000000000 -0600 ++++ VTK6.0.0/CMake/vtkModuleMacros.cmake 2013-12-27 20:59:39.548152746 -0700 +@@ -613,7 +613,7 @@ macro(vtk_module_third_party _pkg) + message(FATAL_ERROR "Cannot specify both LIBRARIES and NO_LIBRARIES") + endif() + +- option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" OFF) ++ option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" ${VTK_USE_SYSTEM_LIBRARIES}) + mark_as_advanced(VTK_USE_SYSTEM_${_upper}) + + if(VTK_USE_SYSTEM_${_upper}) +diff -up VTK6.0.0/CMakeLists.txt.system VTK6.0.0/CMakeLists.txt +--- VTK6.0.0/CMakeLists.txt.system 2013-06-12 13:47:10.000000000 -0600 ++++ VTK6.0.0/CMakeLists.txt 2013-12-27 20:59:39.548152746 -0700 +@@ -107,6 +107,11 @@ set(VTK_INSTALL_INCLUDE_DIR_CM24 ${VTK_I + set(VTK_INSTALL_DOXYGEN_DIR_CM24 ${VTK_INSTALL_DATA_DIR}/doxygen) + + #----------------------------------------------------------------------------- ++# Do we try to use system libraries by default? ++OPTION(VTK_USE_SYSTEM_LIBRARIES "Use the system's libraries by default." OFF) ++MARK_AS_ADVANCED(VTK_USE_SYSTEM_LIBRARIES) ++ ++#----------------------------------------------------------------------------- + # The third party macros are still used in one or two third party builds. + include(vtkThirdParty) + diff --git a/sci-libs/vtk/files/vtk-6.0.0-vtkpython.patch b/sci-libs/vtk/files/vtk-6.0.0-vtkpython.patch new file mode 100644 index 000000000..f310479e8 --- /dev/null +++ b/sci-libs/vtk/files/vtk-6.0.0-vtkpython.patch @@ -0,0 +1,12 @@ +diff -up VTK6.0.0/Wrapping/Python/CMakeLists.txt.vtkpython VTK6.0.0/Wrapping/Python/CMakeLists.txt +--- VTK6.0.0/Wrapping/Python/CMakeLists.txt.vtkpython 2013-06-12 13:47:10.000000000 -0600 ++++ VTK6.0.0/Wrapping/Python/CMakeLists.txt 2013-07-26 16:44:19.954295281 -0600 +@@ -371,3 +371,8 @@ endif() + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in + ${CMAKE_CURRENT_BINARY_DIR}/setup.py @ONLY IMMEDIATE) ++ ++if(NOT VTK_INSTALL_NO_RUNTIME AND NOT VTK_INSTALL_NO_PYTHON) ++ install(TARGETS vtkpython ${VTKPYTHON_EXECUTABLE} ++ DESTINATION ${VTK_INSTALL_RUNTIME_DIR}) ++endif() diff --git a/sci-libs/vtk/metadata.xml b/sci-libs/vtk/metadata.xml index d61334b67..3c01f808b 100644 --- a/sci-libs/vtk/metadata.xml +++ b/sci-libs/vtk/metadata.xml @@ -9,9 +9,11 @@ Add support for boost - Add chemistry support Use nvidia's cg shaders - Build patented classes + Building Imaging modules + Offscreen rendering through OSMesa + Building Redering modules + Building Views modules Enable support for dev-lang/R diff --git a/sci-libs/vtk/vtk-5.10.1.ebuild b/sci-libs/vtk/vtk-5.10.1.ebuild deleted file mode 100644 index 0cb24284f..000000000 --- a/sci-libs/vtk/vtk-5.10.1.ebuild +++ /dev/null @@ -1,270 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3 - -PYTHON_DEPEND="python? 2" -WANT_CMAKE="always" - -inherit eutils flag-o-matic java-pkg-opt-2 python qt4-r2 versionator toolchain-funcs cmake-utils - -# Short package version -SPV="$(get_version_component_range 1-2)" - -DESCRIPTION="The Visualization Toolkit" -HOMEPAGE="http://www.vtk.org/" -SRC_URI=" - http://www.${PN}.org/files/release/${SPV}/${P}.tar.gz - doc? ( http://www.${PN}.org/files/release/${SPV}/${PN}DocHtml-${PV}.tar.gz ) - examples? ( http://www.${PN}.org/files/release/${SPV}/${PN}data-${PV}.tar.gz )" - -LICENSE="BSD LGPL-2" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -SLOT="0" -IUSE="boost chemistry cg doc examples ffmpeg java mpi mysql odbc patented postgres python qt4 R theora threads tk video_cards_nvidia X" - -RDEPEND=" - dev-libs/expat - dev-libs/libxml2:2 - media-libs/freetype - media-libs/libpng - media-libs/mesa - media-libs/tiff - sci-libs/hdf5 - sys-libs/zlib - virtual/jpeg - virtual/opengl - x11-libs/libX11 - x11-libs/libXmu - x11-libs/libXt - cg? ( media-gfx/nvidia-cg-toolkit ) - examples? ( - dev-qt/qtcore:4[qt3support] - dev-qt/qtgui:4[qt3support] ) - ffmpeg? ( virtual/ffmpeg ) - java? ( >=virtual/jre-1.5 ) - mpi? ( virtual/mpi[cxx,romio] ) - mysql? ( virtual/mysql ) - odbc? ( dev-db/unixODBC ) - postgres? ( dev-db/postgresql-base ) - python? ( dev-python/sip ) - qt4? ( - dev-qt/qtcore:4 - || ( ( >=dev-qt/qtgui-4.8.5:4 dev-qt/designer:4 ) > "${T}"/40${PN} <<- EOF - VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data - VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV} - VTKHOME=${EPREFIX}/usr - EOF - doenvd "${T}"/40${PN} -} - -pkg_postinst() { - if use patented; then - ewarn "Using patented code in VTK may require a license." - ewarn "For more information, please read:" - ewarn "http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq07.005.htp" - fi - - if use python; then - python_mod_optimize vtk - fi -} - -pkg_postrm() { - if use python; then - python_mod_cleanup vtk - fi -} diff --git a/sci-libs/vtk/vtk-6.0.0.ebuild b/sci-libs/vtk/vtk-6.0.0.ebuild new file mode 100644 index 000000000..e87ea3b1d --- /dev/null +++ b/sci-libs/vtk/vtk-6.0.0.ebuild @@ -0,0 +1,324 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/vtk/vtk-6.0.0.ebuild,v 1.6 2014/02/03 12:30:03 jlec Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_6,2_7} ) +CMAKE_MAKEFILE_GENERATOR=ninja + +inherit eutils flag-o-matic java-pkg-opt-2 python-single-r1 qt4-r2 versionator toolchain-funcs cmake-utils virtualx + +# Short package version +SPV="$(get_version_component_range 1-2)" + +DESCRIPTION="The Visualization Toolkit" +HOMEPAGE="http://www.vtk.org/" +SRC_URI=" + http://www.${PN}.org/files/release/${SPV}/${P/_rc/.rc}.tar.gz + doc? ( http://www.${PN}.org/files/release/${SPV}/${PN}DocHtml-${PV}.tar.gz )" + +LICENSE="BSD LGPL-2" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +SLOT="0" +IUSE=" + aqua boost cg doc examples imaging ffmpeg java mpi mysql odbc + offscreen postgres python qt4 rendering test theora tk tcl + video_cards_nvidia views R +X" + +REQUIRED_USE=" + java? ( qt4 ) + python? ( ${PYTHON_REQUIRED_USE} ) + tcl? ( rendering ) + test? ( python ) + tk? ( tcl ) + ^^ ( X aqua offscreen )" + +RDEPEND=" + dev-libs/expat + dev-libs/libxml2:2 + media-libs/freetype + media-libs/libpng + media-libs/mesa + media-libs/libtheora + media-libs/tiff + sci-libs/exodusii + sci-libs/hdf5 + sci-libs/netcdf-cxx:3 + sys-libs/zlib + virtual/jpeg + virtual/opengl + >=x11-libs/gl2ps-1.3.8 + x11-libs/libX11 + x11-libs/libXmu + x11-libs/libXt + boost? ( >=dev-libs/boost-1.40.0[mpi?] ) + cg? ( media-gfx/nvidia-cg-toolkit ) + examples? ( + dev-qt/qtcore:4 + dev-qt/qtgui:4 + sci-libs/vtkdata + ) + ffmpeg? ( virtual/ffmpeg ) + java? ( >=virtual/jre-1.5 ) + mpi? ( virtual/mpi[cxx,romio] ) + mysql? ( virtual/mysql ) + odbc? ( dev-db/unixODBC ) + offscreen? ( media-libs/mesa[osmesa] ) + postgres? ( dev-db/postgresql-base ) + python? ( + ${PYTHON_DEPS} + dev-python/sip[${PYTHON_USEDEP}] + ) + qt4? ( + dev-qt/designer:4 + dev-qt/qtcore:4 + dev-qt/qtgui:4 + dev-qt/qtopengl:4 + dev-qt/qtsql:4 + dev-qt/qtwebkit:4 + python? ( dev-python/PyQt4[${PYTHON_USEDEP}] ) + ) + tcl? ( dev-lang/tcl ) + tk? ( dev-lang/tk ) + video_cards_nvidia? ( media-video/nvidia-settings ) + R? ( dev-lang/R )" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + java? ( >=virtual/jdk-1.5 ) + test? ( sci-libs/vtkdata )" + +S="${WORKDIR}"/VTK${PV} + +PATCHES=( + "${FILESDIR}"/${P}-cg-path.patch + "${FILESDIR}"/${P}-install.patch + "${FILESDIR}"/${P}-system.patch + "${FILESDIR}"/${P}-netcdf.patch + "${FILESDIR}"/${P}-vtkpython.patch + "${FILESDIR}"/${P}-OpenGL.patch + ) + +RESTRICT=test + +pkg_setup() { + use java && java-pkg-opt-2_pkg_setup + use python && python-single-r1_pkg_setup + + append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE +} + +src_prepare() { + sed \ + -e 's:libproj4:libproj:g' \ + -e 's:lib_proj.h:lib_abi.h:g' \ + -i CMake/FindLIBPROJ4.cmake || die + + local x + for x in expat freetype gl2ps hdf5 jpeg libxml2 netcdf oggtheora png tiff zlib; do + rm -r ThirdParty/${x}/vtk${x} || die + done + + if use examples || use test; then + # Replace relative path ../../../VTKData with + # otherwise it will break on symlinks. + grep -rl '\.\./\.\./\.\./\.\./VTKData' . | xargs \ + sed \ + -e "s|\.\./\.\./\.\./\.\./VTKData|${EPREFIX}/usr/share/vtk/data|g" \ + -e "s|\.\./\.\./\.\./\.\./\.\./VTKData|${EPREFIX}/usr/share/vtk/data|g" \ + -i || die + fi + + use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm" + + cmake-utils_src_prepare +} + +src_configure() { + # general configuration + local mycmakeargs=( + -Wno-dev +# -DCMAKE_SKIP_RPATH=YES + -DVTK_DIR="${S}" + -DVTK_INSTALL_LIBRARY_DIR=$(get_libdir) + -DVTK_DATA_ROOT:PATH="${EPREFIX}/usr/share/${PN}/data" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DVTK_CUSTOM_LIBRARY_SUFFIX="" + -DBUILD_SHARED_LIBS=ON + -DVTK_USE_SYSTEM_EXPAT=ON + -DVTK_USE_SYSTEM_FREETYPE=ON + -DVTK_USE_SYSTEM_FreeType=ON + -DVTK_USE_SYSTEM_GL2PS=ON + -DVTK_USE_SYSTEM_HDF5=ON + -DVTK_USE_SYSTEM_JPEG=ON + -DVTK_USE_SYSTEM_LIBPROJ4=OFF +# -DLIBPROJ4_DIR="${EPREFIX}/usr" + -DVTK_USE_SYSTEM_LIBXML2=ON + -DVTK_USE_SYSTEM_LibXml2=ON + -DVTK_USE_SYSTEM_NETCDF=ON + -DVTK_USE_SYSTEM_OGGTHEORA=ON + -DVTK_USE_SYSTEM_PNG=ON + -DVTK_USE_SYSTEM_TIFF=ON +# -DVTK_USE_SYSTEM_XDMF2=ON + -DVTK_USE_SYSTEM_ZLIB=ON + -DVTK_USE_SYSTEM_LIBRARIES=ON + -DVTK_USE_GL2PS=ON + -DVTK_USE_PARALLEL=ON + ) + + mycmakeargs+=( + -DVTK_EXTRA_COMPILER_WARNINGS=ON + -DVTK_Group_StandAlone=ON + ) + + mycmakeargs+=( + $(cmake-utils_use_build doc DOCUMENTATION) + $(cmake-utils_use_build examples EXAMPLES) + $(cmake-utils_use_build test TESTING) + $(cmake-utils_use_build test VTK_BUILD_ALL_MODULES_FOR_TESTS) + $(cmake-utils_use doc DOCUMENTATION_HTML_HELP) + $(cmake-utils_use imaging VTK_Group_Imaging) + $(cmake-utils_use mpi VTK_Group_MPI) + $(cmake-utils_use qt4 VTK_Group_Qt) + $(cmake-utils_use rendering VTK_Group_Rendering) + $(cmake-utils_use tk VTK_Group_Tk) + $(cmake-utils_use views VTK_Group_Views) + $(cmake-utils_use java VTK_WRAP_JAVA) + $(cmake-utils_use python VTK_WRAP_PYTHON) + $(cmake-utils_use python VTK_WRAP_PYTHON_SIP) + $(cmake-utils_use tcl VTK_WRAP_TCL) +# -DVTK_BUILD_ALL_MODULES=ON + ) + + mycmakeargs+=( + $(cmake-utils_use boost VTK_USE_BOOST) + $(cmake-utils_use cg VTK_USE_CG_SHADERS) + $(cmake-utils_use odbc VTK_USE_ODBC) + $(cmake-utils_use offscreen VTK_USE_OFFSCREEN) + $(cmake-utils_use offscreen VTK_OPENGL_HAS_OSMESA) + $(cmake-utils_use theora VTK_USE_OGGTHEORA_ENCODER) + $(cmake-utils_use ffmpeg VTK_USE_FFMPEG_ENCODER) + $(cmake-utils_use video_cards_nvidia VTK_USE_NVCONTROL) + $(cmake-utils_use R Module_vtkFiltersStatisticsGnuR) + $(cmake-utils_use X VTK_USE_X) + ) + + # Apple stuff, does it really work? + mycmakeargs+=( $(cmake-utils_use aqua VTK_USE_COCOA) ) + + if use java; then +# local _ejavahome=${EPREFIX}/etc/java-config-2/current-system-vm +# +# mycmakeargs+=( +# -DJAVAC=${EPREFIX}/usr/bin/javac +# -DJAVAC=$(java-config -c) +# -DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include +# -DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include +# -DJAVA_INCLUDE_PATH2:PATH=${JAVA_HOME}/include/linux +# ) +# + if [ "${ARCH}" == "amd64" ]; then + mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so;${JAVA_HOME}/jre/lib/${ARCH}/xawt/libmawt.so" ) + else + mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/i386/libjawt.so;${JAVA_HOME}/jre/lib/i386/xawt/libmawt.so" ) + fi + fi + if use python; then + mycmakeargs+=( + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" + -DPYTHON_LIBRARY="$(python_get_library_path)" + -DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip" + -DSIP_INCLUDE_DIR="$(python_get_includedir)" + -DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)" + -DVTK_PYTHON_LIBRARY="$(python_get_library_path)" + -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${PREFIX} --root=${D}" + ) + fi + + if use qt4; then + mycmakeargs+=( + -DVTK_USE_QVTK=ON + -DVTK_USE_QVTK_OPENGL=ON + -DVTK_USE_QVTK_QTOPENGL=ON + -DQT_WRAP_CPP=ON + -DQT_WRAP_UI=ON + -DVTK_INSTALL_QT_DIR=/$(get_libdir)/qt4/plugins/designer + -DDESIRED_QT_VERSION=4 + -DQT_MOC_EXECUTABLE="${EPREFIX}/usr/bin/moc" + -DQT_UIC_EXECUTABLE="${EPREFIX}/usr/bin/uic" + -DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt4" + -DQT_QMAKE_EXECUTABLE="${EPREFIX}/usr/bin/qmake" + ) + fi + + if use R; then + mycmakeargs+=( +# -DR_LIBRARY_BLAS=$($(tc-getPKG_CONFIG) --libs blas) +# -DR_LIBRARY_LAPACK=$($(tc-getPKG_CONFIG) --libs lapack) + -DR_LIBRARY_BLAS=/usr/lib64/R/lib/libR.so + -DR_LIBRARY_LAPACK=/usr/lib64/R/lib/libR.so + ) + fi + + cmake-utils_src_configure + + cat >> "${BUILD_DIR}"/Utilities/MaterialLibrary/ProcessShader.sh <<- EOF + #!${EPREFIX}/bin/bash + + export LD_LIBRARY_PATH="${BUILD_DIR}"/lib + "${BUILD_DIR}"/bin/vtkProcessShader \$@ + EOF + chmod 750 "${BUILD_DIR}"/Utilities/MaterialLibrary/ProcessShader.sh || die +} + +src_test() { + local tcllib + ln -sf "${BUILD_DIR}"/lib "${BUILD_DIR}"/lib/Release || die + for tcllib in "${BUILD_DIR}"/lib/lib*TCL*so; do + ln -sf $(basename "${tcllib}").1 "${tcllib/.so/-${SPV}.so}" || die + done + export LD_LIBRARY_PATH="${BUILD_DIR}"/lib:"${JAVA_HOME}"/jre/lib/${ARCH}/:"${JAVA_HOME}"/jre/lib/${ARCH}/xawt/ + local VIRTUALX_COMMAND="cmake-utils_src_test" +# local VIRTUALX_COMMAND="cmake-utils_src_test -R Java" +# local VIRTUALX_COMMAND="cmake-utils_src_test -I 364,365" + virtualmake +} + +src_install() { + # install docs + HTML_DOCS=( "${S}"/README.html ) + + cmake-utils_src_install + + use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar + + if use tcl; then + # install Tcl docs + docinto vtk_tcl + dodoc "${S}"/Wrapping/Tcl/README + fi + + # install examples + if use examples; then + insinto /usr/share/${PN} + mv -v Examples examples || die + doins -r examples + fi + + #install big docs + if use doc; then + cd "${WORKDIR}"/html || die + rm -f *.md5 || die "Failed to remove superfluous hashes" + einfo "Installing API docs. This may take some time." + insinto "/usr/share/doc/${PF}/api-docs" + doins -r ./* + fi + + # environment + cat >> "${T}"/40${PN} <<- EOF + VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data + VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV} + VTKHOME=${EPREFIX}/usr + EOF + doenvd "${T}"/40${PN} +}