aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDejauxvue <josuabloess@gmx.de>2021-03-22 23:19:06 +0100
committerGitHub <noreply@github.com>2021-03-22 15:19:06 -0700
commitc8021b4675c1c90e855464c3aa274defd5d26e5b (patch)
treecaeb90d0046dcd210e3357313193eaaf2c2dcea1
parent7524d9d4c4b723739170c2337de325087873c7d3 (diff)
downloadvcpkg-c8021b4675c1c90e855464c3aa274defd5d26e5b.tar.gz
vcpkg-c8021b4675c1c90e855464c3aa274defd5d26e5b.zip
[opencascade] fix #16252 (#16513)
* [opencascade] fix #16252 by exporting includ directories with the targets and replacing internal includes from #include "..." to #include<...> post installation * [opencascade] added port version * [opencascade] update SHA of versions/o-/opencascade.json * Update ports/opencascade/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/opencascade/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/opencascade/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * remove commented line for BUILD_INTERFACE * updated version * remove replacement of includes form #include <...> to #include "..." * update port version * added fix-install-prefix-path.patch, which was removed by #15997 * fix fix-install-prefix-path.patch * update port version * Update ports/opencascade/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * update port version * [opencascade]Revert "remove replacement of includes form #include <...> to #include "..."" also refined regex to allow white spaces between # and 'include' This reverts commit 4b362739f5e57449b3d6b1fcd6f2817b3be144a4. * [opencascade] update port version * [opencascade] change exported include directory from include/opencascade to include * [opencascade] update port version Co-authored-by: bloess <josua.bloess@uni-bayreuth.de> Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
-rw-r--r--ports/opencascade/CONTROL1
-rw-r--r--ports/opencascade/fix-install-prefix-path.patch15
-rw-r--r--ports/opencascade/install-include-dir.patch31
-rw-r--r--ports/opencascade/portfile.cmake25
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/o-/opencascade.json5
6 files changed, 77 insertions, 2 deletions
diff --git a/ports/opencascade/CONTROL b/ports/opencascade/CONTROL
index 998252a3f..11df63835 100644
--- a/ports/opencascade/CONTROL
+++ b/ports/opencascade/CONTROL
@@ -1,5 +1,6 @@
Source: opencascade
Version: 7.5.0
+Port-Version: 1
Build-Depends: freetype
Description: Open CASCADE Technology (OCCT) is an open-source software development platform for 3D CAD, CAM, CAE.
Supports: !(uwp|osx|linux|arm)
diff --git a/ports/opencascade/fix-install-prefix-path.patch b/ports/opencascade/fix-install-prefix-path.patch
new file mode 100644
index 000000000..f523280ac
--- /dev/null
+++ b/ports/opencascade/fix-install-prefix-path.patch
@@ -0,0 +1,15 @@
+diff --git a/adm/templates/OpenCASCADEConfig.cmake.in b/adm/templates/OpenCASCADEConfig.cmake.in
+index e391ddf..c926c49 100644
+--- a/adm/templates/OpenCASCADEConfig.cmake.in
++++ b/adm/templates/OpenCASCADEConfig.cmake.in
+@@ -24,6 +24,7 @@ set (OpenCASCADE_DEVELOPMENT_VERSION "@OCC_VERSION_DEVELOPMENT@")
+ # - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade-<version>
+ get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
+ get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
++get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
+ if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
+ get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
+ endif()
+--
+2.14.3.windows.1
+
diff --git a/ports/opencascade/install-include-dir.patch b/ports/opencascade/install-include-dir.patch
new file mode 100644
index 000000000..85ab582bd
--- /dev/null
+++ b/ports/opencascade/install-include-dir.patch
@@ -0,0 +1,31 @@
+From 32c4bdd88555309752215c53842d438cb51bcb62 Mon Sep 17 00:00:00 2001
+From: bloess <josua.bloess@uni-bayreuth.de>
+Date: Mon, 15 Feb 2021 16:26:36 +0100
+Subject: [PATCH] install include-dir
+
+---
+ CMakeLists.txt | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 100d613..464f95a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1171,6 +1171,14 @@ foreach (OCCT_MODULE ${OCCT_MODULES})
+ endforeach()
+ set (OCCT_MODULES_ENABLED ${OCCT_MODULES_ENABLED_SORTED})
+
++foreach (OCCT_LIBRARY ${OCCT_LIBRARIES})
++ target_include_directories(
++ ${OCCT_LIBRARY}
++ INTERFACE
++ $<INSTALL_INTERFACE:include>)
++
++endforeach()
++
+ # Add all targets to the build-tree export set
+ export (TARGETS ${OCCT_LIBRARIES} FILE "${CMAKE_BINARY_DIR}/OpenCASCADETargets.cmake")
+
+--
+2.14.3.windows.1
+
diff --git a/ports/opencascade/portfile.cmake b/ports/opencascade/portfile.cmake
index 68bb56397..86fc2a34e 100644
--- a/ports/opencascade/portfile.cmake
+++ b/ports/opencascade/portfile.cmake
@@ -8,6 +8,8 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
fix-pdb-find.patch
+ fix-install-prefix-path.patch
+ install-include-dir.patch
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
@@ -43,7 +45,28 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/opencascade TARGET_PATH share/opencascade)
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/opencascade)
+
+#make occt includes relative to source_file
+list(APPEND ADDITIONAL_HEADERS
+ "ExprIntrp.tab.h"
+ "FlexLexer.h"
+ "glext.h"
+ "igesread.h"
+ "NCollection_Haft.h"
+ "OSD_PerfMeter.h"
+ "Standard_values.h"
+ )
+
+file(GLOB files "${CURRENT_PACKAGES_DIR}/include/opencascade/[a-zA-Z0-9_]*\.[hgl]xx")
+foreach(file_name ${files})
+ file(READ ${file_name} filedata)
+ string(REGEX REPLACE "# *include \<([a-zA-Z0-9_]*\.[hgl]xx)\>" "#include \"\\1\"" filedata "${filedata}")
+ foreach(extra_header ${ADDITIONAL_HEADERS})
+ string(REGEX REPLACE "# *include \<${extra_header}\>" "#include \"${extra_header}\"" filedata "${filedata}")
+ endforeach()
+ file(WRITE ${file_name} "${filedata}")
+endforeach()
# Remove libd to lib, libd just has cmake files we dont want too
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
diff --git a/versions/baseline.json b/versions/baseline.json
index bfd69aba8..88c5942b1 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -4302,7 +4302,7 @@
},
"opencascade": {
"baseline": "7.5.0",
- "port-version": 0
+ "port-version": 1
},
"opencc": {
"baseline": "2020-04-26",
diff --git a/versions/o-/opencascade.json b/versions/o-/opencascade.json
index cf3e61041..414552451 100644
--- a/versions/o-/opencascade.json
+++ b/versions/o-/opencascade.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "1afbbcf0d6d85963a334b8ae8e95b4fe16a9ff5b",
+ "version-string": "7.5.0",
+ "port-version": 1
+ },
+ {
"git-tree": "0d003408ab69f77a4ca2c02de115087c87a46b27",
"version-string": "7.5.0",
"port-version": 0