summaryrefslogtreecommitdiff
path: root/sci-libs/opencascade
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-10-27 12:48:57 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-10-27 12:48:57 +0100
commit70b82ae359a5538711e103b0e8dfb92654296644 (patch)
tree8412b84ff9ce02a22be5251052b00feefe1d5b70 /sci-libs/opencascade
parent64e107b9b6058580ff0432107eb37cefb0b2a7d8 (diff)
gentoo resync : 27.10.2018
Diffstat (limited to 'sci-libs/opencascade')
-rw-r--r--sci-libs/opencascade/Manifest6
-rw-r--r--sci-libs/opencascade/files/opencascade-7.3.0-fixed-DESTDIR.patch31
-rw-r--r--sci-libs/opencascade/files/opencascade-7.3.0-vtk-compat.patch13
-rw-r--r--sci-libs/opencascade/metadata.xml1
-rw-r--r--sci-libs/opencascade/opencascade-7.3.0.ebuild140
5 files changed, 190 insertions, 1 deletions
diff --git a/sci-libs/opencascade/Manifest b/sci-libs/opencascade/Manifest
index cd5e1e550c3f..b9dfdd42dc97 100644
--- a/sci-libs/opencascade/Manifest
+++ b/sci-libs/opencascade/Manifest
@@ -2,6 +2,10 @@ AUX opencascade-6.8.0-fixed-DESTDIR.patch 2344 BLAKE2B 6e98f59e0209213937648828e
AUX opencascade-6.9.1-vtk-6.3.patch 3686 BLAKE2B b91ca85b21aa154e467570b698bc4136c2e8fa4978f2b6ae459d8b4d2f5133d67d0bb5b8cedd158ab2a9539e9122eb9e0e50b6f8dfd45a1921ff7a14ed566b6b SHA512 8793d1384b7183a0d60dfae8c267358567e4dd16d3fcf4ade310fb63a63a2b82504f921a9700ea7d7b171b6a2b3bbcc891ed4405ea5e16579557a85301f17bf7
AUX opencascade-6.9.1-vtk-8.1.patch 2184 BLAKE2B eac2c546e909ccd5781a5f1230c0b8e2fd8c4bd857d3bb3108253d587975e31170adfa029b3087d325a1a6124ceda408c92b5579fa67c1b3ee311e2389d87c8a SHA512 6559060e4ffd8d409d9f939aa63f109343c8f60aac9e742505bbf7e68a728c68b61983a878ab4c008ffb5f09f1f359e523192dcba459e929bf202c0c15ee4e25
AUX opencascade-6.9.1-vtk-configure.patch 834 BLAKE2B 00475895b462d0396c4ab96bd645ad81f1180d04aad26e673b77d2363824740b5a0efe3bf75a587bea06a65b37a4ae2e41ceadad471eb4eb232783e3836450c0 SHA512 dbd6d3d2e520137a378dc437c37045f652d2dcf257b44647f9bc99397fde3fdecb88feaa010e1a893a6acdbe60d0e0e3ab9982b9fcd75dab95210069587445f7
+AUX opencascade-7.3.0-fixed-DESTDIR.patch 2272 BLAKE2B 30b0e045d872673ff65f00b471d9b7e5239f451329d8a0d3f0f367c811a387ef76c368eeddc3fe8d6684d7012190ae09aac66f2f91fdec7b2b4f4134b3a1463a SHA512 57e5195516d8f282c0ecd5de88e7e29f00a3748ae9ac82c74eca3b4f577dd4f4e6286e1deda424590a8c8b30cb1cd326d5c4f1634d0f7dba5bcb6ce88758a9f5
+AUX opencascade-7.3.0-vtk-compat.patch 431 BLAKE2B 468a804ed906555637110b0d7cb7a4ef994fae9130e7317e525d21598cc19b67e8c7bfaaaffea82ee8fb94a20c14b42e6ec02e2541ddfc54fc288c8d0f68fc7c SHA512 026ed3451c1c36e1f187be390773329ad011c9ebdb766b730ee04f9f9a844a307c4fefc6669c81187fd34d8264bea233680c7ee43afb566e695c3d64c37438a4
DIST opencascade-6.9.1.tgz 209589289 BLAKE2B 266d68042dbbb8c9bc5f167b9aefaf84b3f1568c25530acb36271443429e67972aae913ebcea09c9ea27164e2e3f007eb287350d7ad69486755cdcb713fdb1af SHA512 92f0fffb110344feebaba9dd4a3427419ea9e6db7b09556b7dcdb1248f2a868e3337587abf9921392435031431f3876cea4d4709fd9926604dcebbd6d26f8963
+DIST opencascade-7.3.0.tar.gz 48576720 BLAKE2B bf63ba77aabc8a8c92d694f78f24bab71c07e68e7ba4b8d5d90966733dbd9c0c83a76e35f059e798d4a60640d663330cd13a828b19ec02a5372053ab39a74aa6 SHA512 17eb1810b43a8b001867563f97801ceb38a7878fa53d9b39b46a5cf3dd676310fa80e83e90668a99ec6aff9d4f09733fb6c7be83c1e3ab4eaa9fda55888050da
EBUILD opencascade-6.9.1-r2.ebuild 5774 BLAKE2B 4f2d3cdb9b50d3941fc4c1e4348571e048f056b80f6c9da8435069a5228b234470abcfc72193bf8b75e60bffbb8dd5473bfd640ac1a33ca6179364dd1bc3a434 SHA512 6016b22ea4b1255244d4f3b62ee886278e2ce8733c57488ed4192f4aee178ef50d32179a2e03ecd510aadba8d41f108f7ce56e00e3dd2715f262314900dfc49d
-MISC metadata.xml 580 BLAKE2B 5a7b243a89950444f8c2f8115c60deabca6c4b53129dda885911e3d87125dc2e3e67f5821c95e5bd191f42b77dcbce2e0f289414dc98d90b8593932a71b15919 SHA512 5483b31f271b1492f499aec837b18dd4e5abe4e0b4ac8a4e3de17be6bd9467faa0629bd7423c9fad3a6c827eb74ecddaedf61f795a2c05757b69400ad0b68311
+EBUILD opencascade-7.3.0.ebuild 4365 BLAKE2B 23f295c3a85d8895da4d394de91a321ececece7bd3bd7d276c1170e3279b57059b88575395894b9b1ac920926efb951d8e5e66235df0915da9589ca16db729b0 SHA512 5f4cff9f0d304206aff60e4b682a8f1c9f0e0748cd10f300adda98375151f0cd28d2a3f33cb861471804d75fceef6bece50641f5f8bd961ac9f8ed53b19ff218
+MISC metadata.xml 628 BLAKE2B 890c96f583be59e59536e947e81e0c8161fafa25741dfcea265c4fa95248878b518684934c169a1c113b569b10ef9e0685e0747145f26ffaa8c045c83aa6923d SHA512 8aef8d8994a018f7351c7fb7c234dfbeccc0a46d76cd7ecd76687d42fa186d4e6b069c799584d1162b417d07ddb502bbd65349e71283927a4dea3504b79d85c3
diff --git a/sci-libs/opencascade/files/opencascade-7.3.0-fixed-DESTDIR.patch b/sci-libs/opencascade/files/opencascade-7.3.0-fixed-DESTDIR.patch
new file mode 100644
index 000000000000..c0a6363e19fd
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-7.3.0-fixed-DESTDIR.patch
@@ -0,0 +1,31 @@
+--- a/CMakeLists.txt 2016-11-25 11:50:18.000000000 +0100
++++ b/CMakeLists.txt 2017-03-18 08:44:10.406668714 +0100
+@@ -885,7 +885,7 @@ if (EXISTS "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}")
+
+ set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}")
+
+- file (WRITE "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
++ file (WRITE \"\$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}\" "${CUSTOM_CONTENT}")
+ else()
+ OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}")
+ endif()
+@@ -906,7 +906,7 @@
+ endforeach()
+ # install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration
+ install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)")
+-install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
++install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"\$ENV{DESTDIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
+
+ foreach (OCCT_MODULE ${OCCT_MODULES})
+ if (BUILD_MODULE_${OCCT_MODULE})
+--- a/adm/cmake/occt_macros.cmake 2016-11-25 11:50:18.000000000 +0100
++++ b/adm/cmake/occt_macros.cmake 2017-03-18 08:44:10.406668714 +0100
+@@ -558,7 +558,7 @@
+ "cmake_policy(PUSH)
+ cmake_policy(SET CMP0007 NEW)
+ string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE)
+- file (GLOB ALL_OCCT_TARGET_FILES \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\")
++ file (GLOB ALL_OCCT_TARGET_FILES \"\$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\")
+ foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES})
+ file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT)
+ file (REMOVE \"\${TARGET_FILENAME}\")
diff --git a/sci-libs/opencascade/files/opencascade-7.3.0-vtk-compat.patch b/sci-libs/opencascade/files/opencascade-7.3.0-vtk-compat.patch
new file mode 100644
index 000000000000..71700a57f1dc
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-7.3.0-vtk-compat.patch
@@ -0,0 +1,13 @@
+--- a/src/IVtkVTK/IVtkVTK_ShapeData.cxx 2018-09-15 01:57:25.086783255 +0300
++++ b/src/IVtkVTK/IVtkVTK_ShapeData.cxx 2018-09-15 01:58:20.877779839 +0300
+@@ -29,6 +29,10 @@
+ #pragma warning(pop)
+ #endif
+
++#ifdef vtkGenericDataArray_h
++#define InsertNextTupleValue InsertNextTypedTuple
++#endif
++
+ IMPLEMENT_STANDARD_RTTIEXT(IVtkVTK_ShapeData,IVtk_IShapeData)
+
+ //================================================================
diff --git a/sci-libs/opencascade/metadata.xml b/sci-libs/opencascade/metadata.xml
index 0dc2b1db4c13..7a267cb2e3be 100644
--- a/sci-libs/opencascade/metadata.xml
+++ b/sci-libs/opencascade/metadata.xml
@@ -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="gles2">Use OpenGL ES 2.0</flag>
<flag name="tbb">Enable multithreading with the Intel Threads Building Block dev-cpp/tbb</flag>
<flag name="vtk">Enable Virtualisation Toolkit</flag>
</use>
diff --git a/sci-libs/opencascade/opencascade-7.3.0.ebuild b/sci-libs/opencascade/opencascade-7.3.0.ebuild
new file mode 100644
index 000000000000..48f4c0775e4d
--- /dev/null
+++ b/sci-libs/opencascade/opencascade-7.3.0.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit check-reqs cmake-utils eapi7-ver java-pkg-opt-2
+
+MY_PV="$(ver_rs 1- '_')"
+
+DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
+HOMEPAGE="http://www.opencascade.com/"
+SRC_URI="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V${MY_PV};sf=tgz -> ${P}.tar.gz"
+
+LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug doc examples ffmpeg freeimage gl2ps gles2 java +tbb +vtk"
+
+RDEPEND="app-eselect/eselect-opencascade
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ dev-tcltk/itcl
+ dev-tcltk/itk
+ dev-tcltk/tix
+ media-libs/freetype:2
+ media-libs/ftgl
+ virtual/glu
+ virtual/opengl
+ x11-libs/libXmu
+ ffmpeg? ( virtual/ffmpeg )
+ freeimage? ( media-libs/freeimage )
+ gl2ps? ( x11-libs/gl2ps )
+ java? ( >=virtual/jdk-0:= )
+ tbb? ( dev-cpp/tbb )
+ vtk? ( sci-libs/vtk[rendering] )
+"
+
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+"
+
+CHECKREQS_MEMORY="256M"
+CHECKREQS_DISK_BUILD="3584M"
+
+CMAKE_BUILD_TYPE=Release
+
+S="${WORKDIR}/occt-V${MY_PV}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-vtk-compat.patch"
+ "${FILESDIR}/${P}-fixed-DESTDIR.patch"
+)
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ use java && java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+ use java && java-pkg-opt-2_src_prepare
+
+ # Do not pre-strip files
+ sed -i 's/_FLAGS_RELEASE} -s/_FLAGS_RELEASE}/g' adm/cmake/occt_defs_flags.cmake || die
+
+ # Prepare environment variables used by Opencascade
+ echo "CASROOT=${EROOT}usr/$(get_libdir)/${P}
+PATH=${EROOT}usr/$(get_libdir)/${P}/bin
+LDPATH=${EROOT}usr/$(get_libdir)/${P}/lib
+
+CSF_EXCEPTION_PROMPT=1
+CSF_GraphicShr=${EROOT}usr/$(get_libdir)/${P}/lib/libTKOpenGl.so
+CSF_IGESDefaults=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/XSTEPResource
+CSF_LANGUAGE=us
+CSF_MDTVTexturesDirectory=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/Textures
+CSF_MIGRATION_TYPES=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/StdResource/MigrationSheet.txt
+CSF_PluginDefaults=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/StdResource
+CSF_ShadersDirectory=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/Shaders
+CSF_SHMessage=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/SHMessage
+CSF_StandardDefaults=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/StdResource
+CSF_StandardLiteDefaults=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/StdResource
+CSF_STEPDefaults=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/XSTEPResource
+CSF_UnitsDefinition=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/UnitsAPI/Units.dat
+CSF_XCAFDefaults=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/StdResource
+CSF_XmlOcafResource=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/XmlOcafResource
+CSF_XSMessage=${EROOT}usr/$(get_libdir)/${P}/share/opencascade/resources/XSMessage
+
+MMGT_CLEAR=1
+# use TBB for memory allocation optimizations
+MMGT_OPT=2
+# The next MMGT_* variables are at their default values.
+# They are here for documentation, so you can change them if needed
+#MMGT_MMAP=1
+#MMGT_CELLSIZE=200
+#MMGT_NBPAGES=10000
+#MMGT_THRESHOLD=40000
+" > "${S}/${PV}"
+
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_DOC_Overview=$(usex doc)
+ -DBUILD_WITH_DEBUG=$(usex debug)
+ -DCMAKE_INSTALL_PREFIX="/usr/$(get_libdir)/${P}"
+ -DINSTALL_DIR_CMAKE="/usr/$(get_libdir)/cmake"
+ -DINSTALL_DIR_DOC="/usr/share/doc/${P}"
+ -DINSTALL_SAMPLES=$(usex examples)
+ -DUSE_FFMPEG=$(usex ffmpeg)
+ -DUSE_FREEIMAGE=$(usex freeimage)
+ -DUSE_GL2PS=$(usex gl2ps)
+ -DUSE_GLES2=$(usex gles2)
+ -DUSE_TBB=$(usex tbb)
+ -DUSE_VTK=$(usex vtk)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ fperms go-w "/usr/$(get_libdir)/${P}/bin/draw.sh"
+
+ if ! use examples; then
+ rm -rf "${ED%/}/usr/$(get_libdir)/${P}/share/${PN}/samples" || die
+ fi
+
+ insinto "/etc/env.d/${PN}"
+ doins "${S}/${PV}"
+}
+
+pkg_postinst() {
+ eselect ${PN} set ${PV}
+ elog "You can switch between available ${PN} implementations using eselect ${PN}."
+ 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."
+}