summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-22 02:11:09 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-22 02:35:32 +0000
commit7a66564fb73f8f9ab35d308d774f07306402467e (patch)
tree4d2ed992ad59fef02cf3a69cf3ac7c6c17aace43 /subr
parent32ad217d197203a97dfcc0076e748731d2315c0b (diff)
downloadmidipix_build-7a66564fb73f8f9ab35d308d774f07306402467e.tar.bz2
midipix_build-7a66564fb73f8f9ab35d308d774f07306402467e.tar.xz
patches/*, subr/pkg_configure_patch{,_pre}.subr: only match against package {name,version}.
subr/pkg_configure_patch.subr: remove `_host' package name postfix when searching for chainport patches. subr/ex_pkg_env.subr: fix typo.
Diffstat (limited to 'subr')
-rw-r--r--subr/ex_pkg_env.subr2
-rw-r--r--subr/pkg_configure_patch.subr18
-rw-r--r--subr/pkg_configure_patch_pre.subr8
3 files changed, 9 insertions, 19 deletions
diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr
index 240c6289..25b00537 100644
--- a/subr/ex_pkg_env.subr
+++ b/subr/ex_pkg_env.subr
@@ -7,7 +7,7 @@ ex_pkg_env() {
if [ -z "${PKG_URL}" ]\
&& [ -z "${PKG_URLS_GIT}" ]\
&& [ -z "${PKG_VERSION}" ]\
- && ! test_cmd "pkg_${PKG_NAME}_all"; then
+ && ! ex_test_cmd "pkg_${PKG_NAME}_all"; then
ex_log_msg failexit "Error: package \`${PKG_NAME}' missing in build.vars.";
elif [ "${PKG_DISABLED:-0}" -eq 1 ]; then
ex_log_msg vnfo "Skipping disabled package \`${PKG_NAME}.'";
diff --git a/subr/pkg_configure_patch.subr b/subr/pkg_configure_patch.subr
index 5dfda784..d15dc0d2 100644
--- a/subr/pkg_configure_patch.subr
+++ b/subr/pkg_configure_patch.subr
@@ -5,19 +5,11 @@
pkg_configure_patch() {
local _patch_fname _patches_done;
set +o noglob;
- for _patch_fname in \
- ${WORKDIR}/chainport-host-invariants/chainport/${PKG_NAME}.midipix.patch \
- ${WORKDIR}/chainport-host-invariants/chainport/${PKG_SUBDIR}.midipix.patch \
- ${WORKDIR}/chainport-host-invariants/chainport/${PKG_SUBDIR%-*}.midipix.patch \
- ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}/*.patch \
- ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}/*.patch \
- ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR%-*}/*.patch \
- ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch \
- ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}.local.patch \
- ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR%-*}.local.patch \
- ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local@${BUILD_HNAME}.patch \
- ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}.local@${BUILD_HNAME}.patch \
- ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR%-*}.local@${BUILD_HNAME}.patch; do
+ for _patch_fname in \
+ ${WORKDIR}/chainport-host-invariants/chainport/${PKG_NAME%_host}${PKG_VERSION:+-${PKG_VERSION}}.midipix.patch \
+ ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}/*.patch \
+ ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}.local.patch \
+ ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}.local@${BUILD_HNAME}.patch; do
if ! ex_lmatch "${_patches_done}" " " "${_patch_fname}"\
&& [ -r "${_patch_fname}" ]; then
patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}";
diff --git a/subr/pkg_configure_patch_pre.subr b/subr/pkg_configure_patch_pre.subr
index d228bd83..6843a784 100644
--- a/subr/pkg_configure_patch_pre.subr
+++ b/subr/pkg_configure_patch_pre.subr
@@ -4,11 +4,9 @@
pkg_configure_patch_pre() {
local _patch_path;
- for _patch_path in \
- ${MIDIPIX_BUILD_PWD}/../${PKG_SUBDIR}_pre.local.patch \
- ${MIDIPIX_BUILD_PWD}/../${PKG_SUBDIR}_pre.local@${BUILD_HNAME}.patch \
- ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}_pre.local.patch \
- ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}_pre.local@${BUILD_HNAME}.patch; do
+ for _patch_path in \
+ ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}_pre.local.patch \
+ ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}_pre.local@${BUILD_HNAME}.patch; do
if [ -r "${_patch_path}" ]; then
patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_path}";
fi;