1 |
commit: 4909a322be06b7abd27e2954ea5f89e5c3ffc46b |
2 |
Author: Bernd Waibel <waebbl <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Oct 19 09:17:54 2019 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 17 07:45:47 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4909a322 |
7 |
|
8 |
sci-libs/opencascade: bump to version 7.4.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/696596 |
11 |
Package-Manager: Portage-2.3.76, Repoman-2.3.17 |
12 |
Signed-off-by: Bernd Waibel <waebbl <AT> gmail.com> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/13596 |
14 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
15 |
|
16 |
sci-libs/opencascade/Manifest | 1 + |
17 |
.../files/opencascade-7.4.0-find-qt.patch | 85 +++++++++++++ |
18 |
.../files/opencascade-7.4.0-fix-install.patch | 133 ++++++++++++++++++++ |
19 |
.../opencascade/files/opencascade-7.4.0.env.in | 103 +++++++++++++++ |
20 |
sci-libs/opencascade/metadata.xml | 27 +++- |
21 |
sci-libs/opencascade/opencascade-7.4.0.ebuild | 140 +++++++++++++++++++++ |
22 |
6 files changed, 484 insertions(+), 5 deletions(-) |
23 |
|
24 |
diff --git a/sci-libs/opencascade/Manifest b/sci-libs/opencascade/Manifest |
25 |
index 52dffdbc97c..d999b843d5d 100644 |
26 |
--- a/sci-libs/opencascade/Manifest |
27 |
+++ b/sci-libs/opencascade/Manifest |
28 |
@@ -1 +1,2 @@ |
29 |
DIST opencascade-7.3.0.tar.gz 48576720 BLAKE2B bf63ba77aabc8a8c92d694f78f24bab71c07e68e7ba4b8d5d90966733dbd9c0c83a76e35f059e798d4a60640d663330cd13a828b19ec02a5372053ab39a74aa6 SHA512 17eb1810b43a8b001867563f97801ceb38a7878fa53d9b39b46a5cf3dd676310fa80e83e90668a99ec6aff9d4f09733fb6c7be83c1e3ab4eaa9fda55888050da |
30 |
+DIST opencascade-7.4.0.tar.gz 49210449 BLAKE2B c92afe7551e9a066ad0940dcf49278b556a726f0534131706b3a11cb0986ba32818e162df3982283f6815eb9d67d7e91f909485d78f2b8d638da1934ffbc2f7f SHA512 eb0d47848d48f42a159ae5d7a4144483ba1f59f634844bd2053e48e04af30a30ba7056112cd38a1730d193a8d736b898f9608dd574cbe6829dbe7257a002772a |
31 |
|
32 |
diff --git a/sci-libs/opencascade/files/opencascade-7.4.0-find-qt.patch b/sci-libs/opencascade/files/opencascade-7.4.0-find-qt.patch |
33 |
new file mode 100644 |
34 |
index 00000000000..1ebc1106a31 |
35 |
--- /dev/null |
36 |
+++ b/sci-libs/opencascade/files/opencascade-7.4.0-find-qt.patch |
37 |
@@ -0,0 +1,85 @@ |
38 |
+From 7304c888e57a581e9dc8ef2005e960ec579d58f4 Mon Sep 17 00:00:00 2001 |
39 |
+From: Bernd Waibel <waebbl@×××××.com> |
40 |
+Date: Sat, 9 Nov 2019 17:15:27 +0100 |
41 |
+Subject: [PATCH] Gentoo-specific: disable internal 3RDPARTY_QT_DIR |
42 |
+ |
43 |
+The patch disables searching for internal 3rd-party Qt. Instead |
44 |
+system installed Qt is used. The call to find_package uses REQUIRED |
45 |
+flag for this. |
46 |
+ |
47 |
+Signed-off-by: Bernd Waibel <waebbl@×××××.com> |
48 |
+--- |
49 |
+ adm/cmake/qt.cmake | 24 ++++++++++++------------ |
50 |
+ adm/cmake/qt_macro.cmake | 6 +++--- |
51 |
+ 2 files changed, 15 insertions(+), 15 deletions(-) |
52 |
+ |
53 |
+diff --git a/adm/cmake/qt.cmake b/adm/cmake/qt.cmake |
54 |
+index 6958bab5..b6a9b794 100644 |
55 |
+--- a/adm/cmake/qt.cmake |
56 |
++++ b/adm/cmake/qt.cmake |
57 |
+@@ -3,27 +3,27 @@ |
58 |
+ # Qt is searched manually first (just determine root) |
59 |
+ message (STATUS "Processing Qt 3-rd party") |
60 |
+ |
61 |
+-if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "") |
62 |
+- FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME) |
63 |
++#if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "") |
64 |
++# FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME) |
65 |
+ |
66 |
+- if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "") |
67 |
+- message (FATAL_ERROR "... Qt root directory was not found") |
68 |
+- endif() |
69 |
++# if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "") |
70 |
++# message (FATAL_ERROR "... Qt root directory was not found") |
71 |
++# endif() |
72 |
+ |
73 |
+ # Combine directory name with absolute path and show in GUI |
74 |
+- set (3RDPARTY_QT_DIR "${3RDPARTY_DIR}/${3RDPARTY_QT_DIR_NAME}" CACHE PATH "The directory containing Qt" FORCE) |
75 |
+- message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}") |
76 |
+-endif() |
77 |
++# set (3RDPARTY_QT_DIR "${3RDPARTY_DIR}/${3RDPARTY_QT_DIR_NAME}" CACHE PATH "The directory containing Qt" FORCE) |
78 |
++# message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}") |
79 |
++#endif() |
80 |
+ |
81 |
+-set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}") |
82 |
++#set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}") |
83 |
+ |
84 |
+ # Now set CMAKE_PREFIX_PATH to point to local Qt installation. |
85 |
+ # Without this setting find_package() will not work |
86 |
+-set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR}) |
87 |
++#set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR}) |
88 |
+ |
89 |
+ # Now we can apply standard CMake finder for Qt5. We do this mostly |
90 |
+ # to have qt5_wrap_cpp() function available and Qt5_FOUND variable filled |
91 |
+-find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH) |
92 |
++find_package(Qt5 COMPONENTS Widgets Quick Xml REQUIRED) |
93 |
+ if (NOT ${Qt5_FOUND}) |
94 |
+ # Now we can apply standard CMake finder for Qt. We do this mostly |
95 |
+ # to have qt4_wrap_cpp() function available |
96 |
+@@ -31,4 +31,4 @@ if (NOT ${Qt5_FOUND}) |
97 |
+ #message (STATUS "Qt4 cmake configuration") |
98 |
+ else() |
99 |
+ #message (STATUS "Qt5 cmake configuration") |
100 |
+-endif() |
101 |
+\ No newline at end of file |
102 |
++endif() |
103 |
+diff --git a/adm/cmake/qt_macro.cmake b/adm/cmake/qt_macro.cmake |
104 |
+index ec897384..8bd314a4 100644 |
105 |
+--- a/adm/cmake/qt_macro.cmake |
106 |
++++ b/adm/cmake/qt_macro.cmake |
107 |
+@@ -2,9 +2,9 @@ |
108 |
+ |
109 |
+ macro (FIND_QT_PACKAGE PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT_INCLUDES) |
110 |
+ |
111 |
+- if ("${3RDPARTY_QT_DIR}" STREQUAL "") |
112 |
+- message (FATAL_ERROR "Empty Qt dir") |
113 |
+- endif() |
114 |
++# if ("${3RDPARTY_QT_DIR}" STREQUAL "") |
115 |
++# message (FATAL_ERROR "Empty Qt dir") |
116 |
++# endif() |
117 |
+ |
118 |
+ if (${Qt5_FOUND}) |
119 |
+ #message (STATUS "Qt5 cmake configuration") |
120 |
+-- |
121 |
+2.23.0 |
122 |
+ |
123 |
|
124 |
diff --git a/sci-libs/opencascade/files/opencascade-7.4.0-fix-install.patch b/sci-libs/opencascade/files/opencascade-7.4.0-fix-install.patch |
125 |
new file mode 100644 |
126 |
index 00000000000..edf3545a74b |
127 |
--- /dev/null |
128 |
+++ b/sci-libs/opencascade/files/opencascade-7.4.0-fix-install.patch |
129 |
@@ -0,0 +1,133 @@ |
130 |
+From 95c7c85f776d6e4764f2146c8385d6e29762043d Mon Sep 17 00:00:00 2001 |
131 |
+From: Bernd Waibel <waebbl@×××××.com> |
132 |
+Date: Sat, 16 Nov 2019 18:28:11 +0100 |
133 |
+Subject: [PATCH] Gentoo-specific: patch installation paths |
134 |
+ |
135 |
+Patch parts of cmake to install into proper locations and handle slotting. |
136 |
+ |
137 |
+Signed-off-by: Bernd Waibel <waebbl@×××××.com> |
138 |
+--- |
139 |
+ CMakeLists.txt | 28 +++++++++++++++------------- |
140 |
+ adm/cmake/occt_macros.cmake | 2 +- |
141 |
+ 2 files changed, 16 insertions(+), 14 deletions(-) |
142 |
+ |
143 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
144 |
+index 0b445de9..1fd5779e 100644 |
145 |
+--- a/CMakeLists.txt |
146 |
++++ b/CMakeLists.txt |
147 |
+@@ -15,6 +15,8 @@ macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE) |
148 |
+ endif() |
149 |
+ endmacro() |
150 |
+ |
151 |
++SET(CMAKE_INSTALL_DO_STRIP OFF) |
152 |
++ |
153 |
+ # include variable description |
154 |
+ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vardescr") |
155 |
+ |
156 |
+@@ -231,7 +233,7 @@ endif() |
157 |
+ # place the libraries to <prefix>/lib folder for unix and leave old structure for windows |
158 |
+ if (NOT DEFINED INSTALL_DIR_LIB) |
159 |
+ if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix") |
160 |
+- set (INSTALL_DIR_LIB "lib" CACHE PATH "${INSTALL_DIR_LIB_DESCR}") |
161 |
++ set (INSTALL_DIR_LIB "lib${LIB_SUFFIX}" CACHE PATH "${INSTALL_DIR_LIB_DESCR}") |
162 |
+ else() |
163 |
+ set (INSTALL_DIR_LIB "${OS_WITH_BIT}/${COMPILER}/lib" CACHE PATH "${INSTALL_DIR_LIB_DESCR}") |
164 |
+ endif() |
165 |
+@@ -315,9 +317,9 @@ endif() |
166 |
+ if (NOT DEFINED INSTALL_DIR_CMAKE) |
167 |
+ if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix") |
168 |
+ if (INSTALL_DIR_WITH_VERSION) |
169 |
+- set (INSTALL_DIR_CMAKE "lib/cmake/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}") |
170 |
++ set (INSTALL_DIR_CMAKE "lib${LIB_SUFFIX}/cmake/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}") |
171 |
+ else() |
172 |
+- set (INSTALL_DIR_CMAKE "lib/cmake/opencascade" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}") |
173 |
++ set (INSTALL_DIR_CMAKE "lib${LIB_SUFFIX}/cmake/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}") |
174 |
+ endif() |
175 |
+ else() |
176 |
+ set (INSTALL_DIR_CMAKE "cmake" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}") |
177 |
+@@ -868,10 +870,10 @@ if (${DRAWEXE_INDEX} GREATER -1) |
178 |
+ # copy draw script to install script folder |
179 |
+ if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}") |
180 |
+ install (FILES "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}" |
181 |
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE) |
182 |
++ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |
183 |
+ else() |
184 |
+ install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}" |
185 |
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE) |
186 |
++ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |
187 |
+ endif() |
188 |
+ |
189 |
+ # copy draw script to CMake binary folder |
190 |
+@@ -892,9 +894,9 @@ if (EXISTS "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}") |
191 |
+ |
192 |
+ set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}") |
193 |
+ |
194 |
+- file (WRITE "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}") |
195 |
++ file (WRITE "${CMAKE_BINARY_DIR}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}") |
196 |
+ else() |
197 |
+- OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}") |
198 |
++ OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}") |
199 |
+ endif() |
200 |
+ |
201 |
+ if (WIN32) |
202 |
+@@ -1067,10 +1069,10 @@ if (BUILD_TOOL_TOOLKITS) |
203 |
+ # copy tinspector script to install script folder |
204 |
+ if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/inspector.${SCRIPT_EXT}") |
205 |
+ install (FILES "${BUILD_PATCH}/adm/templates/inspector.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}" |
206 |
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE) |
207 |
++ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |
208 |
+ else() |
209 |
+ install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/inspector.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}" |
210 |
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE) |
211 |
++ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |
212 |
+ endif() |
213 |
+ |
214 |
+ set (OpenCASCADE_BINARY_DIR "${INSTALL_DIR}/${INSTALL_DIR_BIN}") |
215 |
+@@ -1122,7 +1124,7 @@ foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES}) |
216 |
+ endforeach() |
217 |
+ # install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration |
218 |
+ install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)") |
219 |
+-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)") |
220 |
++install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"\$ENV{DESTDIR}${INSTALL_DIR_CMAKE}/opencascade-${OCC_VERSION_STRING_EXT}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)") |
221 |
+ |
222 |
+ foreach (OCCT_MODULE ${OCCT_MODULES}) |
223 |
+ if (BUILD_MODULE_${OCCT_MODULE}) |
224 |
+@@ -1163,7 +1165,7 @@ endif() |
225 |
+ |
226 |
+ # Configure and install cmake config file |
227 |
+ configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADEConfig.cmake.in" "OpenCASCADEConfig.cmake" @ONLY) |
228 |
+-install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfig.cmake" DESTINATION "${INSTALL_DIR_CMAKE}") |
229 |
++install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfig.cmake" DESTINATION "${INSTALL_DIR_CMAKE}/opencascade-${OCC_VERSION_STRING_EXT}") |
230 |
+ |
231 |
+ # Configure cmake version file |
232 |
+ include(CMakePackageConfigHelpers) |
233 |
+@@ -1172,11 +1174,11 @@ write_basic_package_version_file( ${CMAKE_BINARY_DIR}/OpenCASCADEConfigVersion.c |
234 |
+ COMPATIBILITY ExactVersion ) |
235 |
+ |
236 |
+ # Install cmake version file |
237 |
+-install (FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfigVersion.cmake" DESTINATION "${INSTALL_DIR_CMAKE}") |
238 |
++install (FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfigVersion.cmake" DESTINATION "${INSTALL_DIR_CMAKE}/opencascade-${OCC_VERSION_STRING_EXT}") |
239 |
+ |
240 |
+ # Install the export set for use with the install-tree for each configuration |
241 |
+ foreach (OCCT_MODULE ${OCCT_MODULES_ENABLED}) |
242 |
+- install(EXPORT OpenCASCADE${OCCT_MODULE}Targets DESTINATION "${INSTALL_DIR_CMAKE}") |
243 |
++ install(EXPORT OpenCASCADE${OCCT_MODULE}Targets DESTINATION "${INSTALL_DIR_CMAKE}/opencascade-${OCC_VERSION_STRING_EXT}") |
244 |
+ endforeach() |
245 |
+ |
246 |
+ # Update generated OpenCASCADETargets-*.cmake files |
247 |
+diff --git a/adm/cmake/occt_macros.cmake b/adm/cmake/occt_macros.cmake |
248 |
+index 8220ecd5..228d801b 100644 |
249 |
+--- a/adm/cmake/occt_macros.cmake |
250 |
++++ b/adm/cmake/occt_macros.cmake |
251 |
+@@ -598,7 +598,7 @@ macro (OCCT_UPDATE_TARGET_FILE) |
252 |
+ "cmake_policy(PUSH) |
253 |
+ cmake_policy(SET CMP0007 NEW) |
254 |
+ string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE) |
255 |
+- file (GLOB ALL_OCCT_TARGET_FILES \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\") |
256 |
++ file (GLOB ALL_OCCT_TARGET_FILES \"\$ENV{DESTDIR}${INSTALL_DIR_CMAKE}/opencascade-${OCC_VERSION_STRING_EXT}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\") |
257 |
+ foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES}) |
258 |
+ file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT) |
259 |
+ file (REMOVE \"\${TARGET_FILENAME}\") |
260 |
+-- |
261 |
+2.23.0 |
262 |
+ |
263 |
|
264 |
diff --git a/sci-libs/opencascade/files/opencascade-7.4.0.env.in b/sci-libs/opencascade/files/opencascade-7.4.0.env.in |
265 |
new file mode 100644 |
266 |
index 00000000000..2eefe188c1a |
267 |
--- /dev/null |
268 |
+++ b/sci-libs/opencascade/files/opencascade-7.4.0.env.in |
269 |
@@ -0,0 +1,103 @@ |
270 |
+# |
271 |
+# This file sets needed and optional environment variables for |
272 |
+# Open CASCADE Technology |
273 |
+# |
274 |
+# See: https://dev.opencascade.org/doc/overview/html/index.html#OCCT_OVW_SECTION_4_2 |
275 |
+# for further documentation. |
276 |
+# |
277 |
+# Some of the values are set at compile time depending on what USE flags |
278 |
+# were enabled. Those values are marked as such. |
279 |
+ |
280 |
+# define the root directory of Open CASCADE Technology (needed) |
281 |
+CASROOT=VAR_CASROOT |
282 |
+# PATH and LDPATH are used to find the binaries and libraries of OCCT (needed) |
283 |
+PATH=VAR_CASROOT/bin |
284 |
+LDPATH=VAR_CASROOT/lib |
285 |
+ |
286 |
+############################################################################# |
287 |
+# The MMGT_* variables are used to determine how memory management will work |
288 |
+# in OCCT. All of those are optional. If they are not set here, their default |
289 |
+# values will be used. |
290 |
+# |
291 |
+# Uncomment or change the ones you need to adapt from its default. |
292 |
+############################################################################# |
293 |
+# MMGT_OPT = {0,1,2} (default: 0) set at compile time |
294 |
+# if set to 0 (the default), every memory block is allocated in C |
295 |
+# memory heap directly (via malloc() and free()). Will be set, if |
296 |
+# neither the the 'optimize' nor the 'tbb' USE flags are set. |
297 |
+# if set to 1, the memory manager performs it's own internal optimization. |
298 |
+# Will be set, if the 'optimize' USE flag is set. |
299 |
+# if set to 2, Intel(R) TBB optimized memory manager is used. Will be set, |
300 |
+# if the 'tbb' USE flag is set. |
301 |
+#MMGT_OPT=0 |
302 |
+ |
303 |
+# MMGT_CLEAR = {0,1} (default: 1) |
304 |
+# if set to 0, memory block is returned as it is. Will be set, if the |
305 |
+# 'optimize' USE flag is set |
306 |
+# if set to 1, every allocated memory block is cleared by zeros |
307 |
+#MMGT_CLEAR=1 |
308 |
+ |
309 |
+# MMGT_CELLSIZE (default: 200) |
310 |
+# defines the maximal size of blocks allocated in large pools of memory. |
311 |
+#MMGT_CELLSIZE=200 |
312 |
+ |
313 |
+# MMGT_NBPAGES (default: 10000) |
314 |
+# defines the size of memory chunks allocated for small blocks in pages |
315 |
+# (OS dependant) |
316 |
+#MMGT_NBPAGES=10000 |
317 |
+ |
318 |
+# MMGT_THRESHOLD (default: 40000) |
319 |
+# defines the maximal size of blocks that are recycled internally instead |
320 |
+# of being returned to the heap. |
321 |
+#MMGT_THRESHOLD=40000 |
322 |
+ |
323 |
+# MMGT_MMAP = {0,1} (default: 1) |
324 |
+# if set to 0, large memory blocks will be allocated in the C heap by |
325 |
+# malloc() |
326 |
+# if set to 1, large memory blocks are allocated using memory mapping |
327 |
+# functions of the operating system. |
328 |
+#MMGT_MMAP=1 |
329 |
+ |
330 |
+# CSF_LANGUAGE (default: us) optional |
331 |
+# defines the default language of messages indicated by a two-letter |
332 |
+# country code. Currently it's not verified if this work with other |
333 |
+# than the default languages, so we keep it commented. |
334 |
+#CSF_LANGUAGE=us |
335 |
+ |
336 |
+# CSF_DEBUG_BOP (default: undefined) optional |
337 |
+# if defined then it should specify the directory where diagnostic data |
338 |
+# on problems occured in Boolean operations will be saved. Not defined by |
339 |
+# default. |
340 |
+# |
341 |
+# NOTE: Only enable for debugging purposes. If set, this variable has a |
342 |
+# large impact on the performance of boolean operations. |
343 |
+#CSF_DEBUG_BOP=/var/tmp |
344 |
+ |
345 |
+# CSF_EXCEPTION_PROMPT (default: 1) optional |
346 |
+# not documented upstream (maybe a flag indicating whether the user shall |
347 |
+# be prompted in the case of exceptions) |
348 |
+CSF_EXCEPTION_PROMPT=1 |
349 |
+ |
350 |
+# The following CSF_* variables define various directories and files where |
351 |
+# OCCT is looking for resources. |
352 |
+CSF_GraphicShr=VAR_CASROOT/lib/libTKOpenGl.so |
353 |
+CSF_MIGRATION_TYPES=VAR_CASROOT/share/opencascade/resources/StdResource/MigrationSheet.txt |
354 |
+CSF_MDTVTexturesDirectory=VAR_CASROOT/share/opencascade/resources/Textures |
355 |
+CSF_PluginDefaults=VAR_CASROOT/share/opencascade/resources/StdResource |
356 |
+CSF_StandardDefaults=VAR_CASROOT/share/opencascade/resources/StdResource |
357 |
+CSF_StandardLiteDefaults=VAR_CASROOT/share/opencascade/resources/StdResource |
358 |
+CSF_XCAFDefaults=VAR_CASROOT/share/opencascade/resources/StdResource |
359 |
+CSF_XmlOcafResource=VAR_CASROOT/share/opencascade/resources/XmlOcafResource |
360 |
+# The below values might be optional. |
361 |
+CSF_IGESDefaults=VAR_CASROOT/share/opencascade/resources/XSTEPResource |
362 |
+CSF_ShadersDirectory=VAR_CASROOT/share/opencascade/resources/Shaders |
363 |
+CSF_SHMessage=VAR_CASROOT/share/opencascade/resources/SHMessage |
364 |
+CSF_STEPDefaults=VAR_CASROOT/share/opencascade/resources/XSTEPResource |
365 |
+CSF_UnitsDefinition=/usr/lib64/opencascade-7.3.0/ros/share/opencascade/resources/UnitsAPI/Units.dat |
366 |
+CSF_XSMessage=/usr/lib64/opencascade-7.3.0/ros/share/opencascade/resources/XSMessage |
367 |
+ |
368 |
+# TODO: check those |
369 |
+# they were defined in the original ebuild but the directories and files |
370 |
+# are not present in the current installation. |
371 |
+#CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT |
372 |
+#CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat |
373 |
|
374 |
diff --git a/sci-libs/opencascade/metadata.xml b/sci-libs/opencascade/metadata.xml |
375 |
index cfb5bac89f9..c601fab04b3 100644 |
376 |
--- a/sci-libs/opencascade/metadata.xml |
377 |
+++ b/sci-libs/opencascade/metadata.xml |
378 |
@@ -10,10 +10,27 @@ |
379 |
<name>Proxy Maintainers</name> |
380 |
</maintainer> |
381 |
<use> |
382 |
- <flag name="freeimage">Enable support for image i/o via media-libs/freeimage</flag> |
383 |
- <flag name="gl2ps">Use gl2ps PostScript printing library</flag> |
384 |
- <flag name="gles2">Use OpenGL ES 2.0</flag> |
385 |
- <flag name="tbb">Enable multithreading with the Intel Threads Building Block dev-cpp/tbb</flag> |
386 |
- <flag name="vtk">Enable Visualization Toolkit</flag> |
387 |
+ <flag name="freeimage"> |
388 |
+ Enable support for image i/o via media-libs/freeimage |
389 |
+ </flag> |
390 |
+ <flag name="gl2ps"> |
391 |
+ Use gl2ps PostScript printing library |
392 |
+ </flag> |
393 |
+ <flag name="gles2"> |
394 |
+ Use OpenGL ES 2.0 |
395 |
+ </flag> |
396 |
+ <flag name="inspector"> |
397 |
+ Build the OCCT inspector tool for low-level data inspection |
398 |
+ </flag> |
399 |
+ <flag name="optimize"> |
400 |
+ Don't clear allocated memory. Use optimized memory manager unless |
401 |
+ tbb USE flag is set. |
402 |
+ </flag> |
403 |
+ <flag name="tbb"> |
404 |
+ Enable multithreading with the Intel Threads Building Block dev-cpp/tbb |
405 |
+ </flag> |
406 |
+ <flag name="vtk"> |
407 |
+ Enable Visualization Toolkit |
408 |
+ </flag> |
409 |
</use> |
410 |
</pkgmetadata> |
411 |
|
412 |
diff --git a/sci-libs/opencascade/opencascade-7.4.0.ebuild b/sci-libs/opencascade/opencascade-7.4.0.ebuild |
413 |
new file mode 100644 |
414 |
index 00000000000..5c0a6496857 |
415 |
--- /dev/null |
416 |
+++ b/sci-libs/opencascade/opencascade-7.4.0.ebuild |
417 |
@@ -0,0 +1,140 @@ |
418 |
+# Copyright 1999-2019 Gentoo Authors |
419 |
+# Distributed under the terms of the GNU General Public License v2 |
420 |
+ |
421 |
+# TODO: |
422 |
+# check the src files referenced in 51opencascade, i.e. resources and the like |
423 |
+# check where cmake gets it's '-s' linker flag to avoid pre-stripping (QA) |
424 |
+ |
425 |
+EAPI=7 |
426 |
+ |
427 |
+inherit check-reqs cmake-utils flag-o-matic java-pkg-opt-2 multilib |
428 |
+ |
429 |
+DESCRIPTION="Development platform for CAD/CAE, 3D surface/solid modeling and data exchange" |
430 |
+HOMEPAGE="https://www.opencascade.com" |
431 |
+MY_PV="$(ver_rs 1- '_')" |
432 |
+SRC_URI="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V${MY_PV};sf=tgz -> ${P}.tar.gz" |
433 |
+ |
434 |
+LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" |
435 |
+SLOT="${PV}" |
436 |
+KEYWORDS="~amd64 ~x86" |
437 |
+# gl2ps |
438 |
+IUSE="debug doc examples ffmpeg freeimage gles2 inspector java optimize qt5 tbb +vtk" |
439 |
+ |
440 |
+REQUIRED_USE=" |
441 |
+ inspector? ( qt5 ) |
442 |
+ ?? ( optimize tbb ) |
443 |
+" |
444 |
+ |
445 |
+# gl2ps? ( x11-libs/gl2ps ) |
446 |
+RDEPEND=" |
447 |
+ app-eselect/eselect-opencascade |
448 |
+ dev-cpp/eigen |
449 |
+ dev-lang/tcl:0= |
450 |
+ dev-lang/tk:0= |
451 |
+ dev-tcltk/itcl |
452 |
+ dev-tcltk/itk |
453 |
+ dev-tcltk/tix |
454 |
+ media-libs/freetype:2 |
455 |
+ media-libs/ftgl |
456 |
+ virtual/glu |
457 |
+ virtual/opengl |
458 |
+ x11-libs/libXmu |
459 |
+ ffmpeg? ( virtual/ffmpeg ) |
460 |
+ freeimage? ( media-libs/freeimage ) |
461 |
+ java? ( virtual/jdk:1.8 ) |
462 |
+ qt5? ( |
463 |
+ dev-qt/qtcore:5 |
464 |
+ dev-qt/qtgui:5 |
465 |
+ dev-qt/qtquickcontrols2:5 |
466 |
+ dev-qt/qtwidgets:5 |
467 |
+ dev-qt/qtxml:5 |
468 |
+ ) |
469 |
+ tbb? ( dev-cpp/tbb ) |
470 |
+ vtk? ( >=sci-libs/vtk-8.1.0[rendering] ) |
471 |
+" |
472 |
+DEPEND="${RDEPEND}" |
473 |
+BDEPEND="doc? ( app-doc/doxygen )" |
474 |
+ |
475 |
+# There's no easy way to test. Testing needs a rather big environment |
476 |
+# properly set up. |
477 |
+RESTRICT="test" |
478 |
+ |
479 |
+CHECKREQS_MEMORY="256M" |
480 |
+CHECKREQS_DISK_BUILD="3584M" |
481 |
+ |
482 |
+CMAKE_BUILD_TYPE=Release |
483 |
+ |
484 |
+S="${WORKDIR}/occt-V${MY_PV}" |
485 |
+ |
486 |
+PATCHES=( |
487 |
+ "${FILESDIR}/${P}-find-qt.patch" |
488 |
+ "${FILESDIR}/${P}-fix-install.patch" |
489 |
+) |
490 |
+ |
491 |
+pkg_setup() { |
492 |
+ check-reqs_pkg_setup |
493 |
+ use java && java-pkg-opt-2_pkg_setup |
494 |
+} |
495 |
+ |
496 |
+src_prepare() { |
497 |
+ cmake-utils_src_prepare |
498 |
+ use java && java-pkg-opt-2_src_prepare |
499 |
+} |
500 |
+ |
501 |
+src_configure() { |
502 |
+ local mycmakeargs=( |
503 |
+ -DBUILD_DOC_Overview=$(usex doc) |
504 |
+ -DBUILD_Inspector=$(usex inspector) |
505 |
+ -DBUILD_WITH_DEBUG=$(usex debug) |
506 |
+ -DCMAKE_CONFIGURATION_TYPES="Gentoo" |
507 |
+ -DCMAKE_INSTALL_PREFIX="/usr/$(get_libdir)/${PF}/ros" |
508 |
+ -DINSTALL_DIR_DOC="/usr/share/doc/${PF}" |
509 |
+ -DINSTALL_DIR_CMAKE="/usr/$(get_libdir)/cmake" |
510 |
+ -DINSTALL_DOC_Overview=$(usex doc) |
511 |
+ -DINSTALL_SAMPLES=$(usex examples) |
512 |
+ -DINSTALL_TEST_CASES=NO |
513 |
+ -DUSE_D3D=no |
514 |
+ -DUSE_FFMPEG=$(usex ffmpeg) |
515 |
+ -DUSE_FREEIMAGE=$(usex freeimage) |
516 |
+# -DUSE_GL2PS=$(usex gl2ps) |
517 |
+ -DUSE_GLES2=$(usex gles2) |
518 |
+ -DUSE_TBB=$(usex tbb) |
519 |
+ -DUSE_VTK=$(usex vtk) |
520 |
+ ) |
521 |
+ |
522 |
+ use examples && mycmakeargs+=( -DBUILD_SAMPLES_QT=$(usex qt5) ) |
523 |
+ |
524 |
+ cmake-utils_src_configure |
525 |
+ |
526 |
+ # prepare /etc/env.d file |
527 |
+ sed -e 's|VAR_CASROOT|'${EROOT%}'/usr/'$(get_libdir)'/'${P}'/ros|g' < "${FILESDIR}/${P}.env.in" >> "${T}/${PV}" || die |
528 |
+ sed -i -e 's|ros/lib|ros/'$(get_libdir)'|' "${T}/${PV}" || die |
529 |
+ |
530 |
+ # use TBB for memory allocation optimizations? |
531 |
+ use tbb && (sed -i -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' "${T}/${PV}" || die) |
532 |
+ |
533 |
+ if use optimize ; then |
534 |
+ # use internal optimized memory manager? |
535 |
+ sed -i -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' "${T}/${PV}" || die |
536 |
+ # don't clear memory ? |
537 |
+ sed -i -e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' "${T}/${PV}" || die |
538 |
+ fi |
539 |
+} |
540 |
+ |
541 |
+src_install() { |
542 |
+ cmake-utils_src_install |
543 |
+ |
544 |
+ # respect slotting |
545 |
+ insinto "/etc/env.d/${PN}" |
546 |
+ doins "${T}/${PV}" |
547 |
+ |
548 |
+ # remove examples |
549 |
+ use examples || (rm -rf "${ED}/usr/$(get_libdir)/${P}/ros/share/${PN}/samples" || die) |
550 |
+ use java || (rm -rf "${ED}/usr/$(get_libdir)/${P}/ros/share/${PN}/samples/java" || die) |
551 |
+ use qt5 || (rm -rf "${ED}/usr/$(get_libdir)/${P}/ros/share/${PN}/samples/qt" || die) |
552 |
+} |
553 |
+ |
554 |
+pkg_postinst() { |
555 |
+ eselect ${PN} set ${PV} || die "failed to switch to updated implementation" |
556 |
+ einfo "You can switch between available ${PN} implementations using eselect ${PN}" |
557 |
+} |