pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/gnome-control-center give this the same msgfmt tre...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/18b9aafd9565
branches:  trunk
changeset: 548897:18b9aafd9565
user:      jnemeth <jnemeth%pkgsrc.org@localhost>
date:      Fri Oct 24 23:45:34 2008 +0000

description:
give this the same msgfmt treatment as www/gtkhtml314

diffstat:

 x11/gnome-control-center/Makefile          |  10 +++++++++-
 x11/gnome-control-center/files/msgfmtstrip |  18 ++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletions(-)

diffs (46 lines):

diff -r 71ec88e67257 -r 18b9aafd9565 x11/gnome-control-center/Makefile
--- a/x11/gnome-control-center/Makefile Fri Oct 24 23:35:36 2008 +0000
+++ b/x11/gnome-control-center/Makefile Fri Oct 24 23:45:34 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2008/10/24 23:26:25 jnemeth Exp $
+# $NetBSD: Makefile,v 1.17 2008/10/24 23:45:34 jnemeth Exp $
 #
 
 DISTNAME=      gnome-control-center-2.24.0.1
@@ -60,6 +60,14 @@
 
 _TOOLS_USE_MSGFMT_SH=  yes
 
+# The gettext version in pkgsrc cannot handle the .po files, so
+# we strip out usage of the newer features (context and fuzzy matches)
+post-patch:
+       for f in ${WRKSRC}/po/*.po ; do \
+           mv $$f $$f.original ; \
+           ${AWK} -f ${FILESDIR}/msgfmtstrip $$f.original > $$f ; \
+       done
+
 .include "../../audio/esound/buildlink3.mk"
 .include "../../audio/libcanberra/buildlink3.mk"
 .include "../../devel/gettext-lib/buildlink3.mk"
diff -r 71ec88e67257 -r 18b9aafd9565 x11/gnome-control-center/files/msgfmtstrip
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gnome-control-center/files/msgfmtstrip        Fri Oct 24 23:45:34 2008 +0000
@@ -0,0 +1,18 @@
+# $Id: msgfmtstrip,v 1.1 2008/10/24 23:45:34 jnemeth Exp $
+# Simple awk script to strip out .po entries with "msgctxt" or "#~|", so the
+# resultant file can be handled by the msgfmt 0.14.4 in NetBSD 4.0
+{
+if (/^$/) { entry_end(); }
+else if ($1 == "msgctxt" || $2 == "msgctxt") { skip = 1; }
+else if ($1 == "#~|") { skip = 1; }
+else { entry = entry $0 "\n" }
+}
+
+END { entry_end(); }
+
+function entry_end() {
+    if (!skip)
+       print entry;
+    entry = "";
+    skip = 0;
+}



Home | Main Index | Thread Index | Old Index