/[gentoo-x86]/x11-libs/gtk+/gtk+-2.10.14.ebuild
Gentoo

Contents of /x11-libs/gtk+/gtk+-2.10.14.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Tue Nov 20 05:49:12 2007 UTC (10 years, 2 months ago) by kumba
Branch: MAIN
Changes since 1.9: +2 -2 lines
Stable on mips.
(Portage version: 2.1.3.19)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/gtk+-2.10.14.ebuild,v 1.9 2007/11/13 02:45:01 leio Exp $
4
5 inherit gnome.org flag-o-matic eutils autotools virtualx
6
7 DESCRIPTION="Gimp ToolKit +"
8 HOMEPAGE="http://www.gtk.org/"
9
10 LICENSE="LGPL-2"
11 SLOT="2"
12 KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sh sparc x86 ~x86-fbsd"
13 IUSE="debug doc jpeg tiff xinerama"
14
15 RDEPEND="x11-libs/libXrender
16 x11-libs/libX11
17 x11-libs/libXi
18 x11-libs/libXt
19 x11-libs/libXext
20 x11-libs/libXcursor
21 x11-libs/libXrandr
22 x11-libs/libXfixes
23 xinerama? ( x11-libs/libXinerama )
24 >=dev-libs/glib-2.12.1
25 >=x11-libs/pango-1.12.0
26 >=dev-libs/atk-1.10.1
27 >=x11-libs/cairo-1.2.0
28 media-libs/fontconfig
29 x11-misc/shared-mime-info
30 >=media-libs/libpng-1.2.1
31 jpeg? ( >=media-libs/jpeg-6b-r2 )
32 tiff? ( >=media-libs/tiff-3.5.7 )"
33
34 DEPEND="${RDEPEND}
35 sys-devel/autoconf
36 >=dev-util/pkgconfig-0.9
37 =sys-devel/automake-1.7*
38 x11-proto/xextproto
39 x11-proto/xproto
40 x11-proto/inputproto
41 xinerama? ( x11-proto/xineramaproto )
42 doc? (
43 >=dev-util/gtk-doc-1.4
44 ~app-text/docbook-xml-dtd-4.1.2
45 )"
46
47 pkg_setup() {
48 if ! built_with_use x11-libs/cairo X; then
49 einfo "Please re-emerge x11-libs/cairo with the X USE flag set"
50 die "cairo needs the X flag set"
51 fi
52 }
53
54 set_gtk2_confdir() {
55 # An arch specific config directory is used on multilib systems
56 has_multilib_profile && GTK2_CONFDIR="/etc/gtk-2.0/${CHOST}"
57 GTK2_CONFDIR=${GTK2_CONFDIR:=/etc/gtk-2.0}
58 }
59
60 src_unpack() {
61 unpack ${A}
62 cd "${S}"
63
64 # Optionalize xinerama support
65 epatch "${FILESDIR}/${PN}-2.8.10-xinerama.patch"
66
67 # Make gtk-update-icon-cache check subdirs in it's update check
68 epatch "${FILESDIR}"/${PN}-2.10.11-update-icon-subdirs.patch
69
70 # use an arch-specific config directory so that 32bit and 64bit versions
71 # dont clash on multilib systems
72 has_multilib_profile && epatch "${FILESDIR}/${PN}-2.8.0-multilib.patch"
73
74 # Revert DND change that makes mozilla products DND broken
75 EPATCH_OPTS="-R" epatch "${FILESDIR}/${PN}-2.10.7-mozilla-dnd-fix.patch"
76
77 # -O3 and company cause random crashes in applications. Bug #133469
78 replace-flags -O3 -O2
79 strip-flags
80
81 use ppc64 && append-flags -mminimal-toc
82
83 # remember, eautoreconf applies elibtoolize.
84 # if you remove this, you should manually run elibtoolize
85 export WANT_AUTOMAKE=1.7
86 cp aclocal.m4 old_macros.m4
87 AT_M4DIR="."
88 eautoreconf
89
90 epunt_cxx
91 }
92
93 src_compile() {
94 # png always on to display icons (foser)
95 local myconf="$(use_enable doc gtk-doc) \
96 $(use_with jpeg libjpeg) \
97 $(use_with tiff libtiff) \
98 $(use_enable xinerama) \
99 --with-libpng \
100 --with-gdktarget=x11 \
101 --with-xinput"
102
103 # Passing --disable-debug is not recommended for production use
104 use debug && myconf="${myconf} --enable-debug=yes"
105
106 econf ${myconf} || die "configure failed"
107
108 emake || die "compile failed"
109 }
110
111 src_test() {
112 Xmake check || die
113 }
114
115 src_install() {
116 make DESTDIR="${D}" install || die "Installation failed"
117
118 set_gtk2_confdir
119 dodir ${GTK2_CONFDIR}
120 keepdir ${GTK2_CONFDIR}
121
122 # see bug #133241
123 echo 'gtk-fallback-icon-theme = "gnome"' > "${D}/${GTK2_CONFDIR}/gtkrc"
124
125 # Enable xft in environment as suggested by <utx@gentoo.org>
126 dodir /etc/env.d
127 echo "GDK_USE_XFT=1" > "${D}/etc/env.d/50gtk2"
128
129 dodoc AUTHORS ChangeLog* HACKING NEWS* README*
130 }
131
132 pkg_postinst() {
133 set_gtk2_confdir
134
135 if [ -d "${ROOT}${GTK2_CONFDIR}" ]; then
136 gtk-query-immodules-2.0 > "${ROOT}${GTK2_CONFDIR}/gtk.immodules"
137 gdk-pixbuf-query-loaders > "${ROOT}${GTK2_CONFDIR}/gdk-pixbuf.loaders"
138 else
139 ewarn "The destination path ${ROOT}${GTK2_CONFDIR} doesn't exist;"
140 ewarn "to complete the installation of GTK+, please create the"
141 ewarn "directory and then manually run:"
142 ewarn " cd ${ROOT}${GTK2_CONFDIR}"
143 ewarn " gtk-query-immodules-2.0 > gtk.immodules"
144 ewarn " gdk-pixbuf-query-loaders > gdk-pixbuf.loaders"
145 fi
146
147 if [ -e /usr/lib/gtk-2.0/2.[^1]* ]; then
148 elog "You need to rebuild ebuilds that installed into" /usr/lib/gtk-2.0/2.[^1]*
149 elog "to do that you can use qfile from portage-utils:"
150 elog "emerge -va1 \$(qfile -qC /usr/lib/gtk-2.0/2.[^1]*)"
151 fi
152 }

  ViewVC Help
Powered by ViewVC 1.1.20