diff options
Diffstat (limited to 'dev-lang/ldc2')
-rw-r--r-- | dev-lang/ldc2/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/ldc2/ldc2-1.36.0-r2.ebuild | 34 |
2 files changed, 21 insertions, 14 deletions
diff --git a/dev-lang/ldc2/Manifest b/dev-lang/ldc2/Manifest index 4676ed6..15e8192 100644 --- a/dev-lang/ldc2/Manifest +++ b/dev-lang/ldc2/Manifest @@ -6,6 +6,7 @@ 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.36.0-patches-1.tar.gz 2526 BLAKE2B 016186abc61a174a3e880a167742eafc2f40c6579034e6ec733d22eaa8d2ea51cac1c00a4b80cb9fa995d44229b5473198b7b3d839085b9e94c5622726d4f41f SHA512 f7a124671cd3b7474419823f09d474f72f5be9e4b2c9a30f29743df88caf86491c1363ab2a8dbdfdde69e284789ab1918b78febc98dc0767100d26785cb9d6ba DIST ldc2-1.37.0-patches-1.tar.gz 2523 BLAKE2B 397d701de640bc04bdf9246b9f981141287f4bd8069cf1233567f9430652da3fb1b89899b0c8c9a19877d239465a3a4c9758df32ca2dc1cd098ffffc0d729368 SHA512 b24318ec1f484d71c19db013893d94492b5a155f1bd2c5f7c993ad941e19635872b3e4dd15826094c6f80982c956240c58240c7e86f33b5f7af8344eb407090f 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.36.0-r2.ebuild b/dev-lang/ldc2/ldc2-1.36.0-r2.ebuild index 95fe554..6e625da 100644 --- a/dev-lang/ldc2/ldc2-1.36.0-r2.ebuild +++ b/dev-lang/ldc2/ldc2-1.36.0-r2.ebuild @@ -8,9 +8,16 @@ LLVM_COMPAT=( {15..17} ) PYTHON_COMPAT=( python3_{10..12} ) inherit cmake flag-o-matic 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" + 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} DESCRIPTION="LLVM D Compiler" @@ -55,19 +62,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-disable-compiler-rt-sanitizers-tests.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/pull/4612 - "${FILESDIR}/${PN}"-1.36.0-tests-dshell-remove--m-switch.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 @@ -75,6 +69,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 @@ -199,3 +195,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) +} |