/[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.47 - (hide annotations) (download)
Tue Jun 24 22:19:45 2014 UTC (4 weeks, 3 days ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.46: +2 -2 lines
Lower dev-libs/glib dep to first known EAPI=5 version, requested by Funtoo for GNOME 3.6.

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

1 mgorny 1.37 # Copyright 1999-2014 Gentoo Foundation
2 scarabeus 1.1 # Distributed under the terms of the GNU General Public License v2
3 mgorny 1.47 # $Header: /var/cvsroot/gentoo-x86/x11-libs/cairo/cairo-9999.ebuild,v 1.46 2014/06/18 21:00:27 mgorny Exp $
4 scarabeus 1.1
5 chithanh 1.26 EAPI=5
6 scarabeus 1.1
7 tetromino 1.42 inherit check-reqs eutils flag-o-matic autotools multilib-minimal
8 scarabeus 1.1
9 cardoe 1.20 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 vapier 1.45 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 cardoe 1.20 fi
17 scarabeus 1.1
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 tetromino 1.43 IUSE="X aqua debug directfb drm gallium gles2 +glib legacy-drivers lto opengl openvg qt4 static-libs +svg valgrind xcb xlib-xcb"
23 tetromino 1.38 # 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 scarabeus 1.1
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 mgorny 1.46 RDEPEND=">=dev-libs/lzo-2.06-r1[${MULTILIB_USEDEP}]
30     >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}]
31     >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}]
32     >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}]
33     >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
34     >=x11-libs/pixman-0.32.4[${MULTILIB_USEDEP}]
35 scarabeus 1.1 directfb? ( dev-libs/DirectFB )
36 mgorny 1.46 gles2? ( >=media-libs/mesa-9.1.6[gles2,${MULTILIB_USEDEP}] )
37 mgorny 1.47 glib? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] )
38 mgorny 1.46 opengl? ( || ( >=media-libs/mesa-9.1.6[egl,${MULTILIB_USEDEP}] media-libs/opengl-apple ) )
39     openvg? ( >=media-libs/mesa-9.1.6[openvg,${MULTILIB_USEDEP}] )
40 tetromino 1.38 qt4? ( >=dev-qt/qtgui-4.8:4 )
41 scarabeus 1.1 X? (
42 mgorny 1.46 >=x11-libs/libXrender-0.9.8[${MULTILIB_USEDEP}]
43     >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
44     >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
45 scarabeus 1.1 drm? (
46 mgorny 1.46 >=virtual/udev-208-r2[${MULTILIB_USEDEP}]
47     gallium? ( >=media-libs/mesa-9.1.6[gallium,${MULTILIB_USEDEP}] )
48 scarabeus 1.1 )
49     )
50     xcb? (
51 mgorny 1.46 >=x11-libs/libxcb-1.9.1[${MULTILIB_USEDEP}]
52 tetromino 1.38 )
53     abi_x86_32? (
54     !<=app-emulation/emul-linux-x86-gtklibs-20131008-r1
55     !app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)]
56 scarabeus 1.1 )"
57     DEPEND="${RDEPEND}
58 jdhore 1.19 virtual/pkgconfig
59 scarabeus 1.1 >=sys-devel/libtool-2
60     X? (
61 mgorny 1.46 >=x11-proto/renderproto-0.11.1-r1[${MULTILIB_USEDEP}]
62 scarabeus 1.1 drm? (
63 mgorny 1.46 >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
64     >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
65 scarabeus 1.1 )
66     )"
67 tetromino 1.38 #[[ ${PV} == *9999* ]] && DEPEND="${DEPEND}
68     # doc? (
69     # >=dev-util/gtk-doc-1.6
70     # ~app-text/docbook-xml-dtd-4.2
71     # )"
72 scarabeus 1.1
73 scarabeus 1.11 # drm module requires X
74     # for gallium we need to enable drm
75     REQUIRED_USE="
76     drm? ( X )
77     gallium? ( drm )
78 chithanh 1.33 gles2? ( !opengl )
79 jlec 1.34 openvg? ( || ( gles2 opengl ) )
80 chithanh 1.33 xlib-xcb? ( xcb )
81 scarabeus 1.11 "
82    
83 tetromino 1.38 MULTILIB_WRAPPED_HEADERS=(
84     /usr/include/cairo/cairo-features.h
85     /usr/include/cairo/cairo-directfb.h
86     )
87    
88 tetromino 1.42 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 scarabeus 1.1 src_prepare() {
104 chithanh 1.33 epatch "${FILESDIR}"/${PN}-1.8.8-interix.patch
105     use legacy-drivers && epatch "${FILESDIR}"/${PN}-1.10.0-buggy_gradients.patch
106 yngwin 1.21 epatch "${FILESDIR}"/${PN}-respect-fontconfig.patch
107 tetromino 1.42
108     # allow the automagically injected -flto flag to be not injected
109     epatch "${FILESDIR}"/${PN}-1.12.16-lto-optional.patch
110    
111     # tests and perf tools require X, bug #483574
112     if ! use X; then
113     sed -e '/^SUBDIRS/ s#boilerplate test perf# #' -i Makefile.am || die
114     fi
115    
116 yngwin 1.21 epatch_user
117 scarabeus 1.1
118     # Slightly messed build system YAY
119     if [[ ${PV} == *9999* ]]; then
120     touch boilerplate/Makefile.am.features
121     touch src/Makefile.am.features
122     touch ChangeLog
123     fi
124    
125     # We need to run elibtoolize to ensure correct so versioning on FreeBSD
126     # upgraded to an eautoreconf for the above interix patch.
127     eautoreconf
128     }
129    
130 mgorny 1.37 multilib_src_configure() {
131 scarabeus 1.1 local myopts
132    
133     [[ ${CHOST} == *-interix* ]] && append-flags -D_REENTRANT
134    
135 cardoe 1.20 use elibc_FreeBSD && myopts+=" --disable-symbol-lookup"
136    
137 mgorny 1.37 # TODO: remove this (and add USE-dep) when DirectFB is converted,
138     # bug #484248 -- but beware of the circular dep.
139 tommy 1.41 if ! multilib_is_native_abi; then
140 mgorny 1.37 myopts+=" --disable-directfb"
141     fi
142    
143 tetromino 1.38 # TODO: remove this (and add USE-dep) when qtgui is converted, bug #498010
144 tommy 1.41 if ! multilib_is_native_abi; then
145 tetromino 1.38 myopts+=" --disable-qt"
146     fi
147    
148     # [[ ${PV} == *9999* ]] && myopts+=" $(use_enable doc gtk-doc)"
149    
150 mgorny 1.37 ECONF_SOURCE="${S}" \
151 scarabeus 1.1 econf \
152     --disable-dependency-tracking \
153     $(use_with X x) \
154 chithanh 1.33 $(use_enable X tee) \
155 scarabeus 1.1 $(use_enable X xlib) \
156     $(use_enable X xlib-xrender) \
157     $(use_enable aqua quartz) \
158     $(use_enable aqua quartz-image) \
159     $(use_enable debug test-surfaces) \
160 chithanh 1.33 $(use_enable drm) \
161 scarabeus 1.1 $(use_enable directfb) \
162 chithanh 1.33 $(use_enable gallium) \
163     $(use_enable gles2 glesv2) \
164 scarabeus 1.12 $(use_enable glib gobject) \
165 tetromino 1.42 $(use_enable lto) \
166 scarabeus 1.1 $(use_enable openvg vg) \
167     $(use_enable opengl gl) \
168 cardoe 1.6 $(use_enable qt4 qt) \
169 scarabeus 1.1 $(use_enable static-libs static) \
170     $(use_enable svg) \
171 chithanh 1.33 $(use_enable valgrind) \
172 scarabeus 1.1 $(use_enable xcb) \
173     $(use_enable xcb xcb-shm) \
174 chithanh 1.33 $(use_enable xlib-xcb) \
175 scarabeus 1.1 --enable-ft \
176     --enable-pdf \
177     --enable-png \
178     --enable-ps \
179     ${myopts}
180     }
181    
182 mgorny 1.37 multilib_src_install() {
183 scarabeus 1.1 # parallel make install fails
184 scarabeus 1.11 emake -j1 DESTDIR="${D}" install
185 mgorny 1.37 }
186    
187     multilib_src_install_all() {
188     prune_libtool_files --all
189     einstalldocs
190 scarabeus 1.1 }
191 chithanh 1.36
192     pkg_postinst() {
193     if use !xlib-xcb; then
194     if has_version net-misc/nxserver-freenx \
195     || has_version net-misc/x2goserver; then
196     ewarn "cairo-1.12 is known to cause GTK+ errors with NX servers."
197     ewarn "Enable USE=\"xlib-xcb\" if you notice incorrect behavior in GTK+"
198     ewarn "applications that are running inside NX sessions. For details, see"
199     ewarn "https://bugs.gentoo.org/441878 or https://bugs.freedesktop.org/59173"
200     fi
201     fi
202     }

  ViewVC Help
Powered by ViewVC 1.1.20