[pacman-dev] [PATCH] libmakepkg: allow correctly sourcing when $LIBRARY is not set
Eli Schwartz
eschwartz at archlinux.org
Sun Jul 4 16:56:07 UTC 2021
We usually set this up to default to the build time configured install
location, but a couple of files crept in without this.
Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
scripts/libmakepkg/buildenv.sh.in | 2 ++
scripts/libmakepkg/executable.sh.in | 2 ++
scripts/libmakepkg/util/pkgbuild.sh.in | 2 ++
3 files changed, 6 insertions(+)
diff --git a/scripts/libmakepkg/buildenv.sh.in b/scripts/libmakepkg/buildenv.sh.in
index 0f4178a90..07b32ce93 100644
--- a/scripts/libmakepkg/buildenv.sh.in
+++ b/scripts/libmakepkg/buildenv.sh.in
@@ -22,6 +22,8 @@
[[ -n "$LIBMAKEPKG_BUILDENV_SH" ]] && return
LIBMAKEPKG_BUILDENV_SH=1
+LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
+
declare -a buildenv_functions build_options
for lib in "$LIBRARY/buildenv/"*.sh; do
diff --git a/scripts/libmakepkg/executable.sh.in b/scripts/libmakepkg/executable.sh.in
index ea40289ba..dfa8a0bdf 100644
--- a/scripts/libmakepkg/executable.sh.in
+++ b/scripts/libmakepkg/executable.sh.in
@@ -21,6 +21,8 @@
[[ -n "$LIBMAKEPKG_EXECUTABLE_SH" ]] && return
LIBMAKEPKG_EXECUTABLE_SH=1
+LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
+
declare -a executable_functions
for lib in "$LIBRARY/executable/"*.sh; do
diff --git a/scripts/libmakepkg/util/pkgbuild.sh.in b/scripts/libmakepkg/util/pkgbuild.sh.in
index ceda7824f..e3c5b5902 100644
--- a/scripts/libmakepkg/util/pkgbuild.sh.in
+++ b/scripts/libmakepkg/util/pkgbuild.sh.in
@@ -21,6 +21,8 @@
[[ -n "$LIBMAKEPKG_UTIL_PKGBUILD_SH" ]] && return
LIBMAKEPKG_UTIL_PKGBUILD_SH=1
+LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
+
source "$LIBRARY/util/schema.sh"
--
2.32.0
More information about the pacman-dev
mailing list