summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorjnemeth <jnemeth@pkgsrc.org>2008-10-24 23:45:34 +0000
committerjnemeth <jnemeth@pkgsrc.org>2008-10-24 23:45:34 +0000
commit8bb82e5192906971a76285ca3cf688bbb5e1f3e3 (patch)
treef2853ad2f0fe5ff4a82bbe8df02a589d2b40b88e /x11
parent7fa9e044fa430d90535a83336ce8edfa977eb15f (diff)
downloadpkgsrc-8bb82e5192906971a76285ca3cf688bbb5e1f3e3.tar.gz
give this the same msgfmt treatment as www/gtkhtml314
Diffstat (limited to 'x11')
-rw-r--r--x11/gnome-control-center/Makefile10
-rw-r--r--x11/gnome-control-center/files/msgfmtstrip18
2 files changed, 27 insertions, 1 deletions
diff --git a/x11/gnome-control-center/Makefile b/x11/gnome-control-center/Makefile
index 651488703ab..014a216a1e6 100644
--- a/x11/gnome-control-center/Makefile
+++ b/x11/gnome-control-center/Makefile
@@ -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 @@ PLIST.evolution= yes
_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 --git a/x11/gnome-control-center/files/msgfmtstrip b/x11/gnome-control-center/files/msgfmtstrip
new file mode 100644
index 00000000000..bf06cccf550
--- /dev/null
+++ b/x11/gnome-control-center/files/msgfmtstrip
@@ -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;
+}