Gentoo Archives: gentoo-commits

From: Marco Leise <marco.leise@×××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/user/dlang:master commit in: dev-lang/ldc2/
Date: Wed, 07 Jul 2021 15:41:20
Message-Id: 1625666357.e177a4bd80ebed3dd237d7f16f8e4a20b56d2084.mleise@gentoo
1 commit: e177a4bd80ebed3dd237d7f16f8e4a20b56d2084
2 Author: Marco Leise <marco.leise <AT> gmx <DOT> de>
3 AuthorDate: Wed Jul 7 13:15:16 2021 +0000
4 Commit: Marco Leise <marco.leise <AT> gmx <DOT> de>
5 CommitDate: Wed Jul 7 13:59:17 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=e177a4bd
7
8 Fix for syntax error in ldc2.conf during compilation on hardened Gentoo.
9
10 Signed-off-by: Marco Leise <marco.leise <AT> gmx.de>
11
12 dev-lang/ldc2/ldc2-1.20.1-r2.ebuild | 81 +++++++++++++++++++++++++++++++++++++
13 dev-lang/ldc2/ldc2-1.21.0-r2.ebuild | 81 +++++++++++++++++++++++++++++++++++++
14 dev-lang/ldc2/ldc2-1.22.0-r1.ebuild | 81 +++++++++++++++++++++++++++++++++++++
15 dev-lang/ldc2/ldc2-1.23.0-r1.ebuild | 81 +++++++++++++++++++++++++++++++++++++
16 dev-lang/ldc2/ldc2-1.24.0-r1.ebuild | 81 +++++++++++++++++++++++++++++++++++++
17 5 files changed, 405 insertions(+)
18
19 diff --git a/dev-lang/ldc2/ldc2-1.20.1-r2.ebuild b/dev-lang/ldc2/ldc2-1.20.1-r2.ebuild
20 new file mode 100644
21 index 0000000..5a2b5c6
22 --- /dev/null
23 +++ b/dev-lang/ldc2/ldc2-1.20.1-r2.ebuild
24 @@ -0,0 +1,81 @@
25 +# Copyright 1999-2021 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +inherit multilib-build cmake llvm
31 +
32 +MY_PV="${PV//_/-}"
33 +MY_P="ldc-${MY_PV}-src"
34 +SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz"
35 +S=${WORKDIR}/${MY_P}
36 +
37 +DESCRIPTION="LLVM D Compiler"
38 +HOMEPAGE="https://github.com/ldc-developers/ldc"
39 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
40 +LICENSE="BSD"
41 +SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
42 +
43 +IUSE="static-libs"
44 +
45 +# We support LLVM 3.9 through 10.
46 +RDEPEND="dev-util/ninja
47 + || (
48 + sys-devel/llvm:10
49 + )
50 + <sys-devel/llvm-11:=
51 + >=app-eselect/eselect-dlang-20140709"
52 +DEPEND="${RDEPEND}"
53 +LLVM_MAX_SLOT=10
54 +PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch"
55 +
56 +# For now, we support amd64 multilib. Anyone is free to add more support here.
57 +MULTILIB_COMPAT=( abi_x86_{32,64} )
58 +
59 +DLANG_VERSION_RANGE="2.075-"
60 +DLANG_PACKAGE_TYPE="single"
61 +
62 +inherit dlang
63 +
64 +detect_hardened() {
65 + gcc --version | grep -o Hardened
66 +}
67 +
68 +src_prepare() {
69 + cmake_src_prepare
70 +}
71 +
72 +d_src_configure() {
73 + # Make sure libphobos2 is installed into ldc2's directory.
74 + export LIBDIR_${ABI}="${LIBDIR_HOST}"
75 + local mycmakeargs=(
76 + -DD_VERSION=2
77 + -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
78 + -DD_COMPILER="${DMD}"
79 + -DLDC_WITH_LLD=OFF
80 + )
81 + use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
82 + use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
83 + detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=' "-relocation-model=pic",' )
84 + cmake_src_configure
85 +}
86 +
87 +d_src_compile()
88 +{
89 + cmake_src_compile
90 +}
91 +
92 +d_src_install() {
93 + cmake_src_install
94 +
95 + rm -rf "${ED}"/usr/share/bash-completion
96 +}
97 +
98 +pkg_postinst() {
99 + # Update active ldc2
100 + "${ROOT}"/usr/bin/eselect dlang update ldc2
101 +}
102 +
103 +pkg_postrm() {
104 + "${ROOT}"/usr/bin/eselect dlang update ldc2
105 +}
106
107 diff --git a/dev-lang/ldc2/ldc2-1.21.0-r2.ebuild b/dev-lang/ldc2/ldc2-1.21.0-r2.ebuild
108 new file mode 100644
109 index 0000000..5a2b5c6
110 --- /dev/null
111 +++ b/dev-lang/ldc2/ldc2-1.21.0-r2.ebuild
112 @@ -0,0 +1,81 @@
113 +# Copyright 1999-2021 Gentoo Authors
114 +# Distributed under the terms of the GNU General Public License v2
115 +
116 +EAPI=7
117 +
118 +inherit multilib-build cmake llvm
119 +
120 +MY_PV="${PV//_/-}"
121 +MY_P="ldc-${MY_PV}-src"
122 +SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz"
123 +S=${WORKDIR}/${MY_P}
124 +
125 +DESCRIPTION="LLVM D Compiler"
126 +HOMEPAGE="https://github.com/ldc-developers/ldc"
127 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
128 +LICENSE="BSD"
129 +SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
130 +
131 +IUSE="static-libs"
132 +
133 +# We support LLVM 3.9 through 10.
134 +RDEPEND="dev-util/ninja
135 + || (
136 + sys-devel/llvm:10
137 + )
138 + <sys-devel/llvm-11:=
139 + >=app-eselect/eselect-dlang-20140709"
140 +DEPEND="${RDEPEND}"
141 +LLVM_MAX_SLOT=10
142 +PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch"
143 +
144 +# For now, we support amd64 multilib. Anyone is free to add more support here.
145 +MULTILIB_COMPAT=( abi_x86_{32,64} )
146 +
147 +DLANG_VERSION_RANGE="2.075-"
148 +DLANG_PACKAGE_TYPE="single"
149 +
150 +inherit dlang
151 +
152 +detect_hardened() {
153 + gcc --version | grep -o Hardened
154 +}
155 +
156 +src_prepare() {
157 + cmake_src_prepare
158 +}
159 +
160 +d_src_configure() {
161 + # Make sure libphobos2 is installed into ldc2's directory.
162 + export LIBDIR_${ABI}="${LIBDIR_HOST}"
163 + local mycmakeargs=(
164 + -DD_VERSION=2
165 + -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
166 + -DD_COMPILER="${DMD}"
167 + -DLDC_WITH_LLD=OFF
168 + )
169 + use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
170 + use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
171 + detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=' "-relocation-model=pic",' )
172 + cmake_src_configure
173 +}
174 +
175 +d_src_compile()
176 +{
177 + cmake_src_compile
178 +}
179 +
180 +d_src_install() {
181 + cmake_src_install
182 +
183 + rm -rf "${ED}"/usr/share/bash-completion
184 +}
185 +
186 +pkg_postinst() {
187 + # Update active ldc2
188 + "${ROOT}"/usr/bin/eselect dlang update ldc2
189 +}
190 +
191 +pkg_postrm() {
192 + "${ROOT}"/usr/bin/eselect dlang update ldc2
193 +}
194
195 diff --git a/dev-lang/ldc2/ldc2-1.22.0-r1.ebuild b/dev-lang/ldc2/ldc2-1.22.0-r1.ebuild
196 new file mode 100644
197 index 0000000..5a2b5c6
198 --- /dev/null
199 +++ b/dev-lang/ldc2/ldc2-1.22.0-r1.ebuild
200 @@ -0,0 +1,81 @@
201 +# Copyright 1999-2021 Gentoo Authors
202 +# Distributed under the terms of the GNU General Public License v2
203 +
204 +EAPI=7
205 +
206 +inherit multilib-build cmake llvm
207 +
208 +MY_PV="${PV//_/-}"
209 +MY_P="ldc-${MY_PV}-src"
210 +SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz"
211 +S=${WORKDIR}/${MY_P}
212 +
213 +DESCRIPTION="LLVM D Compiler"
214 +HOMEPAGE="https://github.com/ldc-developers/ldc"
215 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
216 +LICENSE="BSD"
217 +SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
218 +
219 +IUSE="static-libs"
220 +
221 +# We support LLVM 3.9 through 10.
222 +RDEPEND="dev-util/ninja
223 + || (
224 + sys-devel/llvm:10
225 + )
226 + <sys-devel/llvm-11:=
227 + >=app-eselect/eselect-dlang-20140709"
228 +DEPEND="${RDEPEND}"
229 +LLVM_MAX_SLOT=10
230 +PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch"
231 +
232 +# For now, we support amd64 multilib. Anyone is free to add more support here.
233 +MULTILIB_COMPAT=( abi_x86_{32,64} )
234 +
235 +DLANG_VERSION_RANGE="2.075-"
236 +DLANG_PACKAGE_TYPE="single"
237 +
238 +inherit dlang
239 +
240 +detect_hardened() {
241 + gcc --version | grep -o Hardened
242 +}
243 +
244 +src_prepare() {
245 + cmake_src_prepare
246 +}
247 +
248 +d_src_configure() {
249 + # Make sure libphobos2 is installed into ldc2's directory.
250 + export LIBDIR_${ABI}="${LIBDIR_HOST}"
251 + local mycmakeargs=(
252 + -DD_VERSION=2
253 + -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
254 + -DD_COMPILER="${DMD}"
255 + -DLDC_WITH_LLD=OFF
256 + )
257 + use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
258 + use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
259 + detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=' "-relocation-model=pic",' )
260 + cmake_src_configure
261 +}
262 +
263 +d_src_compile()
264 +{
265 + cmake_src_compile
266 +}
267 +
268 +d_src_install() {
269 + cmake_src_install
270 +
271 + rm -rf "${ED}"/usr/share/bash-completion
272 +}
273 +
274 +pkg_postinst() {
275 + # Update active ldc2
276 + "${ROOT}"/usr/bin/eselect dlang update ldc2
277 +}
278 +
279 +pkg_postrm() {
280 + "${ROOT}"/usr/bin/eselect dlang update ldc2
281 +}
282
283 diff --git a/dev-lang/ldc2/ldc2-1.23.0-r1.ebuild b/dev-lang/ldc2/ldc2-1.23.0-r1.ebuild
284 new file mode 100644
285 index 0000000..322787b
286 --- /dev/null
287 +++ b/dev-lang/ldc2/ldc2-1.23.0-r1.ebuild
288 @@ -0,0 +1,81 @@
289 +# Copyright 1999-2021 Gentoo Authors
290 +# Distributed under the terms of the GNU General Public License v2
291 +
292 +EAPI=7
293 +
294 +inherit multilib-build cmake llvm
295 +
296 +MY_PV="${PV//_/-}"
297 +MY_P="ldc-${MY_PV}-src"
298 +SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz"
299 +S=${WORKDIR}/${MY_P}
300 +
301 +DESCRIPTION="LLVM D Compiler"
302 +HOMEPAGE="https://github.com/ldc-developers/ldc"
303 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
304 +LICENSE="BSD"
305 +SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
306 +
307 +IUSE="static-libs"
308 +
309 +# We support LLVM 6.0 through 10.
310 +RDEPEND="dev-util/ninja
311 + || (
312 + sys-devel/llvm:10
313 + )
314 + <sys-devel/llvm-11:=
315 + >=app-eselect/eselect-dlang-20140709"
316 +DEPEND="${RDEPEND}"
317 +LLVM_MAX_SLOT=10
318 +PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch"
319 +
320 +# For now, we support amd64 multilib. Anyone is free to add more support here.
321 +MULTILIB_COMPAT=( abi_x86_{32,64} )
322 +
323 +DLANG_VERSION_RANGE="2.075-"
324 +DLANG_PACKAGE_TYPE="single"
325 +
326 +inherit dlang
327 +
328 +detect_hardened() {
329 + gcc --version | grep -o Hardened
330 +}
331 +
332 +src_prepare() {
333 + cmake_src_prepare
334 +}
335 +
336 +d_src_configure() {
337 + # Make sure libphobos2 is installed into ldc2's directory.
338 + export LIBDIR_${ABI}="${LIBDIR_HOST}"
339 + local mycmakeargs=(
340 + -DD_VERSION=2
341 + -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
342 + -DD_COMPILER="${DMD}"
343 + -DLDC_WITH_LLD=OFF
344 + )
345 + use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
346 + use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
347 + detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=' "-relocation-model=pic",' )
348 + cmake_src_configure
349 +}
350 +
351 +d_src_compile()
352 +{
353 + cmake_src_compile
354 +}
355 +
356 +d_src_install() {
357 + cmake_src_install
358 +
359 + rm -rf "${ED}"/usr/share/bash-completion
360 +}
361 +
362 +pkg_postinst() {
363 + # Update active ldc2
364 + "${ROOT}"/usr/bin/eselect dlang update ldc2
365 +}
366 +
367 +pkg_postrm() {
368 + "${ROOT}"/usr/bin/eselect dlang update ldc2
369 +}
370
371 diff --git a/dev-lang/ldc2/ldc2-1.24.0-r1.ebuild b/dev-lang/ldc2/ldc2-1.24.0-r1.ebuild
372 new file mode 100644
373 index 0000000..322787b
374 --- /dev/null
375 +++ b/dev-lang/ldc2/ldc2-1.24.0-r1.ebuild
376 @@ -0,0 +1,81 @@
377 +# Copyright 1999-2021 Gentoo Authors
378 +# Distributed under the terms of the GNU General Public License v2
379 +
380 +EAPI=7
381 +
382 +inherit multilib-build cmake llvm
383 +
384 +MY_PV="${PV//_/-}"
385 +MY_P="ldc-${MY_PV}-src"
386 +SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz"
387 +S=${WORKDIR}/${MY_P}
388 +
389 +DESCRIPTION="LLVM D Compiler"
390 +HOMEPAGE="https://github.com/ldc-developers/ldc"
391 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
392 +LICENSE="BSD"
393 +SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
394 +
395 +IUSE="static-libs"
396 +
397 +# We support LLVM 6.0 through 10.
398 +RDEPEND="dev-util/ninja
399 + || (
400 + sys-devel/llvm:10
401 + )
402 + <sys-devel/llvm-11:=
403 + >=app-eselect/eselect-dlang-20140709"
404 +DEPEND="${RDEPEND}"
405 +LLVM_MAX_SLOT=10
406 +PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch"
407 +
408 +# For now, we support amd64 multilib. Anyone is free to add more support here.
409 +MULTILIB_COMPAT=( abi_x86_{32,64} )
410 +
411 +DLANG_VERSION_RANGE="2.075-"
412 +DLANG_PACKAGE_TYPE="single"
413 +
414 +inherit dlang
415 +
416 +detect_hardened() {
417 + gcc --version | grep -o Hardened
418 +}
419 +
420 +src_prepare() {
421 + cmake_src_prepare
422 +}
423 +
424 +d_src_configure() {
425 + # Make sure libphobos2 is installed into ldc2's directory.
426 + export LIBDIR_${ABI}="${LIBDIR_HOST}"
427 + local mycmakeargs=(
428 + -DD_VERSION=2
429 + -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
430 + -DD_COMPILER="${DMD}"
431 + -DLDC_WITH_LLD=OFF
432 + )
433 + use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
434 + use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
435 + detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=' "-relocation-model=pic",' )
436 + cmake_src_configure
437 +}
438 +
439 +d_src_compile()
440 +{
441 + cmake_src_compile
442 +}
443 +
444 +d_src_install() {
445 + cmake_src_install
446 +
447 + rm -rf "${ED}"/usr/share/bash-completion
448 +}
449 +
450 +pkg_postinst() {
451 + # Update active ldc2
452 + "${ROOT}"/usr/bin/eselect dlang update ldc2
453 +}
454 +
455 +pkg_postrm() {
456 + "${ROOT}"/usr/bin/eselect dlang update ldc2
457 +}