summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.use.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/bsd.pkg.use.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/bsd.pkg.use.mk')
-rw-r--r--mk/bsd.pkg.use.mk7
1 files changed, 3 insertions, 4 deletions
diff --git a/mk/bsd.pkg.use.mk b/mk/bsd.pkg.use.mk
index 3dcc7d234ee..e7d531eec40 100644
--- a/mk/bsd.pkg.use.mk
+++ b/mk/bsd.pkg.use.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.use.mk,v 1.30 2006/03/11 04:01:27 reed Exp $
+# $NetBSD: bsd.pkg.use.mk,v 1.31 2006/04/13 16:35:58 jlam Exp $
#
# Turn USE_* macros into proper depedency logic. Included near the top of
# bsd.pkg.mk, after bsd.prefs.mk.
@@ -61,9 +61,8 @@ PKG_SKIP_REASON= "INSTALLATION_PREFIX can't be used in a pkgviews package"
### BUILD_USES_MSGFMT
-.if defined(BUILD_USES_MSGFMT) && \
- (!exists(/usr/bin/msgfmt) || ${_USE_GNU_GETTEXT} == "yes")
-BUILD_DEPENDS+= gettext-tools>=0.14.5:../../devel/gettext-tools
+.if defined(BUILD_USES_MSGFMT)
+USE_TOOLS+= msgfmt
.endif
### PKG_USE_KERBEROS