summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2020-02-16 18:13:31 +0100
committerAxel Beckert <abe@deuxchevaux.org>2020-02-16 18:13:31 +0100
commit71ee4aef477ab25bac1f936dc30d5a4bf09a1824 (patch)
treef005feb59d0148fd70dfcc13d6295e628a370bc2 /debian/rules
parent1424bad894300680a6e180878ca4de2f6edfc946 (diff)
downloadzsh-71ee4aef477ab25bac1f936dc30d5a4bf09a1824.tar.gz
zsh-71ee4aef477ab25bac1f936dc30d5a4bf09a1824.zip
Fix FTBFS if libncurses-dev provided the libncursesw5-dev build-dependency
Thanks: Daniel Shahaf for helping to figure out how to solve this issue properly.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules6
1 files changed, 5 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index b7f817434..ae695607a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -46,7 +46,11 @@ CONFIGFLAGS += --enable-zsh-secure-free
CONFIGFLAGS += --enable-zsh-hash-debug
endif
-BUILT_USING=$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W libcap-dev libncursesw5-dev libpcre3-dev libc-dev-bin)
+# We first need to check if the package is installed, otherwise the
+# resulting syntax might be invalid. Needed for packages which are
+# also provided by other packages like libncurses-dev and
+# libncursesw5-dev which both fulfil the according build-dependency.
+BUILT_USING=$(shell for pkg in libcap-dev libncurses-dev libncursesw5-dev libpcre3-dev libc-dev-bin; do dpkg-query -f '$${status}' -W $$pkg 2>&1 | grep -Fq installed && dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W $$pkg; done)
%:
dh $@