1 |
commit: f737b97e9208279f490438dac51d22c4da7bb07b |
2 |
Author: Niko Böckerman <niko.bockerman <AT> protonmail <DOT> com> |
3 |
AuthorDate: Thu Feb 3 20:55:04 2022 +0000 |
4 |
Commit: Marco Leise <marco.leise <AT> gmx <DOT> de> |
5 |
CommitDate: Mon Feb 7 18:26:41 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=f737b97e |
7 |
|
8 |
ldc2-1.28.0 |
9 |
|
10 |
Signed-off-by: Niko Böckerman <niko.bockerman <AT> protonmail.com> |
11 |
|
12 |
dev-lang/ldc2/Manifest | 1 + |
13 |
dev-lang/ldc2/ldc2-1.28.0.ebuild | 82 ++++++++++++++++++++++++++++++++++++++++ |
14 |
eclass/dlang-compilers.eclass | 1 + |
15 |
profiles/use.desc | 1 + |
16 |
4 files changed, 85 insertions(+) |
17 |
|
18 |
diff --git a/dev-lang/ldc2/Manifest b/dev-lang/ldc2/Manifest |
19 |
index d087c64..a8f2072 100644 |
20 |
--- a/dev-lang/ldc2/Manifest |
21 |
+++ b/dev-lang/ldc2/Manifest |
22 |
@@ -2,3 +2,4 @@ DIST ldc-1.24.0-src.tar.gz 7522065 BLAKE2B 65069835528466c4a39ebf08245fa7fcc9348 |
23 |
DIST ldc-1.25.1-src.tar.gz 7625687 BLAKE2B 02eacb06c334608d4b649d8fdffdef03cd1645a2d237063c888728c840a8c939df1c1ff9aefe3efab395358a7757dd287d1efa7a704b37f0b2661c8c1b5faaca SHA512 a087f48ec8f559eea17f88f9c00893c84db17bfcb10590011f43d6d1573a30286067207133ad6d249897fe51cb22829c2ddf00bf23210f01aa059b1f87790fae |
24 |
DIST ldc-1.26.0-src.tar.gz 7650063 BLAKE2B d132dc842e27a93fc76810e17db1d67f856530ca7e6948c795ec5f943e4be32513b4a956aa9217df4acd45806bc81ff855ebab757aa3f6a1943fa7c394b3e3ce SHA512 7bb2aa464f5ba834c07f67743f4af01db6588d56611d6c9e250a6908ebe93a0dcd9d3a79f8f252fc92eeb4826bfa62de6c51c4db03ff80e60a8d993e4451f573 |
25 |
DIST ldc-1.27.1-src.tar.gz 7742031 BLAKE2B d459d70e6745930aca1293cf17ec186526393ce3ff3888c0aad3781f215ed53d6a44a08e3a1bc69e91ba0b039c443e277a0b526e7054e18445e074be1de12e87 SHA512 d10118c9c52a26510f3f9d8d93b38f89144aca7b861ef663e807df0bcf1bb3bc12d1410e6617891e58a3f2cfe160e31bb8478bb1f39f79d026c97ce7e72a9f65 |
26 |
+DIST ldc-1.28.0-src.tar.gz 7923347 BLAKE2B 5381eab19ad66bfa91e27ed9085b11e6a7e202704dcd8ea6141d16fc8580c464c88fba895e1248568781059bf77c396c56e0669ca36125df948e32eaef98c9bd SHA512 3e566282175d65eb075c9c076bcf0475658c747238ed91efd350a7834d6d54760310ac5249fb74db3812c07058efbca8d726427ef39055d77b3f9a6940bf4188 |
27 |
|
28 |
diff --git a/dev-lang/ldc2/ldc2-1.28.0.ebuild b/dev-lang/ldc2/ldc2-1.28.0.ebuild |
29 |
new file mode 100644 |
30 |
index 0000000..a68973a |
31 |
--- /dev/null |
32 |
+++ b/dev-lang/ldc2/ldc2-1.28.0.ebuild |
33 |
@@ -0,0 +1,82 @@ |
34 |
+# Copyright 1999-2021 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 10. |
55 |
+RDEPEND="dev-util/ninja |
56 |
+ || ( |
57 |
+ sys-devel/llvm:11 |
58 |
+ sys-devel/llvm:12 |
59 |
+ ) |
60 |
+ <sys-devel/llvm-13:= |
61 |
+ >=app-eselect/eselect-dlang-20140709" |
62 |
+DEPEND="${RDEPEND}" |
63 |
+LLVM_MAX_SLOT=12 |
64 |
+PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch" |
65 |
+ |
66 |
+# For now, we support amd64 multilib. Anyone is free to add more support here. |
67 |
+MULTILIB_COMPAT=( abi_x86_{32,64} ) |
68 |
+ |
69 |
+DLANG_VERSION_RANGE="2.075-" |
70 |
+DLANG_PACKAGE_TYPE="single" |
71 |
+ |
72 |
+inherit dlang |
73 |
+ |
74 |
+detect_hardened() { |
75 |
+ gcc --version | grep -o Hardened |
76 |
+} |
77 |
+ |
78 |
+src_prepare() { |
79 |
+ cmake_src_prepare |
80 |
+} |
81 |
+ |
82 |
+d_src_configure() { |
83 |
+ # Make sure libphobos2 is installed into ldc2's directory. |
84 |
+ export LIBDIR_${ABI}="${LIBDIR_HOST}" |
85 |
+ local mycmakeargs=( |
86 |
+ -DD_VERSION=2 |
87 |
+ -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2) |
88 |
+ -DD_COMPILER="${DMD}" |
89 |
+ -DLDC_WITH_LLD=OFF |
90 |
+ ) |
91 |
+ use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON ) |
92 |
+ use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON ) |
93 |
+ detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=' "-relocation-model=pic",' ) |
94 |
+ cmake_src_configure |
95 |
+} |
96 |
+ |
97 |
+d_src_compile() |
98 |
+{ |
99 |
+ cmake_src_compile |
100 |
+} |
101 |
+ |
102 |
+d_src_install() { |
103 |
+ cmake_src_install |
104 |
+ |
105 |
+ rm -rf "${ED}"/usr/share/bash-completion |
106 |
+} |
107 |
+ |
108 |
+pkg_postinst() { |
109 |
+ # Update active ldc2 |
110 |
+ "${ROOT}"/usr/bin/eselect dlang update ldc2 |
111 |
+} |
112 |
+ |
113 |
+pkg_postrm() { |
114 |
+ "${ROOT}"/usr/bin/eselect dlang update ldc2 |
115 |
+} |
116 |
|
117 |
diff --git a/eclass/dlang-compilers.eclass b/eclass/dlang-compilers.eclass |
118 |
index ade019f..be7001b 100644 |
119 |
--- a/eclass/dlang-compilers.eclass |
120 |
+++ b/eclass/dlang-compilers.eclass |
121 |
@@ -61,6 +61,7 @@ dlang-compilers_declare_versions() { |
122 |
["1.25"]="2.095 ~amd64 ~arm ~arm64 ~ppc64 ~x86" |
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 |
) |
127 |
} |
128 |
|
129 |
|
130 |
diff --git a/profiles/use.desc b/profiles/use.desc |
131 |
index 6ae0f28..218024e 100644 |
132 |
--- a/profiles/use.desc |
133 |
+++ b/profiles/use.desc |
134 |
@@ -37,3 +37,4 @@ ldc2-1_24 - Build for ldc2 1.24 |
135 |
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 |