From: lilmike <lilmike@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] New package: freedoom-0.12.1
Date: Mon, 06 Nov 2023 21:01:20 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47100@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]
There is a new pull request by lilmike against master on the void-packages repository
https://github.com/lilmike/void-packages freedoom
https://github.com/void-linux/void-packages/pull/47100
New package: freedoom-0.12.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/47100.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-freedoom-47100.patch --]
[-- Type: text/x-diff, Size: 3109 bytes --]
From 1f7a900ba6e6a48ca0c0376fafcf49736ce59952 Mon Sep 17 00:00:00 2001
From: Michael Taboada <michael@michaels.world>
Date: Sat, 29 Oct 2022 22:49:54 -0700
Subject: [PATCH] New package: freedoom-0.12.1
---
.../patches/fix-pillow-breakage.patch | 28 +++++++++++++++++++
srcpkgs/freedoom/template | 21 ++++++++++++++
2 files changed, 49 insertions(+)
create mode 100644 srcpkgs/freedoom/patches/fix-pillow-breakage.patch
create mode 100644 srcpkgs/freedoom/template
diff --git a/srcpkgs/freedoom/patches/fix-pillow-breakage.patch b/srcpkgs/freedoom/patches/fix-pillow-breakage.patch
new file mode 100644
index 0000000000000..0701c280a1d2b
--- /dev/null
+++ b/srcpkgs/freedoom/patches/fix-pillow-breakage.patch
@@ -0,0 +1,28 @@
+diff --git a/graphics/text/create_caption b/graphics/text/create_caption
+index 7ddbd8d6..22bc0507 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/srcpkgs/freedoom/template b/srcpkgs/freedoom/template
new file mode 100644
index 0000000000000..14882c7dbcd26
--- /dev/null
+++ b/srcpkgs/freedoom/template
@@ -0,0 +1,21 @@
+# Template file for 'freedoom'
+pkgname=freedoom
+version=0.12.1
+revision=1
+build_style=gnu-makefile
+hostmakedepends="asciidoc deutex python3 python3-Pillow"
+short_desc="Free game based on the Doom engine"
+maintainer="Michael Taboada <voidpkgs@forwardme.email>"
+license="BSD-3-Clause"
+homepage="https://freedoom.github.io/"
+distfiles="https://github.com/$pkgname/$pkgname/releases/download/v$version/$pkgname-$version.tar.xz"
+checksum=bad733695664c699fc7f02c833916c889b080fadc3b503c40f0aaba3bf637380
+
+pre_build() {
+ # CPP doesn't seem to be used for a c preprocessor in this makefile (?), so replacing the value in the makefile breaks the build.
+ make_build_args="CPP=${XBPS_BUILDDIR}/freedoom-${version}/scripts/simplecpp"
+}
+
+post_install() {
+ vlicense ${XBPS_BUILDDIR}/freedoom-${version}/COPYING.adoc
+}
next reply other threads:[~2023-11-06 20:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 20:01 lilmike [this message]
2023-11-16 20:12 ` [PR REVIEW] " classabbyamp
2023-11-16 20:12 ` classabbyamp
2023-11-16 20:12 ` classabbyamp
2023-11-16 20:12 ` classabbyamp
2023-11-16 20:39 ` [PR PATCH] [Updated] " lilmike
2023-11-16 20:41 ` [PR REVIEW] " lilmike
2023-11-16 20:48 ` classabbyamp
2023-11-16 20:57 ` [PR PATCH] [Updated] " lilmike
2024-02-15 1:45 ` github-actions
2024-02-15 15:30 ` lilmike
2024-02-15 21:55 ` [PR PATCH] [Updated] " lilmike
2024-05-16 1:46 ` github-actions
2024-05-16 7:19 ` lilmike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47100@inbox.vuxu.org \
--to=lilmike@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).