pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/games/pysolfc



Module Name:    pkgsrc
Committed By:   dholland
Date:           Thu Sep 21 08:12:35 UTC 2023

Modified Files:
        pkgsrc/games/pysolfc: Makefile distinfo
Added Files:
        pkgsrc/games/pysolfc/patches: patch-pysollib_kivy_tkutil.py
            patch-pysollib_ui_tktile_tkutil.py

Log Message:
pysolfc: fix for recent py-Pillow

Update names for constants that were apparently deprecated and have
now been removed. In true pythonic form it only failed at runtime.

Also, depend on py-Pillow directly instead of relying on inheriting it
from py-kivy.

PKGREVISION -> 4


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 pkgsrc/games/pysolfc/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/games/pysolfc/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/games/pysolfc/patches/patch-pysollib_kivy_tkutil.py \
    pkgsrc/games/pysolfc/patches/patch-pysollib_ui_tktile_tkutil.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/games/pysolfc/Makefile
diff -u pkgsrc/games/pysolfc/Makefile:1.41 pkgsrc/games/pysolfc/Makefile:1.42
--- pkgsrc/games/pysolfc/Makefile:1.41  Mon Aug 14 05:24:27 2023
+++ pkgsrc/games/pysolfc/Makefile       Thu Sep 21 08:12:35 2023
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.41 2023/08/14 05:24:27 wiz Exp $
+# $NetBSD: Makefile,v 1.42 2023/09/21 08:12:35 dholland Exp $
 
 DISTNAME=      PySolFC-2.14.1
 PKGNAME=       ${DISTNAME:tl}
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    games python
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=pysolfc/}
 EXTRACT_SUFX=  .tar.xz
@@ -24,6 +24,7 @@ DEPENDS+=     ${PYPKGPREFIX}-six-[0-9]*:../.
 DEPENDS+=      ${PYPKGPREFIX}-kivy-[0-9]*:../../devel/py-kivy
 TEST_DEPENDS+= ${PYPKGPREFIX}-pycotap-[0-9]*:../../devel/py-pycotap
 # not listed in setup.py, but needed
+DEPENDS+=       ${PYPKGPREFIX}-Pillow>=9.4:../../graphics/py-Pillow
 DEPENDS+=      ${PYPKGPREFIX}-Tk-[0-9]*:../../x11/py-Tk
 
 PYTHON_VERSIONS_INCOMPATIBLE=  27

Index: pkgsrc/games/pysolfc/distinfo
diff -u pkgsrc/games/pysolfc/distinfo:1.8 pkgsrc/games/pysolfc/distinfo:1.9
--- pkgsrc/games/pysolfc/distinfo:1.8   Mon Jan  3 10:55:26 2022
+++ pkgsrc/games/pysolfc/distinfo       Thu Sep 21 08:12:35 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2022/01/03 10:55:26 wiz Exp $
+$NetBSD: distinfo,v 1.9 2023/09/21 08:12:35 dholland Exp $
 
 BLAKE2s (PySolFC-2.14.1.tar.xz) = 8d7081754847036c3d5b75220c07a9988f66a15ebff67604dc3e9247022b3f78
 SHA512 (PySolFC-2.14.1.tar.xz) = e1ef4024d61aa9d86fd5e54ccacf12466e05038ad46e814e066ac3e81839c7ff03a59ace6e50aed8c44887a3620c3b36d25b9916ea564fec8a579e473c3684c0
@@ -6,4 +6,6 @@ Size (PySolFC-2.14.1.tar.xz) = 4359204 b
 BLAKE2s (PySolFC-Cardsets-2.0.tar.bz2) = 0c396ef4a3239caa6b3295d5702027e4313a24e30a891dcf14ceb675308dfce4
 SHA512 (PySolFC-Cardsets-2.0.tar.bz2) = 24275cd3656024e268a49487ac75e1e67e61ec20e0a9f88e2d1c287f91314a1a9343856d1202ce468f8863f4e9a9bf27526fbb1979a7d765718b38e64ca0cfc8
 Size (PySolFC-Cardsets-2.0.tar.bz2) = 30687905 bytes
+SHA1 (patch-pysollib_kivy_tkutil.py) = 2a975a7b16b14f97318b45026c6da9a0c299a3cc
 SHA1 (patch-pysollib_settings.py) = fc2c0a5c7d1cfcec86c7052a6d1b05e29bbf84a0
