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

Contents of /x11-libs/gtk+/gtk+-2.20.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Jul 3 13:08:01 2010 UTC (4 years, 5 months ago) by grobian
Branch: MAIN
Changes since 1.2: +3 -3 lines
Fix compilation on Darwin8
(Portage version: 2.2.01.15352-prefix/cvs/Darwin powerpc)

1 # Copyright 1999-2010 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.20.1-r1.ebuild,v 1.2 2010/06/20 11:15:18 nirbheek Exp $
4
5 EAPI="3"
6
7 inherit gnome.org flag-o-matic eutils libtool virtualx
8
9 DESCRIPTION="Gimp ToolKit +"
10 HOMEPAGE="http://www.gtk.org/"
11
12 LICENSE="LGPL-2"
13 SLOT="2"
14 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
15 IUSE="aqua cups debug doc +introspection jpeg jpeg2k tiff test vim-syntax xinerama"
16
17 # NOTE: cairo[svg] dep is due to bug 291283 (not patched to avoid eautoreconf)
18 RDEPEND="!aqua? (
19 x11-libs/libXrender
20 x11-libs/libX11
21 x11-libs/libXi
22 x11-libs/libXt
23 x11-libs/libXext
24 >=x11-libs/libXrandr-1.3
25 x11-libs/libXcursor
26 x11-libs/libXfixes
27 x11-libs/libXcomposite
28 x11-libs/libXdamage
29 >=x11-libs/cairo-1.6[X,svg]
30 )
31 aqua? (
32 >=x11-libs/cairo-1.6[aqua,svg]
33 )
34 xinerama? ( x11-libs/libXinerama )
35 >=dev-libs/glib-2.23.6
36 >=x11-libs/pango-1.20[introspection?]
37 >=dev-libs/atk-1.29.2[introspection?]
38 media-libs/fontconfig
39 x11-misc/shared-mime-info
40 >=media-libs/libpng-1.2.43-r2:0
41 cups? ( net-print/cups )
42 jpeg? ( >=media-libs/jpeg-6b-r9:0 )
43 jpeg2k? ( media-libs/jasper )
44 tiff? ( >=media-libs/tiff-3.9.2 )
45 !<gnome-base/gail-1000"
46 DEPEND="${RDEPEND}
47 >=dev-util/pkgconfig-0.9
48 !aqua? (
49 x11-proto/xextproto
50 x11-proto/xproto
51 x11-proto/inputproto
52 x11-proto/damageproto
53 )
54 x86-interix? (
55 sys-libs/itx-bind
56 )
57 xinerama? ( x11-proto/xineramaproto )
58 >=dev-util/gtk-doc-am-1.11
59 doc? (
60 >=dev-util/gtk-doc-1.11
61 ~app-text/docbook-xml-dtd-4.1.2 )
62 introspection? ( >=dev-libs/gobject-introspection-0.6.7 )
63 test? (
64 media-fonts/font-misc-misc
65 media-fonts/font-cursor-misc )"
66 PDEPEND="vim-syntax? ( app-vim/gtk-syntax )"
67
68 set_gtk2_confdir() {
69 # An arch specific config directory is used on multilib systems
70 has_multilib_profile && GTK2_CONFDIR="/etc/gtk-2.0/${CHOST}"
71 GTK2_CONFDIR=${GTK2_CONFDIR:=/etc/gtk-2.0}
72 }
73
74 src_prepare() {
75 # use an arch-specific config directory so that 32bit and 64bit versions
76 # dont clash on multilib systems
77 has_multilib_profile && epatch "${FILESDIR}/${PN}-2.8.0-multilib.patch"
78
79 # Don't break inclusion of gtkclist.h, upstream bug 536767
80 epatch "${FILESDIR}/${PN}-2.14.3-limit-gtksignal-includes.patch"
81
82 # Fix for missing NSUInteger on Darwin8 (10.4)
83 [[ ${CHOST} == *-darwin8 ]] && epatch "${FILESDIR}"/${P}-darwin8.patch
84
85 # Remove the definition of libpixbufloader_gdip_png_la_*
86 epatch "${FILESDIR}/${P}-libpixbufloader-warning.patch"
87
88 # Redraw if GtkRange is a GtkScale and value is drawn.
89 epatch "${FILESDIR}/${P}-gtkrange.patch"
90
91 # Fix upstream "table cells do not implement action interface"
92 epatch "${FILESDIR}/${P}-gail_cell_type.patch"
93
94 # Upstream bg 608218: GtkOffscreenWindow causes bad window with GtkEntry
95 epatch "${FILESDIR}/${P}-GtkOffscreenWindow.patch"
96
97 # fix a 64-bit crasher in libpng 1.4 (upstream bug #617878)
98 epatch "${FILESDIR}/${P}-libpng-fix.patch"
99
100 # -O3 and company cause random crashes in applications. Bug #133469
101 replace-flags -O3 -O2
102 strip-flags
103
104 use ppc64 && append-flags -mminimal-toc
105
106 # Non-working test in gentoo's env
107 sed 's:\(g_test_add_func ("/ui-tests/keys-events.*\):/*\1*/:g' \
108 -i gtk/tests/testing.c || die "sed 1 failed"
109 sed '\%/recent-manager/add%,/recent_manager_purge/ d' \
110 -i gtk/tests/recentmanager.c || die "sed 2 failed"
111
112 if use x86-interix; then
113 # activate the itx-bind package...
114 append-flags "-I${EPREFIX}/usr/include/bind"
115 append-ldflags "-L${EPREFIX}/usr/lib/bind"
116 fi
117
118 elibtoolize
119 }
120
121 src_configure() {
122 # png always on to display icons (foser)
123 local myconf="$(use_enable doc gtk-doc)
124 $(use_with jpeg libjpeg)
125 $(use_with jpeg2k libjasper)
126 $(use_with tiff libtiff)
127 $(use_enable xinerama)
128 $(use_enable cups cups auto)
129 $(use_enable introspection)
130 --disable-papi
131 --with-libpng"
132 if use aqua; then
133 myconf="${myconf} --with-gdktarget=quartz"
134 else
135 myconf="${myconf} --with-gdktarget=x11 --with-xinput"
136 fi
137
138 # Passing --disable-debug is not recommended for production use
139 use debug && myconf="${myconf} --enable-debug=yes"
140
141 # need libdir here to avoid a double slash in a path that libtool doesn't
142 # grok so well during install (// between $EPREFIX and usr ...)
143 econf --libdir="${EPREFIX}/usr/$(get_libdir)" ${myconf}
144 }
145
146 src_test() {
147 unset DBUS_SESSION_BUS_ADDRESS
148 Xemake check || die "tests failed"
149 }
150
151 src_install() {
152 emake DESTDIR="${D}" install || die "Installation failed"
153
154 set_gtk2_confdir
155 dodir ${GTK2_CONFDIR}
156 keepdir ${GTK2_CONFDIR}
157
158 # see bug #133241
159 echo 'gtk-fallback-icon-theme = "gnome"' > "${T}/gtkrc"
160 insinto ${GTK2_CONFDIR}
161 doins "${T}"/gtkrc
162
163 # Enable xft in environment as suggested by <utx@gentoo.org>
164 echo "GDK_USE_XFT=1" > "${T}"/50gtk2
165 doenvd "${T}"/50gtk2
166
167 dodoc AUTHORS ChangeLog* HACKING NEWS* README* || die "dodoc failed"
168
169 # This has to be removed, because it's multilib specific; generated in
170 # postinst
171 rm "${ED%/}/etc/gtk-2.0/gtk.immodules"
172
173 # add -framework Carbon to the .pc files
174 use aqua && for i in gtk+-2.0.pc gtk+-quartz-2.0.pc gtk+-unix-print-2.0.pc; do
175 sed -i -e "s:Libs\: :Libs\: -framework Carbon :" "${ED%/}"/usr/lib/pkgconfig/$i || die "sed failed"
176 done
177 }
178
179 pkg_postinst() {
180 set_gtk2_confdir
181
182 if [ -d "${EROOT%/}${GTK2_CONFDIR}" ]; then
183 gtk-query-immodules-2.0 > "${EROOT%/}${GTK2_CONFDIR}/gtk.immodules"
184 gdk-pixbuf-query-loaders > "${EROOT%/}${GTK2_CONFDIR}/gdk-pixbuf.loaders"
185 else
186 ewarn "The destination path ${EROOT%/}${GTK2_CONFDIR} doesn't exist;"
187 ewarn "to complete the installation of GTK+, please create the"
188 ewarn "directory and then manually run:"
189 ewarn " cd ${EROOT%/}${GTK2_CONFDIR}"
190 ewarn " gtk-query-immodules-2.0 > gtk.immodules"
191 ewarn " gdk-pixbuf-query-loaders > gdk-pixbuf.loaders"
192 fi
193
194 if [ -e "${EROOT%/}"/usr/lib/gtk-2.0/2.[^1]* ]; then
195 elog "You need to rebuild ebuilds that installed into" "${EROOT%/}"/usr/lib/gtk-2.0/2.[^1]*
196 elog "to do that you can use qfile from portage-utils:"
197 elog "emerge -va1 \$(qfile -qC ${EPREFIX}/usr/lib/gtk-2.0/2.[^1]*)"
198 fi
199
200 elog "Please install app-text/evince for print preview functionality."
201 elog "Alternatively, check \"gtk-print-preview-command\" documentation and"
202 elog "add it to your gtkrc."
203 }

  ViewVC Help
Powered by ViewVC 1.1.20