From nobody@FreeBSD.org  Sat Dec 31 14:14:50 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A9391106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 31 Dec 2011 14:14:50 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 79F6C8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 31 Dec 2011 14:14:50 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEEovE085593
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 31 Dec 2011 14:14:50 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id pBVEEouk085592;
	Sat, 31 Dec 2011 14:14:50 GMT
	(envelope-from nobody)
Message-Id: <201112311414.pBVEEouk085592@red.freebsd.org>
Date: Sat, 31 Dec 2011 14:14:50 GMT
From: Kuan-Chung Chiu <buganini@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] optional support for GTK3 in textproc/ibus
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: henry.hu.sh@gmail.com

>Number:         163737
>Category:       ports
>Synopsis:       [patch] optional support for GTK3 in textproc/ibus
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 31 14:20:11 UTC 2011
>Closed-Date:    Sat Jan 07 18:33:04 UTC 2012
>Last-Modified:  Sat Jan 07 18:33:04 UTC 2012
>Originator:     Kuan-Chung Chiu
>Release:        
>Organization:
N/A
>Environment:
>Description:
Add option to enable building gtk3 client in textproc/ibus
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN ibus.orig/Makefile ibus/Makefile
--- ibus.orig/Makefile	2011-12-31 20:06:27.000000000 +0800
+++ ibus/Makefile	2011-12-31 22:12:21.000000000 +0800
@@ -7,7 +7,7 @@
 
 PORTNAME=	ibus
 PORTVERSION=	1.3.9
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	textproc
 MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
 
@@ -32,6 +32,7 @@
 GCONF_SCHEMAS=	ibus.schemas
 
 OPTIONS=	ISOCODES "Use isocodecs" on \
+		GTK3 "Install GTK3 client" off \
 		VALA "Install vala binding" on \
 		GINTRO "Install GObject Introspection data" on
 
@@ -53,6 +54,14 @@
 PLIST_SUB+=	NLS="@comment "
 .endif
 
+.if defined(WITH_GTK3)
+USE_GNOME+=	gtk30
+CONFIGURE_ARGS+=	--enable-gtk3
+PLIST_SUB+=	GTK3=""
+.else
+PLIST_SUB+=	GTK3="@comment "
+.endif
+
 .if defined(WITH_VALA)
 CONFIGURE_ARGS+=	--enable-vala
 PLIST_SUB+=	VALA=""
@@ -80,11 +89,17 @@
 	@${REINPLACE_CMD} -e 's|setpgrp ()|setpgrp (0,0)|g' ${WRKSRC}/bus/main.c
 
 post-install:
+	@if [ -x gtk-query-immodules-3.0 ]; then \
+		gtk-query-immodules-3.0 --update-cache ; \
+	fi
 	@gtk-query-immodules-2.0 > ${LOCALBASE}/etc/gtk-2.0/gtk.immodules
 	@${CAT} ${PKGMESSAGE}
 	@${ECHO} To display this message again, type ${PKG_INFO} -D ${PKGNAME}
 
 post-deinstall:
+	@if [ -x gtk-query-immodules-3.0 ]; then \
+		gtk-query-immodules-3.0 --update-cache ; \
+	fi
 	@gtk-query-immodules-2.0 > ${LOCALBASE}/etc/gtk-2.0/gtk.immodules
 
 .include <bsd.port.post.mk>
diff -ruN ibus.orig/pkg-plist ibus/pkg-plist
--- ibus.orig/pkg-plist	2011-12-31 20:06:27.000000000 +0800
+++ ibus/pkg-plist	2011-12-31 21:52:18.000000000 +0800
@@ -235,6 +235,8 @@
 include/ibus-1.0/ibusxml.h
 lib/gtk-2.0/2.10.0/immodules/im-ibus.la
 lib/gtk-2.0/2.10.0/immodules/im-ibus.so
+%%GTK3%%lib/gtk-3.0/3.0.0/immodules/im-ibus.la
+%%GTK3%%lib/gtk-3.0/3.0.0/immodules/im-ibus.so
 lib/libibus.la
 lib/libibus.so
 lib/libibus.so.2


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sat Dec 31 14:20:21 UTC 2011 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163737 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: henry.hu.sh@gmail.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/163737: [patch] optional support for GTK3 in textproc/ibus
Date: Sat, 31 Dec 2011 14:20:20 UT

 Maintainer of textproc/ibus,
 
 Please note that PR ports/163737 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/163737
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
State-Changed-From-To: feedback->closed 
State-Changed-By: scheidell 
State-Changed-When: Sat Jan 7 18:32:02 UTC 2012 
State-Changed-Why:  
supercedes pr ports/163791 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163737 
>Unformatted:
