From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-954257-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id CF57B139694
	for <garchives@archives.gentoo.org>; Wed,  7 Jun 2017 07:09:56 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B9ACA21C08A;
	Wed,  7 Jun 2017 07:09:54 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 7EE5321C08A
	for <gentoo-commits@lists.gentoo.org>; Wed,  7 Jun 2017 07:09:54 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id D1699341A73
	for <gentoo-commits@lists.gentoo.org>; Wed,  7 Jun 2017 07:09:52 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 41FAD7467
	for <gentoo-commits@lists.gentoo.org>; Wed,  7 Jun 2017 07:09:51 +0000 (UTC)
From: "Michael Weber" <xmw@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michael Weber" <xmw@gentoo.org>
Message-ID: <1496819380.29c93fad765e6a21197b9e8cb6c3b2df2c037ab8.xmw@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/opencascade/, sci-libs/opencascade/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sci-libs/opencascade/files/opencascade-6.9.1-vtk-6.3.patch sci-libs/opencascade/files/opencascade-6.9.1-vtk-configure.patch sci-libs/opencascade/opencascade-6.9.1-r1.ebuild sci-libs/opencascade/opencascade-6.9.1-r2.ebuild
X-VCS-Directories: sci-libs/opencascade/ sci-libs/opencascade/files/
X-VCS-Committer: xmw
X-VCS-Committer-Name: Michael Weber
X-VCS-Revision: 29c93fad765e6a21197b9e8cb6c3b2df2c037ab8
X-VCS-Branch: master
Date: Wed,  7 Jun 2017 07:09:51 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 720e6df5-29c6-41aa-8068-1f59a9cc4a78
X-Archives-Hash: 506a8d93a2deecd386897d4e7e26a37a

commit:     29c93fad765e6a21197b9e8cb6c3b2df2c037ab8
Author:     Michael Weber <xmw <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  7 07:08:05 2017 +0000
Commit:     Michael Weber <xmw <AT> gentoo <DOT> org>
CommitDate: Wed Jun  7 07:09:40 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29c93fad

sci-libs/opencascade: Revbump with patches for >=sci-libs/vtk-6.3 (thanks Juergen Rose, bug 605304). EAPI 6.

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 .../files/opencascade-6.9.1-vtk-6.3.patch          | 70 ++++++++++++++++++++++
 .../files/opencascade-6.9.1-vtk-configure.patch    | 13 ++++
 sci-libs/opencascade/opencascade-6.9.1-r1.ebuild   |  9 +--
 ...6.9.1-r1.ebuild => opencascade-6.9.1-r2.ebuild} | 25 +++++---
 4 files changed, 104 insertions(+), 13 deletions(-)

