| 1 |
spatz |
1.1 |
# Copyright 1999-2010 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
jer |
1.2 |
# $Header: /var/cvsroot/gentoo-x86/x11-libs/cairo/cairo-1.8.10.ebuild,v 1.1 2010/06/16 18:11:35 spatz Exp $
|
| 4 |
spatz |
1.1 |
|
| 5 |
|
|
EAPI=2
|
| 6 |
|
|
|
| 7 |
|
|
inherit eutils flag-o-matic autotools
|
| 8 |
|
|
|
| 9 |
|
|
DESCRIPTION="A vector graphics library with cross-device output support"
|
| 10 |
|
|
HOMEPAGE="http://cairographics.org/"
|
| 11 |
|
|
SRC_URI="http://cairographics.org/releases/${P}.tar.gz
|
| 12 |
|
|
mirror://gentoo/${PN}-1.8-lcd_filter.patch.bz2"
|
| 13 |
|
|
|
| 14 |
|
|
LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
|
| 15 |
|
|
SLOT="0"
|
| 16 |
jer |
1.2 |
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"
|
| 17 |
spatz |
1.1 |
IUSE="aqua cleartype debug directfb doc glitz lcdfilter opengl +svg X xcb"
|
| 18 |
|
|
|
| 19 |
|
|
# Test causes a circular depend on gtk+... since gtk+ needs cairo but test needs gtk+ so we need to block it
|
| 20 |
|
|
RESTRICT="test"
|
| 21 |
|
|
|
| 22 |
|
|
RDEPEND="media-libs/fontconfig
|
| 23 |
|
|
>=media-libs/freetype-2.1.9
|
| 24 |
|
|
sys-libs/zlib
|
| 25 |
|
|
>=media-libs/libpng-1.2.43-r2:0
|
| 26 |
|
|
>=x11-libs/pixman-0.12.0
|
| 27 |
|
|
directfb? ( >=dev-libs/DirectFB-0.9.24 )
|
| 28 |
|
|
glitz? ( >=media-libs/glitz-0.5.1 )
|
| 29 |
|
|
svg? ( dev-libs/libxml2 )
|
| 30 |
|
|
X? ( >=x11-libs/libXrender-0.6
|
| 31 |
|
|
x11-libs/libXext
|
| 32 |
|
|
x11-libs/libX11
|
| 33 |
|
|
x11-libs/libXft )
|
| 34 |
|
|
xcb? ( >=x11-libs/libxcb-0.92
|
| 35 |
|
|
x11-libs/xcb-util )"
|
| 36 |
|
|
# test? (
|
| 37 |
|
|
# pdf test
|
| 38 |
|
|
# x11-libs/pango
|
| 39 |
|
|
# >=x11-libs/gtk+-2.0
|
| 40 |
|
|
# >=app-text/poppler-bindings-0.9.2[gtk]
|
| 41 |
|
|
# ps test
|
| 42 |
|
|
# app-text/ghostscript-gpl
|
| 43 |
|
|
# svg test
|
| 44 |
|
|
# >=x11-libs/gtk+-2.0
|
| 45 |
|
|
# >=gnome-base/librsvg-2.15.0
|
| 46 |
|
|
|
| 47 |
|
|
DEPEND="${RDEPEND}
|
| 48 |
|
|
>=dev-util/pkgconfig-0.19
|
| 49 |
|
|
>=sys-devel/libtool-2
|
| 50 |
|
|
doc? ( >=dev-util/gtk-doc-1.6
|
| 51 |
|
|
~app-text/docbook-xml-dtd-4.2 )
|
| 52 |
|
|
X? ( x11-proto/renderproto )"
|
| 53 |
|
|
|
| 54 |
|
|
src_prepare() {
|
| 55 |
|
|
if use lcdfilter; then
|
| 56 |
|
|
# LCD filter patch from Ubuntu, taken from:
|
| 57 |
|
|
# http://bazaar.launchpad.net/%7Eubuntu-branches/ubuntu/lucid/cairo/lucid/files/head%3A/debian/patches/
|
| 58 |
|
|
epatch "${WORKDIR}"/${PN}-1.8-lcd_filter.patch
|
| 59 |
|
|
elif use cleartype; then
|
| 60 |
|
|
# ClearType-like patches applied by ArchLinux
|
| 61 |
|
|
epatch "${FILESDIR}"/${PN}-1.2.4-lcd-cleartype-like.diff
|
| 62 |
|
|
fi
|
| 63 |
|
|
|
| 64 |
|
|
epatch "${FILESDIR}"/${PN}-1.8.8-interix.patch \
|
| 65 |
|
|
"${FILESDIR}"/${P}-libpng14.patch
|
| 66 |
|
|
|
| 67 |
|
|
# We need to run elibtoolize to ensure correct so versioning on FreeBSD
|
| 68 |
|
|
# upgraded to an eautoreconf for the above interix patch.
|
| 69 |
|
|
eautoreconf
|
| 70 |
|
|
}
|
| 71 |
|
|
|
| 72 |
|
|
src_configure() {
|
| 73 |
|
|
[[ ${CHOST} == *-interix* ]] && append-flags -D_REENTRANT
|
| 74 |
|
|
# http://bugs.freedesktop.org/show_bug.cgi?id=15463
|
| 75 |
|
|
[[ ${CHOST} == *-solaris* ]] && append-flags -D_POSIX_PTHREAD_SEMANTICS
|
| 76 |
|
|
|
| 77 |
|
|
#gets rid of fbmmx.c inlining warnings
|
| 78 |
|
|
append-flags -finline-limit=1200
|
| 79 |
|
|
|
| 80 |
|
|
if use glitz && use opengl; then
|
| 81 |
|
|
export glitz_LIBS=$(pkg-config --libs glitz-glx)
|
| 82 |
|
|
fi
|
| 83 |
|
|
|
| 84 |
|
|
econf $(use_enable X xlib) $(use_enable doc gtk-doc) \
|
| 85 |
|
|
$(use_enable directfb) $(use_enable xcb) \
|
| 86 |
|
|
$(use_enable svg) $(use_enable glitz) $(use_enable X xlib-xrender) \
|
| 87 |
|
|
$(use_enable debug test-surfaces) --enable-pdf --enable-png \
|
| 88 |
|
|
--enable-ft --enable-ps \
|
| 89 |
|
|
$(use_enable aqua quartz) $(use_enable aqua quartz-image) \
|
| 90 |
|
|
|| die "configure failed"
|
| 91 |
|
|
}
|
| 92 |
|
|
|
| 93 |
|
|
src_install() {
|
| 94 |
|
|
make DESTDIR="${D}" install || die "Installation failed"
|
| 95 |
|
|
dodoc AUTHORS ChangeLog NEWS README
|
| 96 |
|
|
}
|
| 97 |
|
|
|
| 98 |
|
|
pkg_postinst() {
|
| 99 |
|
|
if use xcb; then
|
| 100 |
|
|
ewarn "You have enabled the Cairo XCB backend which is used only by"
|
| 101 |
|
|
ewarn "a select few apps. The Cairo XCB backend is presently"
|
| 102 |
|
|
ewarn "un-maintained and needs a lot of work to get it caught up"
|
| 103 |
|
|
ewarn "to the Xrender and Xlib backends, which are the backends used"
|
| 104 |
|
|
ewarn "by most applications. See:"
|
| 105 |
|
|
ewarn "http://lists.freedesktop.org/archives/xcb/2008-December/004139.html"
|
| 106 |
|
|
fi
|
| 107 |
|
|
}
|