commit:     5b5f4cc8dc131511fda89d87b8458707c4d1b1c0
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 10 10:19:35 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Jun 10 11:51:42 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b5f4cc8

games-kids/tuxtype: fix missing text, force pango, tidy

Removed unused t4k-common dep given this package hasn't been migrated
to use it yet (upstream snapshot only has work-in-progress support).

This means needed to bring the t4k-common fix for missing text here.

Removed IUSE:
- svg: this is only work-in-progress code with no real use for now
- pango: sdl-ttf code is seeing neglect and upstream only really
  use/test sdl-pango, forcing brings this in-line with t4k-common
  and allows to remove bundled fonts.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../tuxtype/files/tuxtype-1.8.3-missing-text.patch | 15 +++++
 games-kids/tuxtype/tuxtype-1.8.3-r2.ebuild         | 67 ++++++++++++++++++++++
 2 files changed, 82 insertions(+)

diff --git a/games-kids/tuxtype/files/tuxtype-1.8.3-missing-text.patch 
b/games-kids/tuxtype/files/tuxtype-1.8.3-missing-text.patch
new file mode 100644
index 00000000000..9553cfa8984
--- /dev/null
+++ b/games-kids/tuxtype/files/tuxtype-1.8.3-missing-text.patch
@@ -0,0 +1,15 @@
+Fix some missing (transparent) text with libsdl-1.2.15_p20210224.
+Same issue as t4k-common-0.1.1 given tuxtype shares the same
+code and wasn't migrated to support the separate library yet.
+--- a/src/SDL_extras.c
++++ b/src/SDL_extras.c
+@@ -1297,3 +1297,3 @@
+   /* Use color key for eventual transparency: */
+-  color_key = SDL_MapRGB(bg->format, 01, 01, 01);
++  color_key = SDL_MapRGBA(bg->format, 01, 01, 01, 0xff);
+   SDL_FillRect(bg, NULL, color_key);
+@@ -1344,3 +1344,3 @@
+   SDL_SetColorKey(bg, SDL_SRCCOLORKEY|SDL_RLEACCEL, color_key);
+-  out = SDL_DisplayFormatAlpha(bg);
++  out = SDL_DisplayFormat(bg);
+   SDL_FreeSurface(bg);

diff --git a/games-kids/tuxtype/tuxtype-1.8.3-r2.ebuild 
b/games-kids/tuxtype/tuxtype-1.8.3-r2.ebuild
new file mode 100644
index 00000000000..55d2d6b8927
--- /dev/null
+++ b/games-kids/tuxtype/tuxtype-1.8.3-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools desktop optfeature
+
+DESCRIPTION="Typing tutorial with lots of eye-candy"
+HOMEPAGE="https://www.tux4kids.com/";
+SRC_URI="https://github.com/tux4kids/${PN}/archive/upstream/${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${PN}-upstream-${PV}"
+
+LICENSE="CC-BY-3.0 CC-BY-SA-3.0 GPL-3+ public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+       acct-group/gamestat
+       media-libs/libsdl[video]
+       media-libs/sdl-image[jpeg,png]
+       media-libs/sdl-mixer
+       media-libs/sdl-pango"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-games-group.patch
+       "${FILESDIR}"/${P}-missing-text.patch
+)
+
+src_prepare() {
+       default
+
+       eautoreconf
+}
+
+src_configure() {
+       local econfargs=(
+               # these are a placeholder for future features, i.e. not useful 
for now
+               --without-rsvg
+               --without-sdlnet
+       )
+       econf "${econfargs[@]}"
+}
+
+src_install() {
+       emake DESTDIR="${D}" install # skip einstalldocs, wrong files
+
+       keepdir /etc/${PN} /var/lib/${PN}
+
+       fowners :gamestat /var/lib/${PN} /usr/bin/${PN}
+       fperms g+s /usr/bin/${PN}
+       fperms 660 /var/lib/${PN}
+
+       newicon icon.png ${PN}.png
+       domenu ${PN}.desktop
+
+       # bundled fonts are unused if sdl-pango is enabled
+       rm -r "${ED}"/usr/share/${PN}/fonts || die
+       rm "${ED}"/usr/share/doc/${PF}/{ABOUT-NLS,COPYING,OFL,INSTALL} || die
+       rmdir "${ED}"/var/lib/${PN}/words || die
+}
+
+pkg_postinst() {
+       # mod detection fails if using modplug over mikmod
+       optfeature "music support" "media-libs/sdl-mixer[mod,mikmod,vorbis]"
+}

Reply via email to