1 |
commit: 9dc7c97fabf392de6f3ad8fdb96479fe405e4d3e |
2 |
Author: Marco Leise <marco.leise <AT> gmx <DOT> de> |
3 |
AuthorDate: Wed Jul 7 13:42:04 2021 +0000 |
4 |
Commit: Marco Leise <marco.leise <AT> gmx <DOT> de> |
5 |
CommitDate: Wed Jul 7 14:00:47 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=9dc7c97f |
7 |
|
8 |
ldc2-1.25.1 & ldc2-1.26.0 |
9 |
|
10 |
Signed-off-by: Marco Leise <marco.leise <AT> gmx.de> |
11 |
|
12 |
dev-lang/ldc2/Manifest | 2 + |
13 |
dev-lang/ldc2/ldc2-1.25.1.ebuild | 81 ++++++++++++++++++++++++++++++++++++++++ |
14 |
dev-lang/ldc2/ldc2-1.26.0.ebuild | 81 ++++++++++++++++++++++++++++++++++++++++ |
15 |
3 files changed, 164 insertions(+) |
16 |
|
17 |
diff --git a/dev-lang/ldc2/Manifest b/dev-lang/ldc2/Manifest |
18 |
index a4e6e61..2a2a28f 100644 |
19 |
--- a/dev-lang/ldc2/Manifest |
20 |
+++ b/dev-lang/ldc2/Manifest |
21 |
@@ -3,3 +3,5 @@ DIST ldc-1.21.0-src.tar.gz 7355981 BLAKE2B 46f3289e3e39d8c3b2a4985e1de4b5ef0e218 |
22 |
DIST ldc-1.22.0-src.tar.gz 7434646 BLAKE2B 317c9ebb3f75e495c939fadd24abbbea4baa2f9bf547894067d373adc48dfefd47c5bcc2136ac67ecd2bbbe2bf0cf879cfc9b978d9ff75d68ede7b0686dbfee9 SHA512 81c59e96b181fbe4a499d84a816ee4fbdbc8b6170fe87dc42e8a315e72d0be4a7f42b939084e5a529572987bcdc495926d83ca517aff8a7e5632767cf46d67d8 |
23 |
DIST ldc-1.23.0-src.tar.gz 7438736 BLAKE2B 42cad99be83ce6c8d08819e6e2c6aca161f1243a239da1e692551e7b140069aacb12bbf38b4dc727eab4814bba9d8dafbb16ea2c938ea49db907275c2149b2bd SHA512 dbade9a120bb30d0c691f5c4c6c7e06be0cf3575b9bd63a921e9a768a22aef10293cc4058c7da348707856e1d363419c91e38a893d13408e9b5be4ae85544bb0 |
24 |
DIST ldc-1.24.0-src.tar.gz 7522065 BLAKE2B 65069835528466c4a39ebf08245fa7fcc9348ee620bab933d23157af0702c0ac4f5b3c1692b1eff83ba81ba2b8be6f086935527585c55e1ecb4ea42f965befe6 SHA512 c6f06d80617e5f7789f9e0e349a21e380d0bb6898983f0c2e2aaaec32e23ea0f69c039b6f0c03b8015782b837c890a6ff1051bfa332a6af7c79fc3479446dfb1 |
25 |
+DIST ldc-1.25.1-src.tar.gz 7625687 BLAKE2B 02eacb06c334608d4b649d8fdffdef03cd1645a2d237063c888728c840a8c939df1c1ff9aefe3efab395358a7757dd287d1efa7a704b37f0b2661c8c1b5faaca SHA512 a087f48ec8f559eea17f88f9c00893c84db17bfcb10590011f43d6d1573a30286067207133ad6d249897fe51cb22829c2ddf00bf23210f01aa059b1f87790fae |
26 |
+DIST ldc-1.26.0-src.tar.gz 7650063 BLAKE2B d132dc842e27a93fc76810e17db1d67f856530ca7e6948c795ec5f943e4be32513b4a956aa9217df4acd45806bc81ff855ebab757aa3f6a1943fa7c394b3e3ce SHA512 7bb2aa464f5ba834c07f67743f4af01db6588d56611d6c9e250a6908ebe93a0dcd9d3a79f8f252fc92eeb4826bfa62de6c51c4db03ff80e60a8d993e4451f573 |
27 |
|
28 |
diff --git a/dev-lang/ldc2/ldc2-1.25.1.ebuild b/dev-lang/ldc2/ldc2-1.25.1.ebuild |
29 |
new file mode 100644 |
30 |
index 0000000..322787b |
31 |
--- /dev/null |
32 |
+++ b/dev-lang/ldc2/ldc2-1.25.1.ebuild |
33 |
@@ -0,0 +1,81 @@ |
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:10 |
58 |
+ ) |
59 |
+ <sys-devel/llvm-11:= |
60 |
+ >=app-eselect/eselect-dlang-20140709" |
61 |
+DEPEND="${RDEPEND}" |
62 |
+LLVM_MAX_SLOT=10 |
63 |
+PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch" |
64 |
+ |
65 |
+# For now, we support amd64 multilib. Anyone is free to add more support here. |
66 |
+MULTILIB_COMPAT=( abi_x86_{32,64} ) |
67 |
+ |
68 |
+DLANG_VERSION_RANGE="2.075-" |
69 |
+DLANG_PACKAGE_TYPE="single" |
70 |
+ |
71 |
+inherit dlang |
72 |
+ |
73 |
+detect_hardened() { |
74 |
+ gcc --version | grep -o Hardened |
75 |
+} |
76 |
+ |
77 |
+src_prepare() { |
78 |
+ cmake_src_prepare |
79 |
+} |
80 |
+ |
81 |
+d_src_configure() { |
82 |
+ # Make sure libphobos2 is installed into ldc2's directory. |
83 |
+ export LIBDIR_${ABI}="${LIBDIR_HOST}" |
84 |
+ local mycmakeargs=( |
85 |
+ -DD_VERSION=2 |
86 |
+ -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2) |
87 |
+ -DD_COMPILER="${DMD}" |
88 |
+ -DLDC_WITH_LLD=OFF |
89 |
+ ) |
90 |
+ use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON ) |
91 |
+ use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON ) |
92 |
+ detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=' "-relocation-model=pic",' ) |
93 |
+ cmake_src_configure |
94 |
+} |
95 |
+ |
96 |
+d_src_compile() |
97 |
+{ |
98 |
+ cmake_src_compile |
99 |
+} |
100 |
+ |
101 |
+d_src_install() { |
102 |
+ cmake_src_install |
103 |
+ |
104 |
+ rm -rf "${ED}"/usr/share/bash-completion |
105 |
+} |
106 |
+ |
107 |
+pkg_postinst() { |
108 |
+ # Update active ldc2 |
109 |
+ "${ROOT}"/usr/bin/eselect dlang update ldc2 |
110 |
+} |
111 |
+ |
112 |
+pkg_postrm() { |
113 |
+ "${ROOT}"/usr/bin/eselect dlang update ldc2 |
114 |
+} |
115 |
|
116 |
diff --git a/dev-lang/ldc2/ldc2-1.26.0.ebuild b/dev-lang/ldc2/ldc2-1.26.0.ebuild |
117 |
new file mode 100644 |
118 |
index 0000000..322787b |
119 |
--- /dev/null |
120 |
+++ b/dev-lang/ldc2/ldc2-1.26.0.ebuild |
121 |
@@ -0,0 +1,81 @@ |
122 |
+# Copyright 1999-2021 Gentoo Authors |
123 |
+# Distributed under the terms of the GNU General Public License v2 |
124 |
+ |
125 |
+EAPI=7 |
126 |
+ |
127 |
+inherit multilib-build cmake llvm |
128 |
+ |
129 |
+MY_PV="${PV//_/-}" |
130 |
+MY_P="ldc-${MY_PV}-src" |
131 |
+SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz" |
132 |
+S=${WORKDIR}/${MY_P} |
133 |
+ |
134 |
+DESCRIPTION="LLVM D Compiler" |
135 |
+HOMEPAGE="https://github.com/ldc-developers/ldc" |
136 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
137 |
+LICENSE="BSD" |
138 |
+SLOT="$(ver_cut 1-2)/$(ver_cut 3)" |
139 |
+ |
140 |
+IUSE="static-libs" |
141 |
+ |
142 |
+# We support LLVM 6.0 through 10. |
143 |
+RDEPEND="dev-util/ninja |
144 |
+ || ( |
145 |
+ sys-devel/llvm:10 |
146 |
+ ) |
147 |
+ <sys-devel/llvm-11:= |
148 |
+ >=app-eselect/eselect-dlang-20140709" |
149 |
+DEPEND="${RDEPEND}" |
150 |
+LLVM_MAX_SLOT=10 |
151 |
+PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch" |
152 |
+ |
153 |
+# For now, we support amd64 multilib. Anyone is free to add more support here. |
154 |
+MULTILIB_COMPAT=( abi_x86_{32,64} ) |
155 |
+ |
156 |
+DLANG_VERSION_RANGE="2.075-" |
157 |
+DLANG_PACKAGE_TYPE="single" |
158 |
+ |
159 |
+inherit dlang |
160 |
+ |
161 |
+detect_hardened() { |
162 |
+ gcc --version | grep -o Hardened |
163 |
+} |
164 |
+ |
165 |
+src_prepare() { |
166 |
+ cmake_src_prepare |
167 |
+} |
168 |
+ |
169 |
+d_src_configure() { |
170 |
+ # Make sure libphobos2 is installed into ldc2's directory. |
171 |
+ export LIBDIR_${ABI}="${LIBDIR_HOST}" |
172 |
+ local mycmakeargs=( |
173 |
+ -DD_VERSION=2 |
174 |
+ -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2) |
175 |
+ -DD_COMPILER="${DMD}" |
176 |
+ -DLDC_WITH_LLD=OFF |
177 |
+ ) |
178 |
+ use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON ) |
179 |
+ use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON ) |
180 |
+ detect_hardened && mycmakeargs+=( -DADDITIONAL_DEFAULT_LDC_SWITCHES=' "-relocation-model=pic",' ) |
181 |
+ cmake_src_configure |
182 |
+} |
183 |
+ |
184 |
+d_src_compile() |
185 |
+{ |
186 |
+ cmake_src_compile |
187 |
+} |
188 |
+ |
189 |
+d_src_install() { |
190 |
+ cmake_src_install |
191 |
+ |
192 |
+ rm -rf "${ED}"/usr/share/bash-completion |
193 |
+} |
194 |
+ |
195 |
+pkg_postinst() { |
196 |
+ # Update active ldc2 |
197 |
+ "${ROOT}"/usr/bin/eselect dlang update ldc2 |
198 |
+} |
199 |
+ |
200 |
+pkg_postrm() { |
201 |
+ "${ROOT}"/usr/bin/eselect dlang update ldc2 |
202 |
+} |