summaryrefslogtreecommitdiff
blob: f6d10ee61b5110fe09a35c758d01d5cdbf82e73c (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/cinepaint/cinepaint-0.21.1.ebuild,v 1.4 2007/11/27 12:22:57 zzam Exp $

inherit eutils versionator flag-o-matic autotools

MY_PV=$(replace_version_separator 2 '-')
S=${WORKDIR}/${PN}-${MY_PV}
DESCRIPTION="motion picture editing tool used for painting and retouching of movies"
SRC_URI="mirror://sourceforge/cinepaint/${PN}-${MY_PV}.tar.gz
	mirror://gentoo/${P}-patches.tar.bz2"
HOMEPAGE="http://cinepaint.sourceforge.net/"
SLOT="0"
KEYWORDS="~amd64 ~ppc x86"
LICENSE="GPL-2"
IUSE="png zlib"

DEPEND="=x11-libs/gtk+-1*
	png? ( >=media-libs/libpng-1.2 )
	zlib? ( sys-libs/zlib )
	media-libs/openexr
	media-libs/lcms
	media-libs/tiff
	media-libs/jpeg
	x11-libs/fltk"

src_unpack() {
	unpack ${A}
	cd "${S}"

	epatch "${WORKDIR}/${P}-as-needed.patch"
	epatch "${WORKDIR}/${P}-gcc4.patch"
}

src_compile(){
	[[ -f /usr/include/lcms/lcms.h ]] && \
		append-flags -I/usr/include/lcms

	# gutenprint is not in portage
	econf --disable-print || die "econf failed"
	emake || die "emake failed"
}

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