Make atk-bridge support optional in x11/gtk3. Index: x11/gtk3/buildlink3.mk =================================================================== RCS file: /cvsroot/pkgsrc/x11/gtk3/buildlink3.mk,v retrieving revision 1.14 diff -p -u -r1.14 buildlink3.mk --- x11/gtk3/buildlink3.mk 16 Feb 2013 11:18:17 -0000 1.14 +++ x11/gtk3/buildlink3.mk 23 Apr 2013 13:29:24 -0000 @@ -14,7 +14,9 @@ BUILDLINK_PKGSRCDIR.gtk3?= ../../x11/gtk pkgbase := gtk3 .include "../../mk/pkg-build-options.mk" +.if !empty(PKG_BUILD_OPTIONS.gtk3:Mgtk3-atk-bridge) .include "../../devel/at-spi2-atk/buildlink3.mk" +.endif .include "../../devel/atk/buildlink3.mk" .include "../../devel/gettext-lib/buildlink3.mk" .include "../../devel/glib2/buildlink3.mk" Index: x11/gtk3/distinfo =================================================================== RCS file: /cvsroot/pkgsrc/x11/gtk3/distinfo,v retrieving revision 1.16 diff -p -u -r1.16 distinfo --- x11/gtk3/distinfo 12 Mar 2013 11:40:25 -0000 1.16 +++ x11/gtk3/distinfo 23 Apr 2013 13:29:24 -0000 @@ -4,4 +4,8 @@ SHA1 (gtk+-3.6.4.tar.xz) = 2f592b78c32c2 RMD160 (gtk+-3.6.4.tar.xz) = 8dd671f443b3956e6b0a215dde94d5f481ac538a Size (gtk+-3.6.4.tar.xz) = 13275488 bytes SHA1 (patch-aj) = 88d5a5c25bcc005bce8597d1262e68a9e67b5f93 +SHA1 (patch-config.h.in) = 479ebf5a5cf5ca6855fcda94063638a919bbf548 +SHA1 (patch-configure) = 0bf253073a8799082f83fbd37b5424e9adf9b9d3 +SHA1 (patch-configure.ac) = 4a2144abddc3468500515511cd934fd35f573952 SHA1 (patch-gdk_x11_gdkwindow-x11.h) = c80f7c9d5a570817e54fd74fa903a53400dc6f64 +SHA1 (patch-gtk_a11y_gail.c) = a7545222e55f1b38ddbcfb094609cc232df071f1 Index: x11/gtk3/options.mk =================================================================== RCS file: /cvsroot/pkgsrc/x11/gtk3/options.mk,v retrieving revision 1.4 diff -p -u -r1.4 options.mk --- x11/gtk3/options.mk 13 Nov 2012 21:55:27 -0000 1.4 +++ x11/gtk3/options.mk 23 Apr 2013 13:29:24 -0000 @@ -1,13 +1,13 @@ # $NetBSD: options.mk,v 1.4 2012/11/13 21:55:27 adam Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.gtk3 -PKG_SUPPORTED_OPTIONS= cups debug +PKG_SUPPORTED_OPTIONS= gtk3-atk-bridge cups debug PKG_OPTIONS_REQUIRED_GROUPS= gdk-target PKG_OPTIONS_GROUP.gdk-target= x11 .if exists(/System/Library/Frameworks/Quartz.framework) PKG_OPTIONS_GROUP.gdk-target+= quartz .endif -PKG_SUGGESTED_OPTIONS= x11 +PKG_SUGGESTED_OPTIONS= gtk3-atk-bridge x11 .include "../../mk/bsd.options.mk" @@ -37,10 +37,15 @@ CONFIGURE_ENV+= ac_cv_header_X11_extens CONFIGURE_ENV+= ac_cv_lib_Xinerama_XineramaQueryExtension=no PLIST.x11= yes +. if !empty(PKG_OPTIONS:Mgtk3-atk-bridge) BUILDLINK_API_DEPENDS.at-spi2-atk+= at-spi2-atk>=2.6.1 +. include "../../devel/at-spi2-atk/buildlink3.mk" +. else +CONFIGURE_ARGS+= --without-atk-bridge +. endif + BUILDLINK_API_DEPENDS.Xft2+= Xft2>=2.1.2nb2 -.include "../../devel/at-spi2-atk/buildlink3.mk" .include "../../x11/libX11/buildlink3.mk" .include "../../x11/libXcursor/buildlink3.mk" .include "../../x11/libXft/buildlink3.mk" Index: x11/gtk3/patches/patch-config.h.in =================================================================== RCS file: x11/gtk3/patches/patch-config.h.in diff -N x11/gtk3/patches/patch-config.h.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ x11/gtk3/patches/patch-config.h.in 23 Apr 2013 13:29:24 -0000 @@ -0,0 +1,14 @@ +$NetBSD$ + +--- config.h.in.orig 2013-01-07 10:56:29.000000000 +0000 ++++ config.h.in +@@ -21,6 +21,9 @@ + /* Define the location where the catalogs will be installed */ + #undef GTK_LOCALEDIR + ++/* Define if we're using atk-bridge-2.0 */ ++#undef HAVE_ATK_BRIDGE ++ + /* Define to 1 if you have the `bind_textdomain_codeset' function. */ + #undef HAVE_BIND_TEXTDOMAIN_CODESET + Index: x11/gtk3/patches/patch-configure =================================================================== RCS file: x11/gtk3/patches/patch-configure diff -N x11/gtk3/patches/patch-configure --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ x11/gtk3/patches/patch-configure 23 Apr 2013 13:29:24 -0000 @@ -0,0 +1,42 @@ +$NetBSD$ + +--- configure.orig 2013-01-20 03:10:46.000000000 +0000 ++++ configure +@@ -1010,6 +1010,7 @@ enable_glibtest + enable_modules + with_included_immodules + with_x ++with_atk_bridge + enable_cups + enable_papi + enable_test_print_backend +@@ -1754,6 +1755,7 @@ Optional Packages: + --with-included-immodules=MODULE1,MODULE2,... + build the specified input methods into gtk + --with-x use the X Window System ++ --without-atk-bridge Do not use atk-bridge-2.0 + --with-html-dir=PATH path to installed docs + --with-xml-catalog=CATALOG + path to xml catalog to use +@@ -23450,8 +23452,20 @@ fi + # Check for Accessibility Toolkit flags + ######################################## + +-if test x$enable_x11_backend = xyes; then ++ ++# Check whether --with-atk-bridge was given. ++if test "${with_atk_bridge+set}" = set; then : ++ withval=$with_atk_bridge; : ++else ++ with_atk_bridge=yes ++fi ++ ++ ++if test x$enable_x11_backend = xyes -a x$with_atk_bridge = xyes; then + ATK_PACKAGES="atk atk-bridge-2.0" ++ ++$as_echo "#define HAVE_ATK_BRIDGE 1" >>confdefs.h ++ + else + ATK_PACKAGES="atk" + fi Index: x11/gtk3/patches/patch-configure.ac =================================================================== RCS file: x11/gtk3/patches/patch-configure.ac diff -N x11/gtk3/patches/patch-configure.ac --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ x11/gtk3/patches/patch-configure.ac 23 Apr 2013 13:29:24 -0000 @@ -0,0 +1,19 @@ +$NetBSD$ + +--- configure.ac.orig 2013-01-07 10:50:02.000000000 +0000 ++++ configure.ac +@@ -1295,8 +1295,13 @@ AC_SUBST(GDK_DEP_CFLAGS) + # Check for Accessibility Toolkit flags + ######################################## + +-if test x$enable_x11_backend = xyes; then ++AC_ARG_WITH(atk-bridge, ++ AS_HELP_STRING([--without-atk-bridge], [Do not use atk-bridge-2.0]), ++ :, with_atk_bridge=yes) ++ ++if test x$enable_x11_backend = xyes -a x$with_atk_bridge = xyes; then + ATK_PACKAGES="atk atk-bridge-2.0" ++ AC_DEFINE([HAVE_ATK_BRIDGE], [1], [Define if we're using atk-bridge-2.0]) + else + ATK_PACKAGES="atk" + fi Index: x11/gtk3/patches/patch-gtk_a11y_gail.c =================================================================== RCS file: x11/gtk3/patches/patch-gtk_a11y_gail.c diff -N x11/gtk3/patches/patch-gtk_a11y_gail.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ x11/gtk3/patches/patch-gtk_a11y_gail.c 23 Apr 2013 13:29:24 -0000 @@ -0,0 +1,37 @@ +$NetBSD$ + +--- gtk/a11y/gail.c.orig 2013-01-07 10:50:02.000000000 +0000 ++++ gtk/a11y/gail.c +@@ -36,8 +36,10 @@ + #include "gailmisc.h" + + #ifdef GDK_WINDOWING_X11 ++#ifdef HAVE_ATK_BRIDGE + #include + #endif ++#endif + + static gboolean gail_focus_watcher (GSignalInvocationHint *ihint, + guint n_param_values, +@@ -808,8 +810,10 @@ _gtk_accessibility_shutdown (void) + g_clear_object (&atk_misc_instance); + + #ifdef GDK_WINDOWING_X11 ++#ifdef HAVE_ATK_BRIDGE + atk_bridge_adaptor_cleanup (); + #endif ++#endif + _gail_util_uninstall (); + } + +@@ -828,8 +832,10 @@ _gtk_accessibility_init (void) + + _gail_util_install (); + #ifdef GDK_WINDOWING_X11 ++#ifdef HAVE_ATK_BRIDGE + atk_bridge_adaptor_init (NULL, NULL); + #endif ++#endif + + atk_misc_instance = g_object_new (GAIL_TYPE_MISC, NULL); + }