summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_configure_patch.subr
diff options
context:
space:
mode:
authorLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-02-17 19:29:28 +0100
committerLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-02-17 19:29:28 +0100
commite9fa0774ed2e7e030a68f5b0ae51fe6dd69fe492 (patch)
tree37e46c2578bd8f4f435073db01abc514976da8a8 /subr/pkg_configure_patch.subr
parent56495632fc8bf612766a9c431e37ff27a903e8c6 (diff)
downloadmidipix_build-e9fa0774ed2e7e030a68f5b0ae51fe6dd69fe492.tar.bz2
midipix_build-e9fa0774ed2e7e030a68f5b0ae51fe6dd69fe492.tar.xz
Make everything a bit faster.
0) Issues several prayers and sacrifices to Enki under threat of a terrible deluge sent down by Ellil 1) Convert fork-write/read exprs to be non-forking 2) Pass mostly everything by reference 3) Don't bother cleaning the variable namespace because Bourne shell is an abomination 4) Removes broken ./pkgtool.sh -s, --restart-at, --update-diff & ./build.sh --dump-{in,on-abort} 5) Cleanup
Diffstat (limited to 'subr/pkg_configure_patch.subr')
-rw-r--r--subr/pkg_configure_patch.subr33
1 files changed, 0 insertions, 33 deletions
diff --git a/subr/pkg_configure_patch.subr b/subr/pkg_configure_patch.subr
deleted file mode 100644
index d7c84011..00000000
--- a/subr/pkg_configure_patch.subr
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# set +o errexit -o noglob -o nounset is assumed.
-#
-
-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}}"\
- _strip_count=0;
-
- if [ -n "${PKG_FNAME:-}" ]\
- && [ -n "${PKG_URLS_GIT:-}" ]; then
- _patch_cwd="${PKG_BASE_DIR}"; _strip_count=0;
- else
- _patch_cwd="${PKG_BASE_DIR}/${PKG_SUBDIR}"; _strip_count=1;
- fi;
- set +o noglob;
- for _patch_fname in \
- "${_patch_dir}/${_pkg_name}/"*.patch \
- "${_patch_dir}/${_pkg_name_full}.local.patch" \
- "${_patch_dir}/${_pkg_name_full}.local@${BUILD_HNAME}.patch" \
- ${PKG_PATCHES_EXTRA:-}; do
- if [ -r "${_patch_fname}" ]\
- && ! rtl_lmatch "${_patches_done}" "${_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}")";
- fi;
- fi;
- done; set -o noglob;
-};
-
-# vim:filetype=sh