Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2015-10-19 03:33:24 +0200
committerAllan McRae <allan@archlinux.org>2015-10-19 14:32:59 +1000
commit70e6875ad9afd6ee0e26c7fbe283466f7a6767e5 (patch)
treec0cef561b234b5bf14e622c9a5279ecf0b6cdd19 /scripts/makepkg.sh.in
parent5d4a3f101ca15bb1ae7944ec305c7f10c9f504d0 (diff)
libmakepkg: Add check_buildoption for distcc and ccache
makepkg used to check OPTIONS too, which could override BUILDENV. Implement a new function that handles these options more like OPTIONS. This also reduces code duplication a bit. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 87576987..7d8669b7 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -852,13 +852,13 @@ run_prepare() {
run_build() {
# use distcc if it is requested (check buildenv and PKGBUILD opts)
- if check_buildenv "distcc" "y" && ! check_option "distcc" "n"; then
+ if check_buildoption "distcc" "y"; then
[[ -d /usr/lib/distcc/bin ]] && export PATH="/usr/lib/distcc/bin:$PATH"
export DISTCC_HOSTS
fi
# use ccache if it is requested (check buildenv and PKGBUILD opts)
- if check_buildenv "ccache" "y" && ! check_option "ccache" "n"; then
+ if check_buildoption "ccache" "y"; then
[[ -d /usr/lib/ccache/bin ]] && export PATH="/usr/lib/ccache/bin:$PATH"
fi
@@ -1557,7 +1557,7 @@ check_software() {
fi
# distcc - compilation with distcc
- if check_buildenv "distcc" "y" && ! check_option "distcc" "n"; then
+ if check_buildoption "distcc" "y"; then
if ! type -p distcc >/dev/null; then
error "$(gettext "Cannot find the %s binary required for distributed compilation.")" "distcc"
ret=1
@@ -1565,7 +1565,7 @@ check_software() {
fi
# ccache - compilation with ccache
- if check_buildenv "ccache" "y" && ! check_option "ccache" "n"; then
+ if check_buildoption "ccache" "y"; then
if ! type -p ccache >/dev/null; then
error "$(gettext "Cannot find the %s binary required for compiler cache usage.")" "ccache"
ret=1