Bring gtkrc back.

While here merge a couple of fixes from upstream.
This commit is contained in:
ajacoutot 2014-10-02 20:02:20 +00:00
parent d1a6255cc1
commit f9f2f4848c
5 changed files with 73 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.195 2014/10/02 19:20:51 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.196 2014/10/02 20:02:20 ajacoutot Exp $
COMMENT-main= multi-platform graphical toolkit
COMMENT-guic= gtk+ icon theme caching utility
@ -9,7 +9,7 @@ GNOME_PROJECT= gtk+
PKGNAME-main= gtk+2-${GNOME_VERSION}
PKGNAME-guic= gtk-update-icon-cache-${GNOME_VERSION}
REVISION-main= 1
REVISION-main= 2
CATEGORIES= x11 devel
@ -49,9 +49,7 @@ LIB_DEPENDS-main= ${LIB_DEPENDS} \
# convenient dependency to prevent hunting what needs what:
# some apps need more icons than the stock ones
# some apps needs the svg version of the icon (librsvg pulled in)
RUN_DEPENDS-main += x11/gnome/adwaita-icon-theme
# XXX temporary
RUN_DEPENDS-main += x11/gnome/icon-theme
RUN_DEPENDS-main += x11/gnome/icon-theme-symbolic # pulls x11/gnome/icon-theme
WANTLIB-main += ${WANTLIB}
WANTLIB-main += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
@ -80,6 +78,9 @@ CONFIGURE_ARGS= --with-xinput=xfree
FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/gtk+2
post-install:
# set the global themes (matches what's directly bundled in gtk+3)
${INSTALL_DATA} ${FILESDIR}/gtkrc \
${PREFIX}/share/gtk-2.0
rm ${PREFIX}/lib/gtk-2.0/2.10.0/{engines,immodules,printbackends}/*.{a,la}
rm ${PREFIX}/lib/gtk-2.0/modules/*.{a,la}

7
x11/gtk+2/files/gtkrc Normal file
View File

@ -0,0 +1,7 @@
# $OpenBSD: gtkrc,v 1.1 2014/10/02 20:02:20 ajacoutot Exp $
gtk-theme-name = "Adwaita"
gtk-icon-theme-name = "gnome"
gtk-cursor-theme-name = "Adwaita"
gtk-button-images = 0
gtk-menu-images = 0

View File

@ -0,0 +1,40 @@
$OpenBSD: patch-gdk_gdk_c,v 1.1 2014/10/02 20:02:20 ajacoutot Exp $
From fbf38d16bcc26630f0f721d266509f5bc292f606 Mon Sep 17 00:00:00 2001
From: Emmanuele Bassi <ebassi@gnome.org>
Date: Tue, 26 Aug 2014 12:07:34 +0100
Subject: threads: Do not release the GDK lock if it hasn't been acquired yet
--- gdk/gdk.c.orig Thu Mar 6 05:56:42 2014
+++ gdk/gdk.c Thu Oct 2 21:37:39 2014
@@ -434,7 +434,29 @@ static void
gdk_threads_impl_unlock (void)
{
if (gdk_threads_mutex)
- g_mutex_unlock (gdk_threads_mutex);
+ {
+ /* we need a trylock() here because trying to unlock a mutex
+ * that hasn't been locked yet is:
+ *
+ * a) not portable
+ * b) fail on GLib ≥ 2.41
+ *
+ * trylock() will either succeed because nothing is holding the
+ * GDK mutex, and will be unlocked right afterwards; or it's
+ * going to fail because the mutex is locked already, in which
+ * case we unlock it as expected.
+ *
+ * this is needed in the case somebody called gdk_threads_init()
+ * without calling gdk_threads_enter() before calling gtk_main().
+ * in theory, we could just say that this is undefined behaviour,
+ * but our documentation has always been *less* than explicit as
+ * to what the behaviour should actually be.
+ *
+ * see bug: https://bugzilla.gnome.org/show_bug.cgi?id=735428
+ */
+ g_mutex_trylock (gdk_threads_mutex);
+ g_mutex_unlock (gdk_threads_mutex);
+ }
}
/**

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-modules_engines_pixbuf_pixbuf-draw_c,v 1.1 2014/10/02 20:02:20 ajacoutot Exp $
From 1d0e2d58385bd01fdb753bf40ba2f4c32ccd0cc8 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Mon, 29 Sep 2014 16:05:57 -0400
Subject: pixbuf engine: Avoid a crash if widget is NULL
--- modules/engines/pixbuf/pixbuf-draw.c.orig Thu Mar 6 05:56:42 2014
+++ modules/engines/pixbuf/pixbuf-draw.c Thu Oct 2 21:37:23 2014
@@ -131,7 +131,7 @@ draw_simple_image(GtkStyle *style,
match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
}
- if (!(match_data->flags & THEME_MATCH_DIRECTION))
+ if (widget && !(match_data->flags & THEME_MATCH_DIRECTION))
{
match_data->flags |= THEME_MATCH_DIRECTION;
match_data->direction = gtk_widget_get_direction (widget);

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.39 2014/10/02 15:35:03 ajacoutot Exp $
@comment $OpenBSD: PLIST-main,v 1.40 2014/10/02 20:02:20 ajacoutot Exp $
@conflict gail-*
@conflict gtk+2-cups-*
@conflict gtk+2-docs-*
@ -313,7 +313,6 @@ lib/libgdk-x11-2.0.la
lib/libgtk-x11-2.0.a
lib/libgtk-x11-2.0.la
@lib lib/libgtk-x11-2.0.so.${LIBgtk-x11-2.0_VERSION}
lib/pkgconfig/
lib/pkgconfig/gail.pc
lib/pkgconfig/gdk-2.0.pc
lib/pkgconfig/gdk-x11-2.0.pc
@ -386,6 +385,7 @@ share/gtk-2.0/demo/textview.c
share/gtk-2.0/demo/toolpalette.c
share/gtk-2.0/demo/tree_store.c
share/gtk-2.0/demo/ui_manager.c
share/gtk-2.0/gtkrc
share/gtk-doc/
share/gtk-doc/html/
share/gtk-doc/html/gail-libgail-util/