diff options
author | Andrei Horodniceanu <a.horodniceanu@proton.me> | 2024-09-12 20:26:25 +0300 |
---|---|---|
committer | Andrei Horodniceanu <a.horodniceanu@proton.me> | 2024-09-12 22:06:15 +0300 |
commit | 143a6f03b8b37c84379a7adf8a174a7df1fbe1ce (patch) | |
tree | 3366e738dcfb2e82edbf8f9f634d07fb12652b89 | |
parent | dev-lang/ldc2: 1.39.0 use external patches (diff) | |
download | dlang-143a6f03b8b37c84379a7adf8a174a7df1fbe1ce.tar.gz dlang-143a6f03b8b37c84379a7adf8a174a7df1fbe1ce.tar.bz2 dlang-143a6f03b8b37c84379a7adf8a174a7df1fbe1ce.zip |
dev-lang/ldc2: 1.38.0 use external patches
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
-rw-r--r-- | dev-lang/ldc2/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/ldc2/ldc2-1.38.0.ebuild | 34 |
2 files changed, 21 insertions, 14 deletions
diff --git a/dev-lang/ldc2/Manifest b/dev-lang/ldc2/Manifest index 31f9fe6..6dce506 100644 --- a/dev-lang/ldc2/Manifest +++ b/dev-lang/ldc2/Manifest @@ -6,4 +6,5 @@ DIST ldc-1.36.0-src.tar.gz 8551871 BLAKE2B b0f09128ab37e332f2eebab3288cac687f91b 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 +DIST ldc2-1.38.0-patches-1.tar.gz 8924 BLAKE2B 332ff175f3ba50b2c1c2a4e225a6c584621628fa7eda01bc26f318d04af03c5b40202ce2748392f2e55ce712ee6d8431026703419f278c8a6f38ee57a1601ce3 SHA512 00a84c4a5e3391ef3724b3e41b98af91186fb76a4a74a449cfea5cde86eb14889d6a0f06fb449903e95bda12be1448c3b16164bdc64ea990c933211b304ca2a2 DIST ldc2-1.39.0-patches-1.tar.gz 1176 BLAKE2B 7597fb1917f53ee5ee215cba73b92acf1d8347851d0d71223e5c01421da7ee6fd909ed7da217c99b162f3ca1602cdcddaf680ad13094db8957e98c635c72ecd1 SHA512 f78ddf97bb4ef0167328e1f58a3da7a35ec4a879a6c772f002dc161814bc9ac94b0ff543d3faf533375e0f5a9124a80c44b2371415810f0751617c2f13d56659 diff --git a/dev-lang/ldc2/ldc2-1.38.0.ebuild b/dev-lang/ldc2/ldc2-1.38.0.ebuild index aeaae13..f4bbac6 100644 --- a/dev-lang/ldc2/ldc2-1.38.0.ebuild +++ b/dev-lang/ldc2/ldc2-1.38.0.ebuild @@ -8,11 +8,18 @@ LLVM_COMPAT=( {15..18} ) PYTHON_COMPAT=( python3_{10..12} ) inherit cmake llvm-r1 multilib-build multiprocessing python-any-r1 toolchain-funcs +PATCH_VER=1 +PATCH_TAG_NAME="${PV}-patches-${PATCH_VER}" +PATCH_URL_BASE="https://github.com/the-horo/ldc-patches/archive/refs/tags" + 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" +SRC_URI=" + https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz + ${PATCH_URL_BASE}/${PATCH_TAG_NAME}.tar.gz -> ${P}-patches-${PATCH_VER}.tar.gz +" S=${WORKDIR}/${MY_P} LICENSE="BSD" # dmd code + runtime lib @@ -60,19 +67,6 @@ 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 - "${FILESDIR}/${PN}"-cmake-autodetect-and-compiler-rt-fixes-pr-4659.patch - "${FILESDIR}/${PN}"-x86-mangling-test-fix-pr-4661.patch - "${FILESDIR}/${PN}"-x86-tests-avoid-calling-amd64-gcc-pr-4662.patch -) - pkg_setup() { dlang_setup llvm-r1_pkg_setup @@ -80,6 +74,8 @@ pkg_setup() { } src_prepare(){ + apply_patches + # 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 @@ -192,3 +188,13 @@ pkg_postinst() { pkg_postrm() { "${EROOT}"/usr/bin/eselect dlang update ldc2 } + +apply_patches() { + local patches_dir="${WORKDIR}/ldc-patches-${PATCH_TAG_NAME}" + local patch + while read -rd '' patch; do + eapply "${patch}" + done < <(find "${patches_dir}" -mindepth 1 -maxdepth 1 \ + -type f -name '*.patch' \ + -print0) +} |