summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-04-11 12:54:46 +0100
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-04-11 12:54:46 +0100
commit168e556aba2831a9217ca492619466419c6c8eb0 (patch)
tree5375c42e02ecb1213331a74a4a14e9f92e3d826e /subr
parentb93af38a450391520b810fb465a07c29013fe9b0 (diff)
downloadmidipix_build-168e556aba2831a9217ca492619466419c6c8eb0.tar.bz2
midipix_build-168e556aba2831a9217ca492619466419c6c8eb0.tar.xz
Integrate w/ sofort's ${NATIVE_{C,CXX,LD}FLAGS}.
groups/{000.host_tools,010.host_deps,200.native_packages}.group:${*_SOFORT_NATIVE_C{,XX}FLAGS}: build w/ -I${PREFIX}/include. groups/010.host_deps.group:python[23]_host:${PKG_ENV_VARS_EXTRA}: updated. groups/010.host_deps.group:python[23]_host:${PKG_SOFORT_FORCE}: force calling ex_pkg_env_sofort(). groups/010.host_deps.group:python3_host:${PKG_SOFORT_NATIVE_CC}: build w/ ${DEFAULT_HOST_CC} (via midipix.) groups/221.native_packages_dev.group:python[23]:${PKG_SOFORT_FORCE}: force calling ex_pkg_env_sofort(). groups/221.native_packages_dev.group:${PKG_{ENV_VARS_EXTRA,SOFORT_NATIVE_CFLAGS_EXTRA}}: updated. midipix.env:${DEFAULT_BUILD_VARS}: adds SOFORT_NATIVE_{{CC,CXX,LD},{C,CXX,LD}FLAGS{,_EXTRA}}. patches/python3_host-3.6.3.local.patch: removes obsolete patch. subr/ex_pkg_env.subr:ex_pkg_env_sofort(): initial implementation. subr/ex_pkg_env.subr:ex_pkg_env(): call ex_pkg_env_sofort() initially. subr/pkg_configure_autotools.subr: call ex_pkg_env_sofort().
Diffstat (limited to 'subr')
-rw-r--r--subr/ex_pkg_env.subr45
-rw-r--r--subr/pkg_configure_autotools.subr1
2 files changed, 45 insertions, 1 deletions
diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr
index ebfb8f46..6bea31c9 100644
--- a/subr/ex_pkg_env.subr
+++ b/subr/ex_pkg_env.subr
@@ -87,6 +87,48 @@ exp_pkg_env_set() {
fi;
};
+ex_pkg_env_sofort() {
+ local _pkg_base_dir="${1}" _pkg_sofort_force="${2}" _pkg_subdir="${3}" \
+ _vname="" _vname_new="" _vval="" _vval_old="";
+
+ if [ -d "${_pkg_base_dir}/${_pkg_subdir}/sofort" ]\ \
+ || [ "${_pkg_sofort_force:-0}" -eq 1 ]; then
+ for _vname in \
+ PKG_SOFORT_NATIVE_CC \
+ PKG_SOFORT_NATIVE_CFLAGS \
+ PKG_SOFORT_NATIVE_CXX \
+ PKG_SOFORT_NATIVE_CXXFLAGS \
+ PKG_SOFORT_NATIVE_LD \
+ PKG_SOFORT_NATIVE_LDFLAGS; do
+ _vname_new="PKG_${_vname#PKG_SOFORT_}";
+ rtl_set_var_unsafe "${_vname_new}" "";
+ done;
+ for _vname in \
+ PKG_SOFORT_NATIVE_CC \
+ PKG_SOFORT_NATIVE_CFLAGS \
+ PKG_SOFORT_NATIVE_CFLAGS_EXTRA \
+ PKG_SOFORT_NATIVE_CXX \
+ PKG_SOFORT_NATIVE_CXXFLAGS \
+ PKG_SOFORT_NATIVE_CXXFLAGS_EXTRA \
+ PKG_SOFORT_NATIVE_LD \
+ PKG_SOFORT_NATIVE_LDFLAGS \
+ PKG_SOFORT_NATIVE_LDFLAGS_EXTRA; do
+ if _vval="$(rtl_get_var_unsafe "${_vname}")" \
+ && [ -n "${_vval}" ]; then
+ _vname_new="${_vname#PKG_SOFORT_}";
+ case "${_vname}" in
+ *_EXTRA)
+ _vval_old="$(rtl_get_var_unsafe "${_vname_new%_EXTRA}")";
+ rtl_set_var_unsafe "${_vname_new%_EXTRA}" "${_vval_old:+${_vval_old} }${_vval}"; ;;
+ *)
+ rtl_set_var_unsafe "${_vname_new}" "${_vval}"; ;;
+ esac;
+ export "${_vname_new}";
+ fi;
+ done;
+ fi; return 0;
+};
+
#
# ex_pkg_env() - set package variables for single named package
# @_build_steps_default: list of default build steps
@@ -104,7 +146,8 @@ ex_pkg_env() {
_nounset="${4}" _pkg_name="${5}" _restart_at="${6}" _workdir="${7}" _vname="";
rtl_fileop source_opt "vars/${_pkg_name}.vars" "${_group_name}/${_pkg_name}.${_group_name}";
if ! exp_pkg_env_set "${_build_vars_default}" "${_group_name}" "${_nounset}" "${_pkg_name}"\
- || ! exp_pkg_env_defaults "${_build_steps_default}" "${_pkg_name}" "${_workdir}"; then
+ || ! exp_pkg_env_defaults "${_build_steps_default}" "${_pkg_name}" "${_workdir}"\
+ || ! ex_pkg_env_sofort "${PKG_BASE_DIR:-}" "${PKG_SOFORT_FORCE:-0}" "${PKG_SUBDIR:-}"; then
return 1;
fi;
};
diff --git a/subr/pkg_configure_autotools.subr b/subr/pkg_configure_autotools.subr
index c09f27a4..421be28b 100644
--- a/subr/pkg_configure_autotools.subr
+++ b/subr/pkg_configure_autotools.subr
@@ -4,6 +4,7 @@
pkg_configure_autotools() {
local _config_cache="" _fname="" _subdir_tgt="";
+ ex_pkg_env_sofort "${PKG_BASE_DIR}" "${PKG_SOFORT_FORCE:-0}" "${PKG_SUBDIR:-}";
if rtl_exists_any "${PKG_BASE_DIR}/${PKG_SUBDIR}" \
"config.guess" "configure.ac" "configure.in" "configure";
then rtl_export_vars PKG_CONFIG "${PKG_PKG_CONFIG:-}" PKG_CONFIG_LIBDIR "${PKG_PKG_CONFIG_LIBDIR:-}";