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: profiles/, dev-lang/ldc2/, eclass/
Date: Tue, 10 May 2022 23:17:26
Message-Id: 1652203826.9106a34616e9df65e25ff7b16fa379a086b7d05b.mleise@gentoo
1 commit: 9106a34616e9df65e25ff7b16fa379a086b7d05b
2 Author: Horodniceanu Andrei <a.horodniceanu <AT> protonmail <DOT> com>
3 AuthorDate: Tue May 10 17:30:26 2022 +0000
4 Commit: Marco Leise <marco.leise <AT> gmx <DOT> de>
5 CommitDate: Tue May 10 17:30:26 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=9106a346
7
8 ldc2-1.29.0
9
10 Signed-off-by: Horodniceanu Andrei <a.horodniceanu <AT> protonmail.com>
11
12 dev-lang/ldc2/Manifest | 1 +
13 dev-lang/ldc2/ldc2-1.29.0.ebuild | 83 ++++++++++++++++++++++++++++++++++++++++
14 eclass/dlang-compilers.eclass | 1 +
15 profiles/use.desc | 1 +
16 4 files changed, 86 insertions(+)
17
18 diff --git a/dev-lang/ldc2/Manifest b/dev-lang/ldc2/Manifest
19 index d54c201..bd2a3ec 100644
20 --- a/dev-lang/ldc2/Manifest
21 +++ b/dev-lang/ldc2/Manifest
22 @@ -2,3 +2,4 @@ DIST ldc-1.25.1-src.tar.gz 7625687 BLAKE2B 02eacb06c334608d4b649d8fdffdef03cd164
23 DIST ldc-1.26.0-src.tar.gz 7650063 BLAKE2B d132dc842e27a93fc76810e17db1d67f856530ca7e6948c795ec5f943e4be32513b4a956aa9217df4acd45806bc81ff855ebab757aa3f6a1943fa7c394b3e3ce SHA512 7bb2aa464f5ba834c07f67743f4af01db6588d56611d6c9e250a6908ebe93a0dcd9d3a79f8f252fc92eeb4826bfa62de6c51c4db03ff80e60a8d993e4451f573
24 DIST ldc-1.27.1-src.tar.gz 7742031 BLAKE2B d459d70e6745930aca1293cf17ec186526393ce3ff3888c0aad3781f215ed53d6a44a08e3a1bc69e91ba0b039c443e277a0b526e7054e18445e074be1de12e87 SHA512 d10118c9c52a26510f3f9d8d93b38f89144aca7b861ef663e807df0bcf1bb3bc12d1410e6617891e58a3f2cfe160e31bb8478bb1f39f79d026c97ce7e72a9f65
25 DIST ldc-1.28.1-src.tar.gz 7937120 BLAKE2B fae97676064506989883c03f628685bc8ddd3bb3cd1f41afef9a34bba83c9d803a6cff186145a26e8605479b18b7a7661bb14a950f5891ab27b195f045a219a9 SHA512 3ec4c754873db4c00fb2e45ec42a3641f46ed6a7d882c0a00edb9ee8a5686fad7c43e45068b7a216b2df89395860ccfc700a7f3efea38c2d3d0ac3b90dd5d3a1
26 +DIST ldc-1.29.0-src.tar.gz 8080420 BLAKE2B 37890b283f8097e6d845d6d849b9c04e64bdca5654f483bd83e0d387f0bc4d1cacdef023ccab67dd140a57615e0e7ba9f92acffb18f49211ca130a503f8307e8 SHA512 f8a1e23150b84ef31d3616b9be8ca4c1a64df2b3f26fbedb1119a7d2d3dacad10cd86b6b9bf79728c8c725213f8f7ae88acdeb7a0d9e2f3f5068857f97c39a7e
27
28 diff --git a/dev-lang/ldc2/ldc2-1.29.0.ebuild b/dev-lang/ldc2/ldc2-1.29.0.ebuild
29 new file mode 100644
30 index 0000000..d5fa6fc
31 --- /dev/null
32 +++ b/dev-lang/ldc2/ldc2-1.29.0.ebuild
33 @@ -0,0 +1,83 @@
34 +# Copyright 1999-2022 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +inherit multilib-build cmake llvm
40 +
41 +MY_PV="${PV//_/-}"
42 +MY_P="ldc-${MY_PV}-src"
43 +SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz"
44 +S=${WORKDIR}/${MY_P}
45 +
46 +DESCRIPTION="LLVM D Compiler"
47 +HOMEPAGE="https://github.com/ldc-developers/ldc"
48 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
49 +LICENSE="BSD"
50 +SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
51 +
52 +IUSE="static-libs"
53 +
54 +# We support LLVM 6.0 through 14.
55 +RDEPEND="dev-util/ninja
56 + || (
57 + sys-devel/llvm:12
58 + sys-devel/llvm:13
59 + sys-devel/llvm:14
60 + )
61 + <sys-devel/llvm-15:=
62 + >=app-eselect/eselect-dlang-20140709"
63 +DEPEND="${RDEPEND}"
64 +LLVM_MAX_SLOT=14
65 +PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch"
66 +
67 +# For now, we support amd64 multilib. Anyone is free to add more support here.
68 +MULTILIB_COMPAT=( abi_x86_{32,64} )
69 +
70 +DLANG_VERSION_RANGE="2.075-"
71 +DLANG_PACKAGE_TYPE="single"
72 +
73 +inherit dlang
74 +
75 +detect_hardened() {
76 + gcc --version | grep -o Hardened
77 +}
78 +
79 +src_prepare() {
80 + cmake_src_prepare
81 +}
82 +
83 +d_src_configure() {
84 + # Make sure libphobos2 is installed into ldc2's directory.
85 + export LIBDIR_${ABI}="${LIBDIR_HOST}"
86 + local mycmakeargs=(
87 + -DD_VERSION=2
88 + -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
89 + -DD_COMPILER="${DMD}"
90 + -DLDC_WITH_LLD=OFF
91 + )
92 + use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
93 + use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
94 + detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=' "-relocation-model=pic",' )
95 + cmake_src_configure
96 +}
97 +
98 +d_src_compile()
99 +{
100 + cmake_src_compile
101 +}
102 +
103 +d_src_install() {
104 + cmake_src_install
105 +
106 + rm -rf "${ED}"/usr/share/bash-completion
107 +}
108 +
109 +pkg_postinst() {
110 + # Update active ldc2
111 + "${ROOT}"/usr/bin/eselect dlang update ldc2
112 +}
113 +
114 +pkg_postrm() {
115 + "${ROOT}"/usr/bin/eselect dlang update ldc2
116 +}
117
118 diff --git a/eclass/dlang-compilers.eclass b/eclass/dlang-compilers.eclass
119 index 23000ce..2e1ac16 100644
120 --- a/eclass/dlang-compilers.eclass
121 +++ b/eclass/dlang-compilers.eclass
122 @@ -61,6 +61,7 @@ dlang-compilers_declare_versions() {
123 ["1.26"]="2.096 amd64 ~arm ~arm64 ~ppc64 x86"
124 ["1.27"]="2.097 amd64 ~arm ~arm64 ~ppc64 x86"
125 ["1.28"]="2.098 amd64 ~arm ~arm64 ~ppc64 x86"
126 + ["1.29"]="2.099 ~amd64 ~arm ~arm64 ~ppc64 ~x86"
127 )
128 }
129
130
131 diff --git a/profiles/use.desc b/profiles/use.desc
132 index 9fc2d0c..f03cb2d 100644
133 --- a/profiles/use.desc
134 +++ b/profiles/use.desc
135 @@ -38,3 +38,4 @@ ldc2-1_25 - Build for ldc2 1.25
136 ldc2-1_26 - Build for ldc2 1.26
137 ldc2-1_27 - Build for ldc2 1.27
138 ldc2-1_28 - Build for ldc2 1.28
139 +ldc2-1_29 - Build for ldc2 1.29