void-packages/srcpkgs/occt/patches/fix-install-dir.patch
Piraty 1b4cc7c8d4 New package: occt-7.2.0p1
Closes #13404.

Signed-off-by: Enno Boland <gottox@voidlinux.eu>
2018-04-19 08:44:54 +02:00

26 lines
1.9 KiB
Diff

# fix cmake install dir references
# source: https://aur.archlinux.org/cgit/aur.git/commit/fix-install-dir-references.patch?h=opencascade7&id=a6a582af3688e26236cf0d4469f8f782908a9ff9
--- CMakeLists.txt 2016-11-25 11:50:18.000000000 +0100
+++ CMakeLists.txt 2017-03-18 08:44:10.406668714 +0100
@@ -906,7 +906,7 @@
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}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
foreach (OCCT_MODULE ${OCCT_MODULES})
if (BUILD_MODULE_${OCCT_MODULE})
--- adm/cmake/occt_macros.cmake 2016-11-25 11:50:18.000000000 +0100
+++ adm/cmake/occt_macros.cmake 2017-03-18 08:44:10.406668714 +0100
@@ -558,7 +558,7 @@
"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}/${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}\")
<Paste>