sci-libs/opencascade: add USE=vtk (bug 557022, thanks Helmut Jarausch).
authorMichael Weber <xmw@gentoo.org>
Sun, 9 Aug 2015 13:58:26 +0000 (15:58 +0200)
committerMichael Weber <xmw@gentoo.org>
Sun, 9 Aug 2015 13:58:26 +0000 (15:58 +0200)
Package-Manager: portage-2.2.20

sci-libs/opencascade/metadata.xml
sci-libs/opencascade/opencascade-6.9.0.ebuild

index ccbd7c2de568a632c4810a7886304d0504d10ab6..7d64287a452c89d097685e12bfa81e78f0fca60c 100644 (file)
@@ -8,6 +8,7 @@
   <use>
     <flag name="freeimage">Enable support for image i/o via media-libs/freeimage</flag>
     <flag name="gl2ps">Use gl2ps PostScript printing library</flag>
-    <flag name="tbb">tEnable multithreading with the Intel Threads Building Block dev-cpp/tbb</flag>
+    <flag name="tbb">Enable multithreading with the Intel Threads Building Block dev-cpp/tbb</flag>
+    <flag name="vtk">Enable Virtualisation Toolkit</flag>
   </use>
 </pkgmetadata>
index da82dfc81b499c8b35f08d6f3c9731bbffa87b66..1f59e160992b73aba7bea922ec6bc67d6c05c151 100644 (file)
@@ -13,8 +13,9 @@ SRC_URI="http://files.opencascade.com/OCCT/OCC_${PV}_release/opencascade-${PV}.t
 LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )"
 SLOT="${PV}"
 KEYWORDS="~amd64 ~x86"
-IUSE="debug doc examples freeimage gl2ps java qt4 +tbb"
+IUSE="debug doc examples freeimage gl2ps java qt4 +tbb +vtk"
 
+MY_VTK="vtk-6.1"
 DEPEND="app-eselect/eselect-opencascade
        dev-lang/tcl:0=
        dev-lang/tk:0=
@@ -28,7 +29,8 @@ DEPEND="app-eselect/eselect-opencascade
        freeimage? ( media-libs/freeimage )
        gl2ps? ( x11-libs/gl2ps )
        java? ( virtual/jdk:= )
-       tbb? ( dev-cpp/tbb )"
+       tbb? ( dev-cpp/tbb )
+       vtk? ( =sci-libs/${MY_VTK}* )"
 RDEPEND="${DEPEND}"
 
 # http://bugs.gentoo.org/show_bug.cgi?id=352435
@@ -108,6 +110,7 @@ TCL_LIBRARY=${my_sys_lib}/tcl$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*
                -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
                -e "s:\$qt/include:\$qt/include/qt4:g"\
                -e "s:\$qt/lib:\$qt/$(get_libdir)/qt4:g"\
+               -e "/CSF_VTK_LIB=/s:-${MY_VTK/vtk-}::g" \
                -i configure.ac || die
        eautoreconf
 }
@@ -124,6 +127,8 @@ src_configure() {
                $(usex tbb "--with-tbb-include=${EROOT}usr" "") \
                $(usex tbb "--with-tbb-library=${EROOT}usr" "") \
                $(use java && echo "--with-java-include=$(java-config -O)/include" || echo "--without-java-include") \
+               $(usex vtk "--with-vtk-include=${EROOT}usr/include/${MY_VTK}" "") \
+               $(usex vtk "--with-vtk-library=${EROOT}usr/$(get_libdir)" "") \
                $(use_enable debug) \
                $(use_enable !debug production)
 }