summaryrefslogtreecommitdiff
blob: 4550bd615a986b7c31bc6953498f32111cadbb98 (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
58
59
60
61
62
63
64
65
66
67
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/openimageio/openimageio-0.10.5.ebuild,v 1.1 2012/02/22 18:47:37 ssuominen Exp $

EAPI=4

PYTHON_DEPEND="2:2.7"

inherit cmake-utils eutils python

DESCRIPTION="A library for reading and writing images"
HOMEPAGE="http://sites.google.com/site/openimageio/ http://github.com/OpenImageIO"
SRC_URI="http://github.com/OpenImageIO/oiio/tarball/Release-${PV} -> ${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="dev-libs/boost
	media-libs/glew
	media-libs/ilmbase
	media-libs/jasper
	media-libs/libpng
	media-libs/openexr
	media-libs/tiff
	sci-libs/hdf5
	sys-libs/zlib
	virtual/glu
	virtual/jpeg
	virtual/opengl
	x11-libs/qt-core:4
	x11-libs/qt-gui:4
	x11-libs/qt-opengl:4"
DEPEND="${RDEPEND}"

S=${WORKDIR}/${P}/src

pkg_setup() {
	python_set_active_version 2
	python_pkg_setup
}

src_unpack() {
	unpack ${A}
	mv OpenImageIO-* "${WORKDIR}"/${P}
}

src_prepare() {
	epatch \
		"${FILESDIR}"/${PN}-0.10.2-libpng15.patch \
		"${FILESDIR}"/${PN}-0.10.2-multilib.patch

	sed -i \
		-e '/^add_subdirectory (doc)/d' \
		-e "/PYLIBDIR/s:\${CMAKE_INSTALL_PREFIX}/python:$(python_get_sitedir):" \
		CMakeLists.txt || die
}

src_install() {
	cmake-utils_src_install

	dodoc ../{CHANGES,CREDITS,README} doc/CLA-{CORPORATE,INDIVIDUAL}

	insinto /usr/share/doc/${PF}/pdf
	doins doc/openimageio.pdf
}