aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-06-22 07:40:27 +0800
committerjkim <jkim@FreeBSD.org>2013-06-22 07:40:27 +0800
commit109b8928eba31f7e804b6c1bcd601458712b046d (patch)
treea6add5a2d9c99371417c97359a8b2c7c1715766c
parenta2374735563ee773bfce159a574ddb982ebd4be0 (diff)
downloadfreebsd-ports-gnome-109b8928eba31f7e804b6c1bcd601458712b046d.tar.gz
freebsd-ports-gnome-109b8928eba31f7e804b6c1bcd601458712b046d.tar.zst
freebsd-ports-gnome-109b8928eba31f7e804b6c1bcd601458712b046d.zip
Add an option to build with GTK+ 3.0.
-rw-r--r--korean/imhangul/Makefile31
-rw-r--r--korean/imhangul/distinfo2
-rw-r--r--korean/imhangul/pkg-plist17
3 files changed, 37 insertions, 13 deletions
diff --git a/korean/imhangul/Makefile b/korean/imhangul/Makefile
index 4a68725477eb..68a0155b2953 100644
--- a/korean/imhangul/Makefile
+++ b/korean/imhangul/Makefile
@@ -2,32 +2,51 @@
# $FreeBSD$
PORTNAME= imhangul
-PORTVERSION= 2.1.1
+PORTVERSION= ${GTKVER}.1.1
CATEGORIES= korean
-MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
+MASTER_SITES= GOOGLE_CODE
MAINTAINER= jkim@FreeBSD.org
-COMMENT= GTK+-2.0 Hangul input module
+COMMENT= GTK+ Hangul input module
LICENSE= GPLv2
-LIB_DEPENDS= hangul.1:${PORTSDIR}/korean/libhangul
+LIB_DEPENDS= hangul:${PORTSDIR}/korean/libhangul
USE_AUTOTOOLS= libtool
USE_BZIP2= yes
USE_GMAKE= yes
-USE_GNOME= gtk20
GNU_CONFIGURE= yes
+USES= pkgconfig
+
+OPTIONS_DEFINE= GTK3 NLS
.include <bsd.port.options.mk>
+.if ${PORT_OPTIONS:MGTK3}
+USE_GNOME= gtk30
+GTKVER= 3
+PLIST_SUB= GTK2="@comment " GTK3=""
+.else
+USE_GNOME= gtk20
+GTKVER= 2
+PLIST_SUB= GTK2="" GTK3="@comment "
+.endif
+PLIST_SUB+= GTKVER="${GTKVER}.0"
+
.if ${PORT_OPTIONS:MNLS}
USES+= gettext
-LDFLAGS+= -L${LOCALBASE}/lib
CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
PLIST_SUB+= NLS=""
.else
PLIST_SUB+= NLS="@comment "
.endif
+.if ${PORT_OPTIONS:MGTK3}
+post-install:
+ @${LOCALBASE}/bin/gtk-query-immodules-3.0 > \
+ ${LOCALBASE}/lib/gtk-3.0/${GTK3_VERSION}/immodules.cache
+.endif
+
.include <bsd.port.mk>
diff --git a/korean/imhangul/distinfo b/korean/imhangul/distinfo
index c381cd7b09f4..1324b7a6c73e 100644
--- a/korean/imhangul/distinfo
+++ b/korean/imhangul/distinfo
@@ -1,2 +1,4 @@
SHA256 (imhangul-2.1.1.tar.bz2) = b4860b718b2775ce1e298e80004d5d7b5ac89faa75b30654e51d325643a02e19
SIZE (imhangul-2.1.1.tar.bz2) = 288452
+SHA256 (imhangul-3.1.1.tar.bz2) = 24f103e55c38f2cd4b708398106ac19760e2ef1834513f46f32b0baf439461e0
+SIZE (imhangul-3.1.1.tar.bz2) = 288236
diff --git a/korean/imhangul/pkg-plist b/korean/imhangul/pkg-plist
index 1f4d30049130..18524729aa1c 100644
--- a/korean/imhangul/pkg-plist
+++ b/korean/imhangul/pkg-plist
@@ -1,7 +1,10 @@
-lib/gtk-2.0/immodules/im-hangul.a
-lib/gtk-2.0/immodules/im-hangul.la
-lib/gtk-2.0/immodules/im-hangul.so
-%%NLS%%share/locale/ko/LC_MESSAGES/im-hangul.mo
-@exec %D/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
-@unexec %D/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
-@dirrmtry lib/gtk-2.0/immodules
+lib/gtk-%%GTKVER%%/immodules/im-hangul.a
+lib/gtk-%%GTKVER%%/immodules/im-hangul.la
+lib/gtk-%%GTKVER%%/immodules/im-hangul.so
+%%GTK2%%%%NLS%%share/locale/ko/LC_MESSAGES/im-hangul.mo
+%%GTK2%%@exec %D/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+%%GTK2%%@unexec %D/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+%%GTK3%%%%NLS%%share/locale/ko/LC_MESSAGES/im-hangul-3.0.mo
+%%GTK3%%@exec %D/bin/gtk-query-immodules-3.0 > %D/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache
+%%GTK3%%@unexec %D/bin/gtk-query-immodules-3.0 > %D/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache
+@dirrmtry lib/gtk-%%GTKVER%%/immodules