This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=2b6a69f993e48e73b98c8bdd41fc92a90e23dd2b commit 2b6a69f993e48e73b98c8bdd41fc92a90e23dd2b (HEAD -> master) Author: Guillem Jover <[email protected]> AuthorDate: Sat May 16 22:44:34 2020 +0200 build: Handle po4a --porefs difference between 0.58 and earlier versions Before po4a 0.58 --porefs supported specifying a wrapping mode by appending «,wrap» or «,nowrap», with the default being “nowrap”. Starting with po4a 0.58 the default has changed to “wrap”, and these modifiers are not accepted anymore, which causes a problem with backwards compatibility as we cannot get consistent behavior across different versions. Detect this in configure and pass the «,wrap» modifier when needed and supported, which should make it possible to build the man pages again consistently in Debian buster and bullseye. --- README | 2 +- debian/changelog | 3 ++- m4/dpkg-progs.m4 | 14 ++++++++++++++ man/Makefile.am | 3 ++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README b/README index a08144823..55426b8cb 100644 --- a/README +++ b/README @@ -56,7 +56,7 @@ the source should be roughly equivalent to the distributed tar source. To enable translated documentation this software will be needed: - po4a >= 0.58 + po4a >= 0.43 (>= 0.58 for addenda inclusion) Building from tar source diff --git a/debian/changelog b/debian/changelog index 0b70045b1..5679ea0a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -67,7 +67,8 @@ dpkg (1.20.1) UNRELEASED; urgency=medium - Add debian/changelog as a Changes file to the CPAN distribution. - Set DPKG_SERIES to 1.20.x when running the functional test suite. - Change po4a --porefs argument from no longer supported “noline,wrap” - to “file”. + to “file,wrap” when the default contains «,nowrap» (po4a < 0.58), and + to “file” otherwise (po4a >= 0.58), to preserve backwards compatibility. - Switch to set the po4a addendum in the po4a_paths section instead of repeating it for each man page. * Packaging: diff --git a/m4/dpkg-progs.m4 b/m4/dpkg-progs.m4 index f952bd170..1374e8489 100644 --- a/m4/dpkg-progs.m4 +++ b/m4/dpkg-progs.m4 @@ -38,14 +38,28 @@ AC_DEFUN([DPKG_PROG_PERL], [ # -------------- AC_DEFUN([DPKG_PROG_PO4A], [ AC_REQUIRE([AM_NLS]) + AC_REQUIRE([DPKG_PROG_PERL]) AC_ARG_VAR([PO4A], [po4a program]) AC_CHECK_PROGS([PO4A], [po4a]) AS_IF([test "$USE_NLS" = "yes" && test -n "$PO4A"], [ USE_PO4A=yes + po4a_use_wrap=$($PERL -MLocale::Po4a::Po -e \ + 'my $porefs = Locale::Po4a::Po->new()->{options}{porefs}; + print "yes" if $porefs =~ /,nowrap$/') ], [ USE_PO4A=no ]) AC_SUBST([USE_PO4A]) + + # Starting with po4a 0.58 the --porefs option does not accept the wrap + # modifiers, but earlier versions defaulted to nowrap, so we have to handle + # the backward incompatible change to support older and newer versions. + AS_IF([test "x$po4a_use_wrap" = "xyes"], [ + PO4A_POREFS="file,wrap" + ], [ + PO4A_POREFS="file" + ]) + AC_SUBST([PO4A_POREFS]) ])# DPKG_PROG_PO4A # DPKG_PROG_POD2MAN diff --git a/man/Makefile.am b/man/Makefile.am index a34a59599..c0ec33384 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -147,8 +147,9 @@ PO4A_V = $(PO4A_V_@AM_V@) PO4A_V_ = $(PO4A_V_@AM_DEFAULT_V@) PO4A_V_0 = @echo " PO4A $@"; +PO4A_POREFS = @PO4A_POREFS@ PO4A_OPTS = --previous --srcdir $(srcdir) --destdir $(builddir) --no-backups \ - --porefs file --msgmerge-opt=--add-location=file \ + --porefs $(PO4A_POREFS) --msgmerge-opt=--add-location=file \ --package-name dpkg-man --package-version $(PACKAGE_VERSION) \ --copyright-holder "$(PACKAGE_COPYRIGHT_HOLDER)" \ --msgid-bugs-address $(PACKAGE_BUGREPORT) -- Dpkg.Org's dpkg

