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

Contents of /x11-libs/cairo/cairo-1.12.16-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Jun 10 01:03:13 2014 UTC (3 months, 1 week ago) by vapier
Branch: MAIN
Changes since 1.2: +2 -3 lines
Add arm64/m68k love.

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

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-1.12.16-r3.ebuild,v 1.2 2014/05/04 17:51:45 tetromino Exp $
4
5 EAPI=5
6
7 inherit check-reqs 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 else
14 SRC_URI="http://cairographics.org/releases/${P}.tar.xz"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~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"
16 fi
17
18 DESCRIPTION="A vector graphics library with cross-device output support"
19 HOMEPAGE="http://cairographics.org/"
20 LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
21 SLOT="0"
22 IUSE="X aqua debug directfb drm gallium gles2 +glib legacy-drivers lto opengl openvg qt4 static-libs +svg valgrind xcb xlib-xcb"
23 # gtk-doc regeneration doesn't seem to work with out-of-source builds
24 #[[ ${PV} == *9999* ]] && IUSE="${IUSE} doc" # API docs are provided in tarball, no need to regenerate
25
26 # Test causes a circular depend on gtk+... since gtk+ needs cairo but test needs gtk+ so we need to block it
27 RESTRICT="test"
28
29 RDEPEND="dev-libs/lzo[${MULTILIB_USEDEP}]
30 media-libs/fontconfig[${MULTILIB_USEDEP}]
31 media-libs/freetype:2[${MULTILIB_USEDEP}]
32 media-libs/libpng:0=[${MULTILIB_USEDEP}]
33 sys-libs/zlib[${MULTILIB_USEDEP}]
34 >=x11-libs/pixman-0.28.0[${MULTILIB_USEDEP}]
35 directfb? ( dev-libs/DirectFB )
36 gles2? ( media-libs/mesa[gles2,${MULTILIB_USEDEP}] )
37 glib? ( >=dev-libs/glib-2.28.6:2[${MULTILIB_USEDEP}] )
38 opengl? ( || ( media-libs/mesa[egl,${MULTILIB_USEDEP}] media-libs/opengl-apple ) )
39 openvg? ( media-libs/mesa[openvg,${MULTILIB_USEDEP}] )
40 qt4? ( >=dev-qt/qtgui-4.8:4 )
41 X? (
42 >=x11-libs/libXrender-0.6[${MULTILIB_USEDEP}]
43 x11-libs/libXext[${MULTILIB_USEDEP}]
44 x11-libs/libX11[${MULTILIB_USEDEP}]
45 drm? (
46 >=virtual/udev-136[${MULTILIB_USEDEP}]
47 gallium? ( media-libs/mesa[gallium,${MULTILIB_USEDEP}] )
48 )
49 )
50 xcb? (
51 x11-libs/libxcb[${MULTILIB_USEDEP}]
52 )
53 abi_x86_32? (
54 !<=app-emulation/emul-linux-x86-gtklibs-20131008-r1
55 !app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)]
56 )"
57 DEPEND="${RDEPEND}
58 virtual/pkgconfig
59 >=sys-devel/libtool-2
60 X? (
61 x11-proto/renderproto[${MULTILIB_USEDEP}]
62 drm? (
63 x11-proto/xproto[${MULTILIB_USEDEP}]
64 >=x11-proto/xextproto-7.1[${MULTILIB_USEDEP}]
65 )
66 )"
67 #[[ ${PV} == *9999* ]] && DEPEND="${DEPEND}
68 # doc? (
69 # >=dev-util/gtk-doc-1.6
70 # ~app-text/docbook-xml-dtd-4.2
71 # )"
72
73 # drm module requires X
74 # for gallium we need to enable drm
75 REQUIRED_USE="
76 drm? ( X )
77 gallium? ( drm )
78 gles2? ( !opengl )
79 openvg? ( || ( gles2 opengl ) )
80 xlib-xcb? ( xcb )
81 "
82
83 MULTILIB_WRAPPED_HEADERS=(
84 /usr/include/cairo/cairo-features.h
85 /usr/include/cairo/cairo-directfb.h
86 )
87
88 CHECKREQS_MEMORY="768M"
89
90 pkg_pretend() {
91 if [[ ${MERGE_TYPE} != "binary" ]] && use lto; then
92 einfo "Checking for sufficient memory to build $PN with USE=lto"
93 check-reqs_pkg_pretend
94 fi
95 }
96
97 pkg_setup() {
98 if [[ ${MERGE_TYPE} != "binary" ]] && use lto; then
99 check-reqs_pkg_setup
100 fi
101 }
102
103 src_prepare() {
104 epatch "${FILESDIR}"/${PN}-1.8.8-interix.patch
105 use legacy-drivers && epatch "${FILESDIR}"/${PN}-1.10.0-buggy_gradients.patch
106 epatch "${FILESDIR}"/${PN}-respect-fontconfig.patch
107
108 # all-clipped handling from 1.13
109 epatch "${FILESDIR}"/${PN}-1.12.16-all-clipped-{1,2}.patch
110 # bug #507478, https://bugs.freedesktop.org/show_bug.cgi?id=77931
111 epatch "${FILESDIR}"/${PN}-1.12.16-all-clipped-3.patch
112
113 # allow the automagically injected -flto flag to be not injected
114 epatch "${FILESDIR}"/${PN}-1.12.16-lto-optional.patch
115
116 # tests and perf tools require X, bug #483574
117 if ! use X; then
118 sed -e '/^SUBDIRS/ s#boilerplate test perf# #' -i Makefile.am || die
119 fi
120
121 epatch_user
122
123 # Slightly messed build system YAY
124 if [[ ${PV} == *9999* ]]; then
125 touch boilerplate/Makefile.am.features
126 touch src/Makefile.am.features
127 touch ChangeLog
128 fi
129
130 # We need to run elibtoolize to ensure correct so versioning on FreeBSD
131 # upgraded to an eautoreconf for the above interix patch.
132 eautoreconf
133 }
134
135 multilib_src_configure() {
136 local myopts
137
138 [[ ${CHOST} == *-interix* ]] && append-flags -D_REENTRANT
139
140 use elibc_FreeBSD && myopts+=" --disable-symbol-lookup"
141
142 # TODO: remove this (and add USE-dep) when DirectFB is converted,
143 # bug #484248 -- but beware of the circular dep.
144 if ! multilib_is_native_abi; then
145 myopts+=" --disable-directfb"
146 fi
147
148 # TODO: remove this (and add USE-dep) when qtgui is converted, bug #498010
149 if ! multilib_is_native_abi; then
150 myopts+=" --disable-qt"
151 fi
152
153 # [[ ${PV} == *9999* ]] && myopts+=" $(use_enable doc gtk-doc)"
154
155 ECONF_SOURCE="${S}" \
156 econf \
157 --disable-dependency-tracking \
158 $(use_with X x) \
159 $(use_enable X tee) \
160 $(use_enable X xlib) \
161 $(use_enable X xlib-xrender) \
162 $(use_enable aqua quartz) \
163 $(use_enable aqua quartz-image) \
164 $(use_enable debug test-surfaces) \
165 $(use_enable drm) \
166 $(use_enable directfb) \
167 $(use_enable gallium) \
168 $(use_enable gles2 glesv2) \
169 $(use_enable glib gobject) \
170 $(use_enable lto) \
171 $(use_enable openvg vg) \
172 $(use_enable opengl gl) \
173 $(use_enable qt4 qt) \
174 $(use_enable static-libs static) \
175 $(use_enable svg) \
176 $(use_enable valgrind) \
177 $(use_enable xcb) \
178 $(use_enable xcb xcb-shm) \
179 $(use_enable xlib-xcb) \
180 --enable-ft \
181 --enable-pdf \
182 --enable-png \
183 --enable-ps \
184 ${myopts}
185 }
186
187 multilib_src_install() {
188 # parallel make install fails
189 emake -j1 DESTDIR="${D}" install
190 }
191
192 multilib_src_install_all() {
193 prune_libtool_files --all
194 einstalldocs
195 }
196
197 pkg_postinst() {
198 if use !xlib-xcb; then
199 if has_version net-misc/nxserver-freenx \
200 || has_version net-misc/x2goserver; then
201 ewarn "cairo-1.12 is known to cause GTK+ errors with NX servers."
202 ewarn "Enable USE=\"xlib-xcb\" if you notice incorrect behavior in GTK+"
203 ewarn "applications that are running inside NX sessions. For details, see"
204 ewarn "https://bugs.gentoo.org/441878 or https://bugs.freedesktop.org/59173"
205 fi
206 fi
207 }

  ViewVC Help
Powered by ViewVC 1.1.20