From 0a5028ffd4add60e2c2567706effa8ab85a23183 Mon Sep 17 00:00:00 2001 From: oliver Date: Tue, 19 Jul 2005 15:13:56 +0000 Subject: convert po files to UTF-8 if WITH_GKT2 is specified to solve problems with gtk20 and non utf8-clean message files Bump PORTREVISION PR: ports/83084 Requested by: Seva Gluschenko --- sysutils/xcdroast/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sysutils/xcdroast') diff --git a/sysutils/xcdroast/Makefile b/sysutils/xcdroast/Makefile index 7e9b59377f9e..7635da3f0236 100644 --- a/sysutils/xcdroast/Makefile +++ b/sysutils/xcdroast/Makefile @@ -7,7 +7,7 @@ PORTNAME= xcdroast PORTVERSION= 0.98.a.15 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ http://www.xcdroast.org/download/:src \ @@ -53,6 +53,7 @@ PLIST_SUB= NLS="" .if defined(WITH_GTK2) CONFIGURE_ARGS+=--enable-gtk2 USE_GNOME= gtk20 +PATCH_DEPENDS= iconv:${PORTSDIR}/converters/libiconv .else CONFIGURE_ARGS+=--disable-gtk2 USE_GNOME= gdkpixbuf @@ -84,5 +85,13 @@ pre-patch: post-patch: @${REINPLACE_CMD} -e 's|gint in, out|gsize in, out|g' \ ${WRKSRC}/src/xtools.c +.if defined(WITH_GTK2) + @cd ${WRKSRC}/po ; for FILE in *.po ; do \ + SOURCE=`${AWK} -F'[=\\\\\\\\]' '/charset=/ { print $$2 }' $$FILE` ; \ + ${LOCALBASE}/bin/iconv -f $$SOURCE -t UTF-8 $$FILE > $$FILE.bak ; \ + ${MV} $$FILE.bak $$FILE ; \ + ${REINPLACE_CMD} -e 's|charset='$$SOURCE'|charset=UTF-8|g' $$FILE ; \ + done +.endif .include -- cgit