summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-22 10:58:23 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-22 11:02:43 +0000
commitfc24fa07006d2bb571011ff9a7edd74774a109cc (patch)
treec91793e69c43e7b2f57383511830a71ca17624b3
parente2024b640c93abbcc4f17dbb9b0f2a31556b7fee (diff)
downloadmidipix_build-fc24fa07006d2bb571011ff9a7edd74774a109cc.tar.bz2
midipix_build-fc24fa07006d2bb571011ff9a7edd74774a109cc.tar.xz
subr/ex_pkg_dispatch.subr: correctly check for finished package status.
-rw-r--r--subr/ex_pkg_dispatch.subr104
-rw-r--r--vars/build.vars1
2 files changed, 54 insertions, 51 deletions
diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr
index 99c9ff8f..fc1ddaa9 100644
--- a/subr/ex_pkg_dispatch.subr
+++ b/subr/ex_pkg_dispatch.subr
@@ -9,63 +9,65 @@ ex_pkg_dispatch() {
if [ "${_pkg_name#*_flavour_*}" != "${_pkg_name}" ]; then
PKG_NAME_PARENT="${_pkg_name%_flavour_*}";
fi;
+ if ex_pkg_state_test "${_pkg_name}" finish; then
+ if [ -z "${_restart}" ]\
+ && [ "${_tgt_name}" != "INVARIANTS" ]; then
+ return 0;
+ fi;
+ fi;
(set -o errexit -o noglob;
ex_pkg_vars; ex_pkg_env;
ex_build_fileop mkdir "${PKG_BASE_DIR}";
ex_build_fileop cd "${PKG_BASE_DIR}";
- if [ -n "${_restart}" ]\
- || [ "${_tgt_name}" = "INVARIANTS" ]\
- || ! ex_pkg_state_test "${_pkg_name}" finish; then
- set -- $(ex_lfilter -not "${BUILD_STEPS}" \
- "$(ex_get_var_unsafe PKG_$(ex_toupper "${_pkg_name}")_BUILD_STEPS_DISABLE)");
- while [ ${#} -gt 0 ]; do
- _pkg_step_cmds=""; _pkg_step_cmd_args="";
- case "${1#*:}" in
- dynamic)
- if [ "${_tgt_name}" = "INVARIANTS" ]; then
- _pkg_step_cmds="pkg_${_pkg_name}_${1%:*} pkg_${1%:*}";
- elif [ -n "${_restart}" ]; then
- if [ -z "${_restart_at}" ]\
- || ex_lmatch "${_restart_at}" , "${1%:*}"; then
- _pkg_step_cmds="pkg_${_pkg_name}_${1%:*} pkg_${1%:*}";
- fi;
- elif ! ex_pkg_state_test "${_pkg_name}" "${1%:*}"; then
- _pkg_step_cmds="pkg_${_pkg_name}_${1%:*} pkg_${1%:*}";
- fi; ;;
- invariant)
- _pkg_step_cmds="pkg_${1%:*}"; ;;
- variant)
- if ex_lmatch "${_restart_at}" "," "${1%:*}"; then
+ set -- $(ex_lfilter -not "${BUILD_STEPS}" \
+ "$(ex_get_var_unsafe PKG_$(ex_toupper "${_pkg_name}")_BUILD_STEPS_DISABLE)");
+ while [ ${#} -gt 0 ]; do
+ _pkg_step_cmds=""; _pkg_step_cmd_args="";
+ case "${1#*:}" in
+ dynamic)
+ if [ "${_tgt_name}" = "INVARIANTS" ]; then
+ _pkg_step_cmds="pkg_${_pkg_name}_${1%:*} pkg_${1%:*}";
+ elif [ -n "${_restart}" ]; then
+ if [ -z "${_restart_at}" ]\
+ || ex_lmatch "${_restart_at}" , "${1%:*}"; then
_pkg_step_cmds="pkg_${_pkg_name}_${1%:*} pkg_${1%:*}";
- fi; ;;
- virtual)
- _pkg_step_cmds="pkg_${_pkg_name}_${1%:*}";
- _pkg_step_cmd_args="${_restart_at:-ALL}"; ;;
- all)
- if ex_test_cmd "pkg_${_pkg_name}_${1%:*}"; then
- "pkg_${_pkg_name}_${1%:*}" "${_restart_at:-ALL}";
- break;
- fi; ;;
- finish) ex_pkg_state_push "${_pkg_name}" finish; ;;
- *) ;;
- esac;
- for __ in ${_pkg_step_cmds}; do
- if ex_test_cmd "${__}"; then
- ex_test_cmd "pkg_${_pkg_name}_${1%:*}_pre" \
- && "pkg_${_pkg_name}_${1%:*}_pre"
- "${__}" ${_pkg_step_cmd_args};
- ex_test_cmd "pkg_${_pkg_name}_${1%:*}_post" \
- && "pkg_${_pkg_name}_${1%:*}_post"
- if [ "${1#*:}" != "invariant" ]\
- && [ ${#} -ge 2 ]; then
- ex_pkg_state_push "${_pkg_name}" "${1%:*}" "-${2#*:}";
- else
- ex_pkg_state_push "${_pkg_name}" "${1%:*}";
- fi; break;
fi;
- done;
- shift; done;
- fi); return ${?};
+ elif ! ex_pkg_state_test "${_pkg_name}" "${1%:*}"; then
+ _pkg_step_cmds="pkg_${_pkg_name}_${1%:*} pkg_${1%:*}";
+ fi; ;;
+ invariant)
+ _pkg_step_cmds="pkg_${1%:*}"; ;;
+ variant)
+ if ex_lmatch "${_restart_at}" "," "${1%:*}"; then
+ _pkg_step_cmds="pkg_${_pkg_name}_${1%:*} pkg_${1%:*}";
+ fi; ;;
+ virtual)
+ _pkg_step_cmds="pkg_${_pkg_name}_${1%:*}";
+ _pkg_step_cmd_args="${_restart_at:-ALL}"; ;;
+ all)
+ if ex_test_cmd "pkg_${_pkg_name}_${1%:*}"; then
+ "pkg_${_pkg_name}_${1%:*}" "${_restart_at:-ALL}";
+ break;
+ fi; ;;
+ finish) ex_pkg_state_push "${_pkg_name}" finish; ;;
+ *) ;;
+ esac;
+ for __ in ${_pkg_step_cmds}; do
+ if ex_test_cmd "${__}"; then
+ ex_test_cmd "pkg_${_pkg_name}_${1%:*}_pre" \
+ && "pkg_${_pkg_name}_${1%:*}_pre"
+ "${__}" ${_pkg_step_cmd_args};
+ ex_test_cmd "pkg_${_pkg_name}_${1%:*}_post" \
+ && "pkg_${_pkg_name}_${1%:*}_post"
+ if [ "${1#*:}" != "invariant" ]\
+ && [ ${#} -ge 2 ]; then
+ ex_pkg_state_push "${_pkg_name}" "${1%:*}" "-${2#*:}";
+ else
+ ex_pkg_state_push "${_pkg_name}" "${1%:*}";
+ fi; break;
+ fi;
+ done;
+ shift; done); return ${?};
};
# vim:filetype=sh
diff --git a/vars/build.vars b/vars/build.vars
index e1365817..127f09fe 100644
--- a/vars/build.vars
+++ b/vars/build.vars
@@ -219,6 +219,7 @@ HOST_PACKAGES_PREFIX="${PREFIX}";
: ${PKG_INTLTOOL_HOST_SHA256SUM:=67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd};
: ${PKG_INTLTOOL_HOST_VERSION:=0.51.0};
: ${PKG_INTLTOOL_HOST_URL:=https://launchpad.net/intltool/trunk/${PKG_INTLTOOL_HOST_VERSION}/+download/intltool-${PKG_INTLTOOL_HOST_VERSION}.tar.gz};
+: ${PKG_INTLTOOL_HOST_CONFIGURE_ARGS_EXTRA:=--program-prefix=${TARGET}};
: ${PKG_RUBY_HOST_SHA256SUM:=ba5ba60e5f1aa21b4ef8e9bf35b9ddb57286cb546aac4b5a28c71f459467e507};
: ${PKG_RUBY_HOST_VERSION:=2.3.0};
: ${PKG_RUBY_HOST_URL:=https://cache.ruby-lang.org/pub/ruby/${PKG_RUBY_HOST_VERSION%.*}/ruby-${PKG_RUBY_HOST_VERSION}.tar.gz};