diff options
author | Stephanos Ioannidis <root@stephanos.io> | 2021-07-14 00:07:30 +0900 |
---|---|---|
committer | Stephanos Ioannidis <root@stephanos.io> | 2021-07-14 00:07:30 +0900 |
commit | b48e1a31f335ff2f96e4475d4ae56f8734941cb9 (patch) | |
tree | a26b4f3d93b1930769a99b274be1033ec574ace0 /scripts | |
parent | 3782373c8c6d83a522fe1bf8023434639c9b747d (diff) | |
download | crosstool-ng-b48e1a31f335ff2f96e4475d4ae56f8734941cb9.tar.gz crosstool-ng-b48e1a31f335ff2f96e4475d4ae56f8734941cb9.tar.bz2 crosstool-ng-b48e1a31f335ff2f96e4475d4ae56f8734941cb9.zip |
Support common local patch directory
This commit updates the patching process such that the local patches
can be applied in a version-independent manner, as with the patches
provided by the crosstool-ng packages.
This is done by reading the patch files from
`${CT_LOCAL_PATCH_DIR}/(package_name)` rather than from
`${CT_LOCAL_PATCH_DIR}/(package_name)/(version)`.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/functions | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/functions b/scripts/functions index 11717e43..da909800 100644 --- a/scripts/functions +++ b/scripts/functions @@ -2240,6 +2240,7 @@ CT_DoExtractPatch() local bundled_patch_dir local bundled_common_patch_dir local local_patch_dir + local local_common_patch_dir local overlay # Inherit global value if requested @@ -2315,12 +2316,13 @@ CT_DoExtractPatch() bundled_patch_dir="${CT_LIB_DIR}/packages/${pkg_dir}" bundled_common_patch_dir="${CT_LIB_DIR}/packages/${pkg_name}" local_patch_dir="${CT_LOCAL_PATCH_DIR}/${pkg_dir}" + local_common_patch_dir="${CT_LOCAL_PATCH_DIR}/${pkg_name}" case "${patch_order}" in bundled) patch_dirs=("${bundled_patch_dir}" "${bundled_common_patch_dir}");; - local) patch_dirs=("${local_patch_dir}");; - bundled,local) patch_dirs=("${bundled_patch_dir}" "${bundled_common_patch_dir}" "${local_patch_dir}");; - local,bundled) patch_dirs=("${local_patch_dir}" "${bundled_patch_dir}" "${bundled_common_patch_dir}");; + local) patch_dirs=("${local_patch_dir}" "${local_common_patch_dir}");; + bundled,local) patch_dirs=("${bundled_patch_dir}" "${bundled_common_patch_dir}" "${local_patch_dir}" "${local_common_patch_dir}");; + local,bundled) patch_dirs=("${local_patch_dir}" "${local_common_patch_dir}" "${bundled_patch_dir}" "${bundled_common_patch_dir}");; none) patch_dirs=;; esac |