* [gentoo-commits] repo/gentoo:master commit in: media-gfx/cropgui/files/, media-gfx/cropgui/
@ 2016-01-28 10:30 Sergey Popov
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Popov @ 2016-01-28 10:30 UTC (permalink / raw
To: gentoo-commits
commit: 77ac2746662fcb33b9fd9f1dbe8a2b3c4d103316
Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 28 10:29:59 2016 +0000
Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Thu Jan 28 10:30:33 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77ac2746
media-gfx/cropgui: version bump
Gentoo-Bug: 569654
Package-Manager: portage-2.2.26
media-gfx/cropgui/Manifest | 1 +
media-gfx/cropgui/cropgui-0.2.ebuild | 52 +++++++++++++++++++++++++++
media-gfx/cropgui/cropgui-9999.ebuild | 50 ++++++++++++++++++++++++++
media-gfx/cropgui/files/cropgui-0.2-PIL.patch | 26 ++++++++++++++
4 files changed, 129 insertions(+)
diff --git a/media-gfx/cropgui/Manifest b/media-gfx/cropgui/Manifest
index 1689149..5ec16d3 100644
--- a/media-gfx/cropgui/Manifest
+++ b/media-gfx/cropgui/Manifest
@@ -1 +1,2 @@
+DIST cropgui-0.2.tar.gz 842734 SHA256 9b0fcbc7a8f656979ad8ffcd09b08cec9f8ad20cd617402bae0b64526b5302fc SHA512 d6a9feea8c5de57455d0f7247465108d5a931f773f4df0c91629400bcc2c958c76559a84b6cde45709bcc8936ff7f5e2b3553897a14fbec14a9f032065ce83ba WHIRLPOOL 55e54c3adbf8992acb78c27f159874797cb4d54538b5c33b5350d0781ad1204d72e8db8c3d734922fe2893ea5d57b5a16ee2f7b8dad4db71f469462ecadfd1b1
DIST cropgui_0.1.1.tar.gz 13142 SHA256 d2bab11c2bafdbcbe9c8cac7827a7e25b909b2962cef29e1ce7181ccb2834a75 SHA512 abfe8dfd46a316e970b0355f6b05e2d2a4a54243e201dfc8434ee09f31c8715471dd1f00bd0c6cda646406e6398e5b43da3269bf74d1f2d9d436d5931d2b968f WHIRLPOOL 1e4f9fca887d2d988c6d944f85cae6125472ea08118e84b5601123e2af603b16d49ed54385f9552f1cd819f447b2ceace742ee4fd1e95f5d0461f4c173a1ef7e
diff --git a/media-gfx/cropgui/cropgui-0.2.ebuild b/media-gfx/cropgui/cropgui-0.2.ebuild
new file mode 100644
index 0000000..912767d
--- /dev/null
+++ b/media-gfx/cropgui/cropgui-0.2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-r1
+
+DESCRIPTION="GUI for lossless cropping of jpeg images"
+HOMEPAGE="http://emergent.unpythonic.net/01248401946"
+SRC_URI="https://github.com/jepler/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${PYTHON_DEPS}
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+"
+
+src_prepare() {
+ sed -i -e '/Encoding/d' \
+ -e '/Version/d' \
+ -e '/MimeType/s/$/&;/' \
+ -e '/Categories/s/Application;//' \
+ cropgui.desktop || die 'sed on cropgui.desktop failed'
+ # bug 471530
+ eapply "${FILESDIR}/${P}-PIL.patch"
+
+ eapply_user
+}
+
+install_cropgui_wrapper() {
+ python_domodule cropgtk.py cropgui_common.py filechooser.py cropgui.glade
+ make_wrapper "${PN}.tmp" "${PYTHON} $(python_get_sitedir)/${PN}/cropgtk.py"
+ python_newexe "${ED%/}/usr/bin/${PN}.tmp" "${PN}"
+ rm "${ED%/}/usr/bin/${PN}.tmp" || die
+}
+
+src_install() {
+ local python_moduleroot="${PN}"
+ python_foreach_impl install_cropgui_wrapper
+
+ domenu "${PN}.desktop"
+ doicon "${PN}.png"
+}
diff --git a/media-gfx/cropgui/cropgui-9999.ebuild b/media-gfx/cropgui/cropgui-9999.ebuild
new file mode 100644
index 0000000..ac8de05
--- /dev/null
+++ b/media-gfx/cropgui/cropgui-9999.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+EGIT_REPO_URI="https://github.com/jepler/cropgui.git"
+PYTHON_COMPAT=( python2_7 )
+inherit eutils git-r3 python-r1
+
+DESCRIPTION="GUI for lossless cropping of jpeg images"
+HOMEPAGE="http://emergent.unpythonic.net/01248401946"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${PYTHON_DEPS}
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+"
+
+src_prepare() {
+ sed -i -e '/Encoding/d' \
+ -e '/Version/d' \
+ -e '/MimeType/s/$/&;/' \
+ -e '/Categories/s/Application;//' \
+ cropgui.desktop || die 'sed on cropgui.desktop failed'
+
+ eapply_user
+}
+
+install_cropgui_wrapper() {
+ python_domodule cropgtk.py cropgui_common.py filechooser.py cropgui.glade
+ make_wrapper "${PN}.tmp" "${PYTHON} $(python_get_sitedir)/${PN}/cropgtk.py"
+ python_newexe "${ED%/}/usr/bin/${PN}.tmp" "${PN}"
+ rm "${ED%/}/usr/bin/${PN}.tmp" || die
+}
+
+src_install() {
+ local python_moduleroot="${PN}"
+ python_foreach_impl install_cropgui_wrapper
+
+ domenu "${PN}.desktop"
+ doicon "${PN}.png"
+}
diff --git a/media-gfx/cropgui/files/cropgui-0.2-PIL.patch b/media-gfx/cropgui/files/cropgui-0.2-PIL.patch
new file mode 100644
index 0000000..3c1e918
--- /dev/null
+++ b/media-gfx/cropgui/files/cropgui-0.2-PIL.patch
@@ -0,0 +1,26 @@
+--- cropgui.orig/cropgui_common.py 2016-01-28 12:54:47.424636620 +0300
++++ cropgui/cropgui_common.py 2016-01-28 12:55:15.176635735 +0300
+@@ -13,9 +13,9 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-import Image
+-import ImageFilter
+-import ImageDraw
++from PIL import Image
++from PIL import ImageFilter
++from PIL import ImageDraw
+ import subprocess
+ import threading
+ import Queue
+--- cropgui.orig/filechooser.py 2016-01-28 12:55:26.505635374 +0300
++++ cropgui/filechooser.py 2016-01-28 12:55:32.649635178 +0300
+@@ -8,7 +8,7 @@
+ import gobject
+
+ import os
+-import Image
++from PIL import Image
+ import cropgui_common
+
+ def apply_rotation(rotation, image):
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/cropgui/files/, media-gfx/cropgui/
@ 2017-05-31 6:42 Sergey Popov
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Popov @ 2017-05-31 6:42 UTC (permalink / raw
To: gentoo-commits
commit: 9b50e2a36d6d2cc36c3b74054585128c32d2ba1d
Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Wed May 31 06:38:36 2017 +0000
Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Wed May 31 06:42:35 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b50e2a3
media-gfx/cropgui: revision bump
Backported fix: use tobytes() instead of deprecated tostring()
Drop old revision
Reported-by: Massimo Burcheri <massimo.burcheri <AT> gmx.de>
Gentoo-Bug: 616708
Package-Manager: Portage-2.3.5, Repoman-2.3.1
.../{cropgui-0.2.ebuild => cropgui-0.2-r1.ebuild} | 4 ++-
media-gfx/cropgui/files/cropgui-0.2-tobytes.patch | 40 ++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/media-gfx/cropgui/cropgui-0.2.ebuild b/media-gfx/cropgui/cropgui-0.2-r1.ebuild
similarity index 92%
rename from media-gfx/cropgui/cropgui-0.2.ebuild
rename to media-gfx/cropgui/cropgui-0.2-r1.ebuild
index 5518df4d23d..89341edb6d1 100644
--- a/media-gfx/cropgui/cropgui-0.2.ebuild
+++ b/media-gfx/cropgui/cropgui-0.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -31,6 +31,8 @@ src_prepare() {
cropgui.desktop || die 'sed on cropgui.desktop failed'
# bug 471530
eapply "${FILESDIR}/${P}-PIL.patch"
+ # bug 616708
+ eapply "${FILESDIR}/${P}-tobytes.patch"
eapply_user
}
diff --git a/media-gfx/cropgui/files/cropgui-0.2-tobytes.patch b/media-gfx/cropgui/files/cropgui-0.2-tobytes.patch
new file mode 100644
index 00000000000..18405143bad
--- /dev/null
+++ b/media-gfx/cropgui/files/cropgui-0.2-tobytes.patch
@@ -0,0 +1,40 @@
+commit b664d1fefd7140ec4ec37b3b90a9007839029d8a
+Author: Tristan Stenner <ttstenner@gmail.com>
+Date: Fri Oct 9 08:40:04 2015 +0200
+
+ Try tostring(), fall back to tobytes()
+
+diff --git a/cropgtk.py b/cropgtk.py
+index c1156b0..135b6a8 100755
+--- a/cropgtk.py
++++ b/cropgtk.py
+@@ -170,7 +170,11 @@ class DragManager(DragManagerBase):
+ rendered = self.rendered()
+ rendered = rendered.convert('RGB')
+ i.set_size_request(*rendered.size)
+- pixbuf = gtk.gdk.pixbuf_new_from_data(rendered.tostring(),
++ try:
++ image_data = rendered.tostring()
++ except:
++ image_data = rendered.tobytes()
++ pixbuf = gtk.gdk.pixbuf_new_from_data(image_data,
+ gtk.gdk.COLORSPACE_RGB, 0, 8,
+ rendered.size[0], rendered.size[1], 3*rendered.size[0])
+
+diff --git a/filechooser.py b/filechooser.py
+index f2f8122..a039d74 100644
+--- a/filechooser.py
++++ b/filechooser.py
+@@ -49,7 +49,11 @@ def update_preview_cb(file_chooser, preview):
+ i.thumbnail((PREVIEW_SIZE, PREVIEW_SIZE), Image.ANTIALIAS)
+ i = i.convert('RGB')
+ i = apply_rotation(r, i)
+- pixbuf = gtk.gdk.pixbuf_new_from_data(i.tostring(),
++ try:
++ image_data = i.tostring()
++ except:
++ image_data = i.tobytes()
++ pixbuf = gtk.gdk.pixbuf_new_from_data(image_data,
+ gtk.gdk.COLORSPACE_RGB, 0, 8, i.size[0], i.size[1],
+ i.size[0]*3)
+ preview.set_from_pixbuf(pixbuf)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-31 6:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-28 10:30 [gentoo-commits] repo/gentoo:master commit in: media-gfx/cropgui/files/, media-gfx/cropgui/ Sergey Popov
-- strict thread matches above, loose matches on Subject: below --
2017-05-31 6:42 Sergey Popov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox