Subject: CVS commit: pkgsrc
To: None <pkgsrc-changes@NetBSD.org>
From: Johnny C. Lam <jlam@netbsd.org>
List: pkgsrc-changes
Date: 04/13/2006 16:35:59
Module Name:	pkgsrc
Committed By:	jlam
Date:		Thu Apr 13 16:35:59 UTC 2006

Modified Files:
	pkgsrc/devel/gettext-lib: builtin.mk
	pkgsrc/mk: bsd.pkg.use.mk
	pkgsrc/mk/tools: bsd.tools.mk replace.mk tools.Linux.mk tools.NetBSD.mk
Added Files:
	pkgsrc/mk/tools: msgfmt.mk msgfmt.sh
Removed Files:
	pkgsrc/devel/gettext/files: msgfmt.pl

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -r1.31 -r1.32 pkgsrc/devel/gettext-lib/builtin.mk
cvs rdiff -r1.3 -r0 pkgsrc/devel/gettext/files/msgfmt.pl
cvs rdiff -r1.30 -r1.31 pkgsrc/mk/bsd.pkg.use.mk
cvs rdiff -r1.32 -r1.33 pkgsrc/mk/tools/bsd.tools.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/tools/msgfmt.mk pkgsrc/mk/tools/msgfmt.sh
cvs rdiff -r1.164 -r1.165 pkgsrc/mk/tools/replace.mk
cvs rdiff -r1.30 -r1.31 pkgsrc/mk/tools/tools.Linux.mk
cvs rdiff -r1.26 -r1.27 pkgsrc/mk/tools/tools.NetBSD.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.