+SHA1 (patch-pysollib_ui_tktile_tkutil.py) = 59f5ed5787d089e2ffeb6d0d06a99b77e1058186

Added files:

Index: pkgsrc/games/pysolfc/patches/patch-pysollib_kivy_tkutil.py
diff -u /dev/null pkgsrc/games/pysolfc/patches/patch-pysollib_kivy_tkutil.py:1.1
--- /dev/null   Thu Sep 21 08:12:35 2023
+++ pkgsrc/games/pysolfc/patches/patch-pysollib_kivy_tkutil.py  Thu Sep 21 08:12:35 2023
@@ -0,0 +1,24 @@
+$NetBSD: patch-pysollib_kivy_tkutil.py,v 1.1 2023/09/21 08:12:35 dholland Exp $
+
+Update names of py-Pillow constants for version 10.x.
+
+--- pysollib/kivy/tkutil.py~   2021-06-13 03:25:14.000000000 +0000
++++ pysollib/kivy/tkutil.py
+@@ -489,7 +489,7 @@ def createBottom(image, color='white', b
+     size = (w - th * 2, h - th * 2)
+     tmp = Image.new('RGBA', size, color)
+     tmp.putalpha(60)
+-    mask = out.resize(size, Image.ANTIALIAS)
++    mask = out.resize(size, Image.Resampling.LANCZOS)
+     out.paste(tmp, (th, th), mask)
+     if backfile:
+         back = Image.open(backfile).convert('RGBA')
+@@ -498,7 +498,7 @@ def createBottom(image, color='white', b
+         a = min(float(w1) / w0, float(h1) / h0)
+         a = a * 0.9
+         w0, h0 = int(w0 * a), int(h0 * a)
+-        back = back.resize((w0, h0), Image.ANTIALIAS)
++        back = back.resize((w0, h0), Image.Resampling.LANCZOS)
+         x, y = (w1 - w0) / 2, (h1 - h0) / 2
+         out.paste(back, (x, y), back)
+     return PIL_Image(image=out)
Index: pkgsrc/games/pysolfc/patches/patch-pysollib_ui_tktile_tkutil.py
diff -u /dev/null pkgsrc/games/pysolfc/patches/patch-pysollib_ui_tktile_tkutil.py:1.1
--- /dev/null   Thu Sep 21 08:12:35 2023
+++ pkgsrc/games/pysolfc/patches/patch-pysollib_ui_tktile_tkutil.py     Thu Sep 21 08:12:35 2023
@@ -0,0 +1,33 @@
+$NetBSD: patch-pysollib_ui_tktile_tkutil.py,v 1.1 2023/09/21 08:12:35 dholland Exp $
+
+Update names of py-Pillow constants for version 10.x.
+
+--- pysollib/ui/tktile/tkutil.py~      2021-06-13 03:25:15.000000000 +0000
++++ pysollib/ui/tktile/tkutil.py
+@@ -268,7 +268,7 @@ if Image:
+         def resize(self, xf, yf):
+             w, h = self._pil_image_orig.size
+             w0, h0 = int(w*xf), int(h*yf)
+-            im = self._pil_image_orig.resize((w0, h0), Image.ANTIALIAS)
++            im = self._pil_image_orig.resize((w0, h0), Image.Resampling.LANCZOS)
+             return PIL_Image(image=im, pil_image_orig=self._pil_image_orig)
+ 
+ 
+@@ -381,7 +381,7 @@ def _createBottomImage(image, color='whi
+     size = (w-th*2, h-th*2)
+     tmp = Image.new('RGBA', size, color)
+     tmp.putalpha(60)
+-    mask = out.resize(size, Image.ANTIALIAS)
++    mask = out.resize(size, Image.Resampling.LANCZOS)
+     out.paste(tmp, (th, th), mask)
+     if backfile:
+         back = Image.open(backfile).convert('RGBA')
+@@ -390,7 +390,7 @@ def _createBottomImage(image, color='whi
+         a = min(float(w1)/w0, float(h1)/h0)
+         a = a*0.9
+         w0, h0 = int(w0*a), int(h0*a)
+-        back = back.resize((w0, h0), Image.ANTIALIAS)
++        back = back.resize((w0, h0), Image.Resampling.LANCZOS)
+         x, y = (w1 - w0) // 2, (h1 - h0) // 2
+         out.paste(back, (x, y), back)
+     return out



Home | Main Index | Thread Index | Old Index