summaryrefslogtreecommitdiff
path: root/dev-games/t4k-common
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /dev-games/t4k-common
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'dev-games/t4k-common')
-rw-r--r--dev-games/t4k-common/Manifest5
-rw-r--r--dev-games/t4k-common/files/t4k-common-0.1.1-fix-declaration.patch10
-rw-r--r--dev-games/t4k-common/files/t4k-common-0.1.1-missing-text.patch14
-rw-r--r--dev-games/t4k-common/files/t4k-common-0.1.1-svg-libxml2.patch73
-rw-r--r--dev-games/t4k-common/t4k-common-0.1.1-r1.ebuild (renamed from dev-games/t4k-common/t4k-common-0.1.1.ebuild)28
5 files changed, 118 insertions, 12 deletions
diff --git a/dev-games/t4k-common/Manifest b/dev-games/t4k-common/Manifest
index e24e7fd80c59..4ae6ea33dd9e 100644
--- a/dev-games/t4k-common/Manifest
+++ b/dev-games/t4k-common/Manifest
@@ -1,6 +1,9 @@
AUX t4k-common-0.1.1-ICONV_CONST.patch 193 BLAKE2B 9761594d7a48c44728414440247bbfc7757463c6898108d2c76ecedd9b2ad498a60cd4de4408159abc8263a3c0efd4a8d68c87f1d32fb0449862de4154d23bb7 SHA512 1f2718cd2be30436a342ef33236a4b456e8d14c104af5080a407cb770adcd5ac10575737a80ff0a1fde928bc4fb2782f747d6df976f137335cbbe37e9b42d45a
+AUX t4k-common-0.1.1-fix-declaration.patch 441 BLAKE2B 3b21c72a8f5e4609d70a0bb4edd83eba25f8032d4ae8578e9a52076783bc45f4e6023b2476faa270dd1aac1195909dea206e7ba37562b80683a28f8fa6c4c23e SHA512 92747a5d8b449425773779256b888b94dca1ffc879ac859f3cbd3a1f2bc5d5eabf2fb6e74fa8f3db079dddc3e8663bb939e90493197f4d9a2c0ddfa708bea8df
AUX t4k-common-0.1.1-fno-common.patch 424 BLAKE2B 2a844d9d9fe8cea071b6541ef99281106c00d441bff291d7f30c467fdc5773af80e6fb5d48f2c0fa3737a4e63311a895de7f5d819b03d83b891126862df5a049 SHA512 226c4497eca10f202ac58d51b37bde004385276da6f64cf18e8737634469f524fe2ec6c34e12576b4d88e55e8c9f565231512a9fcf5111de459016e4a10df1bb
AUX t4k-common-0.1.1-libpng.patch 685 BLAKE2B 8d6df4219586670725cba5bd8437d256d5c0ff0f372d9f0764b9456b7dd9d5b54c20a337b454249edb97251f8027d9f3c87a76f5ba741c7283c748e2b97086e4 SHA512 be6f47f6115b5da190cdfd21bf33b7e87ed5912d3300fec7cd503289acc954f15dcd997afc150b5e755510003138bd035cfec7248c12bb7af088f8d85a9660d6
+AUX t4k-common-0.1.1-missing-text.patch 532 BLAKE2B 8bc1f7803806f86f9e33fbdb0dc5bb9bbab279ad52a81833eaab1ffeb52be49bbf73a2f278fa6637cddb9a9e61bf231c40de8e6f0b80c684d3a7faef78b8fa63 SHA512 503c9d9e4ee68e5f5b869649e315ec4c3bb3630e488476424fdb1d0e86686edf6f6f4004134edac7e27c728968b8c0718ad6f9a604aeff64294fa240e81391c5
+AUX t4k-common-0.1.1-svg-libxml2.patch 2860 BLAKE2B 0a4d53638107044e9a817244dbd77231047ebc5050b13a89118c652538a0615ea508186a5fd3d1ae7a6c29089362cae3daed45e4ace0ae49a2f9773900489a76 SHA512 b6ddf673b15aecc0d7bd16d14ce1d9790ebce4884c0304a849649e87a872b67b227713694f5391491be591b84ac981e48a89585c0de93585b62698d977d962ef
DIST t4k-common-0.1.1.tar.gz 622239 BLAKE2B f2ddbb3b8815ad05001f99b8cfd49fda3c1f59e9dc340bf9739c2072e9f4a2faf069bf9f774f95818a0cb59302e557d3d6408530e8ff82adb6b9fd84b36e2641 SHA512 d7fdb469452637187adcb4b5d2907c05687765b1b75cd3a28b75222b2a0358f1962e1a245d88129b4dbede845fde8ff718cf9a7b0f97a12cb21a8791073fbe3d
-EBUILD t4k-common-0.1.1.ebuild 1127 BLAKE2B f9a716db65334c6efb3de17208a8c3d7893ecb847a6dadb540500bcccaf50de82137b57faca7d0be1d39bde4dc324c08c3ee1bbfbe0b5a6a61a838521048293a SHA512 52f895adfb5e63754ecbb09b50b79a02ca6c2db874a561400e76c92056090e9e2e2495b5e9465a5fca4e4466a9eef4d2191962656b954511c0fdf0c17ab75f45
+EBUILD t4k-common-0.1.1-r1.ebuild 1333 BLAKE2B d320443f2954055ce2775cbbe7c046d652d0f50bf25958a4c45382caad6f80cf42e0784108518dbe3738c613e67af7ad8d05e2fafe4f030e05442f78d778c366 SHA512 5670ef68640bd1567198b849a5dc79d52f3d825b69025d26b7f70af856f8e8dfc73ec4e7c667517e4213c00518c1dedb985d874f266835d180bc74bb8f481ac5
MISC metadata.xml 336 BLAKE2B 6e8da7610b8afe5bae34c30ff55d49fac65fcd8889a24e8295516e2a59f41a54b6728c34bedb6588ea6707c0837103a0d2b95598d1743a2a122cc2e54d50f10c SHA512 7f43f1bcfa355ebfe96ae7dfc7165ffa54cf90ea3aa7e58b816f85d04d7c4ba5dcf7a8c7d7eb4395bcff7e8f1206423f853cbc6729774ee582d48603afc123bc
diff --git a/dev-games/t4k-common/files/t4k-common-0.1.1-fix-declaration.patch b/dev-games/t4k-common/files/t4k-common-0.1.1-fix-declaration.patch
new file mode 100644
index 000000000000..8b1188039f42
--- /dev/null
+++ b/dev-games/t4k-common/files/t4k-common-0.1.1-fix-declaration.patch
@@ -0,0 +1,10 @@
+https://bugs.gentoo.org/759574
+--- a/src/t4k_menu.c 2013-12-02 10:50:23.000000000 -0500
++++ b/src/t4k_menu.c 2021-01-04 19:49:20.561524579 -0500
+@@ -152,5 +152,5 @@
+ char* find_longest_text(MenuNode* menu, int* length);
+ int find_longest_menu_page(MenuNode* menu);
+-void set_font_size();
++void set_font_size(bool uniform);
+ void prerender_menu(MenuNode* menu);
+ int min(int a, int b);
diff --git a/dev-games/t4k-common/files/t4k-common-0.1.1-missing-text.patch b/dev-games/t4k-common/files/t4k-common-0.1.1-missing-text.patch
new file mode 100644
index 000000000000..72cb5372c282
--- /dev/null
+++ b/dev-games/t4k-common/files/t4k-common-0.1.1-missing-text.patch
@@ -0,0 +1,14 @@
+Fix some missing (transparent) text with libsdl-1.2.15_p20210224
+e.g. empty menus in tuxmath
+--- a/src/t4k_sdl.c
++++ b/src/t4k_sdl.c
+@@ -1401,3 +1401,3 @@
+ /* Use color key for eventual transparency: */
+- color_key = SDL_MapRGB(bg->format, 30, 30, 30);
++ color_key = SDL_MapRGBA(bg->format, 30, 30, 30, 0xff);
+ SDL_FillRect(bg, NULL, color_key);
+@@ -1448,3 +1448,3 @@
+ SDL_SetColorKey(bg, SDL_SRCCOLORKEY|SDL_RLEACCEL, color_key);
+- out = SDL_DisplayFormatAlpha(bg);
++ out = SDL_DisplayFormat(bg);
+ SDL_FreeSurface(bg);
diff --git a/dev-games/t4k-common/files/t4k-common-0.1.1-svg-libxml2.patch b/dev-games/t4k-common/files/t4k-common-0.1.1-svg-libxml2.patch
new file mode 100644
index 000000000000..590be3858de0
--- /dev/null
+++ b/dev-games/t4k-common/files/t4k-common-0.1.1-svg-libxml2.patch
@@ -0,0 +1,73 @@
+https://bugs.gentoo.org/763591
+
+https://github.com/tux4kids/t4kcommon/commit/99e9d3895b480d5998513592f6af25096c6d1c50
+From: Paul Huff <paul.huff@gmail.com>
+Date: Wed, 1 May 2019 19:56:12 -0600
+Subject: [PATCH] Use libxml2 to get info from svg files for frame counts since
+ librsvg doesn't let you access the description anymore.
+--- a/src/t4k_loaders.c
++++ b/src/t4k_loaders.c
+@@ -41,4 +41,6 @@
+ #include<librsvg/rsvg.h>
+ #include<librsvg/rsvg-cairo.h>
++#include <libxml/parser.h>
++#include <libxml/tree.h>
+ #endif
+
+@@ -49,4 +51,5 @@
+
+ #ifdef HAVE_RSVG
++int get_number_of_frames_from_svg(const char *file_name);
+ SDL_Surface* load_svg(const char* file_name, int width, int height, const char* layer_name);
+ sprite* load_svg_sprite(const char* file_name, int width, int height);
+@@ -161,4 +164,43 @@
+ #ifdef HAVE_RSVG
+
++int get_number_of_frames_from_svg(const char* file_name) {
++ xmlDocPtr svgFile;
++ xmlNodePtr svgNode = NULL, nodeIterator = NULL;
++ int number_of_frames = 0, found = 0;
++
++ svgFile = xmlReadFile(file_name, NULL, XML_PARSE_RECOVER | XML_PARSE_NOERROR | XML_PARSE_NOWARNING);
++
++ /* If it's null something's really wrong because we're trying to load a sprite that doesn't exist */
++ if(svgFile == NULL) {
++ DEBUGMSG(debug_loaders, "get_number_of_frames_from_svg: couldn't load svgFile: %s\n", file_name);
++ return 0;
++ }
++
++ svgNode = xmlDocGetRootElement(svgFile);
++
++ /* If it's null then something's really wrong because there should be a root in every svg file... */
++ if(svgNode == NULL) {
++ DEBUGMSG(debug_loaders, "get_number_of_frames_from_svg: couldn't load the root from the svgFile: %s", file_name);
++ xmlFreeDoc(svgFile); /* be clean */
++ return 0;
++ }
++
++ nodeIterator = svgNode->children;
++ while(nodeIterator) {
++ if(xmlStrcasecmp(nodeIterator->name, (const xmlChar*)"desc") == 0) {
++ sscanf((const char*)xmlNodeGetContent(nodeIterator), "%d", &number_of_frames);
++ xmlFreeDoc(svgFile);
++ return number_of_frames;
++ }
++ nodeIterator = nodeIterator->next;
++ }
++
++ /* if we get here we had no description, which means something's really wrong */
++ DEBUGMSG(debug_loaders, "get_number_of_frames_from_svg: couldn't find the description frame number count from svgFile: %s", file_name);
++ xmlFreeDoc(svgFile);
++ return 0;
++}
++
++
+ /* Load a layer of SVG file and resize it to given dimensions.
+ If width or height is negative no resizing is applied.
+@@ -215,5 +257,5 @@
+
+ /* get number of frames from description */
+- sscanf(rsvg_handle_get_desc(file_handle), "%d", &new_sprite->num_frames);
++ new_sprite->num_frames = get_number_of_frames_from_svg(file_name);
+ DEBUGMSG(debug_loaders, "load_svg_sprite(): loading %d frames\n", new_sprite->num_frames);
+
diff --git a/dev-games/t4k-common/t4k-common-0.1.1.ebuild b/dev-games/t4k-common/t4k-common-0.1.1-r1.ebuild
index e0a6d5009ab5..c395867aa56f 100644
--- a/dev-games/t4k-common/t4k-common-0.1.1.ebuild
+++ b/dev-games/t4k-common/t4k-common-0.1.1-r1.ebuild
@@ -1,17 +1,18 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools
-DESCRIPTION="A library of code shared between tuxmath and tuxtype"
+DESCRIPTION="Library of code shared between tuxmath and tuxtype"
HOMEPAGE="https://github.com/tux4kids/t4kcommon"
SRC_URI="https://github.com/tux4kids/t4kcommon/archive/upstream/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/t4kcommon-upstream-${PV}"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="amd64 x86"
+KEYWORDS="~amd64 ~x86"
IUSE="svg"
RDEPEND="
@@ -20,40 +21,45 @@ RDEPEND="
media-libs/sdl-image
media-libs/sdl-mixer
media-libs/sdl-net
- media-libs/sdl-ttf
media-libs/sdl-pango
svg? (
gnome-base/librsvg:2
- media-libs/libpng:0
+ media-libs/libpng:=
x11-libs/cairo
)"
DEPEND="${RDEPEND}"
-# need sys-devel/gettext for AM_ICONV in iconv.m4
+# need sys-devel/gettext for AM_ICONV added to configure.ac
BDEPEND="
sys-devel/gettext
virtual/pkgconfig"
-S="${WORKDIR}/t4kcommon-upstream-${PV}"
-
PATCHES=(
"${FILESDIR}"/${P}-libpng.patch
"${FILESDIR}"/${P}-fno-common.patch
"${FILESDIR}"/${P}-ICONV_CONST.patch
+ "${FILESDIR}"/${P}-fix-declaration.patch
+ "${FILESDIR}"/${P}-missing-text.patch
+ "${FILESDIR}"/${P}-svg-libxml2.patch
)
src_prepare() {
default
+
rm m4/iconv.m4 || die
eautoreconf
}
src_configure() {
- econf \
- --disable-static \
- $(usex svg "" --without-rsvg)
+ # note: sdlpango<->sdlttf breaks ABI, prefer default pango
+ local econfargs=(
+ $(usex svg '' --without-rsvg)
+ --disable-static
+ )
+ econf "${econfargs[@]}"
}
src_install() {
default
+
find "${ED}" -name '*.la' -delete || die
}