summaryrefslogtreecommitdiff
blob: 6d073adbdb2879ee918b12de52321508cbf9a52c (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/imaging-1.1.5.ebuild,v 1.3 2005/08/26 03:30:07 agriffis Exp $

inherit distutils eutils multilib

MY_P=${P/imaging/Imaging}
S=${WORKDIR}/${MY_P}

DESCRIPTION="Python Imaging Library (PIL)"
HOMEPAGE="http://www.pythonware.com/products/pil/index.htm"
SRC_URI="http://www.effbot.org/downloads/${MY_P}.tar.gz"

LICENSE="as-is"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="X tcltk scanner doc"

DEPEND="virtual/python
	>=media-libs/jpeg-6a
	>=sys-libs/zlib-0.95
	>=media-libs/freetype-2.1.5
	tcltk? ( dev-lang/tk )
	scanner? ( media-gfx/sane-backends )
	X? ( media-gfx/xv )"

src_unpack() {
	unpack ${A}
	# look for 64bit libs in lib64
	sed -i -e "s:\"/usr/lib\":\"/usr/$(get_libdir)\":" \
		${S}/setup.py || die "sed failed"
}

src_compile() {
	distutils_src_compile
	if use scanner ; then
		cd ${S}/Sane
		distutils_src_compile
	fi
}

src_install() {

	local mydoc="CHANGES* CONTENTS"
	distutils_src_install

	if use scanner ; then
		cd ${S}/Sane
		local mydoc="CHANGES *"
		docinto "sane"
		distutils_src_install
		cd ${S}
	fi

	# install headers required by media-gfx/sketch
	distutils_python_version
	insinto "${ROOT}/usr/include/python${PYVER}"
	doins libImaging/Imaging.h
	doins libImaging/ImPlatform.h

	if use doc ; then
		insinto "${ROOT}/usr/share/doc/${PF}"
		doins -r Docs
	fi
}