diff options
-rw-r--r-- | sci-libs/opencascade/files/opencascade-7.2.0-buildsystem.patch | 57 | ||||
-rw-r--r-- | sci-libs/opencascade/opencascade-7.2.0.ebuild | 1 |
2 files changed, 58 insertions, 0 deletions
diff --git a/sci-libs/opencascade/files/opencascade-7.2.0-buildsystem.patch b/sci-libs/opencascade/files/opencascade-7.2.0-buildsystem.patch new file mode 100644 index 0000000..906fc6d --- /dev/null +++ b/sci-libs/opencascade/files/opencascade-7.2.0-buildsystem.patch @@ -0,0 +1,57 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3b713fc..ec50580 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -862,16 +862,7 @@ else() + set (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" \"\$1\" \"\$2\" \nfi") + 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%") +@@ -1041,22 +1032,19 @@ list (REMOVE_DUPLICATES OCCT_MODULES_ENABLED) + list (REMOVE_DUPLICATES OCCT_COMPILE_DEFINITIONS) + + # export compile definitions and C/C++ flags for each configuration to OpenCASCADE config files +-foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES}) +- set (SET_OpenCASCADE_COMPILE_DEFINITIONS) +- string (TOUPPER "${OCCT_CONFIGURATION}" OCCT_CONFIGURATION_UPPER) +- string (TOLOWER "${OCCT_CONFIGURATION}" OCCT_CONFIGURATION_LOWER) +- foreach(COMPILE_DEFINITION ${OCCT_COMPILE_DEFINITIONS}) +- string(REPLACE "(" "\\(" COMPILE_DEFINITION "${COMPILE_DEFINITION}") +- string(REPLACE ")" "\\)" COMPILE_DEFINITION "${COMPILE_DEFINITION}") +- set (SET_OpenCASCADE_COMPILE_DEFINITIONS "${SET_OpenCASCADE_COMPILE_DEFINITIONS}set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:${OCCT_CONFIGURATION}>:${COMPILE_DEFINITION}>)\n") +- endforeach() +- set (SET_OpenCASCADE_CMAKE_C_FLAGS "${CMAKE_C_FLAGS_${OCCT_CONFIGURATION_UPPER}}") +- set (SET_OpenCASCADE_CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_${OCCT_CONFIGURATION_UPPER}}") +- configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADECompileDefinitionsAndFlags.cmake.in" "OpenCASCADECompileDefinitionsAndFlags-${OCCT_CONFIGURATION_LOWER}.cmake" @ONLY) ++set(OCCT_CONFIGURATION ${CMAKE_BUILD_TYPE}) ++set (SET_OpenCASCADE_COMPILE_DEFINITIONS) ++string (TOUPPER "${OCCT_CONFIGURATION}" OCCT_CONFIGURATION_UPPER) ++string (TOLOWER "${OCCT_CONFIGURATION}" OCCT_CONFIGURATION_LOWER) ++foreach(COMPILE_DEFINITION ${OCCT_COMPILE_DEFINITIONS}) ++ string(REPLACE "(" "\\(" COMPILE_DEFINITION "${COMPILE_DEFINITION}") ++ string(REPLACE ")" "\\)" COMPILE_DEFINITION "${COMPILE_DEFINITION}") ++ set (SET_OpenCASCADE_COMPILE_DEFINITIONS "${SET_OpenCASCADE_COMPILE_DEFINITIONS}set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:${OCCT_CONFIGURATION}>:${COMPILE_DEFINITION}>)\n") + 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)") ++set (SET_OpenCASCADE_CMAKE_C_FLAGS "${CMAKE_C_FLAGS_${OCCT_CONFIGURATION_UPPER}}") ++set (SET_OpenCASCADE_CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_${OCCT_CONFIGURATION_UPPER}}") ++configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADECompileDefinitionsAndFlags.cmake.in" "OpenCASCADECompileDefinitionsAndFlags-${OCCT_CONFIGURATION_LOWER}.cmake" @ONLY) ++install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-${OCCT_CONFIGURATION_LOWER}.cmake" DESTINATION "${INSTALL_DIR_CMAKE}") + + foreach (OCCT_MODULE ${OCCT_MODULES}) + if (BUILD_MODULE_${OCCT_MODULE}) diff --git a/sci-libs/opencascade/opencascade-7.2.0.ebuild b/sci-libs/opencascade/opencascade-7.2.0.ebuild index 3ab5a4c..c91b0da 100644 --- a/sci-libs/opencascade/opencascade-7.2.0.ebuild +++ b/sci-libs/opencascade/opencascade-7.2.0.ebuild @@ -43,6 +43,7 @@ CHECKREQS_DISK_BUILD="3584M" PATCHES=( "${FILESDIR}"/${P}-vtk_fixes.patch + "${FILESDIR}"/${P}-buildsystem.patch ) pkg_setup() { |