diff --git a/sci-libs/opencascade/files/opencascade-6.9.1-vtk-6.3.patch b/sci-libs/opencascade/files/opencascade-6.9.1-vtk-6.3.patch
new file mode 100644
index 00000000000..e6b011b1e03
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.9.1-vtk-6.3.patch
@@ -0,0 +1,70 @@
+--- work/opencascade-6.9.1/configure.ac
++++ work/opencascade-6.9.1/configure.ac
+@@ -1044,7 +1044,7 @@
+     fi
+     if test "x$vtk_lib" != "x"; then
+       CSF_VTK_LIB="-L$vtk_lib -lvtkCommonCore -lvtkCommonDataModel -lvtkCommonExecutionModel -lvtkCommonMath -lvtkCommonTransforms "
+-      CSF_VTK_LIB="${CSF_VTK_LIB} -lvtkRenderingCore -lvtkRenderingOpenGL  -lvtkFiltersGeneral -lvtkIOCore -lvtkIOImage -lvtkImagingCore -lvtkInteractionStyle "
++      CSF_VTK_LIB="${CSF_VTK_LIB} -lvtkRenderingCore -lvtkRenderingOpenGL2  -lvtkFiltersGeneral -lvtkIOCore -lvtkIOImage -lvtkImagingCore -lvtkInteractionStyle "
+     else
+       HAVE_VTK=no
+     fi
+--- opencascade-6.9.1/src/IVtkVTK/IVtkVTK_View.cxx
++++ opencascade-6.9.1/src/IVtkVTK/IVtkVTK_View.cxx
+@@ -151,7 +151,7 @@ bool IVtkVTK_View::DisplayToWorld (const gp_XY& theDisplayPnt, gp_XYZ& theWorldP
+   myRenderer->SetDisplayPoint (theDisplayPnt.X(), theDisplayPnt.Y(), 0.0);
+   myRenderer->DisplayToWorld();
+ 
+-  vtkFloatingPointType* const aCoords = myRenderer->GetWorldPoint();
++  double* const aCoords = myRenderer->GetWorldPoint();
+   if (aCoords[3] == 0.0) // Point at infinity in homogeneous coordinates
+   {
+     return false;
+--- opencascade-6.9.1/src/IVtkTools/IVtkTools_ShapePicker.cxx
++++ opencascade-6.9.1/src/IVtkTools/IVtkTools_ShapePicker.cxx
+@@ -73,15 +73,15 @@ float IVtkTools_ShapePicker::GetTolerance( ) const
+ //  Method: convertDisplayToWorld
+ // Purpose: Convert display coordinates to world coordinates
+ //============================================================================
+-bool IVtkTools_ShapePicker::convertDisplayToWorld (vtkRenderer         *theRenderer,
+-                                                   vtkFloatingPointType theDisplayCoord[3],
+-                                                   vtkFloatingPointType theWorldCoord[3])
++bool IVtkTools_ShapePicker::convertDisplayToWorld (vtkRenderer *theRenderer,
++                                                   double theDisplayCoord[3],
++                                                   double theWorldCoord[3])
+ {
+   // Convert the selection point into world coordinates.
+   theRenderer->SetDisplayPoint (theDisplayCoord[0], theDisplayCoord[1], theDisplayCoord[2]);
+   theRenderer->DisplayToWorld();
+ 
+-  vtkFloatingPointType* const aCoords = theRenderer->GetWorldPoint();
++  double* const aCoords = theRenderer->GetWorldPoint();
+   if (aCoords[3] == 0.0)
+   {
+     return false;
+--- opencascade-6.9.1/src/IVtkTools/IVtkTools_ShapePicker.hxx
++++ opencascade-6.9.1/src/IVtkTools/IVtkTools_ShapePicker.hxx
+@@ -124,8 +124,8 @@ protected:
+ 
+   //! Convert display coordinates to world coordinates
+   static bool convertDisplayToWorld (vtkRenderer *theRenderer,
+-                                     vtkFloatingPointType theDisplayCoord[3],
+-                                     vtkFloatingPointType theWorldCoord[3] );
++                                     double theDisplayCoord[3],
++                                     double theWorldCoord[3] );
+ 
+ private: // not copyable
+   IVtkTools_ShapePicker (const IVtkTools_ShapePicker&);
+--- opencascade-6.9.1/inc/IVtkTools_ShapePicker.hxx
++++ opencascade-6.9.1/inc/IVtkTools_ShapePicker.hxx
+@@ -124,8 +124,8 @@
+ 
+   //! Convert display coordinates to world coordinates
+   static bool convertDisplayToWorld (vtkRenderer *theRenderer,
+-                                     vtkFloatingPointType theDisplayCoord[3],
+-                                     vtkFloatingPointType theWorldCoord[3] );
++                                     double theDisplayCoord[3],
++                                     double theWorldCoord[3] );
+ 
+ private: // not copyable
+   IVtkTools_ShapePicker (const IVtkTools_ShapePicker&);

diff --git a/sci-libs/opencascade/files/opencascade-6.9.1-vtk-configure.patch b/sci-libs/opencascade/files/opencascade-6.9.1-vtk-configure.patch
new file mode 100644
index 00000000000..3c2711d3813
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-6.9.1-vtk-configure.patch
@@ -0,0 +1,13 @@
+--- opencascade-6.9.1/configure.ac
++++ opencascade-6.9.1/configure.ac
+@@ -1043,8 +1043,8 @@
+       HAVE_VTK=no
+     fi
+     if test "x$vtk_lib" != "x"; then
+-      CSF_VTK_LIB="-L$vtk_lib -lvtkCommonCore-6.1 -lvtkCommonDataModel-6.1 -lvtkCommonExecutionModel-6.1 -lvtkCommonMath-6.1 -lvtkCommonTransforms-6.1 "
+-      CSF_VTK_LIB="${CSF_VTK_LIB} -lvtkRenderingCore-6.1 -lvtkRenderingOpenGL-6.1  -lvtkFiltersGeneral-6.1 -lvtkIOCore-6.1 -lvtkIOImage-6.1 -lvtkImagingCore-6.1 -lvtkInteractionStyle-6.1 "
++      CSF_VTK_LIB="-L$vtk_lib -lvtkCommonCore -lvtkCommonDataModel -lvtkCommonExecutionModel -lvtkCommonMath -lvtkCommonTransforms "
++      CSF_VTK_LIB="${CSF_VTK_LIB} -lvtkRenderingCore -lvtkRenderingOpenGL  -lvtkFiltersGeneral -lvtkIOCore -lvtkIOImage -lvtkImagingCore -lvtkInteractionStyle "
+     else
+       HAVE_VTK=no
+     fi

diff --git a/sci-libs/opencascade/opencascade-6.9.1-r1.ebuild b/sci-libs/opencascade/opencascade-6.9.1-r1.ebuild
index 02db66a9487..dd0a0cb70c1 100644
--- a/sci-libs/opencascade/opencascade-6.9.1-r1.ebuild
+++ b/sci-libs/opencascade/opencascade-6.9.1-r1.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=6
 
 inherit autotools eutils check-reqs multilib java-pkg-opt-2 flag-o-matic
 
@@ -35,16 +35,17 @@ RDEPEND="${DEPEND}"
 CHECKREQS_MEMORY="256M"
 CHECKREQS_DISK_BUILD="3584M"
 
+PATCHES=( "${FILESDIR}"/${PN}-6.8.0-fixed-DESTDIR.patch )
+
 pkg_setup() {
 	check-reqs_pkg_setup
 	java-pkg-opt-2_pkg_setup
 }
 
 src_prepare() {
-	java-pkg-opt-2_src_prepare
+	default
 
-	epatch \
-		"${FILESDIR}"/${PN}-6.8.0-fixed-DESTDIR.patch
+	java-pkg-opt-2_src_prepare
 
 	# Feed environment variables used by Opencascade compilation
 	my_install_dir=${EROOT}usr/$(get_libdir)/${P}/ros

diff --git a/sci-libs/opencascade/opencascade-6.9.1-r1.ebuild b/sci-libs/opencascade/opencascade-6.9.1-r2.ebuild
similarity index 89%
copy from sci-libs/opencascade/opencascade-6.9.1-r1.ebuild
copy to sci-libs/opencascade/opencascade-6.9.1-r2.ebuild
index 02db66a9487..3f0de66418d 100644
--- a/sci-libs/opencascade/opencascade-6.9.1-r1.ebuild
+++ b/sci-libs/opencascade/opencascade-6.9.1-r2.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=6
 
-inherit autotools eutils check-reqs multilib java-pkg-opt-2 flag-o-matic
+inherit autotools eutils check-reqs multilib java-pkg-opt-2 flag-o-matic versionator
 
 DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
 HOMEPAGE="http://www.opencascade.org/"
@@ -14,7 +14,6 @@ SLOT="${PV}"
 KEYWORDS="~amd64 ~x86"
 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=
@@ -29,22 +28,31 @@ DEPEND="app-eselect/eselect-opencascade
 	gl2ps? ( x11-libs/gl2ps )
 	java? ( >=virtual/jdk-0:= )
 	tbb? ( dev-cpp/tbb )
-	vtk? ( || ( =sci-libs/${MY_VTK}*[imaging] =sci-libs/${MY_VTK}*[qt4] =sci-libs/${MY_VTK}*[rendering] =sci-libs/${MY_VTK}*[views] =sci-libs/${MY_VTK}*[all-modules] ) )"
+	vtk? ( || ( sci-libs/vtk[imaging] sci-libs/vtk[qt4] sci-libs/vtk[rendering] sci-libs/vtk[views] sci-libs/vtk[all-modules] ) )"
 RDEPEND="${DEPEND}"
 
 CHECKREQS_MEMORY="256M"
 CHECKREQS_DISK_BUILD="3584M"
 
+PATCHES=( "${FILESDIR}"/${PN}-6.8.0-fixed-DESTDIR.patch
+	"${FILESDIR}"/${PN}-6.9.1-vtk-configure.patch )
+
 pkg_setup() {
 	check-reqs_pkg_setup
 	java-pkg-opt-2_pkg_setup
 }
 
 src_prepare() {
-	java-pkg-opt-2_src_prepare
+	default
 
-	epatch \
-		"${FILESDIR}"/${PN}-6.8.0-fixed-DESTDIR.patch
+	MY_VTK_P=$(best_version sci-libs/vtk)
+	MY_VTK_PV=${MY_VTK_P/sci-libs\/vtk-}
+	MY_VTK_SUB=vtk-$(get_version_component_range 1-2 ${MY_VTK_PV})
+	if has_version ">=sci-libs/vtk-6.3" ; then #bug 605304
+		epatch "${FILESDIR}"/${PN}-6.9.1-vtk-6.3.patch
+	fi
+
+	java-pkg-opt-2_src_prepare
 
 	# Feed environment variables used by Opencascade compilation
 	my_install_dir=${EROOT}usr/$(get_libdir)/${P}/ros
@@ -105,7 +113,6 @@ 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
 }
@@ -122,7 +129,7 @@ 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-include=${EROOT}usr/include/${MY_VTK_SUB}" "") \
 		$(usex vtk "--with-vtk-library=${EROOT}usr/$(get_libdir)" "") \
 		$(use_enable debug) \
 		$(use_enable !debug production)