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