summaryrefslogtreecommitdiffhomepage
path: root/build.subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-02-08 14:04:33 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-02-08 15:23:11 +0100
commitf9c3864711d0de4e7305e3509d339f0713efa859 (patch)
tree0acde74d41e11715e69b40e1d29b453bbe22a5cc /build.subr
parent0dae87d3c39796eb0e9288256737e45c5030650e (diff)
downloadmidipix_build-f9c3864711d0de4e7305e3509d339f0713efa859.tar.bz2
midipix_build-f9c3864711d0de4e7305e3509d339f0713efa859.tar.xz
- 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.
Diffstat (limited to 'build.subr')
-rw-r--r--build.subr22
1 files changed, 21 insertions, 1 deletions
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);