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=a74a91310260efe55cc986506fe208ae2776a45a commit a74a91310260efe55cc986506fe208ae2776a45a Author: Guillem Jover <[email protected]> AuthorDate: Thu May 21 04:47:28 2020 +0200 build: Require po4a >= 0.59 Supporting older versions resulted impractical, as we could not use the refactored addenda specification anyway. Also 0.58 had broken --srcdir support, and the new 0.59 has a nice addenda mode=eof which will simplify the switch to POD. So let's just require the newer version so that we can make use of the new features. --- README | 2 +- debian/changelog | 7 ++++--- debian/control | 2 +- m4/dpkg-progs.m4 | 29 ++++++++++++++++------------- man/Makefile.am | 3 +-- 5 files changed, 23 insertions(+), 20 deletions(-) diff --git a/README b/README index 55426b8cb..dd5a70fac 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.43 (>= 0.58 for addenda inclusion) + po4a >= 0.59 Building from tar source diff --git a/debian/changelog b/debian/changelog index 5679ea0a5..389f3c845 100644 --- a/debian/changelog +++ b/debian/changelog @@ -66,9 +66,10 @@ dpkg (1.20.1) UNRELEASED; urgency=medium - Handle .git being a plain file when getting the dpkg tree version. - 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,wrap” when the default contains «,nowrap» (po4a < 0.58), and - to “file” otherwise (po4a >= 0.58), to preserve backwards compatibility. + - When using po4a require at least po4a 0.59. Change the po4a --porefs + argument from no longer supported “noline,wrap” to “file”, as wrapping + is the default since po4a 0.58. We require po4a 0.59 as 0.58 had a + regression in its --srcdir support. - Switch to set the po4a addendum in the po4a_paths section instead of repeating it for each man page. * Packaging: diff --git a/debian/control b/debian/control index 6f2aa5f35..0d2bb3604 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,7 @@ Build-Depends: # Needed for ITS support. gettext (>= 0.19.7), # Needed for --porefs defaults. - po4a (>= 0.58), + po4a (>= 0.59), zlib1g-dev, libbz2-dev, liblzma-dev, diff --git a/m4/dpkg-progs.m4 b/m4/dpkg-progs.m4 index 1374e8489..52f680d85 100644 --- a/m4/dpkg-progs.m4 +++ b/m4/dpkg-progs.m4 @@ -40,26 +40,29 @@ AC_DEFUN([DPKG_PROG_PO4A], [ AC_REQUIRE([AM_NLS]) AC_REQUIRE([DPKG_PROG_PERL]) AC_ARG_VAR([PO4A], [po4a program]) + m4_define([_PO4A_MIN_VERSION], [0.59]) + AC_CACHE_CHECK([for po4a >= _PO4A_MIN_VERSION], [ac_cv_path_PO4A], [ + AC_PATH_PROGS_FEATURE_CHECK([PO4A], [po4a], [ + po4aversion=$(LC_ALL=C $ac_path_PO4A --version \ + | sed -ne 's/^po4a version \(.*\)\.$/\1/p') + AS_VERSION_COMPARE([$po4aversion], [_PO4A_MIN_VERSION], + [po4acheck=no], [po4acheck=yes], [po4acheck=yes]) + AS_IF([test "x$po4acheck" = "xyes"], [ + ac_cv_path_PO4A=$ac_path_PO4A ac_path_PO4A_found=: + ]) + ], [ + AC_MSG_ERROR([cannot find po4a >= _PO4A_MIN_VERSION]) + ]) + ]) + AC_SUBST([PO4A], [$ac_cv_path_PO4A]) + 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 c0ec33384..a34a59599 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -147,9 +147,8 @@ 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 $(PO4A_POREFS) --msgmerge-opt=--add-location=file \ + --porefs file --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

