Received: from sebsite.pw (sebsite.pw [71.19.150.50]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 8EC867811B3 for <~alpine/aports@lists.alpinelinux.org>; Thu, 17 Feb 2022 04:08:04 +0000 (UTC) Received: from localhost.localdomain (unknown [8.9.88.219]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by sebsite.pw (Postfix) with ESMTPSA id 74C6A38078C; Thu, 17 Feb 2022 03:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sebsite.pw; s=sebsite; t=1645070288; bh=93jjvX5l3q1tC8VUUNS5uN6oOBcb1Jwerj/6Ts9f8xA=; h=From:To:Cc:Subject:Date; b=o0HQ0NAuR+PL88VowSKXbfuxSlTzG/dL572BaKJDLxePcmNDOJjHRWPuI6teD8Xtg NiPbS1UpKm9apBhxzZtV2PsJLnK79yErX3xwNwkh5tn4Em48YhztCtX/T91qX2u+yu y32m5hqP396V7eonUixm9fJwPX21XsySV6fYFV/Nzf/ZAXqz1UrN9GIDzYn06lZW/L EUlnUCRorESDwKlHyIg79N8DdY2JCNYMVq07Bwj8pD3DRqZE1rf/4nyp7RqsSpmCfA pnwzdJssZfVeLsE8NWYq/JmM8ADDUuNN2TXjwPvcTsPTsTzVCKVD7OUlWSQukO835u orbstbDddYokQ== From: Sebastian To: ~alpine/aports@lists.alpinelinux.org Cc: Sebastian Subject: [PATCH] testing/ace-of-penguins: fix segfault on help screen Date: Wed, 16 Feb 2022 22:56:46 -0500 Message-Id: <20220217035646.27751-1-sebastian@sebsite.pw> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Signed-off-by: Sebastian --- testing/ace-of-penguins/APKBUILD | 6 ++++-- testing/ace-of-penguins/fix-font.patch | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 testing/ace-of-penguins/fix-font.patch diff --git a/testing/ace-of-penguins/APKBUILD b/testing/ace-of-penguins/APKBUILD index 83ea1ee6..5ab3d880 100644 --- a/testing/ace-of-penguins/APKBUILD +++ b/testing/ace-of-penguins/APKBUILD @@ -1,8 +1,8 @@ -# Contributor: Sebastian Hudak +# Contributor: Keith Toh # Maintainer: Sebastian Hudak pkgname=ace-of-penguins pkgver=1.4 -pkgrel=0 +pkgrel=1 pkgdesc="Collection of one-player games for X" url="https://www.delorie.com/store/ace/" arch="all" @@ -14,6 +14,7 @@ subpackages="$pkgname-doc" # https://aur.archlinux.org/packages/ace-of-penguins source="https://www.delorie.com/store/ace/ace-$pkgver.tar.gz ace.patch + fix-font.patch canfield.desktop freecell.desktop golf.desktop @@ -53,6 +54,7 @@ package() { sha512sums=" cd382db95dc17d75a76809c7f1e096e14f5863c1166aa5db7f93204ce949a9ed21979212946b9d3a09667f4a93b30f4cc44a220940f9b5dd8996f28ecb4a6dcc ace-1.4.tar.gz 6846662deda4c21a89ecaf55afe1580f82f67122f236618a94dcd584cd3a5a76d0429c9bd4ac808e29d04ae78ab9cf9417e274585f87af46a0a769af4917f509 ace.patch +b3cd34677326d4b9e47875698aa1bca6985231e1f0e14dc9acdb815c443f767f1199dbd8dd0c72a3aaa2eba62e35c3473a60acaab7c606d848c6cbdb854d3487 fix-font.patch 4ba6813cb57d2ed41ee8a582b4cc3026a9f69d4c78ee5a012cdcb3284efee0b3efb04917ad2bd9fb4846b7007cce4bfef7e5e9bd8e91c229b4ed31d077f4f10b canfield.desktop 3f0b3a55af0df885d23fcd73764e0548b7f7d0e25eb881ee1e24d108dd51a234e4140d37a6c616bc39dc2eb70aeeb0f370a1c0ef0ec3314ffb4a07ab89e0b005 freecell.desktop d76332b739d938ed29ad30f41baaddff6efa70e674aa7354f60b342f828d470212bebacb2a02f6921b8740a616b97b97002455eb153555d7350ffab3ea7b670a golf.desktop diff --git a/testing/ace-of-penguins/fix-font.patch b/testing/ace-of-penguins/fix-font.patch new file mode 100644 index 00000000..6326dc91 --- /dev/null +++ b/testing/ace-of-penguins/fix-font.patch @@ -0,0 +1,24 @@ +Without this patch, trying to open the help screen could make the program +segfault if the appropriate fonts weren't installed. + +--- ace-1.4/lib/help.c 2022-02-17 03:11:56.410174316 +0000 ++++ ace-1.4-alpine/lib/help.c 2022-02-17 03:46:31.476912695 +0000 +@@ -179,7 +179,18 @@ + for (i=0; i<17; i++) + { + if (!fonts[i]) ++ { + fonts[i] = XLoadQueryFont(display, i & STYLE_TT ? "fixed" : "variable"); ++ if (!fonts[i]) ++ { ++ int count; ++ char **fontlist = XListFonts(display, "*", 1, &count); ++ if (count == 0) ++ abort(); ++ fonts[i] = XLoadQueryFont(display, fontlist[0]); ++ XFreeFontNames(fontlist); ++ } ++ } + thin_space[i] = XTextWidth(fonts[i], " ", 1); + } + for (i=0; i