diff -Nru zsh-5.9/debian/changelog zsh-5.9/debian/changelog --- zsh-5.9/debian/changelog 2023-09-06 23:17:01.000000000 +0000 +++ zsh-5.9/debian/changelog 2023-09-22 04:49:44.000000000 +0000 @@ -1,3 +1,9 @@ +zsh (5.9-5ubuntu1) mantic; urgency=medium + + * Don't build zsh-static on Ubuntu/i386. + + -- Steve Langasek Thu, 21 Sep 2023 21:49:44 -0700 + zsh (5.9-5) unstable; urgency=medium * [138340f9,dc77864f] Cherry pick multiple (partial) upstream commits to diff -Nru zsh-5.9/debian/control zsh-5.9/debian/control --- zsh-5.9/debian/control 2023-07-05 00:28:08.000000000 +0000 +++ zsh-5.9/debian/control 2023-09-22 04:49:44.000000000 +0000 @@ -19,7 +19,8 @@ texlive-latex-base, texlive-latex-recommended, yodl (>= 3.08.01) | yodl (<< 3.08.00) -Maintainer: Debian Zsh Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Zsh Maintainers Uploaders: Michael Prokop , Axel Beckert , Frank Terbeck , diff -Nru zsh-5.9/debian/rules zsh-5.9/debian/rules --- zsh-5.9/debian/rules 2023-07-05 01:24:39.000000000 +0000 +++ zsh-5.9/debian/rules 2023-09-22 04:49:44.000000000 +0000 @@ -48,6 +48,10 @@ CONFIGFLAGS += --enable-zsh-hash-debug endif +ifeq ($(DEB_HOST_ARCH):$(VENDOR),i386:ubuntu) + PKGS=-Nzsh-static +endif + # 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 @@ -55,13 +59,16 @@ BUILT_USING=$(shell for pkg in libcap-dev libncurses-dev libpcre2-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 $@ + dh $@ $(PKGS) override_dh_auto_build-arch: build-dynamic build-static build-dynamic: dh_auto_build -B obj build-static: +ifneq (,$(filter zsh-static, $(shell dh_listpackages))) dh_auto_build -B obj-static +endif + : override_dh_auto_build-indep: dh_auto_build -B obj -- pdf @@ -71,7 +78,9 @@ if dpkg-architecture -qDEB_BUILD_ARCH_OS | grep -qv hurd; then \ HOME="$(CURDIR)/obj/testhome" ZTST_verbose=1 dh_auto_test -B obj; \ fi +ifneq (,$(filter zsh-static, $(shell dh_listpackages))) HOME="$(CURDIR)/obj-static/testhome" ZTST_verbose=1 dh_auto_test -B obj-static || true +endif override_dh_auto_test-indep: @@ -79,16 +88,24 @@ chmod 755 configure mkdir -p obj/testhome obj-static/testhome dh_auto_configure -B obj -- $(CONFIGFLAGS) +ifneq (,$(filter zsh-static, $(shell dh_listpackages))) dh_auto_configure -B obj-static -- $(CONFIGFLAGS) $(STATICFLAGS) +endif sed -e 's/#define VENDOR "pc"/#define VENDOR "$(VENDOR)"/' \ - -i obj/config.h obj-static/config.h + -i obj/config.h +ifneq (,$(filter zsh-static, $(shell dh_listpackages))) + sed -e 's/#define VENDOR "pc"/#define VENDOR "$(VENDOR)"/' \ + -i obj-static/config.h sed -e 's/files.mdd link=no/files.mdd link=static/;s/stat.mdd link=no/stat.mdd link=static/' \ -i obj-static/config.modules +endif override_dh_auto_clean: dh_auto_clean -B obj +ifneq (,$(filter zsh-static, $(shell dh_listpackages))) dh_auto_clean -B obj-static +endif override_dh_installdocs-indep: dh_installdocs -pzsh-doc --link-doc=zsh-common --doc-main-package=zsh-common @@ -148,12 +165,16 @@ -dRecommends debian/zsh/usr/lib/*/zsh/*/zsh/*.so execute_after_dh_installdocs-arch: +ifneq (,$(filter zsh-static, $(shell dh_listpackages))) awk 'BEGIN { print "The following modules are statically-compiled into the static zsh binary:\n"; } /link=static/ { printf "%s (%s %s)\n", substr($$1,6), $$4, $$5; }' obj-static/config.modules >debian/zsh-static/usr/share/doc/zsh-static/README.Debian +endif execute_after_dh_install-arch: +ifneq (,$(filter zsh-static, $(shell dh_listpackages))) mv debian/zsh-static/bin/zsh debian/zsh-static/bin/zsh-static mv debian/zsh-static/bin/zsh5 debian/zsh-static/bin/zsh5-static sed -e 's:#!/bin/zsh:#!/bin/zsh-static:' -i debian/zsh-static/bin/zsh5-static +endif find debian/zsh-dev/usr/include/zsh -name '*.h' -o -name '*.mdh' | \ xargs sed -e 's@\.\./config\.h@config.h@;s@#\(\s*\)include "\([^"]\+\)"@#\1include @' -i