Source: gtk=2.90.4-4

0 views
Skip to first unread message

rbui...@rpath.com

unread,
Jul 14, 2010, 10:48:57 AM7/14/10
to gnome-develop...@googlegroups.com
================================
gtk:source=2.90.4-4
cvc rdiff gtk -1 /gnome.rpath.org@gnome:unstable/2.90.4-4
================================
2.90.4-4 Zhang Sen (je...@foresightlinux.org) Wed Jul 14 10:48:52 2010
Commit gtk 2.0 to gnome:unstable

gtk-input-method.taghandler: new
--- /dev/null
+++ gtk-input-method.taghandler
@@ -0,0 +42 @@
+#!/bin/bash
+
+if [ $# -lt 2 ]; then
+ echo "not enough arguments: $0 $*" >&2
+ exit 1
+fi
+
+type="$1"
+shift
+action="$1"
+shift
+
+# if the gtk-3.0 directory doesn't exist, create it
+if [ ! -d %(sysconfdir)s/gtk-3.0 ]; then
+ # just in case there is a file in the way, remove it
+ rm -f %(sysconfdir)s/gtk-3.0
+ mkdir %(sysconfdir)s/gtk-3.0
+fi
+
+case $type in
+ files|handler)
+ case $action in
+ update|remove|preremove)
+ for qm in %(bindir)s/gtk-query-immodules-3.0-*; do
+ HOST=$(basename $qm)
+ HOST=${HOST//gtk-query-immodules-3.0-/}
+ $qm > %(sysconfdir)s/gtk-3.0/$HOST/gtk.immodules
+ done
+ ;;
+ *)
+ echo "ERROR: taghandler $0 invoked for an action ($action) that is not handled" 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+ *)
+ echo "ERROR: taghandler $0 invoked for a type ($type) that is not handled" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0

gdk-pixbuf-loader.taghandler: new
--- /dev/null
+++ gdk-pixbuf-loader.taghandler
@@ -0,0 +42 @@
+#!/bin/bash
+
+if [ $# -lt 2 ]; then
+ echo "not enough arguments: $0 $*" >&2
+ exit 1
+fi
+
+type="$1"
+shift
+action="$1"
+shift
+
+# if the gtk-3.0 directory doesn't exist, create it
+if [ ! -d %(sysconfdir)s/gtk-3.0 ]; then
+ # just in case there is a file in the way, remove it
+ rm -f %(sysconfdir)s/gtk-3.0
+ mkdir %(sysconfdir)s/gtk-3.0
+fi
+
+case $type in
+ files|handler)
+ case $action in
+ update|remove|preremove)
+ for qm in %(bindir)s/gdk-pixbuf-query-loaders-*; do
+ HOST=$(basename $qm)
+ HOST=${HOST//gdk-pixbuf-query-loaders-/}
+ $qm > %(sysconfdir)s/gtk-3.0/$HOST/gdk-pixbuf.loaders
+ done
+ ;;
+ *)
+ echo "ERROR: taghandler $0 invoked for an action ($action) that is not handled" 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+ *)
+ echo "ERROR: taghandler $0 invoked for a type ($type) that is not handled" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0

gtk-update-icon-cache.taghandler: new
--- /dev/null
+++ gtk-update-icon-cache.taghandler
@@ -0,0 +39 @@
+#!/bin/bash
+
+if [ $# -lt 2 ]; then
+ echo "not enough arguments: $0 $*" >&2
+ exit 1
+fi
+
+type="$1"
+shift
+action="$1"
+shift
+
+case $type in
+ files)
+ case $action in
+ update|remove)
+ for path in $(cat); do
+ cut=$(echo "$path" | cut -d'/' -f%(fieldnum)s)
+ echo $cut
+ done | sort -u |
+ while read dirname; do
+ if [ -d "%(datadir)s/icons/$dirname" ]; then
+ gtk-update-icon-cache -f "%(datadir)s/icons/$dirname" 2> /dev/null
+ fi
+ done
+ ;;
+ *)
+ echo "ERROR: taghandler $0 invoked for an action ($action) that is not handled" 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+ *)
+ echo "ERROR: taghandler $0 invoked for a type ($type) that is not handled" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0

gdk-pixbuf-loader.tagdescription: new
--- /dev/null
+++ gdk-pixbuf-loader.tagdescription
@@ -0,0 +5 @@
+file %(taghandlerdir)s/gdk-pixbuf-loader
+implements files update
+implements files remove
+implements handler update
+include %(libdir)s/gtk-[^/]*/[^/]*/loaders/[^/]*\.so$

