summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-04-06 12:47:45 +0100
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-04-06 12:47:45 +0100
commit30b734b4fc70876e2f5860119f684bd69c4f3779 (patch)
tree43bae9a3d7698385184dd96d6149ba6eaf2bc3e7 /subr
parentcb0ebbaacdd5dec2c137c13383779d23b9f967e9 (diff)
downloadmidipix_build-30b734b4fc70876e2f5860119f684bd69c4f3779.tar.bz2
midipix_build-30b734b4fc70876e2f5860119f684bd69c4f3779.tar.xz
subr/pkg_configure_patch.subr: infer -pnum from whether only one or both of ${PKG_{URL,URLS_GIT}} are present.
patches/python2_host-2.7.15.local.patch: updated. patches/python3_host-3.6.3.local.patch: updated.
Diffstat (limited to 'subr')
-rw-r--r--subr/pkg_configure_patch.subr9
1 files changed, 5 insertions, 4 deletions
diff --git a/subr/pkg_configure_patch.subr b/subr/pkg_configure_patch.subr
index 7569c6ac..d7c84011 100644
--- a/subr/pkg_configure_patch.subr
+++ b/subr/pkg_configure_patch.subr
@@ -4,13 +4,14 @@
pkg_configure_patch() {
local _patch_cwd="" _patch_dir="${MIDIPIX_BUILD_PWD}/patches" _patch_fname=""\
- _patches_done="" _pkg_name_full="${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}";
+ _patches_done="" _pkg_name_full="${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}"\
+ _strip_count=0;
if [ -n "${PKG_FNAME:-}" ]\
&& [ -n "${PKG_URLS_GIT:-}" ]; then
- _patch_cwd="${PKG_BASE_DIR}";
+ _patch_cwd="${PKG_BASE_DIR}"; _strip_count=0;
else
- _patch_cwd="${PKG_BASE_DIR}/${PKG_SUBDIR}";
+ _patch_cwd="${PKG_BASE_DIR}/${PKG_SUBDIR}"; _strip_count=1;
fi;
set +o noglob;
for _patch_fname in \
@@ -20,7 +21,7 @@ pkg_configure_patch() {
${PKG_PATCHES_EXTRA:-}; do
if [ -r "${_patch_fname}" ]\
&& ! rtl_lmatch "${_patches_done}" "${_patch_fname}"; then
- if ! patch -b -d "${_patch_cwd}" -p1 < "${_patch_fname}"; then
+ if ! patch -b -d "${_patch_cwd}" "-p${_strip_count}" < "${_patch_fname}"; then
set -o noglob; return 1;
else
_patches_done="$(rtl_lconcat "${_patches_done}" "${_patch_fname}")";