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: Sat, 15 Aug 2020 01:50:44
Message-Id: 1597455274.97ad37cb061d6c879bcf49e2731cefce98bfe4ed.mleise@gentoo
1 commit: 97ad37cb061d6c879bcf49e2731cefce98bfe4ed
2 Author: Marco Leise <marco.leise <AT> gmx <DOT> de>
3 AuthorDate: Fri Aug 14 17:31:32 2020 +0000
4 Commit: Marco Leise <marco.leise <AT> gmx <DOT> de>
5 CommitDate: Sat Aug 15 01:34:34 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=97ad37cb
7
8 Moved remaining ldc2 ebuilds to EAPI=7 and all of them from the legacy eclass cmake-util to cmake.
9
10 Signed-off-by: Marco Leise <marco.leise <AT> gmx.de>
11
12 dev-lang/ldc2/ldc2-1.18.0-r1.ebuild | 76 +++++++++++++++++++++++++++++++++++++
13 dev-lang/ldc2/ldc2-1.19.0-r1.ebuild | 75 ++++++++++++++++++++++++++++++++++++
14 dev-lang/ldc2/ldc2-1.20.1-r1.ebuild | 76 +++++++++++++++++++++++++++++++++++++
15 dev-lang/ldc2/ldc2-1.21.0-r1.ebuild | 76 +++++++++++++++++++++++++++++++++++++
16 4 files changed, 303 insertions(+)
17
18 diff --git a/dev-lang/ldc2/ldc2-1.18.0-r1.ebuild b/dev-lang/ldc2/ldc2-1.18.0-r1.ebuild
19 new file mode 100644
20 index 0000000..5229a08
21 --- /dev/null
22 +++ b/dev-lang/ldc2/ldc2-1.18.0-r1.ebuild
23 @@ -0,0 +1,76 @@
24 +# Copyright 1999-2020 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=7
28 +
29 +inherit multilib-build cmake llvm
30 +
31 +MY_PV="${PV//_/-}"
32 +MY_P="ldc-${MY_PV}-src"
33 +SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz"
34 +S=${WORKDIR}/${MY_P}
35 +
36 +DESCRIPTION="LLVM D Compiler"
37 +HOMEPAGE="https://ldc-developers.github.com/ldc"
38 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
39 +LICENSE="BSD"
40 +SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
41 +
42 +IUSE="static-libs"
43 +
44 +# We support LLVM 3.9 through 9.
45 +RDEPEND="|| (
46 + sys-devel/llvm:9
47 + )
48 + <sys-devel/llvm-10:=
49 + >=app-eselect/eselect-dlang-20140709"
50 +DEPEND="${RDEPEND}"
51 +LLVM_MAX_SLOT=9
52 +PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch\
53 + ${FILESDIR}/ldc2-1.18.0-FileCheck-not.patch"
54 +
55 +# For now, we support amd64 multilib. Anyone is free to add more support here.
56 +MULTILIB_COMPAT=( abi_x86_{32,64} )
57 +
58 +DLANG_VERSION_RANGE="2.068 2.071-"
59 +DLANG_PACKAGE_TYPE="single"
60 +
61 +inherit dlang
62 +
63 +detect_hardened() {
64 + gcc --version | grep -o Hardened
65 +}
66 +
67 +src_prepare() {
68 + cmake_src_prepare
69 +}
70 +
71 +d_src_configure() {
72 + # Make sure libphobos2 is installed into ldc2's directory.
73 + export LIBDIR_${ABI}="${LIBDIR_HOST}"
74 + local mycmakeargs=(
75 + -DD_VERSION=2
76 + -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
77 + -DD_COMPILER="${DMD}"
78 + -DLDC_WITH_LLD=OFF
79 + )
80 + use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
81 + use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
82 + detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=', "-relocation-model=pic"' )
83 + cmake_src_configure
84 +}
85 +
86 +d_src_install() {
87 + cmake_src_install
88 +
89 + rm -rf "${ED}"/usr/share/bash-completion
90 +}
91 +
92 +pkg_postinst() {
93 + # Update active ldc2
94 + "${ROOT}"/usr/bin/eselect dlang update ldc2
95 +}
96 +
97 +pkg_postrm() {
98 + "${ROOT}"/usr/bin/eselect dlang update ldc2
99 +}
100
101 diff --git a/dev-lang/ldc2/ldc2-1.19.0-r1.ebuild b/dev-lang/ldc2/ldc2-1.19.0-r1.ebuild
102 new file mode 100644
103 index 0000000..e39c89a
104 --- /dev/null
105 +++ b/dev-lang/ldc2/ldc2-1.19.0-r1.ebuild
106 @@ -0,0 +1,75 @@
107 +# Copyright 1999-2020 Gentoo Authors
108 +# Distributed under the terms of the GNU General Public License v2
109 +
110 +EAPI=7
111 +
112 +inherit multilib-build cmake llvm
113 +
114 +MY_PV="${PV//_/-}"
115 +MY_P="ldc-${MY_PV}-src"
116 +SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz"
117 +S=${WORKDIR}/${MY_P}
118 +
119 +DESCRIPTION="LLVM D Compiler"
120 +HOMEPAGE="https://ldc-developers.github.com/ldc"
121 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
122 +LICENSE="BSD"
123 +SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
124 +
125 +IUSE="static-libs"
126 +
127 +# We support LLVM 3.9 through 9.
128 +RDEPEND="|| (
129 + sys-devel/llvm:9
130 + )
131 + <sys-devel/llvm-10:=
132 + >=app-eselect/eselect-dlang-20140709"
133 +DEPEND="${RDEPEND}"
134 +LLVM_MAX_SLOT=9
135 +PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch"
136 +
137 +# For now, we support amd64 multilib. Anyone is free to add more support here.
138 +MULTILIB_COMPAT=( abi_x86_{32,64} )
139 +
140 +DLANG_VERSION_RANGE="2.068 2.071-"
141 +DLANG_PACKAGE_TYPE="single"
142 +
143 +inherit dlang
144 +
145 +detect_hardened() {
146 + gcc --version | grep -o Hardened
147 +}
148 +
149 +src_prepare() {
150 + cmake_src_prepare
151 +}
152 +
153 +d_src_configure() {
154 + # Make sure libphobos2 is installed into ldc2's directory.
155 + export LIBDIR_${ABI}="${LIBDIR_HOST}"
156 + local mycmakeargs=(
157 + -DD_VERSION=2
158 + -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
159 + -DD_COMPILER="${DMD}"
160 + -DLDC_WITH_LLD=OFF
161 + )
162 + use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
163 + use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
164 + detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=', "-relocation-model=pic"' )
165 + cmake_src_configure
166 +}
167 +
168 +d_src_install() {
169 + cmake_src_install
170 +
171 + rm -rf "${ED}"/usr/share/bash-completion
172 +}
173 +
174 +pkg_postinst() {
175 + # Update active ldc2
176 + "${ROOT}"/usr/bin/eselect dlang update ldc2
177 +}
178 +
179 +pkg_postrm() {
180 + "${ROOT}"/usr/bin/eselect dlang update ldc2
181 +}
182
183 diff --git a/dev-lang/ldc2/ldc2-1.20.1-r1.ebuild b/dev-lang/ldc2/ldc2-1.20.1-r1.ebuild
184 new file mode 100644
185 index 0000000..c5db3f2
186 --- /dev/null
187 +++ b/dev-lang/ldc2/ldc2-1.20.1-r1.ebuild
188 @@ -0,0 +1,76 @@
189 +# Copyright 1999-2020 Gentoo Authors
190 +# Distributed under the terms of the GNU General Public License v2
191 +
192 +EAPI=7
193 +
194 +inherit multilib-build cmake llvm
195 +
196 +MY_PV="${PV//_/-}"
197 +MY_P="ldc-${MY_PV}-src"
198 +SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz"
199 +S=${WORKDIR}/${MY_P}
200 +
201 +DESCRIPTION="LLVM D Compiler"
202 +HOMEPAGE="https://ldc-developers.github.com/ldc"
203 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
204 +LICENSE="BSD"
205 +SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
206 +
207 +IUSE="static-libs"
208 +
209 +# We support LLVM 3.9 through 10.
210 +RDEPEND="|| (
211 + sys-devel/llvm:10
212 + sys-devel/llvm:9
213 + )
214 + <sys-devel/llvm-11:=
215 + >=app-eselect/eselect-dlang-20140709"
216 +DEPEND="${RDEPEND}"
217 +LLVM_MAX_SLOT=10
218 +PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch"
219 +
220 +# For now, we support amd64 multilib. Anyone is free to add more support here.
221 +MULTILIB_COMPAT=( abi_x86_{32,64} )
222 +
223 +DLANG_VERSION_RANGE="2.075-"
224 +DLANG_PACKAGE_TYPE="single"
225 +
226 +inherit dlang
227 +
228 +detect_hardened() {
229 + gcc --version | grep -o Hardened
230 +}
231 +
232 +src_prepare() {
233 + cmake_src_prepare
234 +}
235 +
236 +d_src_configure() {
237 + # Make sure libphobos2 is installed into ldc2's directory.
238 + export LIBDIR_${ABI}="${LIBDIR_HOST}"
239 + local mycmakeargs=(
240 + -DD_VERSION=2
241 + -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
242 + -DD_COMPILER="${DMD}"
243 + -DLDC_WITH_LLD=OFF
244 + )
245 + use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
246 + use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
247 + detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=', "-relocation-model=pic"' )
248 + cmake_src_configure
249 +}
250 +
251 +d_src_install() {
252 + cmake_src_install
253 +
254 + rm -rf "${ED}"/usr/share/bash-completion
255 +}
256 +
257 +pkg_postinst() {
258 + # Update active ldc2
259 + "${ROOT}"/usr/bin/eselect dlang update ldc2
260 +}
261 +
262 +pkg_postrm() {
263 + "${ROOT}"/usr/bin/eselect dlang update ldc2
264 +}
265
266 diff --git a/dev-lang/ldc2/ldc2-1.21.0-r1.ebuild b/dev-lang/ldc2/ldc2-1.21.0-r1.ebuild
267 new file mode 100644
268 index 0000000..c5db3f2
269 --- /dev/null
270 +++ b/dev-lang/ldc2/ldc2-1.21.0-r1.ebuild
271 @@ -0,0 +1,76 @@
272 +# Copyright 1999-2020 Gentoo Authors
273 +# Distributed under the terms of the GNU General Public License v2
274 +
275 +EAPI=7
276 +
277 +inherit multilib-build cmake llvm
278 +
279 +MY_PV="${PV//_/-}"
280 +MY_P="ldc-${MY_PV}-src"
281 +SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz"
282 +S=${WORKDIR}/${MY_P}
283 +
284 +DESCRIPTION="LLVM D Compiler"
285 +HOMEPAGE="https://ldc-developers.github.com/ldc"
286 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
287 +LICENSE="BSD"
288 +SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
289 +
290 +IUSE="static-libs"
291 +
292 +# We support LLVM 3.9 through 10.
293 +RDEPEND="|| (
294 + sys-devel/llvm:10
295 + sys-devel/llvm:9
296 + )
297 + <sys-devel/llvm-11:=
298 + >=app-eselect/eselect-dlang-20140709"
299 +DEPEND="${RDEPEND}"
300 +LLVM_MAX_SLOT=10
301 +PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch"
302 +
303 +# For now, we support amd64 multilib. Anyone is free to add more support here.
304 +MULTILIB_COMPAT=( abi_x86_{32,64} )
305 +
306 +DLANG_VERSION_RANGE="2.075-"
307 +DLANG_PACKAGE_TYPE="single"
308 +
309 +inherit dlang
310 +
311 +detect_hardened() {
312 + gcc --version | grep -o Hardened
313 +}
314 +
315 +src_prepare() {
316 + cmake_src_prepare
317 +}
318 +
319 +d_src_configure() {
320 + # Make sure libphobos2 is installed into ldc2's directory.
321 + export LIBDIR_${ABI}="${LIBDIR_HOST}"
322 + local mycmakeargs=(
323 + -DD_VERSION=2
324 + -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
325 + -DD_COMPILER="${DMD}"
326 + -DLDC_WITH_LLD=OFF
327 + )
328 + use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
329 + use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
330 + detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=', "-relocation-model=pic"' )
331 + cmake_src_configure
332 +}
333 +
334 +d_src_install() {
335 + cmake_src_install
336 +
337 + rm -rf "${ED}"/usr/share/bash-completion
338 +}
339 +
340 +pkg_postinst() {
341 + # Update active ldc2
342 + "${ROOT}"/usr/bin/eselect dlang update ldc2
343 +}
344 +
345 +pkg_postrm() {
346 + "${ROOT}"/usr/bin/eselect dlang update ldc2
347 +}