aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Horodniceanu <a.horodniceanu@proton.me>2024-07-14 16:29:39 +0300
committerAndrei Horodniceanu <a.horodniceanu@proton.me>2024-07-14 16:29:39 +0300
commitb8a501918785a8087f40d82d14e1aa83e0aea6c6 (patch)
tree4f79f07a508ff1ea437cc1418f16f9e535aa0ef3
parentdev-util/dfmt: enable dmd-2_109 and ldc2-1_39 (diff)
downloaddlang-b8a501918785a8087f40d82d14e1aa83e0aea6c6.tar.gz
dlang-b8a501918785a8087f40d82d14e1aa83e0aea6c6.tar.bz2
dlang-b8a501918785a8087f40d82d14e1aa83e0aea6c6.zip
dev-util/dlang-tools: add 2.109.1
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
-rw-r--r--dev-util/dlang-tools/Manifest1
-rw-r--r--dev-util/dlang-tools/dlang-tools-2.109.1.ebuild114
2 files changed, 115 insertions, 0 deletions
diff --git a/dev-util/dlang-tools/Manifest b/dev-util/dlang-tools/Manifest
index 00713fa..13a794d 100644
--- a/dev-util/dlang-tools/Manifest
+++ b/dev-util/dlang-tools/Manifest
@@ -1,2 +1,3 @@
DIST dlang-tools-2.106.1.tar.gz 129644 BLAKE2B 014adf42be0c4f82b96d1857eff01e5927a5e179cf99e0928abb2300b7ed3e1e2719e2a38a0ff36dc776b61dcd5ae24affd18ed26a1eabdab1185430eeb888b3 SHA512 bed6ec6cf6287104ad1d5e79e8512094b1aec69be09206104ea58d4bff8af8c5f15012db0237aa195a58baa85a8d880b054ea66a7352fc0684218bfa563b2d32
DIST dlang-tools-2.108.0.tar.gz 128260 BLAKE2B de91759bfe75809450eb67c57d05872d5fb1d9a6dde82c3ad8af622fd2068d41290f60b121af60ea4d3a0c7eb555f2e498ab57872c7e7ecb882697a0a32282d7 SHA512 e962a3cebcbe7143fc558a4609f02e59c23b10be15eb1a65147bc49b54ed0b4eb8e3d040045cf9522536a7b016cffb18d66d6db9e26d619c19a2585e0917536a
+DIST dlang-tools-2.109.1.tar.gz 128289 BLAKE2B f69d248162938b21888549812372b92937ebe3e21dcfd2d2b15bf793eb74d2b3a7aea94695b5dd2ec00817013d6a1dcff344b08e343ba309ee076ba8e2535948 SHA512 f0e2858b0b6ed58128679beae30d15caa11eb5560368b760114d3df43e63fef5a6afeef1adfb76c3cef6d9e32c233c649cef7625adbf56bae161edbdfefdf106
diff --git a/dev-util/dlang-tools/dlang-tools-2.109.1.ebuild b/dev-util/dlang-tools/dlang-tools-2.109.1.ebuild
new file mode 100644
index 0000000..f9df159
--- /dev/null
+++ b/dev-util/dlang-tools/dlang-tools-2.109.1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Ancilliary tools for the D programming language compiler"
+HOMEPAGE="http://dlang.org/"
+
+DLANG_SLOT="$(ver_cut 1-2)"
+
+BETA="$(ver_cut 4)"
+VERSION="$(ver_cut 1-3)"
+
+if [[ -n "${BETA}" ]]; then
+ # We want to convert a Gentoo version string into an upstream one: 2.097.0_rc1 -> 2.097.0-rc.1
+ VERSION="$(ver_rs 3 "-" 4 ".")"
+fi
+SRC_URI="https://codeload.github.com/dlang/tools/tar.gz/v${VERSION} -> dlang-tools-${VERSION}.tar.gz"
+S="${WORKDIR}/tools-${VERSION}"
+
+LICENSE="Boost-1.0"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+TOOLS="ddemangle detab dustmite rdmd"
+IUSE="+ddemangle detab dustmite +rdmd test"
+RESTRICT="!test? ( test )"
+
+DLANG_COMPAT=( dmd-2_{106..109} gdc-1{3,4} ldc2-1_{35..39} )
+
+inherit desktop dlang-single xdg-utils
+
+PATCHES=(
+ # The make tests fails due to https://savannah.gnu.org/bugs/?65588
+ "${FILESDIR}/2.108.0-rdmd-disable-make-test.patch"
+ "${FILESDIR}/gdc-13-fix-parentheses.patch"
+)
+
+REQUIRED_USE="|| ( ${TOOLS[@]} ) ${DLANG_REQUIRED_USE} test? ( || ( ddemangle dustmite rdmd ) )"
+DEPEND=${DLANG_DEPS}
+BDEPEND=${DLANG_DEPS}
+RDEPEND=${DLANG_DEPS}
+
+src_compile() {
+ use ddemangle && dlang_compile_bin ddemangle ddemangle.d
+ use detab && dlang_compile_bin detab detab.d
+ use dustmite && dlang_compile_bin dustmite DustMite/dustmite.d DustMite/splitter.d DustMite/polyhash.d
+ use rdmd && dlang_compile_bin rdmd rdmd.d
+}
+
+src_test() {
+ if use ddemangle; then
+ dlang_compile_bin ddemangle_ut ddemangle.d $(dlang_get_unittest_flag)
+ ./ddemangle_ut || die 'ddemangle unittests failed'
+ fi
+ if use dustmite; then
+ dlang_compile_bin dustmite_ut DustMite/dustmite.d DustMite/splitter.d DustMite/polyhash.d $(dlang_get_unittest_flag)
+ ./dustmite_ut || die 'dustmite unittests failed'
+ fi
+ if use rdmd; then
+ # Add an empty main since gdc doesn't support -main
+ echo 'void main(){}' >> rdmd.d
+ dlang_compile_bin rdmd_ut rdmd.d $(dlang_get_unittest_flag)
+ ./rdmd_ut || die 'rdmd unittests failed'
+
+ # These tests fail with gdc, due to some quirks.
+ #
+ # On aarch64, -m64 is not supported by gdc.
+ # See: https://github.com/dlang/tools/pull/470
+ #
+ # On other arches there is one test failing. See:
+ # https://github.com/dlang/tools/pull/469 for possible
+ # solutions.
+ #
+ # These issues have existed for a while so ignore the failures.
+ if [[ ${EDC} == gdc* ]]; then
+ ewarn "Some rdmd tests have been skipped"
+ else
+ dlang_compile_bin rdmd_test rdmd_test.d
+ local model
+ # Note that dlang_get_model_flag doesn't work here since it
+ # is only meant for multilib.
+ [[ ${ABI} == @(x86|amd64) ]] && model=-m$(dlang_get_abi_bits)
+ # One test uses make, it can be specified through $MAKE if needed.
+ ./rdmd_test -v \
+ ${model} \
+ --rdmd-default-compiler="$(dlang_get_dmdw)" \
+ ./rdmd || die 'rdmd tests failed'
+ fi
+
+ fi
+}
+
+src_install() {
+ for tool in ${TOOLS}; do
+ if use "${tool}"; then
+ dobin "${tool}"
+ fi
+ done
+
+ # file icons
+ for size in 16 22 24 32 48 256; do
+ newicon --size "${size}" --context mimetypes "${FILESDIR}/icons/${size}/dmd-source.png" text-x-dsrc.png
+ done
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+}