diff options
author | Bernd Waibel <waebbl@gmail.com> | 2021-02-06 10:31:51 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-05-04 22:02:02 +0000 |
commit | 2ff6f73b2c6c62702952b3e712f878c32a1597da (patch) | |
tree | 5fa2e06af1de50aaa2e8390cad300a031b6208c2 /sci-libs | |
parent | sci-libs/opencascade: fix Qt dependency (diff) | |
download | gentoo-2ff6f73b2c6c62702952b3e712f878c32a1597da.tar.gz gentoo-2ff6f73b2c6c62702952b3e712f878c32a1597da.tar.bz2 gentoo-2ff6f73b2c6c62702952b3e712f878c32a1597da.zip |
sci-libs/opencascade: bump to 7.5.1
Closes: https://bugs.gentoo.org/762775
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/20443
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
11 files changed, 477 insertions, 6 deletions
diff --git a/sci-libs/opencascade/Manifest b/sci-libs/opencascade/Manifest index 3c6a4c44796a..77c4e42f391f 100644 --- a/sci-libs/opencascade/Manifest +++ b/sci-libs/opencascade/Manifest @@ -1 +1,2 @@ DIST opencascade-7.4.0.tar.gz 49210449 BLAKE2B c92afe7551e9a066ad0940dcf49278b556a726f0534131706b3a11cb0986ba32818e162df3982283f6815eb9d67d7e91f909485d78f2b8d638da1934ffbc2f7f SHA512 eb0d47848d48f42a159ae5d7a4144483ba1f59f634844bd2053e48e04af30a30ba7056112cd38a1730d193a8d736b898f9608dd574cbe6829dbe7257a002772a +DIST opencascade-7.5.1.tar.gz 47807222 BLAKE2B b5ef30ea7c373250db3e0863f3c7fde84256b37957a482f10a462a4c4ed1a21cffbbeb10e9fc140325022d7582efbd292ed6d1016d14cb67ccf5c84d14060d5a SHA512 ebb937254ac165041ef7e1a80df8f9d2ac1d518f01b3d4b0fd6d203fe0d80bd474b85a462cccc1c74a513bd257c0b0ab7002632573f38bf72170363c7e42ed2f diff --git a/sci-libs/opencascade/files/opencascade-7.4.0.env.in b/sci-libs/opencascade/files/opencascade-7.4.0.env.in index 2eefe188c1ab..cf7cc6a724df 100644 --- a/sci-libs/opencascade/files/opencascade-7.4.0.env.in +++ b/sci-libs/opencascade/files/opencascade-7.4.0.env.in @@ -76,7 +76,7 @@ LDPATH=VAR_CASROOT/lib # 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 +#CSF_EXCEPTION_PROMPT=1 # The following CSF_* variables define various directories and files where # OCCT is looking for resources. @@ -93,8 +93,8 @@ 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 +CSF_UnitsDefinition=VAR_CASROOT/share/opencascade/resources/UnitsAPI/Units.dat +CSF_XSMessage=VAR_CASROOT/share/opencascade/resources/XSMessage # TODO: check those # they were defined in the original ebuild but the directories and files diff --git a/sci-libs/opencascade/files/opencascade-7.5.1-0001-allow-default-search-path-for-Qt5.patch b/sci-libs/opencascade/files/opencascade-7.5.1-0001-allow-default-search-path-for-Qt5.patch new file mode 100644 index 000000000000..68be3e1c8803 --- /dev/null +++ b/sci-libs/opencascade/files/opencascade-7.5.1-0001-allow-default-search-path-for-Qt5.patch @@ -0,0 +1,26 @@ +From c7d8a7374284186136d72fc285f9e55045b306fb Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl@gmail.com> +Date: Wed, 3 Feb 2021 23:31:23 +0100 +Subject: [PATCH] allow default search path for Qt5 + +Signed-off-by: Bernd Waibel <waebbl@gmail.com> +--- + adm/cmake/qt.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/adm/cmake/qt.cmake b/adm/cmake/qt.cmake +index 535e6a20..6c2141dd 100644 +--- a/adm/cmake/qt.cmake ++++ b/adm/cmake/qt.cmake +@@ -24,7 +24,7 @@ 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 +-- +2.30.0 + diff --git a/sci-libs/opencascade/files/opencascade-7.5.1-0002-remove-unnecessary-Qt5-check.patch b/sci-libs/opencascade/files/opencascade-7.5.1-0002-remove-unnecessary-Qt5-check.patch new file mode 100644 index 000000000000..91d5c66c7614 --- /dev/null +++ b/sci-libs/opencascade/files/opencascade-7.5.1-0002-remove-unnecessary-Qt5-check.patch @@ -0,0 +1,28 @@ +From dcf67dbc486a97256ea6df7b968f69346e7b3dba Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl@gmail.com> +Date: Wed, 3 Feb 2021 23:45:27 +0100 +Subject: [PATCH] remove unnecessary Qt5 check + +Signed-off-by: Bernd Waibel <waebbl@gmail.com> +--- + adm/cmake/qt_macro.cmake | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/adm/cmake/qt_macro.cmake b/adm/cmake/qt_macro.cmake +index ec897384..363d9c52 100644 +--- a/adm/cmake/qt_macro.cmake ++++ b/adm/cmake/qt_macro.cmake +@@ -2,10 +2,6 @@ + + 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 (${Qt5_FOUND}) + #message (STATUS "Qt5 cmake configuration") + +-- +2.30.0 + diff --git a/sci-libs/opencascade/files/opencascade-7.5.1-0003-add-Gentoo-configuration-type.patch b/sci-libs/opencascade/files/opencascade-7.5.1-0003-add-Gentoo-configuration-type.patch new file mode 100644 index 000000000000..0665790d20a1 --- /dev/null +++ b/sci-libs/opencascade/files/opencascade-7.5.1-0003-add-Gentoo-configuration-type.patch @@ -0,0 +1,26 @@ +From a8aa40ec021dac8310d77bcec71ee298f6773926 Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl@gmail.com> +Date: Thu, 4 Feb 2021 22:29:57 +0100 +Subject: [PATCH] add Gentoo configuration type + +Signed-off-by: Bernd Waibel <waebbl@gmail.com> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 100d6133..887a1cd7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake") + + set (CMAKE_SUPPRESS_REGENERATION TRUE) + +-set (CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo CACHE INTERNAL "" FORCE) ++set (CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo Gentoo CACHE INTERNAL "" FORCE) + + # macro: include patched file if it exists + macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE) +-- +2.30.0 + diff --git a/sci-libs/opencascade/files/opencascade-7.5.1-0004-fix-installation-of-cmake-config-files.patch b/sci-libs/opencascade/files/opencascade-7.5.1-0004-fix-installation-of-cmake-config-files.patch new file mode 100644 index 000000000000..caace23fc2d8 --- /dev/null +++ b/sci-libs/opencascade/files/opencascade-7.5.1-0004-fix-installation-of-cmake-config-files.patch @@ -0,0 +1,40 @@ +From 8469f927963fe4bece05297c514fb2b9f9ad9b1a Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl@gmail.com> +Date: Fri, 5 Feb 2021 13:44:15 +0100 +Subject: [PATCH] fix installation of cmake config files + +Signed-off-by: Bernd Waibel <waebbl@gmail.com> +--- + CMakeLists.txt | 2 +- + adm/cmake/occt_macros.cmake | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 100d6133..bc8cdb92 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1156,7 +1156,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\" \"${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)") + + foreach (OCCT_MODULE ${OCCT_MODULES}) + if (BUILD_MODULE_${OCCT_MODULE}) +diff --git a/adm/cmake/occt_macros.cmake b/adm/cmake/occt_macros.cmake +index 0a387945..f10fe5e3 100644 +--- a/adm/cmake/occt_macros.cmake ++++ b/adm/cmake/occt_macros.cmake +@@ -592,7 +592,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 \"${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}\") +-- +2.30.0 + diff --git a/sci-libs/opencascade/files/opencascade-7.5.1-0005-fix-write-permissions-on-scripts.patch b/sci-libs/opencascade/files/opencascade-7.5.1-0005-fix-write-permissions-on-scripts.patch new file mode 100644 index 000000000000..1cb397e0a976 --- /dev/null +++ b/sci-libs/opencascade/files/opencascade-7.5.1-0005-fix-write-permissions-on-scripts.patch @@ -0,0 +1,43 @@ +From 5f7db00bfc56d497a1897102a5ddd5bdddd72942 Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl-gentoo@posteo.net> +Date: Fri, 16 Apr 2021 01:04:24 +0200 +Subject: [PATCH] fix write permissions on scripts + +Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> +--- + CMakeLists.txt | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 100d6133..e9e8fb29 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -890,10 +890,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 +@@ -1101,10 +1101,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}") +-- +2.31.1 + diff --git a/sci-libs/opencascade/files/opencascade-7.5.1-0006-fix-creation-of-custom.sh-script.patch b/sci-libs/opencascade/files/opencascade-7.5.1-0006-fix-creation-of-custom.sh-script.patch new file mode 100644 index 000000000000..0ab023693e65 --- /dev/null +++ b/sci-libs/opencascade/files/opencascade-7.5.1-0006-fix-creation-of-custom.sh-script.patch @@ -0,0 +1,34 @@ +From 0df9b2c485da92c6e9fdd6d4b5ea1ec6588bd66f Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl-gentoo@posteo.net> +Date: Fri, 16 Apr 2021 14:32:24 +0200 +Subject: [PATCH] fix creation of custom.sh script + +Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> +--- + CMakeLists.txt | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 100d6133..7799b73a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -909,15 +909,7 @@ else() + endif() + + # change custom.bat/sh +-if (EXISTS "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}") +- file (READ "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT) +- +- set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}") +- +- file (WRITE "${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() ++OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}") + + if (WIN32) + set (THIRDPARTY_DIR_REPLACE "%THIRDPARTY_DIR%") +-- +2.31.1 + diff --git a/sci-libs/opencascade/files/opencascade-7.5.env.in b/sci-libs/opencascade/files/opencascade-7.5.env.in new file mode 100644 index 000000000000..50766cbb6bb1 --- /dev/null +++ b/sci-libs/opencascade/files/opencascade-7.5.env.in @@ -0,0 +1,102 @@ +# +# 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=VAR_CASROOT/lib/opencascade-VAR_PV/bin +LDPATH=VAR_CASROOT/lib/opencascade-VAR_PV + +############################################################################# +# 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/opencascade-VAR_PV/libTKOpenGl.so +CSF_MIGRATION_TYPES=VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource/MigrationSheet.txt +CSF_MDTVTexturesDirectory=VAR_CASROOT/share/opencascade-VAR_PV/resources/Textures +CSF_PluginDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource +CSF_StandardDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource +CSF_StandardLiteDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource +CSF_XCAFDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource +CSF_XmlOcafResource=VAR_CASROOT/share/opencascade-VAR_PV/resources/XmlOcafResource +# The below values might be optional. +CSF_IGESDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/XSTEPResource +CSF_ShadersDirectory=VAR_CASROOT/share/opencascade-VAR_PV/resources/Shaders +CSF_SHMessage=VAR_CASROOT/share/opencascade-VAR_PV/resources/SHMessage +CSF_STEPDefaults=VAR_CASROOT/share/opencascade-VAR_PV/resources/XSTEPResource +CSF_UnitsDefinition=VAR_CASROOT/share/opencascade-VAR_PV/resources/UnitsAPI/Units.dat +CSF_XSMessage=VAR_CASROOT/share/opencascade-VAR_PV/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 aa017491b603..9477ecff1347 100644 --- a/sci-libs/opencascade/metadata.xml +++ b/sci-libs/opencascade/metadata.xml @@ -11,7 +11,7 @@ </maintainer> <use> <flag name="freeimage"> - Enable support for image i/o via media-libs/freeimage + Enable support for image i/o via <pkg>media-libs/freeimage</pkg> </flag> <flag name="gles2"> Use OpenGL ES 2.0 @@ -19,15 +19,19 @@ <flag name="inspector"> Build the OCCT inspector tool for low-level data inspection </flag> + <flag name="json"> + Enable JSON support through <pkg>dev-libs/rapidjson</pkg> + </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 + Enable multithreading with the Intel Threads Building Block + <pkg>dev-cpp/tbb</pkg> </flag> <flag name="vtk"> - Enable Visualization Toolkit + Enable Visualization Toolkit support via <pkg>sci-libs/vtk</pkg> </flag> </use> </pkgmetadata> diff --git a/sci-libs/opencascade/opencascade-7.5.1.ebuild b/sci-libs/opencascade/opencascade-7.5.1.ebuild new file mode 100644 index 000000000000..474b381f5561 --- /dev/null +++ b/sci-libs/opencascade/opencascade-7.5.1.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2021 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 + +EAPI=7 + +inherit cmake flag-o-matic + +MY_PV="$(ver_rs 1- '_')" +PV_MAJ="$(ver_cut 1-2)" + +DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange" +HOMEPAGE="https://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" +S="${WORKDIR}/occt-V${MY_PV}" + +LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" +SLOT="${PV_MAJ}" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="debug doc examples ffmpeg freeimage gles2 json optimize tbb vtk" + +REQUIRED_USE="?? ( optimize tbb )" + +# There's no easy way to test. Testing needs a rather big environment +# properly set up. +RESTRICT="test" + +RDEPEND=" + app-eselect/eselect-opencascade + dev-cpp/eigen + dev-lang/tcl:0= + dev-lang/tk:0= + dev-libs/rapidjson + dev-tcltk/itcl + dev-tcltk/itk + dev-tcltk/tix + media-libs/fontconfig + media-libs/freetype:2 + media-libs/ftgl + virtual/glu + virtual/opengl + x11-libs/libXmu + examples? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtquickcontrols2:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + ) + ffmpeg? ( media-video/ffmpeg ) + freeimage? ( media-libs/freeimage ) + json? ( dev-libs/rapidjson ) + tbb? ( dev-cpp/tbb ) + vtk? ( >=sci-libs/vtk-8.1.0[rendering] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( app-doc/doxygen ) + examples? ( dev-qt/linguist-tools:5 ) +" + +PATCHES=( + "${FILESDIR}"/${P}-0001-allow-default-search-path-for-Qt5.patch + "${FILESDIR}"/${P}-0002-remove-unnecessary-Qt5-check.patch + "${FILESDIR}"/${P}-0003-add-Gentoo-configuration-type.patch + "${FILESDIR}"/${P}-0004-fix-installation-of-cmake-config-files.patch + "${FILESDIR}"/${P}-0005-fix-write-permissions-on-scripts.patch + "${FILESDIR}"/${P}-0006-fix-creation-of-custom.sh-script.patch +) + +src_prepare() { + cmake_src_prepare + + if use debug; then + append-cppflags -DDEBUG + append-flags -g + fi + + sed -e 's/\/lib\$/\/'$(get_libdir)'\$/' \ + -i adm/templates/OpenCASCADEConfig.cmake.in || die +} + +src_configure() { + local mycmakeargs=( + -DBUILD_DOC_Overview=$(usex doc) + -DBUILD_Inspector=$(usex examples) + -DBUILD_WITH_DEBUG=$(usex debug) + -DCMAKE_INSTALL_PREFIX="/usr" + -DINSTALL_DIR_BIN="$(get_libdir)/${P}/bin" + -DINSTALL_DIR_CMAKE="$(get_libdir)/cmake/${P}" + -DINSTALL_DIR_DOC="share/doc/${PF}" + -DINSTALL_DIR_LIB="$(get_libdir)/${P}" + -DINSTALL_DIR_SCRIPT="$(get_libdir)/${P}/bin" + -DINSTALL_DIR_WITH_VERSION=ON + -DINSTALL_SAMPLES=$(usex examples) + -DINSTALL_TEST_CASES=NO + -DUSE_D3D=NO + -DUSE_FFMPEG=$(usex ffmpeg) + -DUSE_FREEIMAGE=$(usex freeimage) + -DUSE_FREETYPE=ON + -DUSE_GLES2=$(usex gles2) + -DUSE_RAPIDJSON=$(usex json) + -DUSE_TBB=$(usex tbb) + -DUSE_VTK=$(usex vtk) + ) + + use doc && mycmakeargs+=( -DINSTALL_DOC_Overview=ON ) + + if use examples; then + mycmakeargs+=( + -D3RDPARTY_QT_DIR="${ESYSROOT}"/usr + -DBUILD_SAMPLES_QT=ON + ) + fi + + if use vtk; then + if has_version ">=sci-libs/vtk-9.0.0"; then + mycmakeargs+=( + -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr + -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0 + -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) + ) + fi + fi + + cmake_src_configure + + prepare_env_file() { + # prepare /etc/env.d file + sed -e 's|VAR_CASROOT|'${ESYSROOT}'/usr|g' < "${FILESDIR}/${PN}-${PV_MAJ}.env.in" >> "${T}/${PV_MAJ}" || die + sed -e 's|lib/|'$(get_libdir)'/|g' -i "${T}/${PV_MAJ}" || die + sed -e 's|VAR_PV|'${PV}'|g' -i "${T}/${PV_MAJ}" || die + + # use TBB for memory allocation optimizations? + use tbb && (sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' -i "${T}/${PV_MAJ}" || die) + + if use optimize ; then + # use internal optimized memory manager? + sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' -i "${T}/${PV_MAJ}" || die + # don't clear memory ? + sed -e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' -i "${T}/${PV_MAJ}" || die + fi + } + + prepare_env_file +} + +src_install() { + use doc && docompress -x /usr/share/doc/${PF}/overview/html + cmake_src_install + + # respect slotting + insinto "/etc/env.d/${PN}" + doins "${T}/${PV_MAJ}" + + # remove examples + if use !examples; then + rm -r "${ED}/usr/share/${P}/samples" || die + fi +} + +pkg_postinst() { + eselect ${PN} set ${PV_MAJ} || die "failed to switch to updated implementation" + einfo "You can switch between available ${PN} implementations using eselect ${PN}" +} |