aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/xcdroast
diff options
context:
space:
mode:
authoroliver <oliver@FreeBSD.org>2005-07-19 23:13:56 +0800
committeroliver <oliver@FreeBSD.org>2005-07-19 23:13:56 +0800
commit0a5028ffd4add60e2c2567706effa8ab85a23183 (patch)
tree2b29658e65b1b23365bb970827f1cabf4a8bfb6d /sysutils/xcdroast
parentb830cbcf6c12cb0fc42bdea3508f424b5910a8ea (diff)
downloadfreebsd-ports-gnome-0a5028ffd4add60e2c2567706effa8ab85a23183.tar.gz
freebsd-ports-gnome-0a5028ffd4add60e2c2567706effa8ab85a23183.tar.zst
freebsd-ports-gnome-0a5028ffd4add60e2c2567706effa8ab85a23183.zip
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 <gvs@rinet.ru>
Diffstat (limited to 'sysutils/xcdroast')
-rw-r--r--sysutils/xcdroast/Makefile11
1 files changed, 10 insertions, 1 deletions
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 <bsd.port.post.mk>