aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2014-11-11 09:26:11 +0100
committerJustin Lecher <jlec@gentoo.org>2014-11-11 09:26:11 +0100
commit7a52bbfa08cb0eae4e5071b0052c5e693245c0cc (patch)
treef07f867c40d06650c9487584597b8beb63d08919 /sci-chemistry
parentsci-chemistry/rosetta-tools: Bump to EAPI=5 (diff)
downloadsci-7a52bbfa08cb0eae4e5071b0052c5e693245c0cc.tar.gz
sci-7a52bbfa08cb0eae4e5071b0052c5e693245c0cc.tar.bz2
sci-7a52bbfa08cb0eae4e5071b0052c5e693245c0cc.zip
sci-chemistry/mgltools-dejavu: Add PIL fix
Package-Manager: portage-2.2.14
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/mgltools-dejavu/ChangeLog8
-rw-r--r--sci-chemistry/mgltools-dejavu/files/mgltools-dejavu-1.5.6-pil.patch43
-rw-r--r--sci-chemistry/mgltools-dejavu/mgltools-dejavu-1.5.6-r1.ebuild50
3 files changed, 100 insertions, 1 deletions
diff --git a/sci-chemistry/mgltools-dejavu/ChangeLog b/sci-chemistry/mgltools-dejavu/ChangeLog
index 3935600af..ca71dd1fd 100644
--- a/sci-chemistry/mgltools-dejavu/ChangeLog
+++ b/sci-chemistry/mgltools-dejavu/ChangeLog
@@ -1,7 +1,13 @@
# ChangeLog for sci-chemistry/mgltools-dejavu
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*mgltools-dejavu-1.5.6-r1 (11 Nov 2014)
+
+ 11 Nov 2014; Justin Lecher <jlec@gentoo.org>
+ +mgltools-dejavu-1.5.6-r1.ebuild, +files/mgltools-dejavu-1.5.6-pil.patch:
+ Add PIL fix
+
10 Jun 2013; Justin Lecher <jlec@gentoo.org>
-mgltools-dejavu-1.5.4-r1.ebuild, mgltools-dejavu-1.5.6.ebuild:
Drop old
diff --git a/sci-chemistry/mgltools-dejavu/files/mgltools-dejavu-1.5.6-pil.patch b/sci-chemistry/mgltools-dejavu/files/mgltools-dejavu-1.5.6-pil.patch
new file mode 100644
index 000000000..0ac1abdea
--- /dev/null
+++ b/sci-chemistry/mgltools-dejavu/files/mgltools-dejavu-1.5.6-pil.patch
@@ -0,0 +1,43 @@
+ DejaVu/Camera.py | 12 +++++++++---
+ DejaVu/Texture.py | 5 ++++-
+ 2 files changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/DejaVu/Camera.py b/DejaVu/Camera.py
+index 9ecc0eb..555666a 100644
+--- a/DejaVu/Camera.py
++++ b/DejaVu/Camera.py
+@@ -38,9 +38,15 @@ This Module implements the Camera class and the Fog class.
+
+ import os, sys, warnings
+
+-import Image
+-import ImageFilter
+-import ImageChops
++try:
++ import Image
++ import ImageFilter
++ import ImageChops
++except ImportError:
++ from PIL import Image
++ from PIL import ImageFilter
++ from PIL import ImageChops
++
+
+ import tkMessageBox
+
+diff --git a/DejaVu/Texture.py b/DejaVu/Texture.py
+index dccc280..bcf16be 100644
+--- a/DejaVu/Texture.py
++++ b/DejaVu/Texture.py
+@@ -15,7 +15,10 @@
+ #
+
+ import sys, os
+-import Image
++try:
++ import Image
++except ImportError:
++ from PIL import Image
+ import numpy.oldnumeric as Numeric
+ import warnings
+
diff --git a/sci-chemistry/mgltools-dejavu/mgltools-dejavu-1.5.6-r1.ebuild b/sci-chemistry/mgltools-dejavu/mgltools-dejavu-1.5.6-r1.ebuild
new file mode 100644
index 000000000..07a346f6c
--- /dev/null
+++ b/sci-chemistry/mgltools-dejavu/mgltools-dejavu-1.5.6-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+PYTHON_REQ_USE="tk"
+
+inherit distutils-r1 eutils
+
+MY_PN="DejaVu"
+MY_P="${MY_PN}-${PV/_rc3/}"
+
+PYTHON_MODNAME="${MY_PN}"
+
+DESCRIPTION="MGLTools Plugin -- DejaVu"
+HOMEPAGE="http://mgltools.scripps.edu"
+SRC_URI="http://mgltools.scripps.edu/downloads/tars/releases/REL${PV}/mgltools_source_${PV}.tar.gz"
+
+LICENSE="MGLTOOLS MPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ dev-lang/swig"
+
+S="${WORKDIR}"/${MY_P}
+
+DOCS=( DejaVu/RELNOTES )
+
+PATCHES=( "${FILESDIR}"/${P}-pil.patch )
+
+src_unpack() {
+ tar xzpf "${DISTDIR}"/${A} mgltools_source_${PV/_/}/MGLPACKS/${MY_P}.tar.gz
+ tar xzpf mgltools_source_${PV/_/}/MGLPACKS/${MY_P}.tar.gz
+}
+
+python_prepare_all() {
+ ecvs_clean
+ find "${S}" -name LICENSE -type f -delete || die
+
+ sed \
+ -e 's:^.*CVS:#&1:g' \
+ -e 's:^.*LICENSE:#&1:g' \
+ -i "${S}"/MANIFEST.in || die
+ distutils-r1_python_prepare_all
+}