From f71e91f3fbcdebf01a5ecf58164716586daeaa5b Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 4 Aug 2023 03:16:33 +0100 Subject: gentoo auto-resync : 04:08:2023 - 03:16:33 --- games-fps/Manifest.gz | Bin 11890 -> 11899 bytes games-fps/freedm-data/Manifest | 3 +- ...edm-data-0.12.1-Python-PIL-10.0.0-support.patch | 43 +++++++++++++++++++++ games-fps/freedm-data/freedm-data-0.12.1-r1.ebuild | 4 ++ games-fps/freedoom-data/Manifest | 3 +- ...oom-data-0.12.1-Python-PIL-10.0.0-support.patch | 43 +++++++++++++++++++++ .../freedoom-data/freedoom-data-0.12.1-r1.ebuild | 4 ++ 7 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 games-fps/freedm-data/files/freedm-data-0.12.1-Python-PIL-10.0.0-support.patch create mode 100644 games-fps/freedoom-data/files/freedoom-data-0.12.1-Python-PIL-10.0.0-support.patch (limited to 'games-fps') diff --git a/games-fps/Manifest.gz b/games-fps/Manifest.gz index 25b24eb89087..13ee4b95a7c4 100644 Binary files a/games-fps/Manifest.gz and b/games-fps/Manifest.gz differ diff --git a/games-fps/freedm-data/Manifest b/games-fps/freedm-data/Manifest index b18e7ceddd1d..8ae2948094c1 100644 --- a/games-fps/freedm-data/Manifest +++ b/games-fps/freedm-data/Manifest @@ -1,3 +1,4 @@ +AUX freedm-data-0.12.1-Python-PIL-10.0.0-support.patch 1888 BLAKE2B 0e1d81c95ebd4e8cdbe2ecc026b74f4367fc2f4c637bfc4927f5730007bbc65c441001bf64cb4161273da18af42587adcef30398c0b6a4981da7e2800505f8ac SHA512 9a01d013003d565300e34b270e630db18433bdd52d7f03bd03d9fc4da13e72fc56824b03db2fdf8e21b544444564d94ffedd3a51ab7419c97c6238ede19e548e DIST freedoom-0.12.1.tar.gz 18405081 BLAKE2B a508d9ce924ff10640d6017302864869efff474c89fe20a866082b565a1ce65182483a5a692c9ce3329b81472ae9e4fee4ac2511670ecb5dd06ccf81930ac70d SHA512 7db65b039ce98593a86a19b46efe629b85a339c4c020750c3abb95d226fca484c63686ab8c88ecc1e16e86a6aca3b8c7952d85103e0f3db07cc7204fa528daf2 -EBUILD freedm-data-0.12.1-r1.ebuild 1098 BLAKE2B 12c9ce52608ebd1753aa7c0a865080cbd9cbad93d713ca8fd27053c9dbf4acbcea795cec82818a673e7cf763fd2f9e9988fe19c90f7762f81d0452ceda1c38d9 SHA512 68960c300f7fd417537054a10c915d08367e1f96ba505255e78a9d364a8980175ea613c0c61032401e06fd0647ad3e6847eb9ac73d2a6f61587dca6b428cb11e +EBUILD freedm-data-0.12.1-r1.ebuild 1171 BLAKE2B f12a2e04aa538602c1755f56ba525234eff0b172a391232e0172e47b6e23aa15fad19f1110630ef4fc8238a47a67f08c3672e177ba2eeb30047bbc4180f11ba3 SHA512 5d43a092a9eff0d0424e0cf7f4ab10bfa25e77f8876905c79aab874fa8755369253b17485d8750d2ba56611d3ae5bdbe545ae3c62cb6ac80a35972546705e863 MISC metadata.xml 1511 BLAKE2B 83819a1201811582e2b5250598c99dce28d8be5e26833d17fa68d9b49dc493ff195922d55faf00cceb739647d08c573c05998655762e3121144d615f64c57133 SHA512 39ca720f35a6def9804960b9ca6b4ccd5b6b15b25f8a37a449669cfb168eafab1d293a772e1822e1e8d5bad716ee6a7e45ea71b785bbe29bda067f3086c2d17a diff --git a/games-fps/freedm-data/files/freedm-data-0.12.1-Python-PIL-10.0.0-support.patch b/games-fps/freedm-data/files/freedm-data-0.12.1-Python-PIL-10.0.0-support.patch new file mode 100644 index 000000000000..9cc65812de85 --- /dev/null +++ b/games-fps/freedm-data/files/freedm-data-0.12.1-Python-PIL-10.0.0-support.patch @@ -0,0 +1,43 @@ +https://bugs.gentoo.org/909540 +https://github.com/freedoom/freedoom/issues/1015 +https://github.com/freedoom/freedoom/pull/1027 + +From d64ddc6ea90406e21b4b93f5a1e7f99abfaac0d9 Mon Sep 17 00:00:00 2001 +From: Steven Elliott +Date: Sun, 16 Jul 2023 14:52:04 -0400 +Subject: [PATCH] create_caption: Python PIL 10.0.0 support (#1027) + +To support Python PIL 10.0.0 this change uses newer API textbbox() when +available, and older API textsize() when not. +--- + graphics/text/create_caption | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/graphics/text/create_caption b/graphics/text/create_caption +index 7ddbd8d66..22bc0507d 100755 +--- a/graphics/text/create_caption ++++ b/graphics/text/create_caption +@@ -18,8 +18,21 @@ background_image.load() + background_image = background_image.convert("RGBA") + image = Image.new("RGBA", background_image.size, (0, 0, 0, 0)) + draw = ImageDraw.Draw(image) +-txt1_size = draw.textsize(txt1, font=font) +-txt2_size = draw.textsize(txt2, font=font) ++ ++# Getting the text size is tricky since for newer PIL, such as 10.0.0, only ++# textbbox() is supported, but for older PIL, such 7.2.0, only textsize() ++# is supported. The solution is to default to the newer API, but fallback to ++# the older one when it is not available. ++try: ++ # This newer API returns a four item tuple. The "xy" kwarg is returned in ++ # the first two items, and last two items is the size needed, but with "xy" ++ # added, so passing "(0, 0)" returns the size needed. ++ txt1_size = draw.textbbox(xy=(0, 0), text=txt1, font=font)[2:] ++ txt2_size = draw.textbbox(xy=(0, 0), text=txt2, font=font)[2:] ++except: ++ # This older API simply returns the size needed. ++ txt1_size = draw.textsize(txt1, font=font) ++ txt2_size = draw.textsize(txt2, font=font) + + draw.text( + (5, int(image.height - txt1_size[1] - 5)), diff --git a/games-fps/freedm-data/freedm-data-0.12.1-r1.ebuild b/games-fps/freedm-data/freedm-data-0.12.1-r1.ebuild index 354720400a4a..29b53f429e6a 100644 --- a/games-fps/freedm-data/freedm-data-0.12.1-r1.ebuild +++ b/games-fps/freedm-data/freedm-data-0.12.1-r1.ebuild @@ -20,6 +20,10 @@ BDEPEND=" app-text/asciidoc games-util/deutex[png]" +PATCHES=( + "${FILESDIR}"/${PN}-0.12.1-Python-PIL-10.0.0-support.patch +) + S="${WORKDIR}/freedoom-${PV}" DOOMWADPATH=share/doom diff --git a/games-fps/freedoom-data/Manifest b/games-fps/freedoom-data/Manifest index 08fbcb866695..df5e99f1a9ec 100644 --- a/games-fps/freedoom-data/Manifest +++ b/games-fps/freedoom-data/Manifest @@ -1,3 +1,4 @@ +AUX freedoom-data-0.12.1-Python-PIL-10.0.0-support.patch 1888 BLAKE2B f3efc96d1be891441c6c2cfe62d61e479690730b37f6141bf8e93eab3433259850f0d6a9edff3737755a0d4f61a32ff0b09067cb83eee1892367db3212b66c5a SHA512 18dfd974d010e0c773ec999dc10739c0300eb768d3e92cad8a9e601341970163f7316d3c319758b60ae98fc8273879b731635a694f2eb60927fd338e28412c8d DIST freedoom-0.12.1.tar.gz 18405081 BLAKE2B a508d9ce924ff10640d6017302864869efff474c89fe20a866082b565a1ce65182483a5a692c9ce3329b81472ae9e4fee4ac2511670ecb5dd06ccf81930ac70d SHA512 7db65b039ce98593a86a19b46efe629b85a339c4c020750c3abb95d226fca484c63686ab8c88ecc1e16e86a6aca3b8c7952d85103e0f3db07cc7204fa528daf2 -EBUILD freedoom-data-0.12.1-r1.ebuild 1130 BLAKE2B 5ebe5686d2875f0ea9c30074502f05d9d12f6f6a9b52d45412e84a33c96f0346b82e339ff48bc28cad66aee17889fc55529318df55a3a6f222ffd84c05100c0f SHA512 b53f7eabfb519b44d8332dd6fde5f6d6fb7329576d049961420be4ca4ba102c44c86aeef0be7efdc9491570d03e69af04c296da73b63d2203f924127f5b9ccb8 +EBUILD freedoom-data-0.12.1-r1.ebuild 1203 BLAKE2B 11c1745c3905346293575cde77a74055ba87c9baed1fc90d6b7681459e12fd7ffa314f2b90789a3a2ba6ec2b21be55ef91a21fc6001c49f0de59731c2627c5da SHA512 b68a76f3b86bf0efe1a2d5b92f917253d7c8bab50e35d9b5b3dc3fa8af40811a6b93deca969351147865d1c9bd9905eb44a6f95bc2ede31712701a542fb5f5d3 MISC metadata.xml 1840 BLAKE2B a61c6d46ef2b4a6083856d835e3cb787158de4e5313cf5b93e9562183b7aff1ddcf188b81e1215efad27ae148667b75ebb9062610c0968057285e7779605fe49 SHA512 498399ee51da2ada041936c46e481e4fdeae12f0d4913355343469eb8ad221c5e8314025ae8d520b91a1b518dee3215bd7e764b835854ce00f9c529b5189d24c diff --git a/games-fps/freedoom-data/files/freedoom-data-0.12.1-Python-PIL-10.0.0-support.patch b/games-fps/freedoom-data/files/freedoom-data-0.12.1-Python-PIL-10.0.0-support.patch new file mode 100644 index 000000000000..333bff6d2598 --- /dev/null +++ b/games-fps/freedoom-data/files/freedoom-data-0.12.1-Python-PIL-10.0.0-support.patch @@ -0,0 +1,43 @@ +https://bugs.gentoo.org/909548 +https://github.com/freedoom/freedoom/issues/1015 +https://github.com/freedoom/freedoom/pull/1027 + +From d64ddc6ea90406e21b4b93f5a1e7f99abfaac0d9 Mon Sep 17 00:00:00 2001 +From: Steven Elliott +Date: Sun, 16 Jul 2023 14:52:04 -0400 +Subject: [PATCH] create_caption: Python PIL 10.0.0 support (#1027) + +To support Python PIL 10.0.0 this change uses newer API textbbox() when +available, and older API textsize() when not. +--- + graphics/text/create_caption | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/graphics/text/create_caption b/graphics/text/create_caption +index 7ddbd8d66..22bc0507d 100755 +--- a/graphics/text/create_caption ++++ b/graphics/text/create_caption +@@ -18,8 +18,21 @@ background_image.load() + background_image = background_image.convert("RGBA") + image = Image.new("RGBA", background_image.size, (0, 0, 0, 0)) + draw = ImageDraw.Draw(image) +-txt1_size = draw.textsize(txt1, font=font) +-txt2_size = draw.textsize(txt2, font=font) ++ ++# Getting the text size is tricky since for newer PIL, such as 10.0.0, only ++# textbbox() is supported, but for older PIL, such 7.2.0, only textsize() ++# is supported. The solution is to default to the newer API, but fallback to ++# the older one when it is not available. ++try: ++ # This newer API returns a four item tuple. The "xy" kwarg is returned in ++ # the first two items, and last two items is the size needed, but with "xy" ++ # added, so passing "(0, 0)" returns the size needed. ++ txt1_size = draw.textbbox(xy=(0, 0), text=txt1, font=font)[2:] ++ txt2_size = draw.textbbox(xy=(0, 0), text=txt2, font=font)[2:] ++except: ++ # This older API simply returns the size needed. ++ txt1_size = draw.textsize(txt1, font=font) ++ txt2_size = draw.textsize(txt2, font=font) + + draw.text( + (5, int(image.height - txt1_size[1] - 5)), diff --git a/games-fps/freedoom-data/freedoom-data-0.12.1-r1.ebuild b/games-fps/freedoom-data/freedoom-data-0.12.1-r1.ebuild index 62bcb30b42a9..f50e3558ffb1 100644 --- a/games-fps/freedoom-data/freedoom-data-0.12.1-r1.ebuild +++ b/games-fps/freedoom-data/freedoom-data-0.12.1-r1.ebuild @@ -20,6 +20,10 @@ BDEPEND=" app-text/asciidoc games-util/deutex[png]" +PATCHES=( + "${FILESDIR}"/${PN}-0.12.1-Python-PIL-10.0.0-support.patch +) + S="${WORKDIR}/freedoom-${PV}" DOOMWADPATH=share/doom -- cgit v1.2.3