mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-06-22 00:41:51 +00:00
Add option for experimental bundled patches
This adds 3 new options to patch order: * bundled + bundled_exp * bundled + bundled_exp + local * local + bundled + bundled_exp The path for bundled experimental patches is: ${CT_LIB_DIR}/packages/${pkg_dir}/experimental and patches that are still being reviewed, but not yet applied upstream may be toggled with ENABLE_EXPERIMENTAL_BUNDLED_PATCHES. Also fix modelines for editors on bootstrap and scripts/functions, and fix mix whitespace in scripts/functions. Closes: #1916 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
This commit is contained in:
committed by
Chris Packham
parent
fa05153eba
commit
db942c3d0d
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# -*- mode: bash; tab-width: 4 -*-
|
||||||
# vi: ts=4:sw=4:et
|
# vi: ts=4:sw=4:et
|
||||||
|
# vim: filetype=bash
|
||||||
|
|
||||||
if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then
|
if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then
|
||||||
echo "Your BASH shell version (${BASH_VERSION}) is too old." >&2
|
echo "Your BASH shell version (${BASH_VERSION}) is too old." >&2
|
||||||
|
@ -60,6 +60,17 @@ config ALLOW_BUILD_AS_ROOT_SURE
|
|||||||
prompt "Are you sure?"
|
prompt "Are you sure?"
|
||||||
depends on ALLOW_BUILD_AS_ROOT
|
depends on ALLOW_BUILD_AS_ROOT
|
||||||
|
|
||||||
|
config ENABLE_EXPERIMENTAL_BUNDLED_PATCHES
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
depends on EXPERIMENTAL
|
||||||
|
prompt "Enable Experimental Bundled Patches"
|
||||||
|
help
|
||||||
|
This option is for advanced users or special senarios where a
|
||||||
|
patch has been submitted upstream, but still not reviewed
|
||||||
|
or applied yet, but fix an issue with a package or feature that
|
||||||
|
is also marked experimental.
|
||||||
|
|
||||||
config DEBUG_CT
|
config DEBUG_CT
|
||||||
bool
|
bool
|
||||||
prompt "Debug crosstool-NG"
|
prompt "Debug crosstool-NG"
|
||||||
|
@ -48,6 +48,12 @@ config PATCH_BUNDLED
|
|||||||
help
|
help
|
||||||
Only apply patches bundled with crosstool-NG.
|
Only apply patches bundled with crosstool-NG.
|
||||||
|
|
||||||
|
config PATCH_BUNDLED_EXP
|
||||||
|
bool "Bundled, then experimental bundled"
|
||||||
|
depends on ENABLE_EXPERIMENTAL_BUNDLED_PATCHES
|
||||||
|
help
|
||||||
|
Apply the bundled patches, and experimental bundled patches.
|
||||||
|
|
||||||
config PATCH_LOCAL
|
config PATCH_LOCAL
|
||||||
bool "Local only"
|
bool "Local only"
|
||||||
select PATCH_USE_LOCAL
|
select PATCH_USE_LOCAL
|
||||||
@ -64,6 +70,15 @@ config PATCH_BUNDLED_LOCAL
|
|||||||
Apply the patches bundled with crosstool-NG, then apply your local
|
Apply the patches bundled with crosstool-NG, then apply your local
|
||||||
patches.
|
patches.
|
||||||
|
|
||||||
|
config PATCH_BUNDLED_EXP_LOCAL
|
||||||
|
bool "Bundled, then experimental bundled, then local"
|
||||||
|
select PATCH_USE_LOCAL
|
||||||
|
depends on ENABLE_EXPERIMENTAL_BUNDLED_PATCHES
|
||||||
|
help
|
||||||
|
Apply the patches bundled with crosstool-NG, then apply the
|
||||||
|
experimental patches bundled with crosstool-NG, then apply
|
||||||
|
your local patches.
|
||||||
|
|
||||||
config PATCH_LOCAL_BUNDLED
|
config PATCH_LOCAL_BUNDLED
|
||||||
bool "Local, then bundled"
|
bool "Local, then bundled"
|
||||||
select PATCH_USE_LOCAL
|
select PATCH_USE_LOCAL
|
||||||
@ -73,6 +88,16 @@ config PATCH_LOCAL_BUNDLED
|
|||||||
crosstool-NG. Note that the bundled patches cannot be guaranteed
|
crosstool-NG. Note that the bundled patches cannot be guaranteed
|
||||||
to apply on top of your local patches.
|
to apply on top of your local patches.
|
||||||
|
|
||||||
|
config PATCH_LOCAL_BUNDLED_EXP
|
||||||
|
bool "Local, then bundled, then experimental bunlded"
|
||||||
|
select PATCH_USE_LOCAL
|
||||||
|
depends on ENABLE_EXPERIMENTAL_BUNDLED_PATCHES
|
||||||
|
help
|
||||||
|
Apply your local patches, then apply the patches bundled with
|
||||||
|
crosstool-NG, then apply the experimental patches bundled with
|
||||||
|
crosstool-NG. Note that the bundled patches cannot be guaranteed
|
||||||
|
to apply on top of your local patches.
|
||||||
|
|
||||||
config PATCH_NONE
|
config PATCH_NONE
|
||||||
bool "None"
|
bool "None"
|
||||||
depends on EXPERIMENTAL
|
depends on EXPERIMENTAL
|
||||||
@ -94,6 +119,9 @@ config PATCH_ORDER
|
|||||||
default "local" if PATCH_LOCAL
|
default "local" if PATCH_LOCAL
|
||||||
default "bundled,local" if PATCH_BUNDLED_LOCAL
|
default "bundled,local" if PATCH_BUNDLED_LOCAL
|
||||||
default "local,bundled" if PATCH_LOCAL_BUNDLED
|
default "local,bundled" if PATCH_LOCAL_BUNDLED
|
||||||
|
default "bundled,bundled_exp" if PATCH_BUNDLED_EXP
|
||||||
|
default "bundled,bundled_exp,local" if PATCH_BUNDLED_EXP_LOCAL
|
||||||
|
default "local,bundled,bundled_exp" if PATCH_LOCAL_BUNDLED_EXP
|
||||||
default "none" if PATCH_NONE
|
default "none" if PATCH_NONE
|
||||||
|
|
||||||
config PATCH_USE_LOCAL
|
config PATCH_USE_LOCAL
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- mode: sh; tab-width: 4 -*-
|
# -*- mode: bash; tab-width: 4 -*-
|
||||||
# vi: ts=4:sw=4:sts=4:et
|
# vi: ts=4:sw=4:sts=4:et
|
||||||
# vim: filetype=sh :
|
# vim: filetype=bash
|
||||||
# This file contains some useful common functions
|
# This file contains some useful common functions
|
||||||
# Copyright 2007 Yann E. MORIN
|
# Copyright 2007 Yann E. MORIN
|
||||||
# Licensed under the GPL v2. See COPYING in the root of this package
|
# Licensed under the GPL v2. See COPYING in the root of this package
|
||||||
@ -174,8 +174,9 @@ CT_OnError() {
|
|||||||
CT_DoLog ERROR ">> NOTE: You configuration uses non-default patch sets. Please"
|
CT_DoLog ERROR ">> NOTE: You configuration uses non-default patch sets. Please"
|
||||||
CT_DoLog ERROR ">> select 'bundled' as the set of patches applied and attempt"
|
CT_DoLog ERROR ">> select 'bundled' as the set of patches applied and attempt"
|
||||||
CT_DoLog ERROR ">> to reproduce this issue. Issues reported with other patch"
|
CT_DoLog ERROR ">> to reproduce this issue. Issues reported with other patch"
|
||||||
CT_DoLog ERROR ">> set selections (none, local, bundled+local) are going to be"
|
CT_DoLog ERROR ">> set selections (none, local, bundled+local,"
|
||||||
CT_DoLog ERROR ">> closed without explanation."
|
CT_DoLog ERROR ">> bundled+bundled_exp bundled+bundled_exp+local) are going to"
|
||||||
|
CT_DoLog ERROR ">> be closed without explanation."
|
||||||
CT_DoLog ERROR ">>"
|
CT_DoLog ERROR ">>"
|
||||||
fi
|
fi
|
||||||
CT_DoLog ERROR ">> If you feel this is a bug in crosstool-NG, report it at:"
|
CT_DoLog ERROR ">> If you feel this is a bug in crosstool-NG, report it at:"
|
||||||
@ -2237,6 +2238,7 @@ CT_DoExtractPatch()
|
|||||||
local archive ext
|
local archive ext
|
||||||
local -a patch_dirs
|
local -a patch_dirs
|
||||||
local bundled_patch_dir
|
local bundled_patch_dir
|
||||||
|
local bundled_exp_patch_dir
|
||||||
local bundled_common_patch_dir
|
local bundled_common_patch_dir
|
||||||
local local_patch_dir
|
local local_patch_dir
|
||||||
local local_common_patch_dir
|
local local_common_patch_dir
|
||||||
@ -2265,9 +2267,9 @@ CT_DoExtractPatch()
|
|||||||
# Can use common location only if using non-custom source, only bundled patches
|
# Can use common location only if using non-custom source, only bundled patches
|
||||||
# and no overlays. Otherwise, this source directory is custom-tailored for this
|
# and no overlays. Otherwise, this source directory is custom-tailored for this
|
||||||
# particular configuration and cannot be reused by different configurations.
|
# particular configuration and cannot be reused by different configurations.
|
||||||
if [ "${src_custom}" != "y" -a \
|
if test "${src_custom}" != "y" -a \
|
||||||
"${patch_order}" = "bundled" -a \
|
\( "${patch_order}" = 'bundled' -o "${patch_order}" = 'bundled,bundled_exp' \) -a \
|
||||||
! -d "${CT_BUILD_DIR}/overlay/${dir_name}" ]; then
|
! -d "${CT_BUILD_DIR}/overlay/${dir_name}"; then
|
||||||
src_dir="${CT_COMMON_SRC_DIR}"
|
src_dir="${CT_COMMON_SRC_DIR}"
|
||||||
else
|
else
|
||||||
src_dir="${CT_SRC_DIR}"
|
src_dir="${CT_SRC_DIR}"
|
||||||
@ -2314,6 +2316,7 @@ CT_DoExtractPatch()
|
|||||||
CT_DoExecLog ALL touch "${src_dir}/.${basename}.patching"
|
CT_DoExecLog ALL touch "${src_dir}/.${basename}.patching"
|
||||||
|
|
||||||
bundled_patch_dir="${CT_LIB_DIR}/packages/${pkg_dir}"
|
bundled_patch_dir="${CT_LIB_DIR}/packages/${pkg_dir}"
|
||||||
|
bundled_exp_patch_dir="${CT_LIB_DIR}/packages/${pkg_dir}/experimental"
|
||||||
bundled_common_patch_dir="${CT_LIB_DIR}/packages/${pkg_name}"
|
bundled_common_patch_dir="${CT_LIB_DIR}/packages/${pkg_name}"
|
||||||
local_patch_dir="${CT_LOCAL_PATCH_DIR}/${pkg_dir}"
|
local_patch_dir="${CT_LOCAL_PATCH_DIR}/${pkg_dir}"
|
||||||
local_common_patch_dir="${CT_LOCAL_PATCH_DIR}/${pkg_name}"
|
local_common_patch_dir="${CT_LOCAL_PATCH_DIR}/${pkg_name}"
|
||||||
@ -2323,6 +2326,9 @@ CT_DoExtractPatch()
|
|||||||
local) patch_dirs=("${local_patch_dir}" "${local_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}");;
|
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}");;
|
local,bundled) patch_dirs=("${local_patch_dir}" "${local_common_patch_dir}" "${bundled_patch_dir}" "${bundled_common_patch_dir}");;
|
||||||
|
bundled,bundled_exp) patch_dirs=("${bundled_patch_dir}" "${bundled_common_patch_dir}" "${bundled_exp_patch_dir}");;
|
||||||
|
bundled,bundled_exp,local) patch_dirs=("${bundled_patch_dir}" "${bundled_common_patch_dir}" "${bundled_exp_patch_dir}" "${local_patch_dir}" "${local_common_patch_dir}");;
|
||||||
|
local,bundled,bundled_exp) patch_dirs=("${local_patch_dir}" "${local_common_patch_dir}" "${bundled_patch_dir}" "${bundled_common_patch_dir}" "${bundled_exp_patch_dir}");;
|
||||||
none) patch_dirs=;;
|
none) patch_dirs=;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user