From b7d16e0260b6ebb8e43fe2d2783ccf056a3a9bdd Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz Date: Feb 13 2020 18:53:16 +0000 Subject: subr/build_args.subr: reimplemented using getopts(1). etc/build.usage: updated. groups/2*.native_packages_*.group: adds dependencies. --- diff --git a/etc/build.usage b/etc/build.usage index 7a41377..93f1c20 100644 --- a/etc/build.usage +++ b/etc/build.usage @@ -24,6 +24,8 @@ usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-C dir[,..]] [-D kind[,..]] 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. + Currently defined steps are: fetch_wget, fetch_git, fetch_extract, configure_patch_pre, configure_autotools, configure_patch, diff --git a/groups/231.native_packages_etc.group b/groups/231.native_packages_etc.group index 40f49ef..48ecf32 100644 --- a/groups/231.native_packages_etc.group +++ b/groups/231.native_packages_etc.group @@ -169,7 +169,7 @@ fi; : ${PKG_HTOP_CONFIGURE_ARGS_EXTRA:="--enable-proc --enable-unicode"}; : ${PKG_HTOP_CFLAGS_CONFIGURE_EXTRA:="--include=sys/sysmacros.h"}; : ${PKG_HTOP_ENV_VARS_EXTRA:="HTOP_NCURSES_CONFIG_SCRIPT=${PREFIX_NATIVE}/bin/ncurses-config:HTOP_NCURSES6_CONFIG_SCRIPT=${PREFIX_NATIVE}/bin/ncurses6-config:HTOP_NCURSESW_CONFIG_SCRIPT=${PREFIX_NATIVE}/bin/ncursesw-config:HTOP_NCURSESW6_CONFIG_SCRIPT=${PREFIX_NATIVE}/bin/ncursesw6-config"} -: ${PKG_ICECAST_DEPENDS:="curl"}; +: ${PKG_ICECAST_DEPENDS:="curl expat libressl libxml2 libxslt"}; : ${PKG_ICECAST_SHA256SUM:=eee7644a6bc703f5705ebe6b79c8d20a66a13cc577c60665e2bc2c34e3a0536d}; : ${PKG_ICECAST_VERSION:=2.4.99.2-283}; : ${PKG_ICECAST_URL:=https://people.xiph.org/~epirat/Icecast/icecast-${PKG_ICECAST_VERSION}.tar.gz}; diff --git a/subr/build_args.subr b/subr/build_args.subr index 0837326..c41a16f 100644 --- a/subr/build_args.subr +++ b/subr/build_args.subr @@ -2,61 +2,36 @@ # set -o noglob is assumed. # -BUILD_ARGS_SPEC=" - ARCH:arg:-a: - ARG_AS_NEEDED:--as-needed: - ARG_CLEAN_BUILDS:arg:-C: - ARG_DEBUG_MINIPIX:--debug-minipix: - ARG_DIST:arg:-D: - ARG_FETCH_FORCE:-F: - ARG_PARALLEL:optarg:-P:auto - ARG_RELAXED:-R: - ARG_RESTART:arg:-r: - ARG_VERBOSE:selfarg:-v: - ARG_VERBOSE:selfarg:-vv: - ARG_VERBOSE:selfarg:-vvv: - ARG_VERBOSE:selfarg:-vvvv: - BUILD:arg:-b:"; - build_args() { - local _spec="${BUILD_ARGS_SPEC}" _spec_arg="" _found=""; - while [ ${#} -gt 0 ]; do - if [ "${1#-}" = "${1}" ]; then - break; - fi; - for _spec_arg in ${_spec}; do - case "${_spec_arg}" in - *:${1}:*) - case "${_spec_arg#*:}" in - arg:*) - ex_rtl_set_var_unsafe "${_spec_arg%%:*}" "${2}"; shift; ;; - optarg:*) - if [ -n "${2}" ]\ - && [ "x${2#-}" = "x${2}" ]; then - ex_rtl_set_var_unsafe "${_spec_arg%%:*}" "${2}"; - shift; - else - ex_rtl_set_var_unsafe "${_spec_arg%%:*}" \ - "${_spec_arg##*:}"; - fi; ;; - selfarg:*) - ex_rtl_set_var_unsafe "${_spec_arg%%:*}" "${1}"; ;; - *) - ex_rtl_set_var_unsafe "${_spec_arg%%:*}" 1; ;; - esac; _found=1; break; ;; - *) _found=0; ;; - esac; - done; - if [ "${_found:-0}" -eq 0 ]; then - exec cat etc/build.usage; + local _opt="" _shiftfl=0; + while [ "${#}" -gt 0 ]; do + case "${1}" in + --as-needed) ARG_AS_NEEDED=1; _shiftfl=1; ;; + --debug-minipx) ARG_DEBUG_MINIPIX=1; _shiftfl=1; ;; + -v*) _opt="${1#-}"; while [ -n "${_opt}" ]; do + : $((ARG_VERBOSE+=1)); _opt="${_opt#?}"; + done; _shiftfl=1; ;; + *) _shiftfl=0; ;; + esac; + if [ "${_shiftfl}" -gt 0 ]; then + shift "${_shiftfl}"; continue; + elif getopts a:b:C:D:FhPr:R _opt; then + case "${_opt}" in + a) ARCH="${OPTARG}"; ;; + b) BUILD="${OPTARG}"; ;; + C) ARG_CLEAN_BUILDS="${OPTARG}"; ;; + D) ARG_DIST="${OPTARG}"; ;; + F) ARG_FETCH_FORCE=1; ;; + h) cat etc/build.usage; exit 0; ;; + P) ARG_PARALLEL="${OPTARG:-auto}"; ;; + r) ARG_RESTART="${OPTARG}"; ;; + R) ARG_RELAXED=1; ;; + *) cat etc/build.usage; exit 1; ;; + esac; shift $((${OPTIND}-1)); else - shift; + break; fi; done; - if ex_rtl_lmatch "${ARG_DIST}" , zipdist\ - && ! ex_rtl_lmatch "${ARG_DIST}" , minipix; then - ARG_DIST="${ARG_DIST:+${ARG_DIST},}minipix"; - fi; if [ -n "${ARG_RESTART}" ]\ && [ "${ARG_RESTART#\*}" != "${ARG_RESTART}" ]; then ARG_RESTART="${ARG_RESTART#\*}"; ARG_RESTART_RECURSIVE=1; @@ -65,19 +40,8 @@ build_args() { ALL) ARG_RESTART_AT=ALL; ;; LAST) ARG_RESTART_AT=""; ;; "") ;; - *) if [ "${ARG_RESTART%:*}" != "${ARG_RESTART}" ]; then - ARG_RESTART_AT="${ARG_RESTART#*:}"; ARG_RESTART="${ARG_RESTART%:*}"; - else - ARG_RESTART_AT=ALL; - fi; - ARG_RESTART="$(echo "${ARG_RESTART}" | sed "s/,/ /g")"; - ;; - esac; - case "${ARG_VERBOSE}" in - -v) ARG_VERBOSE=1; ;; - -vv) ARG_VERBOSE=2; ;; - -vvv) ARG_VERBOSE=3; ;; - -vvvv) ARG_VERBOSE=4; ;; + *:*) ARG_RESTART_AT="${ARG_RESTART#*:}"; ARG_RESTART="${ARG_RESTART%:*}"; ;; + *) ARG_RESTART="$(echo "${ARG_RESTART}" | sed "s/,/ /g")"; ARG_RESTART_AT=ALL; ;; esac; while [ ${#} -gt 0 ]; do case "${1}" in