1 |
commit: 3adf9db9fe478c3b272c0284a81c10f00ca87df7 |
2 |
Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net> |
3 |
AuthorDate: Mon Dec 13 07:36:51 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 10 01:02:30 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3adf9db9 |
7 |
|
8 |
sci-libs/opencascade: use single slot/subslot for 7.5.3 |
9 |
|
10 |
Instead of using different slots for different versions, the package now |
11 |
uses a single slot with subslots. This is to simplyfy dependency handling |
12 |
in revdeps. |
13 |
|
14 |
Allow build against sci-libs/vtk-9.1.0 |
15 |
|
16 |
Package-Manager: Portage-3.0.29, Repoman-3.0.3 |
17 |
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net> |
18 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
19 |
|
20 |
sci-libs/opencascade/files/opencascade-7.5.env.in | 102 --------------------- |
21 |
...7.5.3-r3.ebuild => opencascade-7.5.3-r4.ebuild} | 34 +++---- |
22 |
2 files changed, 15 insertions(+), 121 deletions(-) |
23 |
|
24 |
diff --git a/sci-libs/opencascade/files/opencascade-7.5.env.in b/sci-libs/opencascade/files/opencascade-7.5.env.in |
25 |
deleted file mode 100644 |
26 |
index d7148c241f11..000000000000 |
27 |
--- a/sci-libs/opencascade/files/opencascade-7.5.env.in |
28 |
+++ /dev/null |
29 |
@@ -1,102 +0,0 @@ |
30 |
-# |
31 |
-# This file sets needed and optional environment variables for |
32 |
-# Open CASCADE Technology |
33 |
-# |
34 |
-# See: https://dev.opencascade.org/doc/overview/html/index.html#OCCT_OVW_SECTION_4_2 |
35 |
-# for further documentation. |
36 |
-# |
37 |
-# Some of the values are set at compile time depending on what USE flags |
38 |
-# were enabled. Those values are marked as such. |
39 |
- |
40 |
-# define the root directory of Open CASCADE Technology (needed) |
41 |
-CASROOT="VAR_CASROOT" |
42 |
-PATH="VAR_CASROOT/lib/opencascade-VAR_PV/bin" |
43 |
-LDPATH="VAR_CASROOT/lib/opencascade-VAR_PV" |
44 |
- |
45 |
-############################################################################# |
46 |
-# The MMGT_* variables are used to determine how memory management will work |
47 |
-# in OCCT. All of those are optional. If they are not set here, their default |
48 |
-# values will be used. |
49 |
-# |
50 |
-# Uncomment or change the ones you need to adapt from its default. |
51 |
-############################################################################# |
52 |
-# MMGT_OPT = {0,1,2} (default: 0) set at compile time |
53 |
-# if set to 0 (the default), every memory block is allocated in C |
54 |
-# memory heap directly (via malloc() and free()). Will be set, if |
55 |
-# neither the the 'optimize' nor the 'tbb' USE flags are set. |
56 |
-# if set to 1, the memory manager performs it's own internal optimization. |
57 |
-# Will be set, if the 'optimize' USE flag is set. |
58 |
-# if set to 2, Intel(R) TBB optimized memory manager is used. Will be set, |
59 |
-# if the 'tbb' USE flag is set. |
60 |
-#MMGT_OPT=0 |
61 |
- |
62 |
-# MMGT_CLEAR = {0,1} (default: 1) |
63 |
-# if set to 0, memory block is returned as it is. Will be set, if the |
64 |
-# 'optimize' USE flag is set |
65 |
-# if set to 1, every allocated memory block is cleared by zeros |
66 |
-#MMGT_CLEAR=1 |
67 |
- |
68 |
-# MMGT_CELLSIZE (default: 200) |
69 |
-# defines the maximal size of blocks allocated in large pools of memory. |
70 |
-#MMGT_CELLSIZE=200 |
71 |
- |
72 |
-# MMGT_NBPAGES (default: 10000) |
73 |
-# defines the size of memory chunks allocated for small blocks in pages |
74 |
-# (OS dependant) |
75 |
-#MMGT_NBPAGES=10000 |
76 |
- |
77 |
-# MMGT_THRESHOLD (default: 40000) |
78 |
-# defines the maximal size of blocks that are recycled internally instead |
79 |
-# of being returned to the heap. |
80 |
-#MMGT_THRESHOLD=40000 |
81 |
- |
82 |
-# MMGT_MMAP = {0,1} (default: 1) |
83 |
-# if set to 0, large memory blocks will be allocated in the C heap by |
84 |
-# malloc() |
85 |
-# if set to 1, large memory blocks are allocated using memory mapping |
86 |
-# functions of the operating system. |
87 |
-#MMGT_MMAP=1 |
88 |
- |
89 |
-# CSF_LANGUAGE (default: us) optional |
90 |
-# defines the default language of messages indicated by a two-letter |
91 |
-# country code. Currently it's not verified if this work with other |
92 |
-# than the default languages, so we keep it commented. |
93 |
-#CSF_LANGUAGE=us |
94 |
- |
95 |
-# CSF_DEBUG_BOP (default: undefined) optional |
96 |
-# if defined then it should specify the directory where diagnostic data |
97 |
-# on problems occured in Boolean operations will be saved. Not defined by |
98 |
-# default. |
99 |
-# |
100 |
-# NOTE: Only enable for debugging purposes. If set, this variable has a |
101 |
-# large impact on the performance of boolean operations. |
102 |
-#CSF_DEBUG_BOP="/var/tmp" |
103 |
- |
104 |
-# CSF_EXCEPTION_PROMPT (default: 1) optional |
105 |
-# not documented upstream (maybe a flag indicating whether the user shall |
106 |
-# be prompted in the case of exceptions) |
107 |
-#CSF_EXCEPTION_PROMPT=1 |
108 |
- |
109 |
-# The following CSF_* variables define various directories and files where |
110 |
-# OCCT is looking for resources. |
111 |
-CSF_GraphicShr="VAR_CASROOT/lib/opencascade-VAR_PV/libTKOpenGl.so" |
112 |
-CSF_MIGRATION_TYPES="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource/MigrationSheet.txt" |
113 |
-CSF_MDTVTexturesDirectory="VAR_CASROOT/share/opencascade-VAR_PV/resources/Textures" |
114 |
-CSF_PluginDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource" |
115 |
-CSF_StandardDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource" |
116 |
-CSF_StandardLiteDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource" |
117 |
-CSF_XCAFDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/StdResource" |
118 |
-CSF_XmlOcafResource="VAR_CASROOT/share/opencascade-VAR_PV/resources/XmlOcafResource" |
119 |
-# The below values might be optional. |
120 |
-CSF_IGESDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/XSTEPResource" |
121 |
-CSF_ShadersDirectory="VAR_CASROOT/share/opencascade-VAR_PV/resources/Shaders" |
122 |
-CSF_SHMessage="VAR_CASROOT/share/opencascade-VAR_PV/resources/SHMessage" |
123 |
-CSF_STEPDefaults="VAR_CASROOT/share/opencascade-VAR_PV/resources/XSTEPResource" |
124 |
-CSF_UnitsDefinition="VAR_CASROOT/share/opencascade-VAR_PV/resources/UnitsAPI/Units.dat" |
125 |
-CSF_XSMessage="VAR_CASROOT/share/opencascade-VAR_PV/resources/XSMessage" |
126 |
- |
127 |
-# TODO: check those |
128 |
-# they were defined in the original ebuild but the directories and files |
129 |
-# are not present in the current installation. |
130 |
-#CSF_MDTVFontDirectory="VAR_CASROOT/src/FontMFT" |
131 |
-#CSF_UnitsLexicon="VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat" |
132 |
|
133 |
diff --git a/sci-libs/opencascade/opencascade-7.5.3-r3.ebuild b/sci-libs/opencascade/opencascade-7.5.3-r4.ebuild |
134 |
similarity index 87% |
135 |
rename from sci-libs/opencascade/opencascade-7.5.3-r3.ebuild |
136 |
rename to sci-libs/opencascade/opencascade-7.5.3-r4.ebuild |
137 |
index 0296150b6b01..2fd61839b59b 100644 |
138 |
--- a/sci-libs/opencascade/opencascade-7.5.3-r3.ebuild |
139 |
+++ b/sci-libs/opencascade/opencascade-7.5.3-r4.ebuild |
140 |
@@ -14,7 +14,7 @@ SRC_URI="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/ta |
141 |
S="${WORKDIR}/occt-V${MY_PV}" |
142 |
|
143 |
LICENSE="|| ( Open-CASCADE-LGPL-2.1-Exception-1.0 LGPL-2.1 )" |
144 |
-SLOT="${PV_MAJ}" |
145 |
+SLOT="0/${PV_MAJ}" |
146 |
KEYWORDS="~amd64 ~arm64 ~x86" |
147 |
IUSE="debug doc examples ffmpeg freeimage gles2 json optimize tbb vtk" |
148 |
|
149 |
@@ -25,7 +25,6 @@ REQUIRED_USE="?? ( optimize tbb )" |
150 |
RESTRICT="test" |
151 |
|
152 |
RDEPEND=" |
153 |
- app-eselect/eselect-opencascade |
154 |
dev-lang/tcl:= |
155 |
dev-lang/tk:= |
156 |
dev-tcltk/itcl |
157 |
@@ -49,13 +48,11 @@ RDEPEND=" |
158 |
tbb? ( <dev-cpp/tbb-2021.4.0 ) |
159 |
vtk? ( sci-libs/vtk:=[rendering] ) |
160 |
" |
161 |
-DEPEND=" |
162 |
- ${RDEPEND} |
163 |
+DEPEND="${RDEPEND}" |
164 |
+ |
165 |
+BDEPEND=" |
166 |
dev-cpp/eigen |
167 |
dev-libs/rapidjson |
168 |
-" |
169 |
-BDEPEND=" |
170 |
- app-eselect/eselect-opencascade |
171 |
doc? ( app-doc/doxygen ) |
172 |
examples? ( dev-qt/linguist-tools:5 ) |
173 |
" |
174 |
@@ -119,7 +116,13 @@ src_configure() { |
175 |
fi |
176 |
|
177 |
if use vtk; then |
178 |
- if has_version ">=sci-libs/vtk-9.0.0"; then |
179 |
+ if has_version ">=sci-libs/vtk-9.1.0"; then |
180 |
+ mycmakeargs+=( |
181 |
+ -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr |
182 |
+ -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.1 |
183 |
+ -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) |
184 |
+ ) |
185 |
+ elif has_version ">=sci-libs/vtk-9.0.0"; then |
186 |
mycmakeargs+=( |
187 |
-D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr |
188 |
-D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0 |
189 |
@@ -134,11 +137,11 @@ src_configure() { |
190 |
sed -e "s|lib/|$(get_libdir)/|" \ |
191 |
-e "s|VAR_PV|${PV}|" \ |
192 |
-e "s|VAR_CASROOT|${ESYSROOT}/usr|" \ |
193 |
- < "${FILESDIR}"/${PN}-${PV_MAJ}.env.in > "${T}"/${PV_MAJ} || die |
194 |
+ < "${FILESDIR}"/${PN}.env.in > "${T}"/99${PN} || die |
195 |
|
196 |
# use TBB for memory allocation optimizations |
197 |
if use tbb; then |
198 |
- sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' -i "${T}"/${PV_MAJ} || die |
199 |
+ sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=2|' -i "${T}"/99${PN} || die |
200 |
fi |
201 |
|
202 |
# use internal optimized memory manager and don't clear memory with this |
203 |
@@ -146,16 +149,14 @@ src_configure() { |
204 |
if use optimize ; then |
205 |
sed -e 's|^#MMGT_OPT=0$|MMGT_OPT=1|' \ |
206 |
-e 's|^#MMGT_CLEAR=1$|MMGT_CLEAR=0|' \ |
207 |
- -i "${T}"/${PV_MAJ} || die |
208 |
+ -i "${T}"/99${PN} || die |
209 |
fi |
210 |
} |
211 |
|
212 |
src_install() { |
213 |
cmake_src_install |
214 |
|
215 |
- # respect slotting |
216 |
- insinto "/etc/env.d/${PN}" |
217 |
- doins "${T}/${PV_MAJ}" |
218 |
+ doenvd "${T}/99${PN}" |
219 |
|
220 |
# remove examples |
221 |
if use !examples; then |
222 |
@@ -164,8 +165,3 @@ src_install() { |
223 |
|
224 |
docompress -x /usr/share/doc/${PF}/overview/html |
225 |
} |
226 |
- |
227 |
-pkg_postinst() { |
228 |
- eselect ${PN} set ${PV_MAJ} || die "failed to switch to updated implementation" |
229 |
- einfo "You can switch between available ${PN} implementations using eselect ${PN}" |
230 |
-} |