From 2012566954daf6273ece3130bdf17b8eee8aaf55 Mon Sep 17 00:00:00 2001 From: Lenard Spencer Date: Mon, 19 Jun 2017 06:52:22 +0200 Subject: [PATCH] misc/gourmet: Switch from tostring to tobytes in the code. This is needed for the newer python-2.7.x. Include two additional dependencies Signed-off-by: Matteo Bernardini --- misc/gourmet/gourmet.SlackBuild | 5 ++++- misc/gourmet/gourmet.info | 2 +- misc/gourmet/slack-desc | 2 +- misc/gourmet/tostring-to-tobytes.patch | 26 ++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 misc/gourmet/tostring-to-tobytes.patch diff --git a/misc/gourmet/gourmet.SlackBuild b/misc/gourmet/gourmet.SlackBuild index e9a2f0f93d..0121943095 100644 --- a/misc/gourmet/gourmet.SlackBuild +++ b/misc/gourmet/gourmet.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=gourmet VERSION=${VERSION:-0.17.4} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -69,6 +69,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Patch to replace removed tostring() with tobytes() +patch -p1 < $CWD/tostring-to-tobytes.patch + python setup.py install --root=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ diff --git a/misc/gourmet/gourmet.info b/misc/gourmet/gourmet.info index 16bbef1a65..64f0f25902 100644 --- a/misc/gourmet/gourmet.info +++ b/misc/gourmet/gourmet.info @@ -5,6 +5,6 @@ DOWNLOAD="https://github.com/thinkle/gourmet/archive/0.17.4.tar.gz" MD5SUM="937334364abc3093709a604c1d473e9f" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="SQLAlchemy python-distutils-extra reportlab pygtkspell gst0-python python-elib.intl" +REQUIRES="SQLAlchemy lxml python-distutils-extra reportlab pygtkspell gst0-python python-elib.intl pypoppler" MAINTAINER="Erwin van Zanten" EMAIL="e.van.zanten.evz@gmail.com" diff --git a/misc/gourmet/slack-desc b/misc/gourmet/slack-desc index 16eb4722a4..ae51c1b38c 100644 --- a/misc/gourmet/slack-desc +++ b/misc/gourmet/slack-desc @@ -6,7 +6,7 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -gourmet: gourmet (A Recipe organizer for Linux) +gourmet: Gourmet (a recipe organizer for Linux) gourmet: gourmet: Gourmet Recipe Manager is a recipe-organizer that allows you gourmet: to collect, search, organize, and browse your recipes. diff --git a/misc/gourmet/tostring-to-tobytes.patch b/misc/gourmet/tostring-to-tobytes.patch new file mode 100644 index 0000000000..e42c59403d --- /dev/null +++ b/misc/gourmet/tostring-to-tobytes.patch @@ -0,0 +1,26 @@ +diff --git a/gourmet/gtk_extras/ratingWidget.py b/gourmet/gtk_extras/ratingWidget.py +index 0e01735..efa6463 100644 +--- a/gourmet/gtk_extras/ratingWidget.py ++++ b/gourmet/gtk_extras/ratingWidget.py +@@ -135,7 +135,7 @@ class StarGenerator: + if is_rgba: rowstride = 4 + else: rowstride = 3 + pb=gtk.gdk.pixbuf_new_from_data( +- image.tostring(), ++ image.tobytes(), + gtk.gdk.COLORSPACE_RGB, + is_rgba, + 8, +diff --git a/gourmet/plugins/browse_recipes/icon_helpers.py b/gourmet/plugins/browse_recipes/icon_helpers.py +index 61c772c..2e7b08b 100644 +--- a/gourmet/plugins/browse_recipes/icon_helpers.py ++++ b/gourmet/plugins/browse_recipes/icon_helpers.py +@@ -38,7 +38,7 @@ def get_pixbuf_from_image (image): + if is_rgba: rowstride = 4 + else: rowstride = 3 + pb=gtk.gdk.pixbuf_new_from_data( +- image.tostring(), ++ image.tobytes(), + gtk.gdk.COLORSPACE_RGB, + is_rgba, + 8,