From f9c3864711d0de4e7305e3509d339f0713efa859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Mon, 8 Feb 2016 14:04:33 +0100 Subject: - Explicitly pass {C,LD}FLAGS_PATH to the runtime (ntapi, psxscl, etc.) build scripts; everything now goes into $PREFIX_NATIVE except for the cross compiler and its dependencies, which go into $PREFIX_TARGET. - Replaced specific PREFIX variables w/ generic per-build level CFLAGS. - Merged 204.psxscl.build into pkg.build. - Generalised patching procedure into build.subr. --- build.subr | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'build.subr') diff --git a/build.subr b/build.subr index 1c1e7984..47882838 100644 --- a/build.subr +++ b/build.subr @@ -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); -- cgit v1.2.3