tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: msgfmt wrapper bug when building gimp



On Mon, 05 Apr 2010 01:06:09 +0900, Alistair Crooks <agc%pkgsrc.org@localhost> 
wrote:

On Sun, Apr 04, 2010 at 04:28:17PM +0900, OBATA Akio wrote:
On Sat, 03 Apr 2010 12:11:40 +0900, OBATA Akio <obache%netbsd.org@localhost> 
wrote:

>Hi!
>
>On Sat, 03 Apr 2010 00:39:34 +0900, Thomas Klausner <wiz%netbsd.org@localhost> 
wrote:
>
>>Running msgfmt from tools produces no errors, but no output either:
>># /scratch/graphics/gimp/work/.tools/bin/msgfmt  pt.po
>># ls pt.*
>>pt.po
>>#
>>
>>The file is 370kB. Suggestions on how to track down the error?
>
>Its EOL style is CRLF.
>Maybe, msgfmt wrapper should convert EOL style before pass to awk, msgfmt.

awk should be able to filter '\r\n' sequences into '\n', though,
without requiring that tr be available, or the extra exec?

Take 2.

Index: mk/tools/msgfmt-msgctxt.awk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/msgfmt-msgctxt.awk,v
retrieving revision 1.1
diff -u -r1.1 msgfmt-msgctxt.awk
--- mk/tools/msgfmt-msgctxt.awk 20 Mar 2009 16:13:02 -0000      1.1
+++ mk/tools/msgfmt-msgctxt.awk 9 Apr 2010 08:46:48 -0000
@@ -3,6 +3,7 @@
 # Simple awk script to strip out .po entries with "msgctxt" or "#~|", so the
 # resultant file can be handled by the msgfmt 0.14.x.
 {
+sub(/\r$/, "")
 if (/^$/) { entry_end(); }
 else if ($1 == "msgctxt" || $2 == "msgctxt") { skip = 1; }
 else if ($1 == "#~|") { skip = 1; }

--
OBATA Akio / obache%NetBSD.org@localhost


Home | Main Index | Thread Index | Old Index