summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-01-16 10:10:33 +0000
committerMichał Górny <mgorny@gentoo.org>2013-01-16 10:10:33 +0000
commitaa2cffe5245e4ced7e79fa1468dc98cabc1847b1 (patch)
tree5bde4a8d8e6b8835d31ee71f525d5f210c4918db /dev-python/imaging
parentInclude subslot support and call it 13 from SONAME wrt #452444 by Michael Pal... (diff)
downloadgentoo-2-aa2cffe5245e4ced7e79fa1468dc98cabc1847b1.tar.gz
gentoo-2-aa2cffe5245e4ced7e79fa1468dc98cabc1847b1.tar.bz2
gentoo-2-aa2cffe5245e4ced7e79fa1468dc98cabc1847b1.zip
Migrate to distutils-r1.
(Portage version: 2.2.0_alpha153/cvs/Linux x86_64, signed Manifest commit with key 42B9401D)
Diffstat (limited to 'dev-python/imaging')
-rw-r--r--dev-python/imaging/ChangeLog9
-rw-r--r--dev-python/imaging/imaging-1.1.7-r2.ebuild104
2 files changed, 111 insertions, 2 deletions
diff --git a/dev-python/imaging/ChangeLog b/dev-python/imaging/ChangeLog
index 81f8fe976154..81a02da8aaa2 100644
--- a/dev-python/imaging/ChangeLog
+++ b/dev-python/imaging/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-python/imaging
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/ChangeLog,v 1.77 2012/12/01 02:03:45 radhermit Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/ChangeLog,v 1.78 2013/01/16 10:10:33 mgorny Exp $
+
+*imaging-1.1.7-r2 (16 Jan 2013)
+
+ 16 Jan 2013; Michał Górny <mgorny@gentoo.org> +imaging-1.1.7-r2.ebuild:
+ Migrate to distutils-r1.
01 Dec 2012; Tim Harder <radhermit@gentoo.org> -imaging-1.1.7.ebuild:
Remove old.
diff --git a/dev-python/imaging/imaging-1.1.7-r2.ebuild b/dev-python/imaging/imaging-1.1.7-r2.ebuild
new file mode 100644
index 000000000000..05376c95c361
--- /dev/null
+++ b/dev-python/imaging/imaging-1.1.7-r2.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/imaging-1.1.7-r2.ebuild,v 1.1 2013/01/16 10:10:32 mgorny Exp $
+
+EAPI=5
+PYTHON_COMPAT=( python{2_5,2_6,2_7} )
+PYTHON_REQ_USE='tk?'
+
+inherit eutils multilib distutils-r1
+
+MY_P=Imaging-${PV}
+
+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="HPND"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="doc examples lcms scanner tk X"
+
+DEPEND="virtual/jpeg
+ media-libs/freetype:2
+ lcms? ( media-libs/lcms:0 )
+ scanner? ( media-gfx/sane-backends )
+ X? ( x11-misc/xdg-utils )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}/${P}-no-xv.patch"
+ "${FILESDIR}/${P}-sane.patch"
+ "${FILESDIR}/${P}-giftrans.patch"
+ "${FILESDIR}/${P}-missing-math.patch"
+ )
+
+ use lcms || PATCHES+=( "${FILESDIR}/${P}-nolcms.patch" )
+
+ # Add shebang.
+ sed -e "1i#!/usr/bin/python" -i Scripts/pilfont.py \
+ || die "sed failed adding shebang"
+
+ sed -i \
+ -e "s:/usr/lib\":/usr/$(get_libdir)\":" \
+ -e "s:\"lib\":\"$(get_libdir)\":g" \
+ setup.py || die "sed failed"
+
+ if ! use tk; then
+ # Make the test always fail
+ sed -i \
+ -e 's/import _tkinter/raise ImportError/' \
+ setup.py || die "sed failed"
+ fi
+
+ distutils-r1_python_prepare_all
+}
+
+# XXX: split into two ebuilds?
+wrap_phase() {
+ "${@}"
+
+ if use scanner; then
+ cd Sane || die
+ "${@}"
+ fi
+}
+
+python_compile() {
+ wrap_phase distutils-r1_python_compile
+}
+
+python_test() {
+ "${PYTHON}" selftest.py || die "Tests fail with ${EPYTHON}"
+}
+
+python_install() {
+ insinto "$(python_get_includedir)"
+ doins libImaging/{Imaging.h,ImPlatform.h}
+
+ wrap_phase distutils-r1_python_install
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( Docs/. )
+
+ distutils-r1_python_install_all
+
+ if use scanner; then
+ docinto sane
+ dodoc Sane/{CHANGES,README,sanedoc.txt}
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r Scripts/.
+
+ if use scanner; then
+ insinto /usr/share/doc/${PF}/examples/sane
+ doins Sane/demo_*.py
+ fi
+ fi
+}