/[gentoo-x86]/x11-libs/cairo/cairo-9999.ebuild
Gentoo

Contents of /x11-libs/cairo/cairo-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.37 - (show annotations) (download)
Fri Feb 28 20:42:55 2014 UTC (6 weeks, 4 days ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.36: +37 -27 lines
Introduce multilib support, bug #488672.

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/x11-libs/cairo/cairo-9999.ebuild,v 1.36 2013/08/21 15:41:17 chithanh Exp $
4
5 EAPI=5
6
7 inherit eutils flag-o-matic autotools multilib-minimal
8
9 if [[ ${PV} == *9999* ]]; then
10 inherit git-2
11 EGIT_REPO_URI="git://anongit.freedesktop.org/git/cairo"
12 SRC_URI=""
13 KEYWORDS=""
14 else
15 SRC_URI="http://cairographics.org/releases/${P}.tar.xz"
16 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
17 fi
18
19 DESCRIPTION="A vector graphics library with cross-device output support"
20 HOMEPAGE="http://cairographics.org/"
21 LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
22 SLOT="0"
23 IUSE="X aqua debug directfb doc drm gallium gles2 +glib legacy-drivers opengl openvg qt4 static-libs +svg valgrind xcb xlib-xcb"
24
25 # Test causes a circular depend on gtk+... since gtk+ needs cairo but test needs gtk+ so we need to block it
26 RESTRICT="test"
27
28 RDEPEND="dev-libs/lzo[${MULTILIB_USEDEP}]
29 media-libs/fontconfig[${MULTILIB_USEDEP}]
30 media-libs/freetype:2[${MULTILIB_USEDEP}]
31 media-libs/libpng:0=[${MULTILIB_USEDEP}]
32 sys-libs/zlib[${MULTILIB_USEDEP}]
33 >=x11-libs/pixman-0.28.0[${MULTILIB_USEDEP}]
34 directfb? ( dev-libs/DirectFB )
35 gles2? ( media-libs/mesa[gles2,${MULTILIB_USEDEP}] )
36 glib? ( >=dev-libs/glib-2.28.6:2[${MULTILIB_USEDEP}] )
37 opengl? ( || ( media-libs/mesa[egl,${MULTILIB_USEDEP}] media-libs/opengl-apple ) )
38 openvg? ( media-libs/mesa[openvg,${MULTILIB_USEDEP}] )
39 qt4? ( >=dev-qt/qtgui-4.8:4[${MULTILIB_USEDEP}] )
40 X? (
41 >=x11-libs/libXrender-0.6[${MULTILIB_USEDEP}]
42 x11-libs/libXext[${MULTILIB_USEDEP}]
43 x11-libs/libX11[${MULTILIB_USEDEP}]
44 drm? (
45 >=virtual/udev-136[${MULTILIB_USEDEP}]
46 gallium? ( media-libs/mesa[gallium,${MULTILIB_USEDEP}] )
47 )
48 )
49 xcb? (
50 x11-libs/libxcb[${MULTILIB_USEDEP}]
51 )"
52 DEPEND="${RDEPEND}
53 virtual/pkgconfig
54 >=sys-devel/libtool-2
55 doc? (
56 >=dev-util/gtk-doc-1.6
57 ~app-text/docbook-xml-dtd-4.2
58 )
59 X? (
60 x11-proto/renderproto[${MULTILIB_USEDEP}]
61 drm? (
62 x11-proto/xproto[${MULTILIB_USEDEP}]
63 >=x11-proto/xextproto-7.1[${MULTILIB_USEDEP}]
64 )
65 )"
66
67 # drm module requires X
68 # for gallium we need to enable drm
69 REQUIRED_USE="
70 drm? ( X )
71 gallium? ( drm )
72 gles2? ( !opengl )
73 openvg? ( || ( gles2 opengl ) )
74 xlib-xcb? ( xcb )
75 "
76
77 src_prepare() {
78 epatch "${FILESDIR}"/${PN}-1.8.8-interix.patch
79 use legacy-drivers && epatch "${FILESDIR}"/${PN}-1.10.0-buggy_gradients.patch
80 epatch "${FILESDIR}"/${PN}-respect-fontconfig.patch
81 epatch_user
82
83 # Slightly messed build system YAY
84 if [[ ${PV} == *9999* ]]; then
85 touch boilerplate/Makefile.am.features
86 touch src/Makefile.am.features
87 touch ChangeLog
88 fi
89
90 # We need to run elibtoolize to ensure correct so versioning on FreeBSD
91 # upgraded to an eautoreconf for the above interix patch.
92 eautoreconf
93 }
94
95 multilib_src_configure() {
96 local myopts
97
98 [[ ${CHOST} == *-interix* ]] && append-flags -D_REENTRANT
99
100 use elibc_FreeBSD && myopts+=" --disable-symbol-lookup"
101
102 # TODO: remove this (and add USE-dep) when DirectFB is converted,
103 # bug #484248 -- but beware of the circular dep.
104 if ! multilib_build_binaries; then
105 myopts+=" --disable-directfb"
106 fi
107
108 ECONF_SOURCE="${S}" \
109 econf \
110 --disable-dependency-tracking \
111 $(use_with X x) \
112 $(use_enable X tee) \
113 $(use_enable X xlib) \
114 $(use_enable X xlib-xrender) \
115 $(use_enable aqua quartz) \
116 $(use_enable aqua quartz-image) \
117 $(use_enable debug test-surfaces) \
118 $(use_enable drm) \
119 $(use_enable directfb) \
120 $(use_enable gallium) \
121 $(use_enable gles2 glesv2) \
122 $(use_enable glib gobject) \
123 $(use_enable doc gtk-doc) \
124 $(use_enable openvg vg) \
125 $(use_enable opengl gl) \
126 $(use_enable qt4 qt) \
127 $(use_enable static-libs static) \
128 $(use_enable svg) \
129 $(use_enable valgrind) \
130 $(use_enable xcb) \
131 $(use_enable xcb xcb-shm) \
132 $(use_enable xlib-xcb) \
133 --enable-ft \
134 --enable-pdf \
135 --enable-png \
136 --enable-ps \
137 ${myopts}
138 }
139
140 multilib_src_install() {
141 # parallel make install fails
142 emake -j1 DESTDIR="${D}" install
143 }
144
145 multilib_src_install_all() {
146 prune_libtool_files --all
147 einstalldocs
148 }
149
150 pkg_postinst() {
151 if use !xlib-xcb; then
152 if has_version net-misc/nxserver-freenx \
153 || has_version net-misc/x2goserver; then
154 ewarn "cairo-1.12 is known to cause GTK+ errors with NX servers."
155 ewarn "Enable USE=\"xlib-xcb\" if you notice incorrect behavior in GTK+"
156 ewarn "applications that are running inside NX sessions. For details, see"
157 ewarn "https://bugs.gentoo.org/441878 or https://bugs.freedesktop.org/59173"
158 fi
159 fi
160 }

  ViewVC Help
Powered by ViewVC 1.1.20