summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2018-05-06 23:35:49 -0500
committerMatthias Maier <tamiko@gentoo.org>2018-05-06 23:35:49 -0500
commitc266961fd2437fc5bc8884e70af77e6f0edde44d (patch)
treec115ae440fed7295392013582eb8e77c77467ca0 /sci-libs/opencascade/files
parentsci-libs/opencascade: version bump to 7.2.0 (diff)
downloadtamiko-c266961fd2437fc5bc8884e70af77e6f0edde44d.tar.gz
tamiko-c266961fd2437fc5bc8884e70af77e6f0edde44d.tar.bz2
tamiko-c266961fd2437fc5bc8884e70af77e6f0edde44d.zip
sci-libs/opencascade: more fixes
Package-Manager: Portage-2.3.34, Repoman-2.3.9
Diffstat (limited to 'sci-libs/opencascade/files')
-rw-r--r--sci-libs/opencascade/files/opencascade-7.2.0-buildsystem.patch57
1 files changed, 57 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})