summaryrefslogtreecommitdiff
blob: a4794eb42ed756697de2a430c257c383896a3dad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/SoQt/SoQt-1.4.1.ebuild,v 1.6 2009/10/29 11:02:54 fauli Exp $

EAPI="2"

inherit flag-o-matic eutils

DESCRIPTION="The glue between Coin3D and Qt"
SRC_URI="ftp://ftp.coin3d.org/pub/coin/src/all/${P}.tar.gz"
HOMEPAGE="http://www.coin3d.org/"

SLOT="0"
LICENSE="|| ( GPL-2 PEL )"
KEYWORDS="~amd64 x86"
IUSE="doc qt4"

RDEPEND=">=media-libs/coin-2.4.4
	qt4? (
		x11-libs/qt-gui:4[qt3support]
		x11-libs/qt-opengl:4[qt3support]
		x11-libs/qt-qt3support:4
	)
	!qt4? ( x11-libs/qt:3[opengl] )"
DEPEND="${RDEPEND}
	dev-util/pkgconfig
	doc? ( app-doc/doxygen )"

src_prepare() {
	epatch "${FILESDIR}/${P}-gcc44.patch"
}

src_configure() {
	if use qt4; then
		export PATH="/usr/bin/:${PATH}"
		export QTDIR="/usr"
		export CONFIG_QTLIBS="$(pkg-config --libs QtGui)"
	fi

	append-ldflags $(no-as-needed)

	econf --with-coin --disable-html-help $(use_enable doc html) htmldir=/usr/share/doc/${PF}/html
}

src_compile() {
	emake -j1 || die "emake failed"
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
	dodoc AUTHORS ChangeLog NEWS README*
}