| 1 |
# Copyright 1999-2011 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.9 2011/01/11 18:58:37 scarabeus Exp $ |
| 4 |
|
| 5 |
EAPI=3 |
| 6 |
|
| 7 |
EGIT_REPO_URI="git://anongit.freedesktop.org/git/cairo" |
| 8 |
[[ ${PV} == *9999 ]] && GIT_ECLASS="git" |
| 9 |
|
| 10 |
inherit eutils flag-o-matic autotools ${GIT_ECLASS} |
| 11 |
|
| 12 |
DESCRIPTION="A vector graphics library with cross-device output support" |
| 13 |
HOMEPAGE="http://cairographics.org/" |
| 14 |
[[ ${PV} == *9999 ]] || SRC_URI="http://cairographics.org/releases/${P}.tar.gz" |
| 15 |
|
| 16 |
LICENSE="|| ( LGPL-2.1 MPL-1.1 )" |
| 17 |
SLOT="0" |
| 18 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
| 19 |
IUSE="X aqua debug directfb doc drm gallium opengl openvg qt4 static-libs +svg xcb" |
| 20 |
|
| 21 |
# Test causes a circular depend on gtk+... since gtk+ needs cairo but test needs gtk+ so we need to block it |
| 22 |
RESTRICT="test" |
| 23 |
|
| 24 |
RDEPEND="media-libs/fontconfig |
| 25 |
media-libs/freetype:2 |
| 26 |
media-libs/libpng:0 |
| 27 |
sys-libs/zlib |
| 28 |
>=x11-libs/pixman-0.18.4 |
| 29 |
directfb? ( dev-libs/DirectFB ) |
| 30 |
opengl? ( virtual/opengl ) |
| 31 |
openvg? ( media-libs/mesa[gallium] ) |
| 32 |
qt4? ( >=x11-libs/qt-gui-4.4:4 ) |
| 33 |
svg? ( dev-libs/libxml2 ) |
| 34 |
X? ( |
| 35 |
>=x11-libs/libXrender-0.6 |
| 36 |
x11-libs/libXext |
| 37 |
x11-libs/libX11 |
| 38 |
x11-libs/libXft |
| 39 |
drm? ( |
| 40 |
>=sys-fs/udev-136 |
| 41 |
gallium? ( media-libs/mesa[gallium] ) |
| 42 |
) |
| 43 |
) |
| 44 |
xcb? ( |
| 45 |
x11-libs/libxcb |
| 46 |
x11-libs/xcb-util |
| 47 |
)" |
| 48 |
DEPEND="${RDEPEND} |
| 49 |
dev-util/pkgconfig |
| 50 |
>=sys-devel/libtool-2 |
| 51 |
doc? ( |
| 52 |
>=dev-util/gtk-doc-1.6 |
| 53 |
~app-text/docbook-xml-dtd-4.2 |
| 54 |
) |
| 55 |
X? ( |
| 56 |
x11-proto/renderproto |
| 57 |
drm? ( |
| 58 |
x11-proto/xproto |
| 59 |
>=x11-proto/xextproto-7.1 |
| 60 |
) |
| 61 |
)" |
| 62 |
|
| 63 |
src_prepare() { |
| 64 |
epatch "${FILESDIR}"/${PN}-1.8.8-interix.patch |
| 65 |
|
| 66 |
# Slightly messed build system YAY |
| 67 |
if [[ ${PV} == *9999* ]]; then |
| 68 |
touch boilerplate/Makefile.am.features |
| 69 |
touch src/Makefile.am.features |
| 70 |
touch ChangeLog |
| 71 |
fi |
| 72 |
|
| 73 |
# We need to run elibtoolize to ensure correct so versioning on FreeBSD |
| 74 |
# upgraded to an eautoreconf for the above interix patch. |
| 75 |
eautoreconf |
| 76 |
} |
| 77 |
|
| 78 |
src_configure() { |
| 79 |
local myopts |
| 80 |
|
| 81 |
[[ ${CHOST} == *-interix* ]] && append-flags -D_REENTRANT |
| 82 |
# http://bugs.freedesktop.org/show_bug.cgi?id=15463 |
| 83 |
[[ ${CHOST} == *-solaris* ]] && append-flags -D_POSIX_PTHREAD_SEMANTICS |
| 84 |
|
| 85 |
#gets rid of fbmmx.c inlining warnings |
| 86 |
append-flags -finline-limit=1200 |
| 87 |
|
| 88 |
if use X; then |
| 89 |
myopts+=" |
| 90 |
--enable-tee=yes |
| 91 |
$(use_enable drm) |
| 92 |
" |
| 93 |
|
| 94 |
if use drm; then |
| 95 |
myopts+=" |
| 96 |
$(use_enable gallium) |
| 97 |
$(use_enable xcb xcb-drm) |
| 98 |
" |
| 99 |
else |
| 100 |
use gallium && ewarn "Gallium use requires drm use enabled. So disabling for now." |
| 101 |
myopts+=" |
| 102 |
--disable-gallium |
| 103 |
--disable-xcb-drm |
| 104 |
" |
| 105 |
fi |
| 106 |
else |
| 107 |
use drm && ewarn "drm use requires X use enabled. So disabling for now." |
| 108 |
myopts+=" |
| 109 |
--disable-drm |
| 110 |
--disable-gallium |
| 111 |
--disable-xcb-drm |
| 112 |
" |
| 113 |
fi |
| 114 |
|
| 115 |
# --disable-xcb-lib: |
| 116 |
# do not override good xlib backed by hardforcing rendering over xcb |
| 117 |
econf \ |
| 118 |
--disable-dependency-tracking \ |
| 119 |
$(use_with X x) \ |
| 120 |
$(use_enable X xlib) \ |
| 121 |
$(use_enable X xlib-xrender) \ |
| 122 |
$(use_enable aqua quartz) \ |
| 123 |
$(use_enable aqua quartz-image) \ |
| 124 |
$(use_enable debug test-surfaces) \ |
| 125 |
$(use_enable directfb) \ |
| 126 |
$(use_enable doc gtk-doc) \ |
| 127 |
$(use_enable openvg vg) \ |
| 128 |
$(use_enable opengl gl) \ |
| 129 |
$(use_enable qt4 qt) \ |
| 130 |
$(use_enable static-libs static) \ |
| 131 |
$(use_enable svg) \ |
| 132 |
$(use_enable xcb) \ |
| 133 |
$(use_enable xcb xcb-shm) \ |
| 134 |
--enable-ft \ |
| 135 |
--enable-pdf \ |
| 136 |
--enable-png \ |
| 137 |
--enable-ps \ |
| 138 |
--disable-xlib-xcb \ |
| 139 |
${myopts} |
| 140 |
} |
| 141 |
|
| 142 |
src_install() { |
| 143 |
# parallel make install fails |
| 144 |
emake -j1 DESTDIR="${D}" install || die |
| 145 |
find "${ED}" -name '*.la' -exec rm -f {} + |
| 146 |
dodoc AUTHORS ChangeLog NEWS README || die |
| 147 |
} |