aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2022-09-10 11:05:31 +0000
committerThierry Thomas <thierry@FreeBSD.org>2022-09-17 12:38:38 +0000
commit3f4f4b240990348b8b261be32e797811f5ee09b4 (patch)
tree7e5bac676a6e2d39e6bb29d0f0d776fb9cbaea49
parentb90c4eb3c3de202a95dd17c06ba79eb86e25c12a (diff)
downloadports-3f4f4b240990348b8b261be32e797811f5ee09b4.tar.gz
ports-3f4f4b240990348b8b261be32e797811f5ee09b4.zip
cad/opencascade: fix cmake files
A cmake macro, which should have configured $OCCT_INSTALL_BIN_LETTER was not applied correctly. Thus some cmake files where badly configured, and some consumers could not use them. PR: 266280 Reported by: yuri MFH: 2022Q3 (cherry picked from commit 31735a5b1aae9a7967e8cc5f12ffab7779acc53c)
-rw-r--r--cad/opencascade/Makefile8
-rw-r--r--cad/opencascade/files/patch-adm_cmake_occt__macros.cmake17
-rw-r--r--cad/opencascade/files/patch-src_Standard_Standard__CString.cxx4
3 files changed, 25 insertions, 4 deletions
diff --git a/cad/opencascade/Makefile b/cad/opencascade/Makefile
index 29bf7a6099a6..dd0530ac92f8 100644
--- a/cad/opencascade/Makefile
+++ b/cad/opencascade/Makefile
@@ -2,7 +2,7 @@
PORTNAME= opencascade
PORTVERSION= 7.6.0
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= cad science
MASTER_SITES= LOCAL/thierry
@@ -64,6 +64,12 @@ CMAKE_ARGS+= -DINSTALL_DIR=${OCCROOT} \
-DUSE_RAPIDJSON:BOOL=ON \
-DUSE_VTK:BOOL=ON \
-D3RDPARTY_VTK_INCLUDE_DIR:PATH=${LOCALBASE}/include/vtk-${VTKVER}
+CONFIGURE_ENV+= DESTDIR=${STAGEDIR}
+
+.if defined(MAINTAINER_MODE)
+CMAKE_ARGS+= -DCMAKE_MESSAGE_CONTEXT_SHOW:BOOL=ON \
+ -DCMAKE_MESSAGE_LOG_LEVEL:STRING=DEBUG
+.endif
# TODO: TBB to be replaced by onetbb later
#CMAKE_ARGS+= -DUSE_EIGEN:BOOL=ON -DUSE_TBB:BOOL=ON
diff --git a/cad/opencascade/files/patch-adm_cmake_occt__macros.cmake b/cad/opencascade/files/patch-adm_cmake_occt__macros.cmake
index d56ea8699ddf..8ab6018984b8 100644
--- a/cad/opencascade/files/patch-adm_cmake_occt__macros.cmake
+++ b/cad/opencascade/files/patch-adm_cmake_occt__macros.cmake
@@ -1,4 +1,4 @@
---- adm/cmake/occt_macros.cmake.orig 2020-11-03 14:49:43 UTC
+--- adm/cmake/occt_macros.cmake.orig 2021-10-30 11:13:37 UTC
+++ adm/cmake/occt_macros.cmake
@@ -47,7 +47,7 @@ macro (OCCT_MAKE_OS_WITH_BITNESS)
elseif(APPLE)
@@ -18,3 +18,18 @@
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
message (STATUS "Info: \(${CURRENT_TIME}\) Checking headers in inc folder...")
+@@ -592,12 +592,12 @@ 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*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}\")
+ foreach (line IN LISTS TARGET_FILE_CONTENT)
+- string (REGEX REPLACE \"[\\\\]?[\\\$]{OCCT_INSTALL_BIN_LETTER}\" \"\${OCCT_INSTALL_BIN_LETTER}\" line \"\${line}\")
++ string (REGEX REPLACE \"[\\\\]?[\\\$]{OCCT_INSTALL_BIN_LETTER}\" \"${OCCT_INSTALL_BIN_LETTER}\" line \"\${line}\")
+ file (APPEND \"\${TARGET_FILENAME}\" \"\${line}\\n\")
+ endforeach()
+ endforeach()
diff --git a/cad/opencascade/files/patch-src_Standard_Standard__CString.cxx b/cad/opencascade/files/patch-src_Standard_Standard__CString.cxx
index a8162b9e0c23..11083adad1b6 100644
--- a/cad/opencascade/files/patch-src_Standard_Standard__CString.cxx
+++ b/cad/opencascade/files/patch-src_Standard_Standard__CString.cxx
@@ -1,6 +1,6 @@
---- src/Standard/Standard_CString.cxx.orig 2020-11-03 14:50:08 UTC
+--- src/Standard/Standard_CString.cxx.orig 2021-10-30 11:13:58 UTC
+++ src/Standard/Standard_CString.cxx
-@@ -83,7 +83,7 @@ Standard_Integer HashCodes (const Standard_CString the
+@@ -82,7 +82,7 @@ Standard_Integer HashCodes (const Standard_CString the
// strtod, strtol, strtoll functions. For other system with locale-depended
// implementations problems may appear if "C" locale is not set explicitly.
#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__MINGW32__)