| 1 |
yngwin |
1.1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
ago |
1.2 |
# $Header: /var/cvsroot/gentoo-x86/x11-libs/cairo/cairo-1.10.2-r3.ebuild,v 1.1 2012/07/25 08:44:33 yngwin Exp $
|
| 4 |
yngwin |
1.1 |
|
| 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 |
ago |
1.2 |
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~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 |
yngwin |
1.1 |
IUSE="X aqua debug directfb doc drm gallium +glib 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 |
|
|
glib? ( dev-libs/glib:2 )
|
| 31 |
|
|
opengl? ( || ( media-libs/mesa[egl] media-libs/opengl-apple ) )
|
| 32 |
|
|
openvg? ( media-libs/mesa[gallium] )
|
| 33 |
|
|
qt4? ( >=x11-libs/qt-gui-4.8:4 )
|
| 34 |
|
|
X? (
|
| 35 |
|
|
>=x11-libs/libXrender-0.6
|
| 36 |
|
|
x11-libs/libX11
|
| 37 |
|
|
drm? (
|
| 38 |
|
|
>=sys-fs/udev-136
|
| 39 |
|
|
gallium? ( media-libs/mesa[gallium] )
|
| 40 |
|
|
)
|
| 41 |
|
|
)
|
| 42 |
|
|
xcb? (
|
| 43 |
|
|
x11-libs/libxcb
|
| 44 |
|
|
x11-libs/xcb-util
|
| 45 |
|
|
)"
|
| 46 |
|
|
DEPEND="${RDEPEND}
|
| 47 |
|
|
virtual/pkgconfig
|
| 48 |
|
|
>=sys-devel/libtool-2
|
| 49 |
|
|
doc? (
|
| 50 |
|
|
>=dev-util/gtk-doc-1.6
|
| 51 |
|
|
~app-text/docbook-xml-dtd-4.2
|
| 52 |
|
|
)
|
| 53 |
|
|
X? (
|
| 54 |
|
|
x11-proto/renderproto
|
| 55 |
|
|
drm? (
|
| 56 |
|
|
x11-proto/xproto
|
| 57 |
|
|
>=x11-proto/xextproto-7.1
|
| 58 |
|
|
)
|
| 59 |
|
|
)"
|
| 60 |
|
|
|
| 61 |
|
|
src_prepare() {
|
| 62 |
|
|
epatch "${FILESDIR}"/${PN}-1.8.8-interix.patch
|
| 63 |
|
|
epatch "${FILESDIR}"/${PN}-1.10.0-buggy_gradients.patch
|
| 64 |
|
|
epatch "${FILESDIR}"/${P}-interix.patch
|
| 65 |
|
|
epatch "${FILESDIR}"/${P}-qt-surface.patch
|
| 66 |
|
|
epatch "${FILESDIR}"/${P}-export-symbols.patch
|
| 67 |
|
|
epatch "${FILESDIR}"/${P}-ubuntu.patch
|
| 68 |
|
|
epatch "${FILESDIR}"/${PN}-respect-fontconfig.patch
|
| 69 |
|
|
epatch_user
|
| 70 |
|
|
|
| 71 |
|
|
# Slightly messed build system YAY
|
| 72 |
|
|
if [[ ${PV} == *9999* ]]; then
|
| 73 |
|
|
touch boilerplate/Makefile.am.features
|
| 74 |
|
|
touch src/Makefile.am.features
|
| 75 |
|
|
touch ChangeLog
|
| 76 |
|
|
fi
|
| 77 |
|
|
|
| 78 |
|
|
# We need to run elibtoolize to ensure correct so versioning on FreeBSD
|
| 79 |
|
|
# upgraded to an eautoreconf for the above interix patch.
|
| 80 |
|
|
eautoreconf
|
| 81 |
|
|
}
|
| 82 |
|
|
|
| 83 |
|
|
src_configure() {
|
| 84 |
|
|
local myopts
|
| 85 |
|
|
|
| 86 |
|
|
# SuperH doesn't have native atomics yet
|
| 87 |
|
|
use sh && myopts+=" --disable-atomic"
|
| 88 |
|
|
|
| 89 |
|
|
[[ ${CHOST} == *-interix* ]] && append-flags -D_REENTRANT
|
| 90 |
|
|
|
| 91 |
|
|
# tracing fails to compile, because Solaris' libelf doesn't do large files
|
| 92 |
|
|
[[ ${CHOST} == *-solaris* ]] && myopts+=" --disable-trace"
|
| 93 |
|
|
|
| 94 |
|
|
# 128-bits long arithemetic functions are missing
|
| 95 |
|
|
[[ ${CHOST} == powerpc*-*-darwin* ]] && filter-flags -mcpu=*
|
| 96 |
|
|
|
| 97 |
|
|
#gets rid of fbmmx.c inlining warnings
|
| 98 |
|
|
append-flags -finline-limit=1200
|
| 99 |
|
|
|
| 100 |
|
|
if use X; then
|
| 101 |
|
|
myopts+="
|
| 102 |
|
|
--enable-tee=yes
|
| 103 |
|
|
$(use_enable drm)
|
| 104 |
|
|
"
|
| 105 |
|
|
|
| 106 |
|
|
if use drm; then
|
| 107 |
|
|
myopts+="
|
| 108 |
|
|
$(use_enable gallium)
|
| 109 |
|
|
$(use_enable xcb xcb-drm)
|
| 110 |
|
|
"
|
| 111 |
|
|
else
|
| 112 |
|
|
use gallium && ewarn "Gallium use requires drm use enabled. So disabling for now."
|
| 113 |
|
|
myopts+="
|
| 114 |
|
|
--disable-gallium
|
| 115 |
|
|
--disable-xcb-drm
|
| 116 |
|
|
"
|
| 117 |
|
|
fi
|
| 118 |
|
|
else
|
| 119 |
|
|
use drm && ewarn "drm use requires X use enabled. So disabling for now."
|
| 120 |
|
|
myopts+="
|
| 121 |
|
|
--disable-drm
|
| 122 |
|
|
--disable-gallium
|
| 123 |
|
|
--disable-xcb-drm
|
| 124 |
|
|
"
|
| 125 |
|
|
fi
|
| 126 |
|
|
|
| 127 |
|
|
use elibc_FreeBSD && myopts+=" --disable-symbol-lookup"
|
| 128 |
|
|
|
| 129 |
|
|
# --disable-xcb-lib:
|
| 130 |
|
|
# do not override good xlib backed by hardforcing rendering over xcb
|
| 131 |
|
|
econf \
|
| 132 |
|
|
--disable-dependency-tracking \
|
| 133 |
|
|
$(use_with X x) \
|
| 134 |
|
|
$(use_enable X xlib) \
|
| 135 |
|
|
$(use_enable X xlib-xrender) \
|
| 136 |
|
|
$(use_enable aqua quartz) \
|
| 137 |
|
|
$(use_enable aqua quartz-image) \
|
| 138 |
|
|
$(use_enable debug test-surfaces) \
|
| 139 |
|
|
$(use_enable directfb) \
|
| 140 |
|
|
$(use_enable glib gobject) \
|
| 141 |
|
|
$(use_enable doc gtk-doc) \
|
| 142 |
|
|
$(use_enable openvg vg) \
|
| 143 |
|
|
$(use_enable opengl gl) \
|
| 144 |
|
|
$(use_enable qt4 qt) \
|
| 145 |
|
|
$(use_enable static-libs static) \
|
| 146 |
|
|
$(use_enable svg) \
|
| 147 |
|
|
$(use_enable xcb) \
|
| 148 |
|
|
$(use_enable xcb xcb-shm) \
|
| 149 |
|
|
--enable-ft \
|
| 150 |
|
|
--enable-pdf \
|
| 151 |
|
|
--enable-png \
|
| 152 |
|
|
--enable-ps \
|
| 153 |
|
|
--disable-xlib-xcb \
|
| 154 |
|
|
${myopts}
|
| 155 |
|
|
}
|
| 156 |
|
|
|
| 157 |
|
|
src_install() {
|
| 158 |
|
|
# parallel make install fails
|
| 159 |
|
|
emake -j1 DESTDIR="${D}" install || die
|
| 160 |
|
|
find "${ED}" -name '*.la' -exec rm -f {} +
|
| 161 |
|
|
dodoc AUTHORS ChangeLog NEWS README || die
|
| 162 |
|
|
}
|