Source: shadow
Source-Version: 1:4.5-1
Severity: wishlist
Tags: upstream patch
Control: block -1 by 881886
Control: block -1 by 881888
Hi!
I was looking into switching this package from gnome-doc-utils (which
was reported to me as being deprecated, and a blocker in the
rebootstrap effort) to a pure gettext solution.
Unfortunately upstream gettext XML support does not seem mature
enough, so this is currently not possible. :( I guess another option
might be to switch to use po4a, but I've taken already too much time
with this.
I'm attaching what I've got, which could be applied once the blocking
bugs have been fixed.
Thanks,
Guillem
From d4fb35319a421bfd802dcf8871d879e1356fd4d9 Mon Sep 17 00:00:00 2001
From: Guillem Jover
Date: Sat, 4 Nov 2017 02:56:56 +0100
Subject: [PATCH] build: Switch to gettext XML support
---
configure.ac | 10 +-
debian/control| 3 +-
debian/dependencies | 6 +-
man/.gitignore| 9 ++
man/Makefile.am | 2 +-
man/generate_mans.mak | 1 +
man/generate_translations.mak | 5 +-
man/po/LINGUAS| 16 +--
man/po/Makefile.in| 245 --
man/po/Makevars | 53 -
man/po/POTFILES.in| 41 +++
man/po/XMLFILES | 42
man/po/its/docbook.its| 215
man/po/its/docbook.loc| 6 ++
po/Makevars | 53 -
15 files changed, 398 insertions(+), 309 deletions(-)
delete mode 100644 man/po/Makefile.in
create mode 100644 man/po/POTFILES.in
delete mode 100644 man/po/XMLFILES
create mode 100644 man/po/its/docbook.its
create mode 100644 man/po/its/docbook.loc
diff --git a/configure.ac b/configure.ac
index 2dcf966..acededf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -622,7 +622,13 @@ fi
AC_DEFINE_UNQUOTED(SHELL, ["$SHELL"], [The default shell.])
-AM_GNU_GETTEXT_VERSION(0.16)
+# Require at least this gettext version, but will take any later version too.
+AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.7])
+# XXX: We cannot remove the following macro due to backwards compatibility
+# reasons. The above macro is set unconditionally to the minimal version
+# required, and the below is set to 0.19.6, the first version introducing
+# the AM_GNU_GETTEXT_REQUIRE_VERSION macro.
+AM_GNU_GETTEXT_VERSION([0.19.6])
AM_GNU_GETTEXT([external], [need-ngettext])
AM_CONDITIONAL(USE_NLS, test "x$USE_NLS" = "xyes")
@@ -632,7 +638,7 @@ AC_CONFIG_FILES([
doc/Makefile
man/Makefile
man/config.xml
- man/po/Makefile
+ man/po/Makefile.in
man/cs/Makefile
man/da/Makefile
man/de/Makefile
diff --git a/debian/control b/debian/control
index 58f8828..942aa24 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders: Christian Perrier ,
Section: admin
Priority: required
Build-Depends: dh-autoreconf,
- gettext,
+ gettext (>= 0.19.7),
libpam0g-dev,
debhelper (>= 10~),
quilt,
@@ -17,7 +17,6 @@ Build-Depends: dh-autoreconf,
cdbs,
libselinux1-dev [linux-any],
libsemanage1-dev [linux-any],
- gnome-doc-utils,
bison,
libaudit-dev [linux-any]
Standards-Version: 3.9.5
diff --git a/debian/dependencies b/debian/dependencies
index e8cc141..bcc9663 100644
--- a/debian/dependencies
+++ b/debian/dependencies
@@ -4,8 +4,8 @@ Build-Depends:
* automake1.9
works with 1.7 or 1.9 (at least)
* libtool
- * gettext
- POT, PO, GMO regenerated?
+ * gettext (>= 0.19.7)
+ POT, PO, GMO regenerated, 0.19.7 needed for XML support
* libpam0g-dev
OK
* debhelper (>= 4.1.16)
@@ -28,8 +28,6 @@ Build-Depends:
* cdbs
used in debian/rules
* libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
- * gnome-doc-utils (>= 0.4.3-1)
- xml2po, 0.4.3-1 needed for the -l switch.
passwd Depends:
===
diff --git a/man/.gitignore b/man/.gitignore
index a5a91a9..7a58a5a 100644
--- a/man/.gitignore
+++ b/man/.gitignore
@@ -4,5 +4,14 @@ generate_mans.deps
*.[0-9]
+/po/Makefile.in.in
+/po/Makevars.template
/po/POTFILES
+/po/Rules-quot
+/po/boldquot.sed
+/po/en@boldquot.header
+/po/en@quot.header
+/po/insert-header.sin
+/po/quot.sed
+/po/remove-potcdate.sin
/po/stamp-po
diff --git a/man/Makefile.am b/man/Makefile.am
index 4c34022..a9d0115 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -203,7 +203,7 @@ generate_mans.deps: *.xml
if ENABLE_REGENERATE_MAN
-@ENABLE_REGENERATE_MAN_TRUE@include generate_mans.deps
+@ENABLE_REGENERATE_MAN_TRUE@-include generate_mans.deps
include generate_mans.mak
diff --git a/man/generate_mans.mak b/man/generate_mans.mak
index a0721b8..83be60e 100644
--- a/man/generate_mans.mak
+++ b/man/generate_mans.mak
@@ -39,6 +39,7 @@ man1/% man3/% man5/% man8/%: