diff options
author | Jory Pratt <anarchy@gentoo.org> | 2006-06-04 01:03:03 +0000 |
---|---|---|
committer | Jory Pratt <anarchy@gentoo.org> | 2006-06-04 01:03:03 +0000 |
commit | de3f745f2c225e16e07a9ee78faa0f7fd89b3647 (patch) | |
tree | b324e8c4928165747588d4f213b89068918dcbd6 /x11-wm | |
parent | New package for ab initio calculations using density functional theory. Requi... (diff) | |
download | gentoo-2-de3f745f2c225e16e07a9ee78faa0f7fd89b3647.tar.gz gentoo-2-de3f745f2c225e16e07a9ee78faa0f7fd89b3647.tar.bz2 gentoo-2-de3f745f2c225e16e07a9ee78faa0f7fd89b3647.zip |
gtk use color support
(Portage version: 2.1_rc4)
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/openbox/ChangeLog | 8 | ||||
-rw-r--r-- | x11-wm/openbox/files/digest-openbox-20060509-r2 | 6 | ||||
-rw-r--r-- | x11-wm/openbox/files/openbox-20060509-gtkcolors.patch | 222 | ||||
-rw-r--r-- | x11-wm/openbox/openbox-20060509-r2.ebuild | 72 |
4 files changed, 307 insertions, 1 deletions
diff --git a/x11-wm/openbox/ChangeLog b/x11-wm/openbox/ChangeLog index 59c3baa65f16..78b00afd355d 100644 --- a/x11-wm/openbox/ChangeLog +++ b/x11-wm/openbox/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for x11-wm/openbox # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-wm/openbox/ChangeLog,v 1.108 2006/06/01 01:09:15 anarchy Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-wm/openbox/ChangeLog,v 1.109 2006/06/04 01:03:03 anarchy Exp $ + +*openbox-20060509-r2 (04 Jun 2006) + + 04 Jun 2006; Jory A. Pratt <anarchy@gentoo.org> + +files/openbox-20060509-gtkcolors.patch, +openbox-20060509-r2.ebuild: + gtk use color support *openbox-20060509-r1 (01 Jun 2006) diff --git a/x11-wm/openbox/files/digest-openbox-20060509-r2 b/x11-wm/openbox/files/digest-openbox-20060509-r2 new file mode 100644 index 000000000000..f185955cb253 --- /dev/null +++ b/x11-wm/openbox/files/digest-openbox-20060509-r2 @@ -0,0 +1,6 @@ +MD5 3d69bb394dae0994461172fccedc602a ob-themes-usability.tar.bz2 19204 +RMD160 0d5307746ba743647fe912eb8a364ca61c68b61a ob-themes-usability.tar.bz2 19204 +SHA256 36ce83c2d10abcc503dbaa6c89c0ce9a8793e5760d281973a38a41577421f5c5 ob-themes-usability.tar.bz2 19204 +MD5 3ff8d5dd7fdae18e5bc1b49f917af16a openbox-20060509.tar.gz 827216 +RMD160 dcd93e081ba1db144b87b0758a76a45256a543a1 openbox-20060509.tar.gz 827216 +SHA256 c097806666b63dfc312f769a3f60b30c60d73996fb44e37f484d4321fd2e7fb2 openbox-20060509.tar.gz 827216 diff --git a/x11-wm/openbox/files/openbox-20060509-gtkcolors.patch b/x11-wm/openbox/files/openbox-20060509-gtkcolors.patch new file mode 100644 index 000000000000..3835ad2e4b05 --- /dev/null +++ b/x11-wm/openbox/files/openbox-20060509-gtkcolors.patch @@ -0,0 +1,222 @@ +diff -urN openbox-tree/Makefile.am openbox/Makefile.am +--- openbox-tree/Makefile.am 2006-06-03 19:12:50.576300928 -0500 ++++ openbox/Makefile.am 2006-06-03 19:19:36.964520528 -0500 +@@ -51,6 +51,7 @@ + $(X_CFLAGS) \ + $(XFT_CFLAGS) \ + $(GLIB_CFLAGS) \ ++ $(GTK_CFLAGS) \ + $(XML_CFLAGS) \ + $(PANGO_CFLAGS) \ + -DG_LOG_DOMAIN=\"ObRender\" \ +@@ -63,6 +64,7 @@ + $(XFT_LIBS) \ + $(PANGO_LIBS) \ + $(GLIB_LIBS) \ ++ $(GTK_LIBS) \ + $(XML_LIBS) \ + parser/libobparser.la + render_libobrender_la_SOURCES = \ +@@ -111,6 +113,7 @@ + $(SM_CFLAGS) \ + $(XFT_CFLAGS) \ + $(GLIB_CFLAGS) \ ++ $(GTK_CFLAGS) \ + $(LIBSN_CFLAGS) \ + $(XML_CFLAGS) \ + -DLOCALEDIR=\"$(localedir)\" \ +@@ -125,6 +128,7 @@ + $(VIDMODE_LIBS) \ + $(XSHAPE_LIBS) \ + $(GLIB_LIBS) \ ++ $(GTK_LIBS) \ + $(X_LIBS) \ + $(LIBSN_LIBS) \ + $(XML_LIBS) \ +diff -urN openbox-tree/configure.ac openbox/configure.ac +--- openbox-tree/configure.ac 2006-06-03 19:12:50.577300776 -0500 ++++ openbox/configure.ac 2006-06-03 19:14:01.146572616 -0500 +@@ -74,6 +74,29 @@ + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) + ++AC_ARG_ENABLE(gtk, ++ AC_HELP_STRING( ++ [--disable-gtk], ++ [disable the GTK+ library [[default=no]]] ++ ), ++ [enable_gtk=$enableval], ++ [enable_gtk=yes] ++) ++ ++if test "$enable_gtk" = yes; then ++PKG_CHECK_MODULES([GTK], [gtk+-2.0], ++ [ ++ AC_DEFINE(USE_GTK, [1], [Use GTK]) ++ AC_SUBST(GTK_CFLAGS) ++ AC_SUBST(GTK_LIBS) ++ gtk_found=yes ++ ], ++ gtk_found=no ++) ++else ++ gtk_found=no ++fi ++ + AC_ARG_ENABLE(pango, + AC_HELP_STRING( + [--disable-pango], +@@ -157,6 +180,7 @@ + AC_MSG_RESULT + AC_MSG_RESULT([Compiling with these options: + Pango... $pango_found ++ GTK+... $gtk_found + Startup Notification... $sn_found + Session Management... $SM + ]) +diff -urN openbox-tree/openbox/openbox.c openbox/openbox/openbox.c +--- openbox-tree/openbox/openbox.c 2006-06-03 19:12:50.833261864 -0500 ++++ openbox/openbox/openbox.c 2006-06-03 19:14:01.147572464 -0500 +@@ -68,6 +68,9 @@ + # include <unistd.h> + #endif + #include <errno.h> ++#ifdef USE_GTK ++# include <gtk/gtk.h> ++#endif + + #include <X11/cursorfont.h> + +@@ -105,6 +108,10 @@ + bind_textdomain_codeset(PACKAGE_NAME, "UTF-8"); + textdomain(PACKAGE_NAME); + ++#ifdef USE_GTK ++ gtk_init (&argv, &argv); ++#endif ++ + g_set_prgname(argv[0]); + + if (chdir(g_get_home_dir()) == -1) +diff -urN openbox-tree/render/color.c openbox/render/color.c +--- openbox-tree/render/color.c 2006-06-03 19:12:50.940245600 -0500 ++++ openbox/render/color.c 2006-06-03 19:14:01.148572312 -0500 +@@ -23,8 +23,81 @@ + + #include <X11/Xlib.h> + #include <X11/Xutil.h> ++#ifdef USE_GTK ++# include <gtk/gtk.h> ++# include <gdk/gdk.h> ++#endif + #include <string.h> + ++#ifdef USE_GTK ++gchar *GtkConstToColorname (gchar *colorname) ++{ ++ GtkWidget *widget; ++ GdkColor *col = NULL; ++ gchar *tmp; ++ ++ gtk_rc_reparse_all (); ++ widget = gtk_window_new (GTK_WINDOW_TOPLEVEL); ++ gtk_widget_ensure_style (widget); ++ ++ /* FIXME: omg, this is awful */ ++ /* fg */ ++ if (!g_ascii_strcasecmp (colorname, "GTK_FG_NORMAL")) ++ col = >K_WIDGET (widget)->style->fg[GTK_STATE_NORMAL]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_FG_ACTIVE")) ++ col = >K_WIDGET (widget)->style->fg[GTK_STATE_ACTIVE]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_FG_PRELIGHT")) ++ col = >K_WIDGET (widget)->style->fg[GTK_STATE_PRELIGHT]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_FG_SELECTED")) ++ col = >K_WIDGET (widget)->style->fg[GTK_STATE_SELECTED]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_FG_INSENSITIVE")) ++ col = >K_WIDGET (widget)->style->fg[GTK_STATE_INSENSITIVE]; ++ /* bg */ ++ else if (!g_ascii_strcasecmp (colorname, "GTK_BG_NORMAL")) ++ col = >K_WIDGET (widget)->style->bg[GTK_STATE_NORMAL]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_BG_ACTIVE")) ++ col = >K_WIDGET (widget)->style->bg[GTK_STATE_ACTIVE]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_BG_PRELIGHT")) ++ col = >K_WIDGET (widget)->style->bg[GTK_STATE_PRELIGHT]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_BG_SELECTED")) ++ col = >K_WIDGET (widget)->style->bg[GTK_STATE_SELECTED]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_BG_INSENSITIVE")) ++ col = >K_WIDGET (widget)->style->bg[GTK_STATE_INSENSITIVE]; ++ /* base */ ++ else if (!g_ascii_strcasecmp (colorname, "GTK_BASE_NORMAL")) ++ col = >K_WIDGET (widget)->style->base[GTK_STATE_NORMAL]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_BASE_ACTIVE")) ++ col = >K_WIDGET (widget)->style->base[GTK_STATE_ACTIVE]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_BASE_PRELIGHT")) ++ col = >K_WIDGET (widget)->style->base[GTK_STATE_PRELIGHT]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_BASE_SELECTED")) ++ col = >K_WIDGET (widget)->style->base[GTK_STATE_SELECTED]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_BASE_INSENSITIVE")) ++ col = >K_WIDGET (widget)->style->base[GTK_STATE_INSENSITIVE]; ++ /* text */ ++ else if (!g_ascii_strcasecmp (colorname, "GTK_TEXT_NORMAL")) ++ col = >K_WIDGET (widget)->style->text[GTK_STATE_NORMAL]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_TEXT_ACTIVE")) ++ col = >K_WIDGET (widget)->style->text[GTK_STATE_ACTIVE]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_TEXT_PRELIGHT")) ++ col = >K_WIDGET (widget)->style->text[GTK_STATE_PRELIGHT]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_TEXT_SELECTED")) ++ col = >K_WIDGET (widget)->style->text[GTK_STATE_SELECTED]; ++ else if (!g_ascii_strcasecmp (colorname, "GTK_TEXT_INSENSITIVE")) ++ col = >K_WIDGET (widget)->style->text[GTK_STATE_INSENSITIVE]; ++ ++ gtk_widget_destroy (widget); ++ ++ if (col) ++ tmp = g_strdup_printf ("#%02x%02x%02x", ++ col->red >> 8, col->green >> 8, col->blue >> 8); ++ else ++ tmp = g_strdup ("#ffffff"); ++ ++ return (tmp); ++} ++#endif /* USE_GTK */ ++ + void RrColorAllocateGC(RrColor *in) + { + XGCValues gcv; +@@ -39,19 +112,32 @@ + RrColor *RrColorParse(const RrInstance *inst, gchar *colorname) + { + XColor xcol; ++ RrColor *ret; + + g_assert(colorname != NULL); + /* get rgb values from colorname */ + ++ /* beware! voodoo following */ ++#ifdef USE_GTK ++ if (!g_ascii_strncasecmp (colorname, "GTK", 3)) ++ colorname = GtkConstToColorname (colorname); ++ else ++ colorname = g_strdup (colorname); ++#endif ++ + xcol.red = 0; + xcol.green = 0; + xcol.blue = 0; + xcol.pixel = 0; +- if (!XParseColor(RrDisplay(inst), RrColormap(inst), colorname, &xcol)) { ++ if (!XParseColor(RrDisplay(inst), RrColormap(inst), colorname, &xcol)) + g_warning("unable to parse color '%s'", colorname); +- return NULL; +- } +- return RrColorNew(inst, xcol.red >> 8, xcol.green >> 8, xcol.blue >> 8); ++ else ++ ret= RrColorNew(inst, xcol.red >> 8, xcol.green >> 8, xcol.blue >> 8); ++ ++#ifdef USE_GTK ++ g_free (colorname); ++#endif ++ return ret; + } + + /*#define NO_COLOR_CACHE*/ diff --git a/x11-wm/openbox/openbox-20060509-r2.ebuild b/x11-wm/openbox/openbox-20060509-r2.ebuild new file mode 100644 index 000000000000..2fb4d0c8d628 --- /dev/null +++ b/x11-wm/openbox/openbox-20060509-r2.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-wm/openbox/openbox-20060509-r2.ebuild,v 1.1 2006/06/04 01:03:03 anarchy Exp $ + +inherit eutils autotools + +DESCRIPTION="Openbox is a standards compliant, fast, light-weight, extensible window manager." +HOMEPAGE="http://icculus.org/openbox/" +SRC_URI="mirror://gentoo/${P}.tar.gz + mirror://gentoo/ob-themes-usability.tar.bz2" + +LICENSE="GPL-2" +SLOT="3" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="pango nls startup-notification xinerama gtk" + +RDEPEND="|| ( ( x11-libs/libXrandr + x11-libs/libXt + xinerama? ( x11-libs/libXinerama ) + ) + virtual/x11 + ) + virtual/xft + >=dev-libs/glib-2 + >=media-libs/fontconfig-2 + >=dev-libs/libxml2-2.0 + gtk? ( >=x11-libs/gtk+-2 )" +DEPEND="${RDEPEND} + || ( ( + xinerama? ( x11-proto/xineramaproto ) + x11-proto/xextproto + x11-proto/xf86vidmodeproto + ) + virtual/x11 + ) + pango? ( x11-libs/pango ) + startup-notification? ( x11-libs/startup-notification ) + dev-util/pkgconfig" + +S=${WORKDIR}/${PN} + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${P}-asneeded.patch + epatch ${FILESDIR}/${P}-hideMenuHeader.patch + epatch ${FILESDIR}/${P}-pipedsplitgradient.patch + epatch ${FILESDIR}/${P}-gtkcolors.patch + + AT_M4DIR="m4" \ + eautoreconf || die "failed running eautoreconf" +} + +src_compile() { + econf `use_enable nls` `use_enable pango` `use_enable startup-notification` `use_enable gtk` ${myconf} || die "failed running configure" + emake || die "failed running make" +} + +src_install() { + dodir /etc/X11/Sessions + echo "/usr/bin/openbox" > ${D}/etc/X11/Sessions/openbox + fperms a+x /etc/X11/Sessions/openbox + + insinto /usr/share/xsessions + doins ${FILESDIR}/${PN}.desktop + + make DESTDIR=${D} install || die + dodoc ABOUT-NLS AUTHORS CHANGELOG COMPLIANCE COPYING README + + insinto /usr/share/themes + doins -r ${WORKDIR}/ob-themes-usability/* +} |