summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Koltsov <maksbotan@gentoo.org>2011-12-21 07:32:38 +0000
committerMaxim Koltsov <maksbotan@gentoo.org>2011-12-21 07:32:38 +0000
commita70f45cbd04dbab90444cf0578a27d81c60ebe53 (patch)
treeaf612bb635526d55e0440233e4b4a914451a8f15 /dev-python/imaging
parentMarked ppc/ppc64 stable (bug #377623). (diff)
downloadgentoo-2-a70f45cbd04dbab90444cf0578a27d81c60ebe53.tar.gz
gentoo-2-a70f45cbd04dbab90444cf0578a27d81c60ebe53.tar.bz2
gentoo-2-a70f45cbd04dbab90444cf0578a27d81c60ebe53.zip
Revision bump, add lcms depend and use flag, bug 381689. Thanks to Chris Mayo
(Portage version: 2.1.10.40/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/imaging')
-rw-r--r--dev-python/imaging/ChangeLog8
-rw-r--r--dev-python/imaging/files/imaging-1.1.7-nolcms.patch13
-rw-r--r--dev-python/imaging/imaging-1.1.7-r1.ebuild117
3 files changed, 137 insertions, 1 deletions
diff --git a/dev-python/imaging/ChangeLog b/dev-python/imaging/ChangeLog
index 300d36252015..b0c5f5612e35 100644
--- a/dev-python/imaging/ChangeLog
+++ b/dev-python/imaging/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/imaging
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/ChangeLog,v 1.64 2011/07/07 23:26:15 neurogeek Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/ChangeLog,v 1.65 2011/12/21 07:32:38 maksbotan Exp $
+
+*imaging-1.1.7-r1 (21 Dec 2011)
+
+ 21 Dec 2011; Maxim Koltsov <maksbotan@gentoo.org> +imaging-1.1.7-r1.ebuild,
+ +files/imaging-1.1.7-nolcms.patch:
+ Revision bump, add lcms depend and use flag, bug 381689. Thanks to Chris Mayo
07 Jul 2011; Jesus Rivero <neurogeek@gentoo.org> imaging-1.1.7.ebuild:
Fixed shebang in Scripts/pilfont.py wrt bug #371117
diff --git a/dev-python/imaging/files/imaging-1.1.7-nolcms.patch b/dev-python/imaging/files/imaging-1.1.7-nolcms.patch
new file mode 100644
index 000000000000..e087cd301dd5
--- /dev/null
+++ b/dev-python/imaging/files/imaging-1.1.7-nolcms.patch
@@ -0,0 +1,13 @@
+--- setup.py.orig
++++ setup.py 2011-09-04
+@@ -264,10 +264,6 @@
+ if dir:
+ add_directory(self.compiler.include_dirs, dir, 0)
+
+- if find_include_file(self, "lcms.h"):
+- if find_library_file(self, "lcms"):
+- feature.lcms = "lcms"
+-
+ if _tkinter and find_include_file(self, "tk.h"):
+ # the library names may vary somewhat (e.g. tcl84 or tcl8.4)
+ version = TCL_VERSION[0] + TCL_VERSION[2]
diff --git a/dev-python/imaging/imaging-1.1.7-r1.ebuild b/dev-python/imaging/imaging-1.1.7-r1.ebuild
new file mode 100644
index 000000000000..7f562d8bcd4b
--- /dev/null
+++ b/dev-python/imaging/imaging-1.1.7-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2011 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-r1.ebuild,v 1.1 2011/12/21 07:32:38 maksbotan Exp $
+
+EAPI="3"
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="tk"
+PYTHON_USE_WITH_OPT="tk"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython"
+
+inherit eutils distutils
+
+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="as-is"
+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[python] )
+ scanner? ( media-gfx/sane-backends )
+ X? ( x11-misc/xdg-utils )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS="CHANGES CONTENTS"
+
+pkg_setup() {
+ PYTHON_MODNAME="PIL $(use scanner && echo sane.py)"
+ python_pkg_setup
+}
+
+src_prepare() {
+ distutils_src_prepare
+
+ epatch "${FILESDIR}/${P}-no-xv.patch"
+ epatch "${FILESDIR}/${P}-sane.patch"
+ epatch "${FILESDIR}/${P}-giftrans.patch"
+ epatch "${FILESDIR}/${P}-missing-math.patch"
+ if ! use lcms; then
+ epatch "${FILESDIR}/${P}-nolcms.patch"
+ fi
+
+ # 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
+}
+
+src_compile() {
+ distutils_src_compile
+
+ if use scanner; then
+ pushd Sane > /dev/null
+ distutils_src_compile
+ popd > /dev/null
+ fi
+}
+
+src_test() {
+ tests() {
+ PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" selftest.py
+ }
+ python_execute_function tests
+}
+
+src_install() {
+ distutils_src_install
+
+ if use doc; then
+ dohtml Docs/* || die "dohtml failed"
+ fi
+
+ if use scanner; then
+ pushd Sane > /dev/null
+ docinto sane
+ DOCS="CHANGES sanedoc.txt" distutils_src_install
+ popd > /dev/null
+ fi
+
+ # Install headers required by media-gfx/sketch.
+ install_headers() {
+ insinto "$(python_get_includedir)"
+ doins libImaging/Imaging.h
+ doins libImaging/ImPlatform.h
+ }
+ python_execute_function install_headers
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins Scripts/* || die "doins failed"
+
+ if use scanner; then
+ insinto /usr/share/doc/${PF}/examples/sane
+ doins Sane/demo_*.py || die "doins failed"
+ fi
+ fi
+}