diff options
author | Bernd Waibel <waebbl@gmail.com> | 2019-10-19 11:17:54 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2019-11-17 09:45:47 +0200 |
commit | 4909a322be06b7abd27e2954ea5f89e5c3ffc46b (patch) | |
tree | 8f260d6dbc0f7db0857799fbafaf6d0bc413e5da /sci-libs/opencascade/files | |
parent | media-plugins/vdr-dvbhddevice: remove old ebuilds (diff) | |
download | gentoo-4909a322be06b7abd27e2954ea5f89e5c3ffc46b.tar.gz gentoo-4909a322be06b7abd27e2954ea5f89e5c3ffc46b.tar.bz2 gentoo-4909a322be06b7abd27e2954ea5f89e5c3ffc46b.zip |
sci-libs/opencascade: bump to version 7.4.0
Closes: https://bugs.gentoo.org/696596
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Bernd Waibel <waebbl@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/13596
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'sci-libs/opencascade/files')
3 files changed, 321 insertions, 0 deletions
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 |