pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/tools strip \r in awk script, avoid to extra `tr' e...
details: https://anonhg.NetBSD.org/pkgsrc/rev/65977ad4a329
branches: trunk
changeset: 573984:65977ad4a329
user: obache <obache%pkgsrc.org@localhost>
date: Sat Apr 10 00:46:23 2010 +0000
description:
strip \r in awk script, avoid to extra `tr' exec.
diffstat:
mk/tools/gettext.mk | 5 ++---
mk/tools/msgfmt-msgctxt.awk | 3 ++-
mk/tools/msgfmt.sh | 4 +---
3 files changed, 5 insertions(+), 7 deletions(-)
diffs (60 lines):
diff -r f4f9585c5a5e -r 65977ad4a329 mk/tools/gettext.mk
--- a/mk/tools/gettext.mk Sat Apr 10 00:18:13 2010 +0000
+++ b/mk/tools/gettext.mk Sat Apr 10 00:46:23 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gettext.mk,v 1.13 2010/04/09 15:44:17 wiz Exp $
+# $NetBSD: gettext.mk,v 1.14 2010/04/10 00:46:23 obache Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -122,8 +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} \
+ MSGFMT=${TOOLS_PATH.msgfmt:Q} \
PKGSRCDIR=${PKGSRCDIR:Q} \
MSGFMT_STRIP_MSGID_PLURAL=${MSGFMT_STRIP_MSGID_PLURAL} \
MSGFMT_STRIP_MSGCTXT=${MSGFMT_STRIP_MSGCTXT} \
diff -r f4f9585c5a5e -r 65977ad4a329 mk/tools/msgfmt-msgctxt.awk
--- a/mk/tools/msgfmt-msgctxt.awk Sat Apr 10 00:18:13 2010 +0000
+++ b/mk/tools/msgfmt-msgctxt.awk Sat Apr 10 00:46:23 2010 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: msgfmt-msgctxt.awk,v 1.1 2009/03/20 16:13:02 joerg Exp $
+# $NetBSD: msgfmt-msgctxt.awk,v 1.2 2010/04/10 00:46:23 obache Exp $
#
# 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; }
diff -r f4f9585c5a5e -r 65977ad4a329 mk/tools/msgfmt.sh
--- a/mk/tools/msgfmt.sh Sat Apr 10 00:18:13 2010 +0000
+++ b/mk/tools/msgfmt.sh Sat Apr 10 00:46:23 2010 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: msgfmt.sh,v 1.33 2010/04/09 15:44:17 wiz Exp $
+# $NetBSD: msgfmt.sh,v 1.34 2010/04/10 00:46:23 obache Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -84,7 +84,6 @@
: ${CAT=cat}
: ${MSGFMT=/usr/bin/msgfmt}
: ${TEE=tee}
-: ${TR=tr}
case "${MSGFMT}" in
/*) ;;
@@ -163,7 +162,6 @@
fi
${CAT} $pofile | \
-${TR} -d '\015' | \
if test "${MSGFMT_STRIP_MSGCTXT}" = "yes"; then
${AWK} -f ${PKGSRCDIR}/mk/tools/msgfmt-msgctxt.awk
else
Home |
Main Index |
Thread Index |
Old Index