summaryrefslogtreecommitdiff
blob: 9b2c74289bc9e87d13067510f010f4ef96deaf51 (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
53
54
55
56
57
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=2
inherit autotools eutils flag-o-matic

DESCRIPTION="OpenEXR Viewers"
SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
HOMEPAGE="http://openexr.com/"

LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
IUSE="opengl video_cards_nvidia"

RDEPEND=">=media-libs/ilmbase-1.0.2
	>=media-libs/openexr-1.7.0
	media-libs/ctl
	media-libs/openexr_ctl
	opengl? ( virtual/opengl
		x11-libs/fltk:1[opengl]
		video_cards_nvidia? ( media-gfx/nvidia-cg-toolkit ) )
	!<media-libs/openexr-1.5.0"
DEPEND="${RDEPEND}
	virtual/pkgconfig"

src_prepare() {
	epatch "${FILESDIR}"/${P}-nvidia-automagic.patch \
		"${FILESDIR}"/${PN}-1.0.1-gcc43.patch \
		"${FILESDIR}"/${PN}-1.0.1-gcc44.patch

	eautoreconf
}

src_configure() {
	local myconf

	if use video_cards_nvidia; then
		myconf="--with-cg-prefix=/opt/nvidia-cg-toolkit"
		append-flags $(no-as-needed) # binary-only libCg is not properly linked
	fi

	econf \
		--disable-dependency-tracking \
		$(use_enable video_cards_nvidia nvidia) \
		$(use_with opengl fltk-config /usr/bin/fltk-config) \
		${myconf}
}

src_install() {
	emake \
		DESTDIR="${D}" \
		docdir="/usr/share/doc/${PF}/pdf" \
		install || die

	dodoc AUTHORS ChangeLog NEWS README
}