/[gentoo-x86]/dev-python/imaging/imaging-1.1.7-r1.ebuild
Gentoo

Contents of /dev-python/imaging/imaging-1.1.7-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Mon Jun 8 12:03:57 2015 UTC (3 weeks, 2 days ago) by mrueg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +1 -1 lines
FILE REMOVED
Remove old.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key )

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/imaging-1.1.7-r1.ebuild,v 1.14 2014/12/30 18:23:18 floppym Exp $
4
5 EAPI="3"
6 PYTHON_DEPEND="2"
7 PYTHON_USE_WITH="tk"
8 PYTHON_USE_WITH_OPT="tk"
9 SUPPORT_PYTHON_ABIS="1"
10 RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
11
12 inherit eutils multilib distutils
13
14 MY_P=Imaging-${PV}
15
16 DESCRIPTION="Python Imaging Library (PIL)"
17 HOMEPAGE="http://www.pythonware.com/products/pil/index.htm"
18 SRC_URI="http://www.effbot.org/downloads/${MY_P}.tar.gz"
19
20 LICENSE="HPND"
21 SLOT="0"
22 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
23 IUSE="doc examples scanner tk X"
24
25 DEPEND="virtual/jpeg
26 media-libs/freetype:2
27 scanner? ( media-gfx/sane-backends )
28 X? ( x11-misc/xdg-utils )"
29 RDEPEND="${DEPEND}"
30 RDEPEND+=" !dev-python/pillow"
31
32 S="${WORKDIR}/${MY_P}"
33
34 DOCS="CHANGES CONTENTS"
35
36 pkg_setup() {
37 PYTHON_MODNAME="PIL $(use scanner && echo sane.py)"
38 python_pkg_setup
39 }
40
41 src_prepare() {
42 distutils_src_prepare
43
44 epatch "${FILESDIR}/${P}-no-xv.patch"
45 epatch "${FILESDIR}/${P}-sane.patch"
46 epatch "${FILESDIR}/${P}-giftrans.patch"
47 epatch "${FILESDIR}/${P}-missing-math.patch"
48 epatch "${FILESDIR}/${P}-nolcms.patch"
49
50 # Add shebang.
51 sed -e "1i#!/usr/bin/python" -i Scripts/pilfont.py \
52 || die "sed failed adding shebang"
53
54 sed -i \
55 -e "s:/usr/lib\":/usr/$(get_libdir)\":" \
56 -e "s:\"lib\":\"$(get_libdir)\":g" \
57 setup.py || die "sed failed"
58
59 if ! use tk; then
60 # Make the test always fail
61 sed -i \
62 -e 's/import _tkinter/raise ImportError/' \
63 setup.py || die "sed failed"
64 fi
65 }
66
67 src_compile() {
68 distutils_src_compile
69
70 if use scanner; then
71 pushd Sane > /dev/null
72 distutils_src_compile
73 popd > /dev/null
74 fi
75 }
76
77 src_test() {
78 tests() {
79 PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" selftest.py
80 }
81 python_execute_function tests
82 }
83
84 src_install() {
85 distutils_src_install
86
87 if use doc; then
88 dohtml Docs/* || die "dohtml failed"
89 fi
90
91 if use scanner; then
92 pushd Sane > /dev/null
93 docinto sane
94 DOCS="CHANGES sanedoc.txt" distutils_src_install
95 popd > /dev/null
96 fi
97
98 # Install headers required by media-gfx/sketch.
99 install_headers() {
100 insinto "$(python_get_includedir)"
101 doins libImaging/Imaging.h
102 doins libImaging/ImPlatform.h
103 }
104 python_execute_function install_headers
105
106 if use examples; then
107 insinto /usr/share/doc/${PF}/examples
108 doins Scripts/* || die "doins failed"
109
110 if use scanner; then
111 insinto /usr/share/doc/${PF}/examples/sane
112 doins Sane/demo_*.py || die "doins failed"
113 fi
114 fi
115 }

  ViewVC Help
Powered by ViewVC 1.1.20