summaryrefslogtreecommitdiff
path: root/mk/tools/tools.NetBSD.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-04-13 16:35:57 +0000
committerjlam <jlam@pkgsrc.org>2006-04-13 16:35:57 +0000
commit0f4967eb59854511c3cbd3d80e3a886dd7fb7fc7 (patch)
tree05edb3a0d35814dcd46fc6d587c479a7a041b561 /mk/tools/tools.NetBSD.mk
parent56e51ad6bcbe62feec59ad6d8300df92c2e40784 (diff)
downloadpkgsrc-0f4967eb59854511c3cbd3d80e3a886dd7fb7fc7.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.NetBSD.mk')
-rw-r--r--mk/tools/tools.NetBSD.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/mk/tools/tools.NetBSD.mk b/mk/tools/tools.NetBSD.mk
index aab10c426af..ecfaf01d89e 100644
--- a/mk/tools/tools.NetBSD.mk
+++ b/mk/tools/tools.NetBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: tools.NetBSD.mk,v 1.26 2006/03/06 05:25:45 jlam Exp $
+# $NetBSD: tools.NetBSD.mk,v 1.27 2006/04/13 16:35:59 jlam Exp $
#
# System-supplied tools for the NetBSD operating system.
@@ -59,6 +59,9 @@ TOOLS_PLATFORM.makeinfo?= /usr/bin/makeinfo
.endif
TOOLS_PLATFORM.mkdir?= /bin/mkdir -p
TOOLS_PLATFORM.mktemp?= /usr/bin/mktemp
+.if exists(/usr/bin/msgfmt)
+TOOLS_PLATFORM.msgfmt?= /usr/bin/msgfmt
+.endif
TOOLS_PLATFORM.mtree?= /usr/sbin/mtree
TOOLS_PLATFORM.mv?= /bin/mv
TOOLS_PLATFORM.nice?= /usr/bin/nice