1 |
commit: 5c04c89d33aaa76dce05205ff8e39e2731519356 |
2 |
Author: Joe Sapp <nixphoeni <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 27 20:24:54 2015 +0000 |
4 |
Commit: Joe Sapp <nixphoeni <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 27 20:25:27 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c04c89d |
7 |
|
8 |
app-misc/gourmet: Add patch to address gourmet pull request 824; also eliminates PIL support |
9 |
|
10 |
See https://github.com/thinkle/gourmet/pull/824 . |
11 |
|
12 |
Package-Manager: portage-2.2.25 |
13 |
|
14 |
app-misc/gourmet/files/tostring-to-tobytes.patch | 26 ++++++++++ |
15 |
app-misc/gourmet/gourmet-0.17.4-r1.ebuild | 61 ++++++++++++++++++++++++ |
16 |
2 files changed, 87 insertions(+) |
17 |
|
18 |
diff --git a/app-misc/gourmet/files/tostring-to-tobytes.patch b/app-misc/gourmet/files/tostring-to-tobytes.patch |
19 |
new file mode 100644 |
20 |
index 0000000..e42c594 |
21 |
--- /dev/null |
22 |
+++ b/app-misc/gourmet/files/tostring-to-tobytes.patch |
23 |
@@ -0,0 +1,26 @@ |
24 |
+diff --git a/gourmet/gtk_extras/ratingWidget.py b/gourmet/gtk_extras/ratingWidget.py |
25 |
+index 0e01735..efa6463 100644 |
26 |
+--- a/gourmet/gtk_extras/ratingWidget.py |
27 |
++++ b/gourmet/gtk_extras/ratingWidget.py |
28 |
+@@ -135,7 +135,7 @@ class StarGenerator: |
29 |
+ if is_rgba: rowstride = 4 |
30 |
+ else: rowstride = 3 |
31 |
+ pb=gtk.gdk.pixbuf_new_from_data( |
32 |
+- image.tostring(), |
33 |
++ image.tobytes(), |
34 |
+ gtk.gdk.COLORSPACE_RGB, |
35 |
+ is_rgba, |
36 |
+ 8, |
37 |
+diff --git a/gourmet/plugins/browse_recipes/icon_helpers.py b/gourmet/plugins/browse_recipes/icon_helpers.py |
38 |
+index 61c772c..2e7b08b 100644 |
39 |
+--- a/gourmet/plugins/browse_recipes/icon_helpers.py |
40 |
++++ b/gourmet/plugins/browse_recipes/icon_helpers.py |
41 |
+@@ -38,7 +38,7 @@ def get_pixbuf_from_image (image): |
42 |
+ if is_rgba: rowstride = 4 |
43 |
+ else: rowstride = 3 |
44 |
+ pb=gtk.gdk.pixbuf_new_from_data( |
45 |
+- image.tostring(), |
46 |
++ image.tobytes(), |
47 |
+ gtk.gdk.COLORSPACE_RGB, |
48 |
+ is_rgba, |
49 |
+ 8, |
50 |
|
51 |
diff --git a/app-misc/gourmet/gourmet-0.17.4-r1.ebuild b/app-misc/gourmet/gourmet-0.17.4-r1.ebuild |
52 |
new file mode 100644 |
53 |
index 0000000..e5a07f2 |
54 |
--- /dev/null |
55 |
+++ b/app-misc/gourmet/gourmet-0.17.4-r1.ebuild |
56 |
@@ -0,0 +1,61 @@ |
57 |
+# Copyright 1999-2015 Gentoo Foundation |
58 |
+# Distributed under the terms of the GNU General Public License v2 |
59 |
+# $Id$ |
60 |
+ |
61 |
+EAPI="5" |
62 |
+PYTHON_COMPAT=( python2_7 ) |
63 |
+PYTHON_REQ_USE="sqlite" |
64 |
+ |
65 |
+inherit distutils-r1 |
66 |
+ |
67 |
+DESCRIPTION="Recipe Organizer and Shopping List Generator for Gnome" |
68 |
+HOMEPAGE="https://thinkle.github.com/gourmet/" |
69 |
+SRC_URI="https://github.com/thinkle/gourmet/archive/${PV}.tar.gz -> ${P}.tar.gz" |
70 |
+ |
71 |
+LICENSE="GPL-2" |
72 |
+SLOT="0" |
73 |
+KEYWORDS="~amd64 ~x86" |
74 |
+IUSE="-i18n -ipython pdf print spell sound web" |
75 |
+ |
76 |
+RDEPEND=">=dev-python/pygtk-2.22.0:2[${PYTHON_USEDEP}] |
77 |
+ >=dev-python/sqlalchemy-0.7.9-r1[${PYTHON_USEDEP}] |
78 |
+ dev-python/pillow[${PYTHON_USEDEP}] |
79 |
+ i18n? ( dev-python/elib-intl[${PYTHON_USEDEP}] ) |
80 |
+ ipython? ( >=dev-python/ipython-0.13.2[${PYTHON_USEDEP}] ) |
81 |
+ pdf? ( |
82 |
+ >=dev-python/reportlab-2.6[${PYTHON_USEDEP}] |
83 |
+ >=dev-python/python-poppler-0.12.1-r4[${PYTHON_USEDEP}] |
84 |
+ ) |
85 |
+ print? ( |
86 |
+ >=dev-python/reportlab-2.6[${PYTHON_USEDEP}] |
87 |
+ >=dev-python/python-poppler-0.12.1-r4[${PYTHON_USEDEP}] |
88 |
+ ) |
89 |
+ spell? ( >=dev-python/gtkspell-python-2.25.3-r1[${PYTHON_USEDEP}] ) |
90 |
+ sound? ( >=dev-python/gst-python-0.10.22-r1:0.10[${PYTHON_USEDEP}] ) |
91 |
+ web? ( >=dev-python/beautifulsoup-3.2.1-r1:python-2[${PYTHON_USEDEP}] )" |
92 |
+DEPEND="${RDEPEND} |
93 |
+ dev-util/intltool |
94 |
+ >=dev-python/python-distutils-extra-2.37-r1[${PYTHON_USEDEP}]" |
95 |
+ |
96 |
+PATCHES=( ${FILESDIR}/no-docs-0.17.0.patch ${FILESDIR}/tostring-to-tobytes.patch ) |
97 |
+DOCS=( ChangeLog CODING.md FAQ README.md TESTS TODO.md ) |
98 |
+ |
99 |
+python_prepare_all() { |
100 |
+ # Modify these lines before copying them out |
101 |
+ sed -i "s:base_dir = '..':base_dir = '/usr/share':" gourmet/settings.py || die |
102 |
+ sed -i 's:data_dir = os.path.join(base_dir, "gourmet", "data"):data_dir = os.path.join(base_dir, "gourmet"):' gourmet/settings.py || die |
103 |
+ sed -i 's:\(icon_base = os.path.join(data_dir,\) "icons",:\1 "gourmet",:' gourmet/settings.py || die |
104 |
+ sed -i 's:\(locale_base = os.path.join(base_dir, "gourmet",\) "build",:\1:' gourmet/settings.py || die |
105 |
+ sed -i 's:\(plugin_base = os.path.join(base_dir,\) "gourmet", "build", "share",:\1:' gourmet/settings.py || die |
106 |
+ distutils-r1_python_prepare_all |
107 |
+} |
108 |
+ |
109 |
+python_prepare() { |
110 |
+ distutils-r1_python_prepare |
111 |
+ sed -i "s:\(lib_dir = \)'../gourmet':\1'$(python_get_sitedir)':" gourmet/settings.py || die |
112 |
+} |
113 |
+ |
114 |
+python_install_all() { |
115 |
+ distutils-r1_python_install_all |
116 |
+ doman gourmet.1 |
117 |
+} |