diff options
author | jlam <jlam@pkgsrc.org> | 2006-04-13 16:35:57 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-04-13 16:35:57 +0000 |
commit | 3774e03c3c6a58f0b6b728d30ecd7425cb17f24d (patch) | |
tree | 05edb3a0d35814dcd46fc6d587c479a7a041b561 /mk/tools/tools.Linux.mk | |
parent | ccdc7ec748eeff4f966deacbd93f4f4cae4b2ac1 (diff) | |
download | pkgsrc-3774e03c3c6a58f0b6b728d30ecd7425cb17f24d.tar.gz |
Overhaul the way packages can ask for "msgfmt". If a package needs
msgfmt, then it should set the following in the package Makefile:
USE_TOOLS+= msgfmt
To deal with message files that use the "msgid_plural" statement,
which isn't supported in NetBSD<=3.x and also in gettext<=0.10.35, we
determine if the built-in "msgfmt" is sufficiently new enough to
understand "msgid_plural". If it isn't, then we use the msgfmt.sh
script to transform the msgid_plural statements to an equivalent
construct that's understood by older msgfmt tools.
The msgfmt.sh script is a straightforward translation of the original
perl script msgfmt.pl script by Julio M. Merino Vidal into shell and
awk, which are more lightweight dependencies than perl.
We remove the USE_MSGFMT_PLURALS bits in gettext-lib/builtin.mk as they
are made obsolete by the new code in mk/tools/msgfmt.mk.
BUILD_USE_MSGFMT is still supported but will be removed in a separate
commit.
Diffstat (limited to 'mk/tools/tools.Linux.mk')
-rw-r--r-- | mk/tools/tools.Linux.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mk/tools/tools.Linux.mk b/mk/tools/tools.Linux.mk index cc1c8ce8d9c..791c336fa96 100644 --- a/mk/tools/tools.Linux.mk +++ b/mk/tools/tools.Linux.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.Linux.mk,v 1.30 2006/03/06 05:25:45 jlam Exp $ +# $NetBSD: tools.Linux.mk,v 1.31 2006/04/13 16:35:59 jlam Exp $ # # System-supplied tools for the Linux operating system. @@ -123,6 +123,9 @@ TOOLS_PLATFORM.mkdir?= /bin/mkdir -p .if exists(/usr/bin/mktemp) TOOLS_PLATFORM.mktemp?= /usr/bin/mktemp .endif +.if exists(/usr/bin/msgfmt) +TOOLS_PLATFORM.msgfmt?= /usr/bin/msgfmt +.endif TOOLS_PLATFORM.mv?= /bin/mv .if exists(/bin/nice) TOOLS_PLATFORM.nice?= /bin/nice |