aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHorodniceanu Andrei <a.horodniceanu@proton.me>2023-10-03 22:21:04 +0300
committerHorodniceanu Andrei <a.horodniceanu@proton.me>2023-10-12 21:16:39 +0300
commite2f80d6711cba19f5908119ee34a3e6398f743b6 (patch)
treeee8f4b949e413da66cd10df4ed0b832eab0ed76f
parentdev-lang/ldc2: add 1.32.2 (diff)
downloaddlang-e2f80d6711cba19f5908119ee34a3e6398f743b6.tar.gz
dlang-e2f80d6711cba19f5908119ee34a3e6398f743b6.tar.bz2
dlang-e2f80d6711cba19f5908119ee34a3e6398f743b6.zip
dev-lang/ldc2: add 1.33.0
Signed-off-by: Horodniceanu Andrei <a.horodniceanu@proton.me>
-rw-r--r--dev-lang/ldc2/Manifest1
-rw-r--r--dev-lang/ldc2/ldc2-1.33.0.ebuild78
-rw-r--r--eclass/dlang-compilers.eclass1
-rw-r--r--profiles/use.desc1
4 files changed, 81 insertions, 0 deletions
diff --git a/dev-lang/ldc2/Manifest b/dev-lang/ldc2/Manifest
index 1c05ab1..0d07c7f 100644
--- a/dev-lang/ldc2/Manifest
+++ b/dev-lang/ldc2/Manifest
@@ -2,4 +2,5 @@ DIST ldc-1.29.0-src.tar.gz 8080420 BLAKE2B 37890b283f8097e6d845d6d849b9c04e64bdc
DIST ldc-1.30.0-src.tar.gz 8292548 BLAKE2B e2e9846b055837bd2ccccfbeb4b17481f0dd1a49978d8794ee380ad2c14b9713065e98486c62c76a02e9ac2deead8664191409d768da99c7cf447bc5c1d3c77c SHA512 6da36e70cdb7e298b103642d40465fad7a08f05e5424ca9205783c9db867a2e75058d4d3b0124fe305ac69d853cd3dae41e179f80c5359d771f206b76a8b7e80
DIST ldc-1.31.0-src.tar.gz 8042077 BLAKE2B 6840b3d591b644eca5e7f3f00a39ae477981e1778dc6c0e17ba4425488af1417802935b7c40b914263c7990ab321b8a6a27bd90a18ccf88eb5a36c3b47559b7c SHA512 6fb98ff646f347f04fbaf2d0467b5334bae2f9938dcdffb402ac010283aa62a767e5bc6845aeeb13ce743ebb6aa390bcd761cc0e7b58085813b8cdb310a68858
DIST ldc-1.32.2-src.tar.gz 8116363 BLAKE2B 2fb0c2c01bc6257dcaeca75318e241ebdb9b6212a5a368ba9e2337a143ed2c7ddc932ffb1c70587142ab755f7d36f8f27a94148de32c60fef440f15cc3e9cdec SHA512 1494c7e3905851dbb679b8c7a651f21b57fa58a6bfbf5bd83661829b69158cbd1c963db463fd6dbd60c1be1c739396b761376fc2978dd71dee968aaae3629e2b
+DIST ldc-1.33.0-src.tar.gz 8139266 BLAKE2B 6c2efd0765307815563bc7bd775f1faef3f5e19c82e4aee038f668dd00a2521fa58bd32f6a45d2bc5a3854f31a2d7bd47b1be255aeafc0a4206f72d663b0021f SHA512 ef5a42934e24caf947b63ef29a62205b07b539a59292266877f2d5f5ecf06272e1fc3ca83772d02eda203e4b166fbcea788b804740b8780b07a4643e4b51bf70
DIST ldc-1.34.0-src.tar.gz 8176200 BLAKE2B 048975a3142da860540ba5378be5214884eb44e2f4492e95aa124a669ccf53bbcf9ccce24f12946948265af5a0de1f5771d21f196052ab53275aa8bb7d0dfb2e SHA512 c4ceda1d448b91f706719cdea141cb705f9996ea3f86c107620f13e2f50f6a29724a69b5e3b01c51e13dd4e50ba29a280785ce0789188641c90738d774300a06
diff --git a/dev-lang/ldc2/ldc2-1.33.0.ebuild b/dev-lang/ldc2/ldc2-1.33.0.ebuild
new file mode 100644
index 0000000..921f641
--- /dev/null
+++ b/dev-lang/ldc2/ldc2-1.33.0.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib-build cmake llvm
+
+MY_PV="${PV//_/-}"
+MY_P="ldc-${MY_PV}-src"
+SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="LLVM D Compiler"
+HOMEPAGE="https://github.com/ldc-developers/ldc"
+KEYWORDS="~amd64 ~arm64 ~x86"
+LICENSE="BSD"
+SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
+
+IUSE="static-libs"
+
+# Upstream supports LLVM 9.0 through 15.0.
+RDEPEND="dev-util/ninja
+ || (
+ sys-devel/llvm:15
+ sys-devel/llvm:14
+ )
+ <sys-devel/llvm-16:=
+ >=app-eselect/eselect-dlang-20140709"
+DEPEND="${RDEPEND}"
+LLVM_MAX_SLOT=15
+PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch"
+
+# For now, we support amd64 multilib. Anyone is free to add more support here.
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+
+# Upstream supports "2.079-"
+DLANG_VERSION_RANGE="2.075-2.080 2.082-"
+DLANG_PACKAGE_TYPE="single"
+
+inherit dlang
+
+src_prepare() {
+ cmake_src_prepare
+}
+
+d_src_configure() {
+ # Make sure libphobos2 is installed into ldc2's directory.
+ export LIBDIR_${ABI}="${LIBDIR_HOST}"
+ local mycmakeargs=(
+ -DD_VERSION=2
+ -DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
+ -DD_COMPILER="${DMD} $(dlang_dmdw_dcflags)"
+ -DLDC_WITH_LLD=OFF
+ )
+ use static-libs && mycmakeargs+=( -DBUILD_SHARED_LIBS=BOTH ) || mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
+ use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
+ cmake_src_configure
+}
+
+d_src_compile()
+{
+ cmake_src_compile
+}
+
+d_src_install() {
+ cmake_src_install
+
+ rm -rf "${ED}"/usr/share/bash-completion
+}
+
+pkg_postinst() {
+ # Update active ldc2
+ "${ROOT}"/usr/bin/eselect dlang update ldc2
+}
+
+pkg_postrm() {
+ "${ROOT}"/usr/bin/eselect dlang update ldc2
+}
diff --git a/eclass/dlang-compilers.eclass b/eclass/dlang-compilers.eclass
index 9f395cd..445fd75 100644
--- a/eclass/dlang-compilers.eclass
+++ b/eclass/dlang-compilers.eclass
@@ -86,6 +86,7 @@ dlang-compilers_declare_versions() {
["1.30"]="2.100 ~amd64 ~arm ~arm64 ~ppc64 ~x86"
["1.31"]="2.101 ~amd64 ~arm64 ~x86"
["1.32"]="2.102 ~amd64 ~arm64 ~x86"
+ ["1.33"]="2.103 ~amd64 ~arm64 ~x86"
["1.34"]="2.104 ~amd64 ~arm64 ~x86"
)
}
diff --git a/profiles/use.desc b/profiles/use.desc
index f4b0fb5..210b39e 100644
--- a/profiles/use.desc
+++ b/profiles/use.desc
@@ -52,4 +52,5 @@ ldc2-1_29 - Build for ldc2 1.29
ldc2-1_30 - Build for ldc2 1.30
ldc2-1_31 - Build for ldc2 1.31
ldc2-1_32 - Build for ldc2 1.32
+ldc2-1_33 - Build for ldc2 1.33
ldc2-1_34 - Build for ldc2 1.34