summaryrefslogtreecommitdiffstats
path: root/games/pysolfc
diff options
context:
space:
mode:
Diffstat (limited to 'games/pysolfc')
-rw-r--r--games/pysolfc/pillow6.patch47
-rw-r--r--games/pysolfc/pysolfc.SlackBuild18
-rw-r--r--games/pysolfc/pysolfc.info2
3 files changed, 63 insertions, 4 deletions
diff --git a/games/pysolfc/pillow6.patch b/games/pysolfc/pillow6.patch
new file mode 100644
index 0000000000..80f0f1868e
--- /dev/null
+++ b/games/pysolfc/pillow6.patch
@@ -0,0 +1,47 @@
+From fa20e7f834a1385f383f09a3aa8f4fb4bb86da18 Mon Sep 17 00:00:00 2001
+From: Shlomi Fish <shlomif@shlomifish.org>
+Date: Fri, 5 Apr 2019 17:13:13 +0300
+Subject: [PATCH] Try fixing issue #108 - compat with pillow 6.0
+
+See https://github.com/shlomif/PySolFC/issues/108 .
+---
+ pysollib/mfxutil.py | 2 +-
+ pysollib/ui/tktile/tkutil.py | 11 +++--------
+ 2 files changed, 4 insertions(+), 9 deletions(-)
+
+diff --git a/pysollib/mfxutil.py b/pysollib/mfxutil.py
+index a0d0aed4..f461ed10 100644
+--- a/pysollib/mfxutil.py
++++ b/pysollib/mfxutil.py
+@@ -51,7 +51,7 @@
+ from PIL import PpmImagePlugin # noqa: F401
+ Image._initialized = 2
+ USE_PIL = False
+-if TOOLKIT == 'tk' and Image and Image.VERSION >= '1.1.7':
++if TOOLKIT == 'tk' and Image:
+ USE_PIL = True
+
+ # debug
+diff --git a/pysollib/ui/tktile/tkutil.py b/pysollib/ui/tktile/tkutil.py
+index af43130a..0319e6d3 100644
+--- a/pysollib/ui/tktile/tkutil.py
++++ b/pysollib/ui/tktile/tkutil.py
+@@ -353,15 +353,10 @@ def shadowImage(image, color='#3896f8', factor=0.3):
+ if not hasattr(image, '_pil_image'):
+ return None
+ im = image._pil_image
+- if Image.VERSION >= '1.1.7':
+- # use an alpha image
+- sh = Image.new('RGBA', im.size, color)
+- sh.putalpha(100)
+- out = Image.composite(sh, im, im)
+- return PIL_Image(image=out)
++ # use an alpha image
+ sh = Image.new('RGBA', im.size, color)
+- tmp = Image.blend(im, sh, factor)
+- out = Image.composite(tmp, im, im)
++ sh.putalpha(100)
++ out = Image.composite(sh, im, im)
+ return PIL_Image(image=out)
+
+
diff --git a/games/pysolfc/pysolfc.SlackBuild b/games/pysolfc/pysolfc.SlackBuild
index 02ef038041..7bfc1d74c0 100644
--- a/games/pysolfc/pysolfc.SlackBuild
+++ b/games/pysolfc/pysolfc.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for pysolfc
@@ -43,10 +43,13 @@
# - Update README and slack-desc.
SRCNAM=PySolFC
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pysolfc
VERSION=${VERSION:-2.4.0}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
CARDSETVER=${CARDSETVER:-2.0}
CARDSETS=$SRCNAM-Cardsets--Minimal-$CARDSETVER
@@ -59,7 +62,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -76,6 +86,8 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+patch -p1 < $CWD/pillow6.patch
+
# 20181012 bkw: Slightly dirty hack, to combat a dirty hack from upstream.
# Begin rant:
# Basically, the old versions of pysol used the python 'random' library,
@@ -119,4 +131,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/pysolfc/pysolfc.info b/games/pysolfc/pysolfc.info
index acb95cd6b2..c853cad8cd 100644
--- a/games/pysolfc/pysolfc.info
+++ b/games/pysolfc/pysolfc.info
@@ -7,6 +7,6 @@ MD5SUM="43d3a6f82418a9cb7452ab7bc0e1401b \
85c0edeeb0e319d54f9ebcd4165a2077"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="six"
+REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"