public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/user/dlang:master commit in: dev-lang/ldc2/, eclass/, profiles/
@ 2024-05-28 20:48 Horodniceanu Andrei
  0 siblings, 0 replies; 2+ messages in thread
From: Horodniceanu Andrei @ 2024-05-28 20:48 UTC (permalink / raw
  To: gentoo-commits

commit:     e7f04fa3eacd05d8221f72fde0c2c87db1e9dee0
Author:     Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Sun May 19 11:28:51 2024 +0000
Commit:     Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
CommitDate: Tue May 28 19:33:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=e7f04fa3

dev-lang/ldc2: add 1.38.0

Signed-off-by: Andrei Horodniceanu <a.horodniceanu <AT> proton.me>

 dev-lang/ldc2/Manifest           |   4 +
 dev-lang/ldc2/ldc2-1.38.0.ebuild | 198 +++++++++++++++++++++++++++++++++++++++
 eclass/dlang-compilers-r1.eclass |   1 +
 profiles/use.desc                |   1 +
 4 files changed, 204 insertions(+)

diff --git a/dev-lang/ldc2/Manifest b/dev-lang/ldc2/Manifest
index 4ae4b26..a4a3083 100644
--- a/dev-lang/ldc2/Manifest
+++ b/dev-lang/ldc2/Manifest
@@ -4,3 +4,7 @@ DIST ldc-1.34.0-src.tar.gz 8176200 BLAKE2B 048975a3142da860540ba5378be5214884eb4
 DIST ldc-1.35.0-src.tar.gz 8241960 BLAKE2B fb531841e57225f82cddf5135d0b0da98624d33aba76a1d39d98b13deb319556eaad3599ba1461f9f509c6b7b535632b85805de2433bae4ccf50c691c116da3f SHA512 f85871832455a8e3208f7f905b04ac249a988f8ea2cfe81ed2a67b56404d11a08653b13b6019f45d9dbcf6fbd60086e6aabb13307908d1bbf6d86bd91462dfaa
 DIST ldc-1.36.0-src.tar.gz 8551871 BLAKE2B b0f09128ab37e332f2eebab3288cac687f91b696ba758d9ecd6fc4d98dc70d13e6fc4e02878028ac530cc9d9449d1148c8c3ed052fecfb18c95bd76437537467 SHA512 e8060ae30ddf659c51b2e57989b14f1d94c58537a3aa0c5afd3cf2906503d66421598014c33fdeb063a5aaea00034b4b11769a2c07cc2dabd7644840241183b4
 DIST ldc-1.37.0-src.tar.gz 8555980 BLAKE2B ac93c903f9dbeec5b69e94c7cdf851ae3fa3168752dceccbd1262fbdae5cdda43e53b82bd7c8b24b0bb2dc06fb00f3b1c74a278a851ea68b948dc7e618460227 SHA512 488451dba58262cf533760f471f707f984d66edeb5c7dfff5a512efa0111742cead4ff23ed5ace39ea4d07e9bac290a846d0df3de49fd3fc276241a771aff0ed
+DIST ldc-1.38.0-src.tar.gz 8691096 BLAKE2B 7b25ba96c470a707d9ee7660ac030984c2cfecaf757a00015507dfb7c17075132ebcc546562ae700ab43eb19e117b4d1247cc1b2f62f455328a7cf9dc0ddf5d4 SHA512 1540a1a6f4bad3bc93da0f59bc28cd31dd4aeb58b8b4c744a204faa43692a1fe13d010ae56b3369e870a5e58724103b2aee58db8b40925698e7816f78f0f2de3
+DIST ldc2-pr-4659.patch 29459 BLAKE2B d4a24ea28d8ddca26924051973aa9ac27489c399849137996043fa8023ae43353fa80c8aa4cbe504b3cc1f45a7a25ec66b01a14dc072f37ea74286cf203fe7bf SHA512 d1a4fd76b3aa4a1527cf4434129918da821c52d74cdfb044c22e177db38fcbca692e1b597a2f2658c2bf26d6e581674637d4aa77cb464bf12535ba1161c6dced
+DIST ldc2-pr-4661.patch 2230 BLAKE2B 0819499e30b90c4089ae5f7295e67675def2579c374f40d0a0918f7563235768350c2b5ff9d32619f9f5c63ace1f7386a6fc3301f92b30d03bd39ddcefeb17cc SHA512 a3215efd1771ddf185ccbe360c66372d0f7cb450c0094c9b96e9df3bd5596dfb2cc9841e205076c339fd01e3864ab4a859074e836f7420b2856d1ee6062fe12c
+DIST ldc2-pr-4662.patch 1438 BLAKE2B e9f8027bba8723f766d33fc049058dd3206914a7cc0890bed361ceeff0a3c9684755cf6d70133409b57e54718855533c78f61d1b6af0e77532e5c7174409d696 SHA512 f35242fd2d97c7f40028b468b24bfb23d46a611d3bcc9aa58a63fe3c0aea19812bb5d9862927a3bd65d46a58fa0a61198df6d2b9f5cb894d92f1b9e7e385a4e8

diff --git a/dev-lang/ldc2/ldc2-1.38.0.ebuild b/dev-lang/ldc2/ldc2-1.38.0.ebuild
new file mode 100644
index 0000000..404d535
--- /dev/null
+++ b/dev-lang/ldc2/ldc2-1.38.0.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Upstream supports LLVM 11.0 through 18.0.
+LLVM_COMPAT=( {15..18} )
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake llvm-r1 multilib-build multiprocessing python-any-r1 toolchain-funcs
+
+DESCRIPTION="LLVM D Compiler"
+HOMEPAGE="https://github.com/ldc-developers/ldc"
+MY_PV="${PV//_/-}"
+MY_P="ldc-${MY_PV}-src"
+PR_URL="https://github.com/ldc-developers/ldc/pull"
+SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz
+	${PR_URL}/4659.patch -> ${PN}-pr-4659.patch
+	${PR_URL}/4661.patch -> ${PN}-pr-4661.patch
+	${PR_URL}/4662.patch -> ${PN}-pr-4662.patch
+"
+S=${WORKDIR}/${MY_P}
+LICENSE="BSD"
+# dmd code + runtime lib
+LICENSE+=" Boost-1.0 RSA BSD ZLIB curl public-domain"
+# llvm bits
+LICENSE+=" Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+# old gdc + dmd code
+LICENSE+=" GPL-2+ Artistic"
+
+# Only increase subslot in case of ABI breakage
+SLOT="$(ver_cut 1-2)/0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+DLANG_COMPAT=( dmd-2_{106..108} gdc-13 ldc2-1_{35..38} )
+
+inherit dlang-single
+
+REQUIRED_USE=${DLANG_REQUIRED_USE}
+DEPEND="
+	${DLANG_DEPS}
+	$(llvm_gen_dep '
+	  sys-devel/llvm:${LLVM_SLOT}=
+	')
+	net-misc/curl[${MULTILIB_USEDEP}]
+"
+IDEPEND=">=app-eselect/eselect-dlang-20140709"
+RDEPEND="
+	${DEPEND}
+	${IDEPEND}
+"
+BDEPEND="
+	${DLANG_DEPS}
+	test? (
+		  ${PYTHON_DEPS}
+		  $(python_gen_any_dep '
+			  dev-python/lit[${PYTHON_USEDEP}]
+		  ')
+	)
+"
+
+python_check_deps() {
+	python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+PATCHES=(
+	"${FILESDIR}"/ldc2-1.15.0-link-defaultlib-shared.patch
+	"${FILESDIR}/${PN}"-1.36.0-lit-cfg-disable-gdb.patch
+
+	# https://github.com/dlang/phobos/pull/8956
+	"${FILESDIR}/${PN}"-1.36.0-fix-phobos-OS-dependent-test-string.patch
+	# https://github.com/ldc-developers/ldc/issues/4614#issuecomment-2034169152
+	"${FILESDIR}/${PN}"-remove-dmd-common-int128-unittest.patch
+)
+
+pkg_setup() {
+	dlang_setup
+	llvm-r1_pkg_setup
+	use test && python_setup
+}
+
+src_prepare(){
+	# Disable GDB tests by passing GDB_FLAGS=OFF
+	# Put this here to avoid trigerring reconfigurations later on.
+	sed -i 's/\(GDB_FLAGS=\)\S\+/\1OFF/' "${S}"/tests/dmd/CMakeLists.txt
+
+	eapply "${DISTDIR}/${PN}-pr-"{4659,4661,4662}".patch"
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DD_VERSION=2
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr/lib/ldc2/$(ver_cut 1-2)
+		-DD_COMPILER="$(dlang_get_dmdw) $(dlang_get_dmdw_dcflags)"
+		-DLDC_WITH_LLD=OFF
+		-DCOMPILE_D_MODULES_SEPARATELY=ON
+		-DLDC_ENABLE_ASSERTIONS=OFF
+		-DBUILD_SHARED_LIBS=$(usex static-libs BOTH ON)
+		-DLDC_BUNDLE_LLVM_TOOLS=OFF
+		-DCOMPILER_RT_BASE_DIR="${EPREFIX}"/usr/lib
+		-DCOMPILER_RT_LIBDIR_OS=linux
+		-DTEST_COMPILER_RT_LIBRARIES=none
+	)
+	use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
+
+	cmake_src_configure
+}
+
+src_test()
+{
+	# Call the same tests that .github/actions/main.yml does
+
+	local jobs=$(get_makeopts_jobs)
+
+	### 4a-test-ldc2 ###
+
+	# We build it explicitly so that MAKEOPTS is respected
+	cmake_src_compile ldc2-unittest
+	cmake_src_test -R ldc2-unittest
+
+	### 4b-test-lit ###
+
+	# Instead of running cmake_src_test -R lit-tests we call lit directly
+	pushd "${BUILD_DIR}"/tests > /dev/null || die
+	"${EPYTHON}" runlit.py -j${jobs} -v . || die 'lit tests failed'
+	popd > /dev/null || die
+
+	### 4c-test-dmd ###
+
+	# https://github.com/dlang/dmd/pull/16353
+	# Requires gdb but isn't named appropriately
+	mv "${S}"/tests/dmd/runnable/{,gdb-}b18504.d || die
+	# Calss gcc directly
+	sed -i "s/gcc/$(tc-getCC)/" "${S}"/tests/dmd/runnable/importc-test1.sh || die
+	# Fails on aarch64 due to int128
+	if [[ ${ARCH} == arm64 ]]; then
+		# https://github.com/dlang/dmd/pull/16352
+		rm -f "${S}"/tests/dmd/compilable/stdcheaders.c || die
+	fi
+
+	# These tests invoke a runner that runs the tests in parallel so
+	# specify the jobs only to the runner and not cmake. I'm pretty sure
+	# that some of the tests can't be run simultaniously by multiple
+	# runners so keep the cmake jobs to 1.
+	DMD_TESTSUITE_MAKE_ARGS=-j${jobs} cmake_src_test -j 1 -V -R dmd-testsuite
+
+	### 4d-test-libs ###
+
+	# We compile the tests first so that $MAKEOPTS is respect, if
+	# compiled during the tests, nproc jobs will be used.
+	cmake_src_compile all-test-runners
+
+	local CMAKE_SKIP_TESTS=(
+		# These are the targets tested above
+		ldc2-unittest
+		lit-tests
+		dmd-testsuite
+
+		# These tests call gdb
+		druntime-test-exceptions
+		# Require valgrind
+		druntime-test-gc
+		druntime-test-valgrind
+
+		# This one fails due to an uncaught error, probably due to the
+		# sandbox.
+		druntime-test-cycles
+	)
+	if [[ ${ARCH} == arm64 ]]; then
+		# https://github.com/ldc-developers/ldc/issues/4613
+
+		# fails due to "innacuracy"
+		CMAKE_SKIP_TESTS+=( std.internal.math.gammafunction )
+		# Bad code generation with optimizations?
+		CMAKE_SKIP_TESTS+=( std.math.exponential )
+	fi
+
+	cmake_src_test
+}
+
+src_install() {
+	cmake_src_install
+
+	rm -rf "${ED}"/usr/share/bash-completion
+}
+
+pkg_postinst() {
+	# Update active ldc2
+	"${EROOT}"/usr/bin/eselect dlang update ldc2
+}
+
+pkg_postrm() {
+	"${EROOT}"/usr/bin/eselect dlang update ldc2
+}

diff --git a/eclass/dlang-compilers-r1.eclass b/eclass/dlang-compilers-r1.eclass
index be07b57..8bc231b 100644
--- a/eclass/dlang-compilers-r1.eclass
+++ b/eclass/dlang-compilers-r1.eclass
@@ -93,6 +93,7 @@ readonly _DLANG_LDC2_FRONTENDS=(
 	"1.35 2.105 ~amd64 ~arm64 ~x86"
 	"1.36 2.106 ~amd64 ~arm64 ~x86"
 	"1.37 2.107 ~amd64 ~arm64 ~x86"
+	"1.38 2.108 ~amd64 ~arm64 ~x86"
 )
 
 # @FUNCTION: _dlang_accumulate_implementations

diff --git a/profiles/use.desc b/profiles/use.desc
index 871cbb7..7d7d2a9 100644
--- a/profiles/use.desc
+++ b/profiles/use.desc
@@ -16,6 +16,7 @@ dlang_single_target_ldc2-1_34 - Build for ldc2 1.34 only
 dlang_single_target_ldc2-1_35 - Build for ldc2 1.35 only
 dlang_single_target_ldc2-1_36 - Build for ldc2 1.36 only
 dlang_single_target_ldc2-1_37 - Build for ldc2 1.37 only
+dlang_single_target_ldc2-1_38 - Build for ldc2 1.38 only
 
 dlang_targets_dmd-2_101 - Build with DMD 2.101
 dlang_targets_dmd-2_102 - Build with DMD 2.102


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/user/dlang:master commit in: dev-lang/ldc2/, eclass/, profiles/
@ 2024-07-12 18:59 Horodniceanu Andrei
  0 siblings, 0 replies; 2+ messages in thread
From: Horodniceanu Andrei @ 2024-07-12 18:59 UTC (permalink / raw
  To: gentoo-commits

commit:     1e1eecea2dadd260c4d83dad658f20fc90fd42a5
Author:     Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Sun Jul  7 15:00:01 2024 +0000
Commit:     Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
CommitDate: Sun Jul  7 15:00:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=1e1eecea

dev-lang/ldc2: add 1.39.0

The LICENSE has been corrected as I've mistaken the license of the
valgrind headers as being BSD when, in fact, it is BZIP2. The other
change to LICENSE, RSA being replaced by `|| ( CC0-1.0 Apache-2.0 )' is
because some internal hashing implementation has changed.

The arm64 keyword has been dropped temporarily as I find myself without
the hardware to test it.

Signed-off-by: Andrei Horodniceanu <a.horodniceanu <AT> proton.me>

 dev-lang/ldc2/Manifest           |   1 +
 dev-lang/ldc2/ldc2-1.39.0.ebuild | 181 +++++++++++++++++++++++++++++++++++++++
 eclass/dlang-compilers-r1.eclass |   1 +
 profiles/use.desc                |   2 +
 4 files changed, 185 insertions(+)

diff --git a/dev-lang/ldc2/Manifest b/dev-lang/ldc2/Manifest
index 0aa65e2..6d39aef 100644
--- a/dev-lang/ldc2/Manifest
+++ b/dev-lang/ldc2/Manifest
@@ -5,3 +5,4 @@ DIST ldc-1.35.0-src.tar.gz 8241960 BLAKE2B fb531841e57225f82cddf5135d0b0da98624d
 DIST ldc-1.36.0-src.tar.gz 8551871 BLAKE2B b0f09128ab37e332f2eebab3288cac687f91b696ba758d9ecd6fc4d98dc70d13e6fc4e02878028ac530cc9d9449d1148c8c3ed052fecfb18c95bd76437537467 SHA512 e8060ae30ddf659c51b2e57989b14f1d94c58537a3aa0c5afd3cf2906503d66421598014c33fdeb063a5aaea00034b4b11769a2c07cc2dabd7644840241183b4
 DIST ldc-1.37.0-src.tar.gz 8555980 BLAKE2B ac93c903f9dbeec5b69e94c7cdf851ae3fa3168752dceccbd1262fbdae5cdda43e53b82bd7c8b24b0bb2dc06fb00f3b1c74a278a851ea68b948dc7e618460227 SHA512 488451dba58262cf533760f471f707f984d66edeb5c7dfff5a512efa0111742cead4ff23ed5ace39ea4d07e9bac290a846d0df3de49fd3fc276241a771aff0ed
 DIST ldc-1.38.0-src.tar.gz 8691096 BLAKE2B 7b25ba96c470a707d9ee7660ac030984c2cfecaf757a00015507dfb7c17075132ebcc546562ae700ab43eb19e117b4d1247cc1b2f62f455328a7cf9dc0ddf5d4 SHA512 1540a1a6f4bad3bc93da0f59bc28cd31dd4aeb58b8b4c744a204faa43692a1fe13d010ae56b3369e870a5e58724103b2aee58db8b40925698e7816f78f0f2de3
+DIST ldc-1.39.0-src.tar.gz 8554301 BLAKE2B cb1dd5f6b4cc7a7344d8575d1e96fddbd1c34fc0e4f05cf96d29179bec725a997d7d8aee7bf0d97e53d0b36fb108f56e1c55eb66aa93e0075d1beb9d737e21e5 SHA512 d5c91043fa7d5faee9fc231fade52b6ac961907a7f6f8920d8337c9ba0b7052a5f98eb5f23ae56ca93510952c502ca78c9eec1d03f408aaa310fa4e4d57d9519

diff --git a/dev-lang/ldc2/ldc2-1.39.0.ebuild b/dev-lang/ldc2/ldc2-1.39.0.ebuild
new file mode 100644
index 0000000..6ddfbce
--- /dev/null
+++ b/dev-lang/ldc2/ldc2-1.39.0.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Upstream supports LLVM 15.0 through 18.0.
+LLVM_COMPAT=( {15..18} )
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake llvm-r1 multilib-build multiprocessing python-any-r1 toolchain-funcs
+
+DESCRIPTION="LLVM D Compiler"
+HOMEPAGE="https://github.com/ldc-developers/ldc"
+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}
+LICENSE="BSD"
+# dmd code + runtime lib, see dmd-r1.eclass for more details
+LICENSE+=" Boost-1.0 || ( CC0-1.0 Apache-2.0 ) BZIP2 ZLIB curl public-domain"
+# llvm bits
+LICENSE+=" Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+# old gdc + dmd code
+LICENSE+=" GPL-2+ Artistic"
+
+# Only increase subslot in case of ABI breakage
+SLOT="$(ver_cut 1-2)/0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+DLANG_COMPAT=( dmd-2_{106..109} gdc-1{3..4} ldc2-1_{35..39} )
+
+inherit dlang-single
+
+REQUIRED_USE=${DLANG_REQUIRED_USE}
+DEPEND="
+	${DLANG_DEPS}
+	$(llvm_gen_dep '
+	  sys-devel/llvm:${LLVM_SLOT}=
+	')
+	net-misc/curl[${MULTILIB_USEDEP}]
+"
+IDEPEND=">=app-eselect/eselect-dlang-20140709"
+RDEPEND="
+	${DEPEND}
+	${IDEPEND}
+"
+BDEPEND="
+	${DLANG_DEPS}
+	test? (
+		  ${PYTHON_DEPS}
+		  $(python_gen_any_dep '
+			  dev-python/lit[${PYTHON_USEDEP}]
+		  ')
+	)
+"
+
+python_check_deps() {
+	python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+PATCHES=(
+	"${FILESDIR}"/ldc2-1.15.0-link-defaultlib-shared.patch
+	"${FILESDIR}/${PN}"-1.36.0-lit-cfg-disable-gdb.patch
+
+	# https://github.com/ldc-developers/ldc/issues/4614#issuecomment-2034169152
+	"${FILESDIR}/${PN}"-remove-dmd-common-int128-unittest.patch
+)
+
+pkg_setup() {
+	dlang_setup
+	llvm-r1_pkg_setup
+	use test && python_setup
+}
+
+src_prepare(){
+	# Disable GDB tests by passing GDB_FLAGS=OFF
+	# Put this here to avoid trigerring reconfigurations later on.
+	sed -i 's/\(GDB_FLAGS=\)\S\+/\1OFF/' "${S}"/tests/dmd/CMakeLists.txt
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DD_VERSION=2
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr/lib/ldc2/$(ver_cut 1-2)
+		-DD_COMPILER="$(dlang_get_dmdw) $(dlang_get_dmdw_dcflags)"
+		-DLDC_WITH_LLD=OFF
+		-DCOMPILE_D_MODULES_SEPARATELY=ON
+		-DLDC_ENABLE_ASSERTIONS=OFF
+		-DBUILD_SHARED_LIBS=$(usex static-libs BOTH ON)
+		-DLDC_BUNDLE_LLVM_TOOLS=OFF
+		-DCOMPILER_RT_BASE_DIR="${EPREFIX}"/usr/lib
+		-DCOMPILER_RT_LIBDIR_OS=linux
+		-DTEST_COMPILER_RT_LIBRARIES=none
+	)
+	use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON )
+
+	cmake_src_configure
+}
+
+src_test()
+{
+	# Call the same tests that .github/actions/main.yml does
+
+	local jobs=$(get_makeopts_jobs)
+
+	### 4a-test-ldc2 ###
+
+	# We build it explicitly so that MAKEOPTS is respected
+	cmake_src_compile ldc2-unittest
+	cmake_src_test -R ldc2-unittest
+
+	### 4b-test-lit ###
+
+	# Instead of running cmake_src_test -R lit-tests we call lit directly
+	pushd "${BUILD_DIR}"/tests > /dev/null || die
+	"${EPYTHON}" runlit.py -j${jobs} -v . || die 'lit tests failed'
+	popd > /dev/null || die
+
+	### 4c-test-dmd ###
+
+	# Calss gcc directly
+	sed -i "s/gcc/$(tc-getCC)/" "${S}"/tests/dmd/runnable/importc-test1.sh || die
+
+	# These tests invoke a runner that runs the tests in parallel so
+	# specify the jobs only to the runner and not cmake. I'm pretty sure
+	# that some of the tests can't be run simultaniously by multiple
+	# runners so keep the cmake jobs to 1.
+	DMD_TESTSUITE_MAKE_ARGS=-j${jobs} cmake_src_test -j 1 -V -R dmd-testsuite
+
+	### 4d-test-libs ###
+
+	# We compile the tests first so that $MAKEOPTS is respect, if
+	# compiled during the tests, nproc jobs will be used.
+	cmake_src_compile all-test-runners
+
+	local CMAKE_SKIP_TESTS=(
+		# These are the targets tested above
+		ldc2-unittest
+		lit-tests
+		dmd-testsuite
+
+		# These tests call gdb
+		druntime-test-exceptions
+		# Require valgrind
+		druntime-test-gc
+		druntime-test-valgrind
+
+		# This one fails due to an uncaught error, probably due to the
+		# sandbox.
+		druntime-test-cycles
+	)
+	if [[ ${ARCH} == arm64 ]]; then
+		# https://github.com/ldc-developers/ldc/issues/4613
+
+		# fails due to "innacuracy"
+		CMAKE_SKIP_TESTS+=( std.internal.math.gammafunction )
+		# Bad code generation with optimizations?
+		CMAKE_SKIP_TESTS+=( std.math.exponential )
+	fi
+
+	cmake_src_test
+}
+
+src_install() {
+	cmake_src_install
+
+	rm -rf "${ED}"/usr/share/bash-completion
+}
+
+pkg_postinst() {
+	# Update active ldc2
+	"${EROOT}"/usr/bin/eselect dlang update ldc2
+}
+
+pkg_postrm() {
+	"${EROOT}"/usr/bin/eselect dlang update ldc2
+}

diff --git a/eclass/dlang-compilers-r1.eclass b/eclass/dlang-compilers-r1.eclass
index 4588e5b..f601e92 100644
--- a/eclass/dlang-compilers-r1.eclass
+++ b/eclass/dlang-compilers-r1.eclass
@@ -96,6 +96,7 @@ readonly _DLANG_LDC2_FRONTENDS=(
 	"1.36 2.106 ~amd64 ~arm64 ~x86"
 	"1.37 2.107 ~amd64 ~arm64 ~x86"
 	"1.38 2.108 ~amd64 ~arm64 ~x86"
+	"1.39 2.109 ~amd64 ~arm64 ~x86"
 )
 
 # @FUNCTION: _dlang_accumulate_implementations

diff --git a/profiles/use.desc b/profiles/use.desc
index 5e8f5f2..78b8234 100644
--- a/profiles/use.desc
+++ b/profiles/use.desc
@@ -19,6 +19,7 @@ dlang_single_target_ldc2-1_35 - Build for ldc2 1.35 only
 dlang_single_target_ldc2-1_36 - Build for ldc2 1.36 only
 dlang_single_target_ldc2-1_37 - Build for ldc2 1.37 only
 dlang_single_target_ldc2-1_38 - Build for ldc2 1.38 only
+dlang_single_target_ldc2-1_39 - Build for ldc2 1.39 only
 
 dlang_targets_dmd-2_101 - Build with DMD 2.101
 dlang_targets_dmd-2_102 - Build with DMD 2.102
@@ -41,6 +42,7 @@ dlang_targets_ldc2-1_35 - Build with ldc2 1.35
 dlang_targets_ldc2-1_36 - Build with ldc2 1.36
 dlang_targets_ldc2-1_37 - Build with ldc2 1.37
 dlang_targets_ldc2-1_38 - Build with ldc2 1.38
+dlang_targets_ldc2-1_39 - Build with ldc2 1.39
 
 
 dmd-2_101 - Build for DMD 2.101


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-12 18:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12 18:59 [gentoo-commits] repo/user/dlang:master commit in: dev-lang/ldc2/, eclass/, profiles/ Horodniceanu Andrei
  -- strict thread matches above, loose matches on Subject: below --
2024-05-28 20:48 Horodniceanu Andrei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox