diff options
Diffstat (limited to 'build.subr')
-rw-r--r-- | build.subr | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -4,6 +4,16 @@ TIMESTAMP_FMT="${TIMESTAMP_FMT:-"%Y/%m/%d %H:%M:%S"}"; +apply_patches() { + (rm_if_exists -m -c ${2}; + wget -c -nd -np -r -R \*.htm\* -R \*.sig ${1}; + for _patch_fname in \ + $(find . -type f -not -iname \*.sig | sort); do + patch -d ../${PKG_SUBDIR} -p0 \ + < ${_patch_fname}; + done; unset _patch_fname); +}; + check_path_vars() { while [ $# -gt 0 ]; do if [ -z "${_val:=$(eval echo \${${1}})}" ]; then @@ -52,6 +62,16 @@ compare_hash() { shift $((${#}-1)); set -- ${1} ${_hash_cmp}; unset _hash_cmp; [ "x${1}" = "x${2}" ]; }; +compare_hash_manifest() { + while [ $# -gt 0 ]; do + if ! compare_hash ${1} ${2}; then + log_msg fail "Error: hash mismatch for patch file \`${1}'."; + exit 1; + else + shift; + fi; + done; return 0; +}; is_build_script_done() { _script_fname=${SCRIPT_FNAME##*/}; @@ -100,7 +120,7 @@ parse_with_pkg_name() { for _vname in \ build_type configure_args configure_extra_args \ no_config_cache no_destdir no_libtool_midipix \ - patches_extra prefix prefix_extra sha256sum \ + patches_extra_url prefix prefix_extra sha256sum \ url version \ CC CFLAGS LDFLAGS; do _vNAME=$(echo "${_vname}" | tr a-z A-Z); |