summaryrefslogtreecommitdiff
path: root/sci-libs/opencascade
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/opencascade')
-rw-r--r--sci-libs/opencascade/Manifest7
-rw-r--r--sci-libs/opencascade/files/opencascade-7.4.0-find-qt.patch85
-rw-r--r--sci-libs/opencascade/files/opencascade-7.4.0-fix-install.patch133
-rw-r--r--sci-libs/opencascade/files/opencascade-7.4.0.env.in103
-rw-r--r--sci-libs/opencascade/metadata.xml27
-rw-r--r--sci-libs/opencascade/opencascade-7.4.0.ebuild140
6 files changed, 489 insertions, 6 deletions
diff --git a/sci-libs/opencascade/Manifest b/sci-libs/opencascade/Manifest
index 62bd8709ad3d..25663fc37b49 100644
--- a/sci-libs/opencascade/Manifest
+++ b/sci-libs/opencascade/Manifest
@@ -1,6 +1,11 @@
AUX opencascade-7.3.0-ffmpeg4.patch 1392 BLAKE2B ce5f6c82b34ca00c758411102d15b12bc410f98156b6281a2c50609eee05e1655e93cbd918c509b2daa6e018fb7cd107a6a8a539f9d9f19438d3cf5a7e20e3cd SHA512 447ff4039ed6ad0f01d62a4d129ff0eed77427fff11dc6303decb5e15b41dd1be305a909838c296a926ddaa8c93211995f188f95c4a70a9f9ce896e7d286929f
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
+AUX opencascade-7.4.0-find-qt.patch 3349 BLAKE2B 6520b3242927c86c4958f81f8a94e8976fb2cd262318ee7fd7e1362bb95d0d665bbf909108a0526e4d251af045f734a58ee6cfae631b14b139e1a70f7666beb3 SHA512 8d7a758f749794430267e473b6048386bb3b9e4274091f5a5662bfcbaf2c76cdf0c3c2fac4d6e8f03ea300bfe3d0258cb23b8f184de62f153d12a41746f02e75
+AUX opencascade-7.4.0-fix-install.patch 7870 BLAKE2B 4842ad5123a06a53b81ca80e4152434ee6d78a9eb5436a7a9f899651fcdb45a6f403f31bd6e4225611c1085fb91eb7a5640e5bb3fd49b71295ad0868b8e018dd SHA512 5315e82bd03a8782df8c72bbfb334d9cf739dd53f3aa22649f087c1b8b7fa5f88f7a80850c1f2e0c9dffd80a77dd99fd36e9674463535cbf48b896596c24f38e
+AUX opencascade-7.4.0.env.in 4611 BLAKE2B 3593cd4e05d33e466a975cf4641c56cd8e686310a148cc684591d3e08f8c4efd86e4df13500f11845e425b056b9c2c42f0f27a2a4d8cea524dc8fbb1c7dad703 SHA512 25f65e2b1e91fa78313334dab7d19b115bb7ff97ccefe7d18c45ab1817e12e10fdbe36babcb22e2a0d52bf7a0fbbdd2937523b773ddbb37635c1dd0d14de6253
DIST opencascade-7.3.0.tar.gz 48576720 BLAKE2B bf63ba77aabc8a8c92d694f78f24bab71c07e68e7ba4b8d5d90966733dbd9c0c83a76e35f059e798d4a60640d663330cd13a828b19ec02a5372053ab39a74aa6 SHA512 17eb1810b43a8b001867563f97801ceb38a7878fa53d9b39b46a5cf3dd676310fa80e83e90668a99ec6aff9d4f09733fb6c7be83c1e3ab4eaa9fda55888050da
+DIST opencascade-7.4.0.tar.gz 49210449 BLAKE2B c92afe7551e9a066ad0940dcf49278b556a726f0534131706b3a11cb0986ba32818e162df3982283f6815eb9d67d7e91f909485d78f2b8d638da1934ffbc2f7f SHA512 eb0d47848d48f42a159ae5d7a4144483ba1f59f634844bd2053e48e04af30a30ba7056112cd38a1730d193a8d736b898f9608dd574cbe6829dbe7257a002772a
EBUILD opencascade-7.3.0.ebuild 4410 BLAKE2B ccb199b9cde98a579d3be135c657755506f2f4950317521bc70260666f191e9176124fb98b7ae232121222da4db93db2a300eaf88e42b14bfd330d0d8ac4f3c2 SHA512 0ca80511c240296b5f5d93c1e0132eb369778205f192f8f322cacfdede1808c5700ee96ebc10afad01b2786e18f5ae64e179fd54ddb632e1cede07a20aa2da91
-MISC metadata.xml 712 BLAKE2B 6a328a6f4cf8b32a86b837826af0ecae3050d1ca662aa438062f6c67bc96842784bbdb749c350024222ee2b8fdf7940868cab57adcb003e2252e6bf54afec918 SHA512 a58adeb9c45fb1eb8cf86331a14d07bb99131d5bd963347acc79fc60a914a246dfc0156e006c898848df8373a56f7a5a5ca85c71fc4a20a7ea6477fbf6da5455
+EBUILD opencascade-7.4.0.ebuild 3766 BLAKE2B 2f997bf0370d954515dcebcada59b5df5414356539e68a0f73beb84a7923896961f63be913cb29bc5a403727b8d3a7543f6633e015a378c098d9be5db8b5a13f SHA512 b63050e4dc4d616651c10fda42af95cfd2b426fcb21ed0a674f75b630531f6dc52b3d759b634b13debaaf26d9ee64d68d2637ff8aa65e7c151a213fe2a6f116c
+MISC metadata.xml 957 BLAKE2B 609b823e60c216481f0628bf396a81b827dea3d3d7a8e96203d9243e46c110784e4dc55032773ccd808cfa10f18342b30852ad982983e86ab41a399cfc99692d SHA512 80246f152111d9bb48df691198b478f5181c51a94286e28dc0f3a037e025b403559ad2c1aebf7660693d6a6a333e058de4bc711317c45ba9491e98529bd2d5ba
diff --git a/sci-libs/opencascade/files/opencascade-7.4.0-find-qt.patch b/sci-libs/opencascade/files/opencascade-7.4.0-find-qt.patch
new file mode 100644
index 000000000000..1ebc1106a31b
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-7.4.0-find-qt.patch
@@ -0,0 +1,85 @@
+From 7304c888e57a581e9dc8ef2005e960ec579d58f4 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Sat, 9 Nov 2019 17:15:27 +0100
+Subject: [PATCH] Gentoo-specific: disable internal 3RDPARTY_QT_DIR
+
+The patch disables searching for internal 3rd-party Qt. Instead
+system installed Qt is used. The call to find_package uses REQUIRED
+flag for this.
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ adm/cmake/qt.cmake | 24 ++++++++++++------------
+ adm/cmake/qt_macro.cmake | 6 +++---
+ 2 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/adm/cmake/qt.cmake b/adm/cmake/qt.cmake
+index 6958bab5..b6a9b794 100644
+--- a/adm/cmake/qt.cmake
++++ b/adm/cmake/qt.cmake
+@@ -3,27 +3,27 @@
+ # Qt is searched manually first (just determine root)
+ message (STATUS "Processing Qt 3-rd party")
+
+-if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "")
+- FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME)
++#if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "")
++# FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME)
+
+- if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
+- message (FATAL_ERROR "... Qt root directory was not found")
+- endif()
++# if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
++# message (FATAL_ERROR "... Qt root directory was not found")
++# endif()
+
+ # Combine directory name with absolute path and show in GUI
+- set (3RDPARTY_QT_DIR "${3RDPARTY_DIR}/${3RDPARTY_QT_DIR_NAME}" CACHE PATH "The directory containing Qt" FORCE)
+- message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}")
+-endif()
++# set (3RDPARTY_QT_DIR "${3RDPARTY_DIR}/${3RDPARTY_QT_DIR_NAME}" CACHE PATH "The directory containing Qt" FORCE)
++# message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}")
++#endif()
+
+-set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}")
++#set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}")
+
+ # Now set CMAKE_PREFIX_PATH to point to local Qt installation.
+ # Without this setting find_package() will not work
+-set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR})
++#set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR})
+
+ # Now we can apply standard CMake finder for Qt5. We do this mostly
+ # to have qt5_wrap_cpp() function available and Qt5_FOUND variable filled
+-find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)
++find_package(Qt5 COMPONENTS Widgets Quick Xml REQUIRED)
+ if (NOT ${Qt5_FOUND})
+ # Now we can apply standard CMake finder for Qt. We do this mostly
+ # to have qt4_wrap_cpp() function available
+@@ -31,4 +31,4 @@ if (NOT ${Qt5_FOUND})
+ #message (STATUS "Qt4 cmake configuration")
+ else()
+ #message (STATUS "Qt5 cmake configuration")
+-endif()
+\ No newline at end of file
++endif()
+diff --git a/adm/cmake/qt_macro.cmake b/adm/cmake/qt_macro.cmake
+index ec897384..8bd314a4 100644
+--- a/adm/cmake/qt_macro.cmake
++++ b/adm/cmake/qt_macro.cmake
+@@ -2,9 +2,9 @@
+
+ macro (FIND_QT_PACKAGE PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT_INCLUDES)
+
+- if ("${3RDPARTY_QT_DIR}" STREQUAL "")
+- message (FATAL_ERROR "Empty Qt dir")
+- endif()
++# if ("${3RDPARTY_QT_DIR}" STREQUAL "")
++# message (FATAL_ERROR "Empty Qt dir")
++# endif()
+
+ if (${Qt5_FOUND})
+ #message (STATUS "Qt5 cmake configuration")
+--
+2.23.0
+
diff --git a/sci-libs/opencascade/files/opencascade-7.4.0-fix-install.patch b/sci-libs/opencascade/files/opencascade-7.4.0-fix-install.patch
new file mode 100644
index 000000000000..edf3545a74bd
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-7.4.0-fix-install.patch
@@ -0,0 +1,133 @@
+From 95c7c85f776d6e4764f2146c8385d6e29762043d Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Sat, 16 Nov 2019 18:28:11 +0100
+Subject: [PATCH] Gentoo-specific: patch installation paths
+
+Patch parts of cmake to install into proper locations and handle slotting.
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ CMakeLists.txt | 28 +++++++++++++++-------------
+ adm/cmake/occt_macros.cmake | 2 +-
+ 2 files changed, 16 insertions(+), 14 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0b445de9..1fd5779e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -15,6 +15,8 @@ macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
+ endif()
+ endmacro()
+
++SET(CMAKE_INSTALL_DO_STRIP OFF)
++
+ # include variable description
+ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vardescr")
+
+@@ -231,7 +233,7 @@ endif()
+ # place the libraries to <prefix>/lib folder for unix and leave old structure for windows
+ if (NOT DEFINED INSTALL_DIR_LIB)
+ if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
+- set (INSTALL_DIR_LIB "lib" CACHE PATH "${INSTALL_DIR_LIB_DESCR}")
++ set (INSTALL_DIR_LIB "lib${LIB_SUFFIX}" CACHE PATH "${INSTALL_DIR_LIB_DESCR}")
+ else()
+ set (INSTALL_DIR_LIB "${OS_WITH_BIT}/${COMPILER}/lib" CACHE PATH "${INSTALL_DIR_LIB_DESCR}")
+ endif()
+@@ -315,9 +317,9 @@ endif()
+ if (NOT DEFINED INSTALL_DIR_CMAKE)
+ if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
+ if (INSTALL_DIR_WITH_VERSION)
+- set (INSTALL_DIR_CMAKE "lib/cmake/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
++ set (INSTALL_DIR_CMAKE "lib${LIB_SUFFIX}/cmake/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
+ else()
+- set (INSTALL_DIR_CMAKE "lib/cmake/opencascade" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
++ set (INSTALL_DIR_CMAKE "lib${LIB_SUFFIX}/cmake/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
+ endif()
+ else()
+ set (INSTALL_DIR_CMAKE "cmake" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
+@@ -868,10 +870,10 @@ if (${DRAWEXE_INDEX} GREATER -1)
+ # copy draw script to install script folder
+ if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}")
+ install (FILES "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
++ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ else()
+ install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
++ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ endif()
+
+ # copy draw script to CMake binary folder
+@@ -892,9 +894,9 @@ 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 "${CMAKE_BINARY_DIR}/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}")
++ OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}")
+ endif()
+
+ if (WIN32)
+@@ -1067,10 +1069,10 @@ if (BUILD_TOOL_TOOLKITS)
+ # copy tinspector script to install script folder
+ if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/inspector.${SCRIPT_EXT}")
+ install (FILES "${BUILD_PATCH}/adm/templates/inspector.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
++ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ else()
+ install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/inspector.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
++ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ endif()
+
+ set (OpenCASCADE_BINARY_DIR "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
+@@ -1122,7 +1124,7 @@ foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
+ 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}/opencascade-${OCC_VERSION_STRING_EXT}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
+
+ foreach (OCCT_MODULE ${OCCT_MODULES})
+ if (BUILD_MODULE_${OCCT_MODULE})
+@@ -1163,7 +1165,7 @@ endif()
+
+ # Configure and install cmake config file
+ configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADEConfig.cmake.in" "OpenCASCADEConfig.cmake" @ONLY)
+-install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfig.cmake" DESTINATION "${INSTALL_DIR_CMAKE}")
++install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfig.cmake" DESTINATION "${INSTALL_DIR_CMAKE}/opencascade-${OCC_VERSION_STRING_EXT}")
+
+ # Configure cmake version file
+ include(CMakePackageConfigHelpers)
+@@ -1172,11 +1174,11 @@ write_basic_package_version_file( ${CMAKE_BINARY_DIR}/OpenCASCADEConfigVersion.c
+ COMPATIBILITY ExactVersion )
+
+ # Install cmake version file
+-install (FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfigVersion.cmake" DESTINATION "${INSTALL_DIR_CMAKE}")
++install (FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfigVersion.cmake" DESTINATION "${INSTALL_DIR_CMAKE}/opencascade-${OCC_VERSION_STRING_EXT}")
+
+ # Install the export set for use with the install-tree for each configuration
+ foreach (OCCT_MODULE ${OCCT_MODULES_ENABLED})
+- install(EXPORT OpenCASCADE${OCCT_MODULE}Targets DESTINATION "${INSTALL_DIR_CMAKE}")
++ install(EXPORT OpenCASCADE${OCCT_MODULE}Targets DESTINATION "${INSTALL_DIR_CMAKE}/opencascade-${OCC_VERSION_STRING_EXT}")
+ endforeach()
+
+ # Update generated OpenCASCADETargets-*.cmake files
+diff --git a/adm/cmake/occt_macros.cmake b/adm/cmake/occt_macros.cmake
+index 8220ecd5..228d801b 100644
+--- a/adm/cmake/occt_macros.cmake
++++ b/adm/cmake/occt_macros.cmake
+@@ -598,7 +598,7 @@ macro (OCCT_UPDATE_TARGET_FILE)
+ "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_CMAKE}/opencascade-${OCC_VERSION_STRING_EXT}/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}\")
+--
+2.23.0
+
diff --git a/sci-libs/opencascade/files/opencascade-7.4.0.env.in b/sci-libs/opencascade/files/opencascade-7.4.0.env.in
new file mode 100644
index 000000000000..2eefe188c1ab
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-7.4.0.env.in
@@ -0,0 +1,103 @@
+#
+# This file sets needed and optional environment variables for
+# Open CASCADE Technology
+#
+# See: https://dev.opencascade.org/doc/overview/html/index.html#OCCT_OVW_SECTION_4_2
+# for further documentation.
+#
+# Some of the values are set at compile time depending on what USE flags
+# were enabled. Those values are marked as such.
+
+# define the root directory of Open CASCADE Technology (needed)
+CASROOT=VAR_CASROOT
+# PATH and LDPATH are used to find the binaries and libraries of OCCT (needed)
+PATH=VAR_CASROOT/bin
+LDPATH=VAR_CASROOT/lib
+
+#############################################################################
+# The MMGT_* variables are used to determine how memory management will work
+# in OCCT. All of those are optional. If they are not set here, their default
+# values will be used.
+#
+# Uncomment or change the ones you need to adapt from its default.
+#############################################################################
+# MMGT_OPT = {0,1,2} (default: 0) set at compile time
+# if set to 0 (the default), every memory block is allocated in C
+# memory heap directly (via malloc() and free()). Will be set, if
+# neither the the 'optimize' nor the 'tbb' USE flags are set.
+# if set to 1, the memory manager performs it's own internal optimization.
+# Will be set, if the 'optimize' USE flag is set.
+# if set to 2, Intel(R) TBB optimized memory manager is used. Will be set,
+# if the 'tbb' USE flag is set.
+#MMGT_OPT=0
+
+# MMGT_CLEAR = {0,1} (default: 1)
+# if set to 0, memory block is returned as it is. Will be set, if the
+# 'optimize' USE flag is set
+# if set to 1, every allocated memory block is cleared by zeros
+#MMGT_CLEAR=1
+
+# MMGT_CELLSIZE (default: 200)
+# defines the maximal size of blocks allocated in large pools of memory.
+#MMGT_CELLSIZE=200
+
+# MMGT_NBPAGES (default: 10000)
+# defines the size of memory chunks allocated for small blocks in pages
+# (OS dependant)
+#MMGT_NBPAGES=10000
+
+# MMGT_THRESHOLD (default: 40000)
+# defines the maximal size of blocks that are recycled internally instead
+# of being returned to the heap.
+#MMGT_THRESHOLD=40000
+
+# MMGT_MMAP = {0,1} (default: 1)
+# if set to 0, large memory blocks will be allocated in the C heap by
+# malloc()
+# if set to 1, large memory blocks are allocated using memory mapping
+# functions of the operating system.
+#MMGT_MMAP=1
+
+# CSF_LANGUAGE (default: us) optional
+# defines the default language of messages indicated by a two-letter
+# country code. Currently it's not verified if this work with other
+# than the default languages, so we keep it commented.
+#CSF_LANGUAGE=us
+
+# CSF_DEBUG_BOP (default: undefined) optional
+# if defined then it should specify the directory where diagnostic data
+# on problems occured in Boolean operations will be saved. Not defined by
+# default.
+#
+# NOTE: Only enable for debugging purposes. If set, this variable has a
+# large impact on the performance of boolean operations.
+#CSF_DEBUG_BOP=/var/tmp
+
+# CSF_EXCEPTION_PROMPT (default: 1) optional
+# not documented upstream (maybe a flag indicating whether the user shall
+# be prompted in the case of exceptions)
+CSF_EXCEPTION_PROMPT=1
+
+# The following CSF_* variables define various directories and files where
+# OCCT is looking for resources.
+CSF_GraphicShr=VAR_CASROOT/lib/libTKOpenGl.so
+CSF_MIGRATION_TYPES=VAR_CASROOT/share/opencascade/resources/StdResource/MigrationSheet.txt
+CSF_MDTVTexturesDirectory=VAR_CASROOT/share/opencascade/resources/Textures
+CSF_PluginDefaults=VAR_CASROOT/share/opencascade/resources/StdResource
+CSF_StandardDefaults=VAR_CASROOT/share/opencascade/resources/StdResource
+CSF_StandardLiteDefaults=VAR_CASROOT/share/opencascade/resources/StdResource
+CSF_XCAFDefaults=VAR_CASROOT/share/opencascade/resources/StdResource
+CSF_XmlOcafResource=VAR_CASROOT/share/opencascade/resources/XmlOcafResource
+# The below values might be optional.
+CSF_IGESDefaults=VAR_CASROOT/share/opencascade/resources/XSTEPResource
+CSF_ShadersDirectory=VAR_CASROOT/share/opencascade/resources/Shaders
+CSF_SHMessage=VAR_CASROOT/share/opencascade/resources/SHMessage
+CSF_STEPDefaults=VAR_CASROOT/share/opencascade/resources/XSTEPResource
+CSF_UnitsDefinition=/usr/lib64/opencascade-7.3.0/ros/share/opencascade/resources/UnitsAPI/Units.dat
+CSF_XSMessage=/usr/lib64/opencascade-7.3.0/ros/share/opencascade/resources/XSMessage
+
+# TODO: check those
+# they were defined in the original ebuild but the directories and files
+# are not present in the current installation.
+#CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
+#CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
diff --git a/sci-libs/opencascade/metadata.xml b/sci-libs/opencascade/metadata.xml
index cfb5bac89f91..c601fab04b30 100644
--- a/sci-libs/opencascade/metadata.xml
+++ b/sci-libs/opencascade/metadata.xml
@@ -10,10 +10,27 @@
<name>Proxy Maintainers</name>
</maintainer>
<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 Visualization Toolkit</flag>
+ <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="inspector">
+ Build the OCCT inspector tool for low-level data inspection
+ </flag>
+ <flag name="optimize">
+ Don't clear allocated memory. Use optimized memory manager unless
+ tbb USE flag is set.
+ </flag>
+ <flag name="tbb">
+ Enable multithreading with the Intel Threads Building Block dev-cpp/tbb
+ </flag>
+ <flag name="vtk">
+ Enable Visualization Toolkit
+ </flag>
</use>
</pkgmetadata>
diff --git a/sci-libs/opencascade/opencascade-7.4.0.ebuild b/sci-libs/opencascade/opencascade-7.4.0.ebuild
new file mode 100644
index 000000000000..5c0a6496857e
--- /dev/null
+++ b/sci-libs/opencascade/opencascade-7.4.0.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# TODO:
+# check the src files referenced in 51opencascade, i.e. resources and the like
+# check where cmake gets it's '-s' linker flag to avoid pre-stripping (QA)
+
+EAPI=7
+
+inherit check-reqs cmake-utils flag-o-matic java-pkg-opt-2 multilib
+
+DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
+HOMEPAGE="https://www.opencascade.com"
+MY_PV="$(ver_rs 1- '_')"
+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"
+# gl2ps
+IUSE="debug doc examples ffmpeg freeimage gles2 inspector java optimize qt5 tbb +vtk"
+
+REQUIRED_USE="
+ inspector? ( qt5 )
+ ?? ( optimize tbb )
+"
+
+# gl2ps? ( x11-libs/gl2ps )
+RDEPEND="
+ app-eselect/eselect-opencascade
+ dev-cpp/eigen
+ 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 )
+ java? ( virtual/jdk:1.8 )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtquickcontrols2:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ )
+ tbb? ( dev-cpp/tbb )
+ vtk? ( >=sci-libs/vtk-8.1.0[rendering] )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-doc/doxygen )"
+
+# There's no easy way to test. Testing needs a rather big environment
+# properly set up.
+RESTRICT="test"
+
+CHECKREQS_MEMORY="256M"
+CHECKREQS_DISK_BUILD="3584M"
+
+CMAKE_BUILD_TYPE=Release
+
+S="${WORKDIR}/occt-V${MY_PV}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-find-qt.patch"
+ "${FILESDIR}/${P}-fix-install.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
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_DOC_Overview=$(usex doc)
+ -DBUILD_Inspector=$(usex inspector)
+ -DBUILD_WITH_DEBUG=$(usex debug)
+ -DCMAKE_CONFIGURATION_TYPES="Gentoo"
+ -DCMAKE_INSTALL_PREFIX="/usr/$(get_libdir)/${PF}/ros"
+ -DINSTALL_DIR_DOC="/usr/share/doc/${PF}"
+ -DINSTALL_DIR_CMAKE="/usr/$(get_libdir)/cmake"
+ -DINSTALL_DOC_Overview=$(usex doc)
+ -DINSTALL_SAMPLES=$(usex examples)
+ -DINSTALL_TEST_CASES=NO
+ -DUSE_D3D=no
+ -DUSE_FFMPEG=$(usex ffmpeg)
+ -DUSE_FREEIMAGE=$(usex freeimage)
+# -DUSE_GL2PS=$(usex gl2ps)
+ -DUSE_GLES2=$(usex gles2)
+ -DUSE_TBB=$(usex tbb)
+ -DUSE_VTK=$(usex vtk)
+ )
+
+ use examples && mycmakeargs+=( -DBUILD_SAMPLES_QT=$(usex qt5) )
+
+ cmake-utils_src_configure
+
+ # prepare /etc/env.d file
+ sed -e 's|VAR_CASROOT|'${EROOT%}'/usr/'$(get_libdir)'/'${P}'/ros|g' < "${FILESDIR}/${P}.env.in" >> "${T}/${PV}" || die
+ sed -i -e 's|ros/lib|ros/'$(get_libdir)'|' "${T}/${PV}" || die
+
+ # use TBB for memory allocation optimizations?
+ use tbb && (sed -i -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' "${T}/${PV}" || die)
+
+ if use optimize ; then
+ # use internal optimized memory manager?
+ sed -i -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' "${T}/${PV}" || die
+ # don't clear memory ?
+ sed -i -e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' "${T}/${PV}" || die
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # respect slotting
+ insinto "/etc/env.d/${PN}"
+ doins "${T}/${PV}"
+
+ # remove examples
+ use examples || (rm -rf "${ED}/usr/$(get_libdir)/${P}/ros/share/${PN}/samples" || die)
+ use java || (rm -rf "${ED}/usr/$(get_libdir)/${P}/ros/share/${PN}/samples/java" || die)
+ use qt5 || (rm -rf "${ED}/usr/$(get_libdir)/${P}/ros/share/${PN}/samples/qt" || die)
+}
+
+pkg_postinst() {
+ eselect ${PN} set ${PV} || die "failed to switch to updated implementation"
+ einfo "You can switch between available ${PN} implementations using eselect ${PN}"
+}