aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Horodniceanu <a.horodniceanu@proton.me>2024-09-12 20:26:25 +0300
committerAndrei Horodniceanu <a.horodniceanu@proton.me>2024-09-12 22:06:15 +0300
commit143a6f03b8b37c84379a7adf8a174a7df1fbe1ce (patch)
tree3366e738dcfb2e82edbf8f9f634d07fb12652b89 /dev-lang/ldc2/ldc2-1.38.0.ebuild
parentdev-lang/ldc2: 1.39.0 use external patches (diff)
downloaddlang-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>
Diffstat (limited to 'dev-lang/ldc2/ldc2-1.38.0.ebuild')
-rw-r--r--dev-lang/ldc2/ldc2-1.38.0.ebuild34
1 files changed, 20 insertions, 14 deletions
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)
+}