gtk-input-method.tagdescription: new
--- /dev/null
+++ gtk-input-method.tagdescription
@@ -0,0 +5 @@
+file %(taghandlerdir)s/gtk-input-method
+implements files update
+implements files remove
+implements handler update
+include %(libdir)s/gtk-[^/]*/[^/]*/immodules/[^/]*\.so$

gtk+-2.90.4.tar.bz2: new
gtk-update-icon-cache.tagdescription: new
--- /dev/null
+++ gtk-update-icon-cache.tagdescription
@@ -0,0 +5 @@
+file %(taghandlerdir)s/gtk-update-icon-cache
+implements files update
+implements files remove
+include %(datadir)s/icons/.*
+datasource stdin

gtk.recipe: new
--- /dev/null
+++ gtk.recipe
@@ -0,0 +118 @@
+#
+# Copyright (c) 2004-2008 rPath, Inc.
+# This file is distributed under the terms of the MIT License.
+# A copy is available at http://www.rpath.com/permanent/mit-license.html
+#
+
+
+loadRecipe('gnomepackage')
+class Gtk2(GnomePackageRecipe):
+ name = 'gtk'
+ version = '2.90.4'
+
+ externalArchive = 'mirror://gnome/gtk+/%(major_version)s/gtk+-%(version)s.tar.bz2'
+
+ clearBuildRequires('gtk:devel')
+ buildRequires = [
+ 'atk:devellib',
+ 'autoconf:runtime',
+ 'automake:runtime',
+ 'cups:devel',
+ 'docbook-utils:runtime',
+ 'gcc-c++:runtime',
+ 'gnutls:devellib',
+ 'gobject-introspection:devellib',
+ 'gobject-introspection:runtime',
+ 'indent:runtime',
+ 'jasper:devel',
+ 'libXcomposite:devel',
+ 'libXcursor:devel',
+ 'libXdamage:devel',
+ 'libXfixes:devel',
+ 'libXrandr:devel',
+ 'libjpeg:devel',
+ 'libtiff:devel',
+ 'openssl:devel',
+ 'pango:devellib',
+ 'perl:runtime',
+ 'python:devel',
+]
+
+ #patches = [
+ # Better support multilib.
+ #'lib64.patch',
+ #]
+
+ extraConfig = ' --build=%(host)s --host=%(host)s --with-xinput=xfree'
+ preMakeInstall = ' RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false '
+
+ def unpack (r):
+ GnomePackageRecipe.unpack(r)
+
+ # setup some macros to make the taghandler work properly
+ r.macros.fieldnum = str(len(r.macros.datadir.split('/'))+2)
+
+ r.Replace('tests ','','Makefile.*')
+
+ r.addSource('gtk-input-method.tagdescription', macros=True,
+ dest='%(tagdescriptiondir)s/gtk-input-method')
+ r.addSource('gtk-input-method.taghandler', macros=True,
+ dest='%(taghandlerdir)s/gtk-input-method', mode=0755)
+ r.addSource('gdk-pixbuf-loader.tagdescription', macros=True,
+ dest='%(tagdescriptiondir)s/gdk-pixbuf-loader')
+ r.addSource('gdk-pixbuf-loader.taghandler', macros=True,
+ dest='%(taghandlerdir)s/gdk-pixbuf-loader', mode=0755)
+ r.addSource('gtk-update-icon-cache.tagdescription', macros=True,
+ dest='%(tagdescriptiondir)s/gtk-update-icon-cache')
+ r.addSource('gtk-update-icon-cache.taghandler', macros=True,
+ dest='%(taghandlerdir)s/gtk-update-icon-cache', mode=0755)
+
+ def policy (r):
+ r.MakeDirs('%(sysconfdir)s/gtk-3.0')
+
+ # set up HOST definition for gtk.modules location
+ r.macros.host = r.macros.target
+ if r.macros.target.endswith("linux"):
+ # autotools appends -gnu to -linux
+ r.macros.host += '-gnu'
+
+ r.macros.queryloaders = '%(bindir)s/gdk-pixbuf-query-loaders-3.0-%(host)s'
+ r.macros.loadersfile = '%(sysconfdir)s/gtk-3.0/%(host)s/gdk-pixbuf.loaders'
+
+ r.macros.queryimmodules = '%(bindir)s/gtk-query-immodules-3.0-%(host)s'
+ r.macros.immodulesfile = '%(sysconfdir)s/gtk-3.0/%(host)s/gtk.immodules'
+
+ # separate query modules for multilib installation
+ r.Move('%(bindir)s/gdk-pixbuf-query-loaders-3.0', '%(queryloaders)s')
+ r.Move('%(bindir)s/gtk-query-immodules-3.0', '%(queryimmodules)s')
+
+ r.Remove('%(sysconfdir)s/gtk-3.0/gdk-pixbuf.loaders')
+ r.Remove('%(sysconfdir)s/gtk-3.0/gtk.immodules')
+ r.ComponentSpec('runtime', '%(sysconfdir)s/gtk-3.0/im-multipress.conf')
+
+ # zero-length config files
+ r.Create('%(loadersfile)s')
+ r.Create('%(immodulesfile)s')
+ r.InitialContents('%(loadersfile)s')
+ r.InitialContents('%(immodulesfile)s')
+
+ # :runtime can be installed only once, :lib has multilib, so
+ # move de-collided paths into :lib where they belong
+ r.ComponentSpec('lib',
+ '%(bindir)s/.*query.*',
+ '%(sysconfdir)s/gtk-.*/.*',
+ '%(libdir)s/libgdk-x11-.*.so')
+
+ r.Doc('docs/tutorial', 'docs/faq', 'examples')
+ r.ComponentSpec('devel', '%(bindir)s/gdk-pixbuf-csource')
+ r.ComponentSpec('doc', '%(datadir)s/gtk-.*/demo/')
+
+ # these pkg-config files have Requires: statements
+ r.Requires('atk:devel', '%(libdir)s/pkgconfig/gtk.*pc')
+ r.Requires('glib:devel', '%(libdir)s/pkgconfig/gdk-pixbuf-xlib.*pc')
+ r.Requires('pango:devel', '%(libdir)s/pkgconfig/gdk-x11.*pc',
+ '%(libdir)s/pkgconfig/gdk-3.0.pc')
+
+ # modules require tag handlers being run in order to be loaded
+ r.Requires('gtk:runtime',
+ r'%(libdir)s/gtk-[^/]*/[^/]*/(loaders|immodules)/[^/]*\.so')

