Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/betagarden:master commit in: x11-libs/gtk+/files/, x11-libs/gtk+/
Date: Tue, 02 Aug 2011 22:55:52
Message-Id: b5ad05faea3a33783a615b685cd8bc833e878f87.sping@gentoo
1 commit: b5ad05faea3a33783a615b685cd8bc833e878f87
2 Author: Sebastian Pipping <sebastian <AT> pipping <DOT> org>
3 AuthorDate: Tue Aug 2 22:26:07 2011 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 2 22:26:07 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=b5ad05fa
7
8 x11-libs/gtk+: 3.1.6
9
10 ---
11 x11-libs/gtk+/files/settings.ini | 4 +
12 x11-libs/gtk+/gtk+-3.1.6.ebuild | 191 ++++++++++++++++++++++++++++++++++++++
13 2 files changed, 195 insertions(+), 0 deletions(-)
14
15 diff --git a/x11-libs/gtk+/files/settings.ini b/x11-libs/gtk+/files/settings.ini
16 new file mode 100644
17 index 0000000..a65c0a8
18 --- /dev/null
19 +++ b/x11-libs/gtk+/files/settings.ini
20 @@ -0,0 +1,4 @@
21 +[Settings]
22 +gtk-theme-name = Adwaita
23 +gtk-icon-theme-name = gnome
24 +gtk-cursor-theme-name = Adwaita
25
26 diff --git a/x11-libs/gtk+/gtk+-3.1.6.ebuild b/x11-libs/gtk+/gtk+-3.1.6.ebuild
27 new file mode 100644
28 index 0000000..90001e3
29 --- /dev/null
30 +++ b/x11-libs/gtk+/gtk+-3.1.6.ebuild
31 @@ -0,0 +1,191 @@
32 +# Copyright 1999-2011 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/gtk+-3.0.12.ebuild,v 1.1 2011/07/28 18:04:54 pacho Exp $
35 +
36 +EAPI="4"
37 +
38 +inherit eutils flag-o-matic gnome.org gnome2-utils libtool virtualx
39 +
40 +DESCRIPTION="Gimp ToolKit +"
41 +HOMEPAGE="http://www.gtk.org/"
42 +
43 +LICENSE="LGPL-2"
44 +SLOT="3"
45 +# NOTE: This gtk+ has multi-gdk-backend support, see:
46 +# * http://blogs.gnome.org/kris/2010/12/29/gdk-3-0-on-mac-os-x/
47 +# * http://mail.gnome.org/archives/gtk-devel-list/2010-November/msg00099.html
48 +# I tried this and got it all compiling, but the end result is unusable as it
49 +# horribly mixes up the backends -- grobian
50 +IUSE="aqua cups debug doc examples +introspection test vim-syntax xinerama"
51 +KEYWORDS="" # blind bump + patches disabled
52 +
53 +# FIXME: introspection data is built against system installation of gtk+:3
54 +# NOTE: cairo[svg] dep is due to bug 291283 (not patched to avoid eautoreconf)
55 +# Use gtk+:2 for gtk-update-icon-cache and gtk-builder-convert
56 +# >=x11-libs/gtk+-2.24:2 is needed for bug 359555
57 +COMMON_DEPEND="!aqua? (
58 + x11-libs/libXrender
59 + x11-libs/libX11
60 + x11-libs/libXi
61 + x11-libs/libXt
62 + x11-libs/libXext
63 + >=x11-libs/libXrandr-1.3
64 + x11-libs/libXcursor
65 + x11-libs/libXfixes
66 + x11-libs/libXcomposite
67 + x11-libs/libXdamage
68 + >=x11-libs/cairo-1.10.0[X,glib,svg]
69 + >=x11-libs/gdk-pixbuf-2.22.0:2[X,introspection?]
70 + )
71 + aqua? (
72 + >=x11-libs/cairo-1.10.0[aqua,glib,svg]
73 + >=x11-libs/gdk-pixbuf-2.22.0:2[introspection?]
74 + )
75 + xinerama? ( x11-libs/libXinerama )
76 + >=dev-libs/glib-2.28.0
77 + >=x11-libs/pango-1.24.0[introspection?]
78 + >=dev-libs/atk-1.30[introspection?]
79 + >=x11-libs/gtk+-2.24:2
80 + media-libs/fontconfig
81 + x11-misc/shared-mime-info
82 + cups? ( net-print/cups )
83 + introspection? ( >=dev-libs/gobject-introspection-0.10.1 )"
84 +DEPEND="${COMMON_DEPEND}
85 + >=dev-util/pkgconfig-0.9
86 + !aqua? (
87 + x11-proto/xextproto
88 + x11-proto/xproto
89 + x11-proto/inputproto
90 + x11-proto/damageproto
91 + )
92 + x86-interix? (
93 + sys-libs/itx-bind
94 + )
95 + xinerama? ( x11-proto/xineramaproto )
96 + >=dev-util/gtk-doc-am-1.11
97 + doc? (
98 + >=dev-util/gtk-doc-1.11
99 + ~app-text/docbook-xml-dtd-4.1.2 )
100 + test? (
101 + media-fonts/font-misc-misc
102 + media-fonts/font-cursor-misc )"
103 +RDEPEND="${COMMON_DEPEND}
104 + !<gnome-base/gail-1000"
105 +PDEPEND="vim-syntax? ( app-vim/gtk-syntax )"
106 +
107 +strip_builddir() {
108 + local rule=$1
109 + shift
110 + local directory=$1
111 + shift
112 + sed -e "s/^\(${rule} =.*\)${directory}\(.*\)$/\1\2/" -i $@ \
113 + || die "Could not strip director ${directory} from build."
114 +}
115 +
116 +src_prepare() {
117 + # -O3 and company cause random crashes in applications. Bug #133469
118 + replace-flags -O3 -O2
119 + strip-flags
120 +
121 + # Non-working test in gentoo's env
122 + sed 's:\(g_test_add_func ("/ui-tests/keys-events.*\):/*\1*/:g' \
123 + -i gtk/tests/testing.c || die "sed 1 failed"
124 + sed '\%/recent-manager/add%,/recent_manager_purge/ d' \
125 + -i gtk/tests/recentmanager.c || die "sed 2 failed"
126 +
127 + if use x86-interix; then
128 + # activate the itx-bind package...
129 + append-flags "-I${EPREFIX}/usr/include/bind"
130 + append-ldflags "-L${EPREFIX}/usr/lib/bind"
131 + fi
132 +
133 + if ! use test; then
134 + # don't waste time building tests
135 + strip_builddir SRC_SUBDIRS tests Makefile.am
136 + strip_builddir SRC_SUBDIRS tests Makefile.in
137 + fi
138 +
139 + if ! use examples; then
140 + # don't waste time building demos
141 + strip_builddir SRC_SUBDIRS demos Makefile.am
142 + strip_builddir SRC_SUBDIRS demos Makefile.in
143 + fi
144 +
145 + # http://mail.gnome.org/archives/commits-list/2011-March/msg04372.html
146 + ########## epatch "${FILESDIR}"/${PN}-3.0.8-darwin-quartz.patch
147 + # fix building with gir #372953
148 + ########## epatch "${FILESDIR}"/${PN}-3.0.11-darwin-quartz-introspection.patch
149 +}
150 +
151 +src_configure() {
152 + # FIXME: PackageKit support
153 + # png always on to display icons (foser)
154 + local myconf="$(use_enable doc gtk-doc)
155 + $(use_enable xinerama)
156 + $(use_enable cups cups auto)
157 + $(use_enable introspection)
158 + --disable-packagekit
159 + --disable-papi
160 + --enable-gtk2-dependency"
161 +
162 + # XXX: Maybe with multi-backend we should enable x11 all the time?
163 + if use aqua; then
164 + myconf="${myconf} --enable-quartz-backend --disable-xinput"
165 + else
166 + myconf="${myconf} --enable-x11-backend --enable-xinput"
167 + fi
168 +
169 + # Passing --disable-debug is not recommended for production use
170 + use debug && myconf="${myconf} --enable-debug=yes"
171 +
172 + # need libdir here to avoid a double slash in a path that libtool doesn't
173 + # grok so well during install (// between $EPREFIX and usr ...)
174 + econf --libdir="${EPREFIX}/usr/$(get_libdir)" ${myconf}
175 +}
176 +
177 +src_test() {
178 + unset DBUS_SESSION_BUS_ADDRESS
179 + # Exporting HOME fixes tests using XDG directories spec since all defaults
180 + # are based on $HOME. It is also backward compatible with functions not
181 + # yet ported to this spec.
182 + XDG_DATA_HOME="${T}" HOME="${T}" Xemake check || die "tests failed"
183 +}
184 +
185 +src_install() {
186 + emake DESTDIR="${D}" install
187 +
188 + insinto /etc/gtk-3.0
189 + doins "${FILESDIR}"/settings.ini
190 +
191 + dodoc AUTHORS ChangeLog* HACKING NEWS* README*
192 +
193 + # Remove unneeded *.la files
194 + find "${ED}" -name "*.la" -delete
195 +
196 + # add -framework Carbon to the .pc files
197 + use aqua && for i in gtk+-3.0.pc gtk+-quartz-3.0.pc gtk+-unix-print-3.0.pc; do
198 + sed -i -e "s:Libs\: :Libs\: -framework Carbon :" "${ED}"usr/$(get_libdir)/pkgconfig/$i || die "sed failed"
199 + done
200 +}
201 +
202 +pkg_preinst() {
203 + gnome2_schemas_savelist
204 +}
205 +
206 +pkg_postinst() {
207 + gnome2_schemas_update
208 +
209 + local GTK3_MODDIR="${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0"
210 + gtk-query-immodules-3.0 > "${GTK3_MODDIR}/immodules.cache" \
211 + || ewarn "Failed to run gtk-query-immodules-3.0"
212 +
213 + if ! has_version "app-text/evince"; then
214 + elog "Please install app-text/evince for print preview functionality."
215 + elog "Alternatively, check \"gtk-print-preview-command\" documentation and"
216 + elog "add it to your settings.ini file."
217 + fi
218 +}
219 +
220 +pkg_postrm() {
221 + gnome2_schemas_update --uninstall
222 +}