From 219c5e932fddfa9a5a996fb5774fdbe0e117c05c Mon Sep 17 00:00:00 2001 From: Erico Nunes Date: Sun, 21 Jun 2015 20:53:43 -0300 Subject: functions: add support for arch-specific patch Add support for applying arch-specific patches found in "patches/${pkgname}/${version}/${CT_ARCH}". This is needed for applying a popular binutils patch specific for the AVR architecture but which isn't isolated for AVR in binutils' code. In this case, applying it for every architecture would end up bloating binutils' "size" options with AVR specifics. This feels like a bit of a hack but it is easy enough to support with current crosstool-ng infrastructure, seems like worth it for this case. Signed-off-by: Erico Nunes diff --git a/scripts/functions b/scripts/functions index 0fe8239..6429aa8 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1101,13 +1101,14 @@ CT_Patch() { CT_DoLog EXTRA "Patching '${pkgdir}'" bundled_patch_dir="${CT_LIB_DIR}/patches/${pkgname}/${version}" + bundled_patch_arch_dir="${bundled_patch_dir}/${CT_ARCH}" local_patch_dir="${CT_LOCAL_PATCH_DIR}/${pkgname}/${version}" case "${CT_PATCH_ORDER}" in - bundled) patch_dirs=("${bundled_patch_dir}");; + bundled) patch_dirs=("${bundled_patch_dir}" "${bundled_patch_arch_dir}");; local) patch_dirs=("${local_patch_dir}");; - bundled,local) patch_dirs=("${bundled_patch_dir}" "${local_patch_dir}");; - local,bundled) patch_dirs=("${local_patch_dir}" "${bundled_patch_dir}");; + bundled,local) patch_dirs=("${bundled_patch_dir}" "${bundled_patch_arch_dir}" "${local_patch_dir}");; + local,bundled) patch_dirs=("${local_patch_dir}" "${bundled_patch_dir}" "${bundled_patch_arch_dir}");; none) patch_dirs=;; esac -- cgit v0.10.2-6-g49f6