diff --git a/build.sh b/build.sh index 493f801..3786bc0 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ buildp_dispatch() { local _msg="${1}" _group_name="${2}" _pkg_name="${3}" \ - _build_group_meta="" _build_group_lc="" _build_groups_lc="" _last_pkg="" _pkg_restart="" PKGS_FOUND; + _build_group_meta="" _build_group_lc="" _build_groups_lc="" _pkg_restart="" PKGS_FOUND; case "${_msg}" in # Top-level start_build) shift; build_init "${@}"; diff --git a/etc/build.usage b/etc/build.usage index 354fc93..7401608 100644 --- a/etc/build.usage +++ b/etc/build.usage @@ -1,5 +1,5 @@ usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-C dir[,..]] [-D kind[,..]] - [-F ipv4|ipv6|offline] [-h] [-P [jobs]] [-r [*]ALL|LAST|name[,..][:step,..]] + [-F ipv4|ipv6|offline] [-h] [-P [jobs]] [-r [*[*]]ALL|LAST|name[,..][:step,..]] [-R] [-v[v[v[v]]]] [--as-needed] [--debug-minipix] [[ ..]] -a nt32|nt64 Selects 32-bit or 64-bit architecture; defaults to nt64. -b debug|release Selects debug or release build; defaults to debug. @@ -20,11 +20,12 @@ usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-C dir[,..]] [-D kind[,..]] processors on the host system. If -R is not specified and at least one (1) package fails to build, all remaining package builds will be forcibly aborted for convenience. - -r [*]ALL[:step,..]|LAST|name[,..][:step,..] + -r [*[*]]ALL[:step,..]|LAST|name[,..][:step,..] Restart all packages/the specified comma-separated package(s) completely or at optionally specified comma-separated step(s) or restart the last failed package and resume build. - Prepend w/ `*' to automatically include dependencies. + Prepend w/ `*' to automatically include dependencies and `**' to + forcibly rebuild all dependencies. Currently defined steps are: fetch_wget, fetch_git, fetch_extract, diff --git a/groups/231.native_packages_etc.group b/groups/231.native_packages_etc.group index ec04c03..93039d2 100644 --- a/groups/231.native_packages_etc.group +++ b/groups/231.native_packages_etc.group @@ -175,7 +175,7 @@ fi; : ${PKG_ICECAST_VERSION:=2.4.99.2-283}; : ${PKG_ICECAST_URL:=https://people.xiph.org/~epirat/Icecast/icecast-${PKG_ICECAST_VERSION}.tar.gz}; : ${PKG_ICECAST_CONFIGURE_ARGS_EXTRA:="--without-speex"}; -: ${PKG_IMAGEMAGICK_DEPENDS:="curl xz"}; +: ${PKG_IMAGEMAGICK_DEPENDS:="curl xz zstd"}; : ${PKG_IMAGEMAGICK_SHA256SUM:=67859f9cba97f2c06b5e416898216e49216be00c7cba3dd89896e49331aef96d}; : ${PKG_IMAGEMAGICK_VERSION:=7.0.9-12}; : ${PKG_IMAGEMAGICK_URL:=https://imagemagick.org/download/releases/ImageMagick-${PKG_IMAGEMAGICK_VERSION}.tar.xz}; diff --git a/subr/build_init.subr b/subr/build_init.subr index 53327ac..c204c9b 100644 --- a/subr/build_init.subr +++ b/subr/build_init.subr @@ -11,15 +11,18 @@ buildp_ast() { }; buildp_init_args() { - _status=""; + local _last_pkg=""; _status=""; if [ "${ARG_AS_NEEDED:-0}" -eq 1 ]\ && [ -e "${PREFIX}/build.gitref" ]\ && [ "$(git rev-parse HEAD)" = "$(cat "${PREFIX}/build.gitref")" ]; then _status="Git repository has not changed since last build and --as-needed was specified."; fi; - if [ -n "${ARG_RESTART}" ]\ - && [ "${ARG_RESTART#\*}" != "${ARG_RESTART}" ]; then - ARG_RESTART="${ARG_RESTART#\*}"; ARG_RESTART_RECURSIVE=1; + if [ -n "${ARG_RESTART}" ]; then + if [ "${ARG_RESTART#\*\*}" != "${ARG_RESTART}" ]; then + ARG_RESTART="${ARG_RESTART#\*\*}"; ARG_RESTART_RECURSIVE=2; + elif [ "${ARG_RESTART#\*}" != "${ARG_RESTART}" ]; then + ARG_RESTART="${ARG_RESTART#\*}"; ARG_RESTART_RECURSIVE=1; + fi; fi; case "${ARG_RESTART}" in ALL) ARG_RESTART_AT=ALL; ;; diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr index 7ea9587..13b2a6d 100644 --- a/subr/ex_pkg_dispatch.subr +++ b/subr/ex_pkg_dispatch.subr @@ -29,8 +29,8 @@ exp_pkg_dispatch_group() { && _pkg_depends="$(exp_pkg_expand_packages $(ex_rtl_get_var_unsafe "PKG_$(ex_rtl_toupper "${_pkg_name}")_DEPENDS"))"\ && exp_pkg_check_depends "${_group_name}" "${_pkg_depends}" "${_pkg_name}" \ && exp_pkg_dispatch_package "${_dispatch_fn}" "${_group_name}" \ - "${_pkg_name}" "${_restart_at}" "${_stderrout_path}" \ - "${_pipe_path}"; then + "${_pkg_name}" "${_restart}" "${_restart_at}" \ + "${_stderrout_path}" "${_pipe_path}"; then _pkgs_found_new="${_pkgs_found_new:+${_pkgs_found_new} }${_pkg_name}"; break; fi; @@ -39,8 +39,8 @@ exp_pkg_dispatch_group() { }; exp_pkg_dispatch_package() { - local _dispatch_fn="${1}" _group_name="${2}" _pkg_name="${3}" _restart_at="${4}" \ - _stderrout_path="${5}" _pipe_path="${6}" _pkg_name_uc="" _rc=0; + local _dispatch_fn="${1}" _group_name="${2}" _pkg_name="${3}" _restart="${4}" _restart_at="${5}" \ + _stderrout_path="${6}" _pipe_path="${7}" _pkg_name_uc="" _rc=0; _pkg_name_uc="$(ex_rtl_toupper "${_pkg_name}")"; if [ -n "$(ex_rtl_get_var_unsafe PKG_${_pkg_name_uc}_DISABLED)" ]; then _pkgs_complete="${_pkgs_complete:+${_pkgs_complete} }${_pkg_name}"; @@ -48,7 +48,8 @@ exp_pkg_dispatch_package() { : $((_pkgs_count+=1)); _rc=1; "${_dispatch_fn}" disabled_pkg "${_group_name}" "${_pkg_name}" "${_pkgs_count}" "${_pkgs_count_max}"; elif ex_pkg_state_test "${_pkg_name}" finish\ - && [ -z "${_restart_at}" ]; then + && [ -z "$(ex_rtl_lsearch "${_restart}" "${_pkg_name}")" ]\ + && [ "${ARG_RESTART_RECURSIVE}" -ne 2 ]; then _pkgs_complete="${_pkgs_complete:+${_pkgs_complete} }${_pkg_name}"; _pkg_names="$(ex_rtl_lfilter "${_pkg_names}" "${_pkg_name}")"; : $((_pkgs_count+=1)); _rc=1; @@ -59,7 +60,7 @@ exp_pkg_dispatch_package() { "${_dispatch_fn}" start_pkg "${_group_name}" "${_pkg_name}" "${_pkgs_count}" "${_pkgs_count_max}"; (set -o errexit -o noglob; BUILD_IS_PARENT=0; ex_pkg_env "${_group_name}" "${_pkg_name}" "${_restart_at}"; - ex_pkg_exec "${_group_name}" "${_pkg_name}" "${_restart_at}" \ + ex_pkg_exec "${_group_name}" "${_pkg_name}" "${_restart_at}" \ "${_dispatch_fn}";) 1>"${_stderrout_path}" 2>&1 3>"${_pipe_path}" & : $((_njobs+=1)); fi; @@ -89,8 +90,10 @@ exp_pkg_get_packages() { _pkg_names="$(ex_rtl_lsearch "${_pkg_names}" "${_restart}")"; fi; if ! [ -n "${_restart}" ]\ - || [ "${ARG_RESTART_RECURSIVE:-0}" -eq 1 ]; then + || [ "${ARG_RESTART_RECURSIVE:-0}" -ge 1 ]; then + ex_rtl_log_msg vnfo "Resolving \`${_group_name}' dependencies..."; _pkg_names="$(ex_rtl_uniq $(exp_pkg_expand_packages ${_pkg_names}))"; + ex_rtl_log_msg vnfo "Resolved \`${_group_name}' dependencies."; fi; };