lib64.patch: new
--- /dev/null
+++ lib64.patch
@@ -0,0 +58 @@
+diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am
+index c5606f5..fbe98ce 100644
+--- a/gdk-pixbuf/Makefile.am
++++ b/gdk-pixbuf/Makefile.am
+@@ -510,6 +510,7 @@ INCLUDES = \
+ -I$(top_srcdir)/gdk-pixbuf \
+ -I$(top_builddir)/gdk-pixbuf \
+ -DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
++ -DHOST=\"$(host_triplet)\" \
+ -DGTK_VERSION=\"$(GTK_VERSION)\" \
+ -DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
+ -DGTK_PREFIX=\"$(prefix)\" \
+diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
+index 7140766..0515762 100644
+--- a/gdk-pixbuf/gdk-pixbuf-io.c
++++ b/gdk-pixbuf/gdk-pixbuf-io.c
+@@ -305,7 +305,17 @@ gdk_pixbuf_get_module_file (void)
+ gchar *result = g_strdup (g_getenv ("GDK_PIXBUF_MODULE_FILE"));
+
+ if (!result)
+- result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0", "gdk-pixbuf.loaders", NULL);
++ {
++ result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0",
++ HOST, "gdk-pixbuf.loaders", NULL);
++ if (!g_file_test (result, G_FILE_TEST_EXISTS))
++ {
++ g_free (result);
++
++ result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0",
++ "gdk-pixbuf.loaders", NULL);
++ }
++ }
+
+ return result;
+ }
+diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c
+index a23a605..e925047 100644
+--- a/gtk/gtkrc.c
++++ b/gtk/gtkrc.c
+@@ -450,7 +450,17 @@ gtk_rc_get_im_module_file (void)
+ if (im_module_file)
+ result = g_strdup (im_module_file);
+ else
+- result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0", "gtk.immodules", NULL);
++ {
++ result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0", GTK_HOST,
++ "gtk.immodules", NULL);
++ if (!g_file_test (result, G_FILE_TEST_EXISTS))
++ {
++ g_free (result);
++
++ result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0",
++ "gtk.immodules", NULL);
++ }
++ }
+ }
+
+ return result;


Committed by: jesse

Reply all
Reply to author
Forward
0 new messages