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 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.

Index: tools/gettext.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/gettext.mk,v
retrieving revision 1.12
diff -u -r1.12 gettext.mk
--- tools/gettext.mk    22 Mar 2009 18:10:27 -0000      1.12
+++ tools/gettext.mk    4 Apr 2010 07:27:08 -0000
@@ -122,6 +122,7 @@
 .    if !empty(_TOOLS_USE_MSGFMT_SH:M[yY][eE][sS])
 USE_TOOLS+=            awk sh
 TOOLS_SCRIPT.msgfmt=   AWK=${TOOLS_AWK:Q} CAT=${TOOLS_CAT:Q}           \
+                       TR=${TOOLS_TR:Q}        \
                        MSGFMT=${TOOLS_PATH.msgfmt:Q}           \
                        PKGSRCDIR=${PKGSRCDIR:Q}                        \
                        MSGFMT_STRIP_MSGID_PLURAL=${MSGFMT_STRIP_MSGID_PLURAL} \
Index: tools/msgfmt.sh
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/msgfmt.sh,v
retrieving revision 1.32
diff -u -r1.32 msgfmt.sh
--- tools/msgfmt.sh     27 Mar 2009 14:44:36 -0000      1.32
+++ tools/msgfmt.sh     4 Apr 2010 07:27:08 -0000
@@ -84,6 +84,7 @@
 : ${CAT=cat}
 : ${MSGFMT=/usr/bin/msgfmt}
 : ${TEE=tee}
+: ${TR=tr}

 case "${MSGFMT}" in
 /*)    ;;
@@ -162,6 +163,7 @@
 fi

 ${CAT} $pofile | \
+${TR} -d '\015' | \
 if test "${MSGFMT_STRIP_MSGCTXT}" = "yes"; then
        ${AWK} -f ${PKGSRCDIR}/mk/tools/msgfmt-msgctxt.awk
 else



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


Home | Main Index | Thread Index | Old Index