summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2017-06-07 09:08:05 +0200
committerMichael Weber <xmw@gentoo.org>2017-06-07 09:09:40 +0200
commit29c93fad765e6a21197b9e8cb6c3b2df2c037ab8 (patch)
treea66beef4d8810a60e16d2eaf39a1e7b4e1f3c5bd /sci-libs/opencascade
parentmedia-gfx/feh: version bump to 2.19 (diff)
downloadgentoo-29c93fad765e6a21197b9e8cb6c3b2df2c037ab8.tar.gz
gentoo-29c93fad765e6a21197b9e8cb6c3b2df2c037ab8.tar.bz2
gentoo-29c93fad765e6a21197b9e8cb6c3b2df2c037ab8.zip
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
Diffstat (limited to 'sci-libs/opencascade')
-rw-r--r--sci-libs/opencascade/files/opencascade-6.9.1-vtk-6.3.patch70
-rw-r--r--sci-libs/opencascade/files/opencascade-6.9.1-vtk-configure.patch13
-rw-r--r--sci-libs/opencascade/opencascade-6.9.1-r1.ebuild9
-rw-r--r--sci-libs/opencascade/opencascade-6.9.1-r2.ebuild170
4 files changed, 258 insertions, 4 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 000000000000..e6b011b1e03b
--- /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 000000000000..3c2711d3813e
--- /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 02db66a94874..dd0a0cb70c10 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-r2.ebuild b/sci-libs/opencascade/opencascade-6.9.1-r2.ebuild
new file mode 100644
index 000000000000..3f0de66418db
--- /dev/null
+++ b/sci-libs/opencascade/opencascade-6.9.1-r2.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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/"
+SRC_URI="http://www.opencascade.com/sites/default/files/private/occt/OCC_${PV}_release/opencascade-${PV}.tgz"
+
+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 +vtk"
+
+DEPEND="app-eselect/eselect-opencascade
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ dev-tcltk/itcl
+ dev-tcltk/itk
+ dev-tcltk/tix
+ media-libs/ftgl
+ virtual/glu
+ virtual/opengl
+ x11-libs/libXmu
+ freeimage? ( media-libs/freeimage )
+ gl2ps? ( x11-libs/gl2ps )
+ java? ( >=virtual/jdk-0:= )
+ tbb? ( dev-cpp/tbb )
+ 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() {
+ default
+
+ 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
+ local my_env_install="#!/bin/sh -f
+if [ -z \"\$PATH\" ]; then
+ export PATH=VAR_CASROOT/Linux/bin
+else
+ export PATH=VAR_CASROOT/Linux/bin:\$PATH
+fi
+if [ -z \"\$LD_LIBRARY_PATH\" ]; then
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib
+else
+ export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib:\$LD_LIBRARY_PATH
+fi"
+ local my_sys_lib=${EROOT}usr/$(get_libdir)
+ local my_env="CASROOT=VAR_CASROOT
+CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
+CSF_LANGUAGE=us
+MMGT_CLEAR=1
+CSF_EXCEPTION_PROMPT=1
+CSF_SHMessage=VAR_CASROOT/src/SHMessage
+CSF_MDTVTexturesDirectory=VAR_CASROOT/src/Textures
+CSF_XSMessage=VAR_CASROOT/src/XSMessage
+CSF_StandardDefaults=VAR_CASROOT/src/StdResource
+CSF_PluginDefaults=VAR_CASROOT/src/StdResource
+CSF_XCAFDefaults=VAR_CASROOT/src/StdResource
+CSF_StandardLiteDefaults=VAR_CASROOT/src/StdResource
+CSF_GraphicShr=VAR_CASROOT/Linux/lib/libTKOpenGl.so
+CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
+CSF_UnitsDefinition=VAR_CASROOT/src/UnitsAPI/Units.dat
+CSF_IGESDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_STEPDefaults=VAR_CASROOT/src/XSTEPResource
+CSF_XmlOcafResource=VAR_CASROOT/src/XmlOcafResource
+CSF_MIGRATION_TYPES=VAR_CASROOT/src/StdResource/MigrationSheet.txt
+TCLHOME=${EROOT}usr/bin
+TCLLIBPATH=${my_sys_lib}
+ITK_LIBRARY=${my_sys_lib}/itk$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/')
+ITCL_LIBRARY=${my_sys_lib}/itcl$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/')
+TIX_LIBRARY=${my_sys_lib}/tix$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
+TK_LIBRARY=${my_sys_lib}/tk$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
+TCL_LIBRARY=${my_sys_lib}/tcl$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')"
+
+ ( echo "${my_env_install}"
+ echo "${my_env}" | sed -e "s:^:export :" ) \
+ | sed -e "s:VAR_CASROOT:${S}:g" > env.sh || die
+ source env.sh
+
+ ( echo "PATH=${my_install_dir}/lin/bin"
+ echo "LDPATH=${my_install_dir}/lin/$(get_libdir)"
+ echo "${my_env}" | sed \
+ -e "s:VAR_CASROOT:${my_install_dir}/lin:g" \
+ -e "s:/Linux/lib/:/$(get_libdir)/:g" || die
+ ) > 50${PN}
+
+ append-cxxflags "-fpermissive"
+
+ sed -e "/^AM_C_PROTOTYPES$/d" \
+ -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"\
+ -i configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --prefix=${my_install_dir}/lin --exec-prefix=${my_install_dir}/lin \
+ --with-tcl="${EROOT}usr/$(get_libdir)" --with-tk="${EROOT}usr/$(get_libdir)" \
+ --with-freetype="${EROOT}usr" \
+ --with-ftgl="${EROOT}usr" \
+ $(usex freeimage "--with-freeimage=${EROOT}usr" "") \
+ $(usex gl2ps "--with-gl2ps=${EROOT}usr" "") \
+ $(usex qt4 "--with-qt=${EROOT}usr" "") \
+ $(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_SUB}" "") \
+ $(usex vtk "--with-vtk-library=${EROOT}usr/$(get_libdir)" "") \
+ $(use_enable debug) \
+ $(use_enable !debug production)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ prune_libtool_files
+
+ # Symlinks for keeping original OpenCascade folder structure and
+ # add a link lib to $(get_libdir) if we are e.g. on amd64 multilib
+ if [ "$(get_libdir)" != "lib" ]; then
+ dosym "$(get_libdir)" "${my_install_dir}/lin/lib"
+ fi
+
+ insinto /etc/env.d/${PN}
+ newins 50${PN} ${PV}
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r data
+ doins -r samples
+ fi
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r doc/{overview,pdf,refman}
+ fi
+}
+
+pkg_postinst() {
+ eselect ${PN} set ${PV}
+ einfo
+ elog "After upgrading OpenCASCADE you may have to rebuild packages depending on it."
+ elog "You get a list by running \"equery depends sci-libs/opencascade\""
+ elog "revdep-rebuild does NOT suffice."
+ einfo
+}