summaryrefslogtreecommitdiff
path: root/x11-wm
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2013-06-09 21:17:51 +0000
committerMichael Weber <xmw@gentoo.org>2013-06-09 21:17:51 +0000
commitec37cac5a162e4808f049b3dabb9d6c42239a327 (patch)
tree4f05434dea162ffbe733f282275e5110fc162caf /x11-wm
parentUpdate maintainer info (diff)
downloadgentoo-2-ec37cac5a162e4808f049b3dabb9d6c42239a327.tar.gz
gentoo-2-ec37cac5a162e4808f049b3dabb9d6c42239a327.tar.bz2
gentoo-2-ec37cac5a162e4808f049b3dabb9d6c42239a327.zip
Fix PIL imports (bug 471566, thanks Arfrever)
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)
Diffstat (limited to 'x11-wm')
-rw-r--r--x11-wm/xpra/ChangeLog9
-rw-r--r--x11-wm/xpra/files/xpra-0.9.5-PIL.patch103
-rw-r--r--x11-wm/xpra/xpra-0.9.4-r1.ebuild (renamed from x11-wm/xpra/xpra-0.9.3.ebuild)26
-rw-r--r--x11-wm/xpra/xpra-0.9.5-r1.ebuild82
4 files changed, 208 insertions, 12 deletions
diff --git a/x11-wm/xpra/ChangeLog b/x11-wm/xpra/ChangeLog
index d5bdb565c0ac..b0e402b9e154 100644
--- a/x11-wm/xpra/ChangeLog
+++ b/x11-wm/xpra/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for x11-wm/xpra
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-wm/xpra/ChangeLog,v 1.67 2013/06/09 19:20:49 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-wm/xpra/ChangeLog,v 1.68 2013/06/09 21:17:51 xmw Exp $
+
+*xpra-0.9.4-r1 (09 Jun 2013)
+*xpra-0.9.5-r1 (09 Jun 2013)
+
+ 09 Jun 2013; Michael Weber <xmw@gentoo.org> +files/xpra-0.9.5-PIL.patch,
+ +xpra-0.9.4-r1.ebuild, +xpra-0.9.5-r1.ebuild, -xpra-0.9.3.ebuild:
+ Fix PIL imports (bug 471566, thanks Arfrever)
09 Jun 2013; Mike Gilbert <floppym@gentoo.org> xpra-0.9.5.ebuild:
Revert PIL virtual change; see bug 471566.
diff --git a/x11-wm/xpra/files/xpra-0.9.5-PIL.patch b/x11-wm/xpra/files/xpra-0.9.5-PIL.patch
new file mode 100644
index 000000000000..1e17af291348
--- /dev/null
+++ b/x11-wm/xpra/files/xpra-0.9.5-PIL.patch
@@ -0,0 +1,103 @@
+--- xpra-0.9.5/xpra/server.py
++++ xpra-0.9.5/xpra/server.py
+@@ -610,11 +610,11 @@
+ width = maxx-minx
+ height = maxy-miny
+ log("screenshot: %sx%s, min x=%s y=%s", width, height, minx, miny)
+- import Image
+- image = Image.new("RGBA", (width, height))
++ import PIL.Image
++ image = PIL.Image.new("RGBA", (width, height))
+ for wid, x, y, w, h, pixmap in reversed(all_regions):
+ _, _, wid, _, _, w, h, _, raw_data, rowstride, _, _ = get_rgb_rawdata(0, 0, wid, pixmap, 0, 0, w, h, "rgb24", -1, None, logger=log.debug)
+- window_image = Image.fromstring("RGB", (w, h), raw_data, "raw", "RGB", rowstride)
++ window_image = PIL.Image.fromstring("RGB", (w, h), raw_data, "raw", "RGB", rowstride)
+ tx = x-minx
+ ty = y-miny
+ image.paste(window_image, (tx, ty))
+--- xpra-0.9.5/xpra/window_source.py
++++ xpra-0.9.5/xpra/window_source.py
+@@ -1024,8 +1024,8 @@
+
+ def PIL_encode(self, w, h, coding, data, rowstride, options):
+ assert coding in ENCODINGS
+- import Image
+- im = Image.fromstring("RGB", (w, h), data, "raw", "RGB", rowstride)
++ import PIL.Image
++ im = PIL.Image.fromstring("RGB", (w, h), data, "raw", "RGB", rowstride)
+ buf = StringIO()
+ client_options = {}
+ if coding=="jpeg":
+--- xpra-0.9.5/xpra/window_backing.py
++++ xpra-0.9.5/xpra/window_backing.py
+@@ -32,7 +32,7 @@
+ #have/use PIL?
+ has_PIL = False
+ try:
+- import Image
++ import PIL.Image
+ has_PIL = True
+ except:
+ pass
+@@ -91,7 +91,7 @@
+
+ def jpegimage(self, img_data, width, height):
+ buf = IOClass(img_data)
+- return Image.open(buf)
++ return PIL.Image.open(buf)
+
+ def rgb24image(self, img_data, width, height, rowstride):
+ assert has_PIL
+@@ -99,7 +99,7 @@
+ assert len(img_data) == rowstride * height
+ else:
+ assert len(img_data) == width * 3 * height
+- return Image.fromstring("RGB", (width, height), img_data, 'raw', 'RGB', rowstride, 1)
++ return PIL.Image.fromstring("RGB", (width, height), img_data, 'raw', 'RGB', rowstride, 1)
+
+ def process_delta(self, raw_data, width, height, rowstride, options):
+ """
+@@ -395,7 +395,7 @@
+ if use_PIL:
+ #try PIL first since it doesn't need the UI thread until the actual do_paint_rgb24 call
+ buf = IOClass(img_data)
+- img = Image.open(buf)
++ img = PIL.Image.open(buf)
+ if img.mode=="RGB":
+ raw_data = img.tostring("raw", "RGB")
+ #PIL flattens the data to a continuous straightforward RGB format:
+--- xpra-0.9.5/xpra/scripts/config.py
++++ xpra-0.9.5/xpra/scripts/config.py
+@@ -18,8 +18,8 @@
+ from wimpiggy.gobject_compat import import_gobject, is_gtk3
+ gobject = import_gobject()
+ try:
+- import Image
+- assert Image
++ import PIL.Image
++ assert PIL.Image
+ _has_PIL = True
+ except:
+ _has_PIL = False
+--- xpra-0.9.5/xpra/server_source.py
++++ xpra-0.9.5/xpra/server_source.py
+@@ -696,8 +696,8 @@
+ def make_window_icon(self, pixel_data, pixel_format, stride, w, h):
+ log("found new window icon: %sx%s, sending as png=%s", w, h, self.png_window_icons)
+ if self.png_window_icons:
+- import Image
+- img = Image.frombuffer("RGBA", (w,h), pixel_data, "raw", "BGRA", 0, 1)
++ import PIL.Image
++ img = PIL.Image.frombuffer("RGBA", (w,h), pixel_data, "raw", "BGRA", 0, 1)
+ MAX_SIZE = 64
+ if w>MAX_SIZE or h>MAX_SIZE:
+ #scale icon down
+@@ -708,7 +708,7 @@
+ w = int(w*MAX_SIZE/h)
+ h = MAX_SIZE
+ log("scaling window icon down to %sx%s", w, h)
+- img = img.resize((w,h), Image.ANTIALIAS)
++ img = img.resize((w,h), PIL.Image.ANTIALIAS)
+ output = StringIO()
+ img.save(output, 'PNG')
+ raw_data = output.getvalue()
diff --git a/x11-wm/xpra/xpra-0.9.3.ebuild b/x11-wm/xpra/xpra-0.9.4-r1.ebuild
index 362e913e4491..e28ea4b445ff 100644
--- a/x11-wm/xpra/xpra-0.9.3.ebuild
+++ b/x11-wm/xpra/xpra-0.9.4-r1.ebuild
@@ -1,11 +1,10 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-wm/xpra/xpra-0.9.3.ebuild,v 1.1 2013/05/24 06:05:54 xmw Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-wm/xpra/xpra-0.9.4-r1.ebuild,v 1.1 2013/06/09 21:17:51 xmw Exp $
EAPI=5
-#dev-python/pygobject and dev-python/pygtk do not support python3
-PYTHON_COMPAT=( python{2_5,2_6,2_7} )
+PYTHON_COMPAT=( python{2_6,2_7} )
inherit distutils-r1 eutils
DESCRIPTION="X Persistent Remote Apps (xpra) and Partitioning WM (parti) based on wimpiggy"
@@ -17,9 +16,12 @@ SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="+clipboard pulseaudio +rencode server vpx webp x264"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
# x264/old-libav.path situation see bug 459218
-COMMON_DEPEND="dev-python/pygobject:2
- dev-python/pygtk:2
+COMMON_DEPEND=""${PYTHON_DEPS}"
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
x11-libs/libX11
x11-libs/libXcomposite
x11-libs/libXdamage
@@ -34,9 +36,9 @@ COMMON_DEPEND="dev-python/pygobject:2
virtual/ffmpeg )"
RDEPEND="${COMMON_DEPEND}
- dev-python/dbus-python
- dev-python/imaging
- dev-python/ipython
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/ipython[${PYTHON_USEDEP}]
+ virtual/python-imaging[${PYTHON_USEDEP}]
virtual/ssh
x11-apps/setxkbmap
x11-apps/xmodmap
@@ -46,11 +48,13 @@ RDEPEND="${COMMON_DEPEND}
)"
DEPEND="${COMMON_DEPEND}
virtual/pkgconfig
- >=dev-python/cython-0.16"
+ >=dev-python/cython-0.16[${PYTHON_USEDEP}]"
python_prepare_all() {
- epatch "${FILESDIR}"/${PN}-0.7.1-ignore-gentoo-no-compile.patch
- epatch "${FILESDIR}"/${PN}-0.8.0-prefix.patch
+ epatch \
+ "${FILESDIR}"/${PN}-0.7.1-ignore-gentoo-no-compile.patch \
+ "${FILESDIR}"/${PN}-0.8.0-prefix.patch \
+ "${FILESDIR}"/${PN}-0.9.5-PIL.patch
#assuming ffmpeg and libav mutual exclusive installs
if has_version "media-video/libav" ; then
diff --git a/x11-wm/xpra/xpra-0.9.5-r1.ebuild b/x11-wm/xpra/xpra-0.9.5-r1.ebuild
new file mode 100644
index 000000000000..b194429884f7
--- /dev/null
+++ b/x11-wm/xpra/xpra-0.9.5-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-wm/xpra/xpra-0.9.5-r1.ebuild,v 1.1 2013/06/09 21:17:51 xmw Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+inherit distutils-r1 eutils
+
+DESCRIPTION="X Persistent Remote Apps (xpra) and Partitioning WM (parti) based on wimpiggy"
+HOMEPAGE="http://xpra.org/"
+SRC_URI="http://xpra.org/src/${P}.tar.bz2"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+clipboard pulseaudio +rencode server vpx webp x264"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# x264/old-libav.path situation see bug 459218
+COMMON_DEPEND=""${PYTHON_DEPS}"
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXfixes
+ x11-libs/libXrandr
+ x11-libs/libXtst
+ vpx? ( media-libs/libvpx
+ virtual/ffmpeg )
+ webp? ( media-libs/libwebp )
+ x264? ( media-libs/x264
+ || ( >=media-video/ffmpeg-1.0.4 media-video/libav )
+ virtual/ffmpeg )"
+
+RDEPEND="${COMMON_DEPEND}
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/ipython[${PYTHON_USEDEP}]
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ virtual/ssh
+ x11-apps/setxkbmap
+ x11-apps/xmodmap
+ server? ( x11-base/xorg-server[-minimal,xvfb]
+ x11-drivers/xf86-input-void
+ x11-drivers/xf86-video-dummy
+ )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ >=dev-python/cython-0.16[${PYTHON_USEDEP}]"
+
+python_prepare_all() {
+ epatch \
+ "${FILESDIR}"/${PN}-0.7.1-ignore-gentoo-no-compile.patch \
+ "${FILESDIR}"/${PN}-0.8.0-prefix.patch \
+ "${FILESDIR}"/${PN}-0.9.5-PIL.patch
+
+ #assuming ffmpeg and libav mutual exclusive installs
+ if has_version "media-video/libav" ; then
+ if ! has_version ">=media-video/libav-9" ; then
+ epatch patches/old-libav.patch
+ fi
+ fi
+
+ use clipboard || epatch patches/disable-clipboard.patch
+ use pulseaudio || epatch patches/disable-pulseaudio.patch
+ use rencode || epatch patches/disable-rencode.patch
+ use server || epatch patches/disable-posix-server.patch
+ use vpx || epatch patches/disable-vpx.patch
+ use webp || epatch patches/disable-webp.patch
+ use x264 || epatch patches/disable-x264.patch
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ rm -vf "${ED}"usr/share/parti/{parti.,}README \
+ "${ED}"usr/share/xpra/{webm/LICENSE,xpra.README} \
+ "${ED}"usr/share/wimpiggy/wimpiggy.README || die
+ dodoc {parti.,wimpiggy.,xpra.,}README
+}