summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Sokolov <sokolov@google.com>2020-10-03 20:35:46 +0100
committerSam James <sam@gentoo.org>2020-10-15 20:26:34 +0000
commitcea071f6cd314416dc6e9b944501ea9f8f7bc70b (patch)
tree59895f4bc3c162c58a953454df97090ca91a10cb /games-kids/lletters
parentsys-kernel/gentoo-kernel-bin: bump to 5.4.71 for arm64 (diff)
downloadgentoo-cea071f6cd314416dc6e9b944501ea9f8f7bc70b.tar.gz
gentoo-cea071f6cd314416dc6e9b944501ea9f8f7bc70b.tar.bz2
gentoo-cea071f6cd314416dc6e9b944501ea9f8f7bc70b.zip
games-kids/lletters: fix build and crash on startup
Closes: https://bugs.gentoo.org/708540 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-kids/lletters')
-rw-r--r--games-kids/lletters/files/lletters-0.1.95-fno-common.patch41
-rw-r--r--games-kids/lletters/files/lletters-0.1.95-nolang.patch14
-rw-r--r--games-kids/lletters/lletters-0.1.95-r4.ebuild55
3 files changed, 110 insertions, 0 deletions
diff --git a/games-kids/lletters/files/lletters-0.1.95-fno-common.patch b/games-kids/lletters/files/lletters-0.1.95-fno-common.patch
new file mode 100644
index 000000000000..284b276231ef
--- /dev/null
+++ b/games-kids/lletters/files/lletters-0.1.95-fno-common.patch
@@ -0,0 +1,41 @@
+diff -r edda3caf942c libqdwav/wav_lib.h
+--- a/libqdwav/wav_lib.h Sat Oct 03 19:10:00 2020 +0000
++++ b/libqdwav/wav_lib.h Sat Oct 03 19:12:33 2020 +0000
+@@ -29,11 +29,11 @@
+ char head[43];
+ } wav_sig;
+
+-buffmem_desc binfo;
+-count_info cinfo;
++extern buffmem_desc binfo;
++extern count_info cinfo;
+
+-int dsp_fd;
+-int *buffer;
++extern int dsp_fd;
++extern int *buffer;
+
+ short get_wav_format (wav_sig *info);
+ int open_wav (char *header, char file_name[]);
+@@ -47,4 +47,4 @@
+ int init_parm (int argc, char *argv[], wav_sig *file_info);
+ int open_wav_rec (wav_sig *info);
+
+-int bsize;
++extern int bsize;
+diff -r edda3caf942c libqdwav/wav_read.c
+--- a/libqdwav/wav_read.c Sat Oct 03 19:10:00 2020 +0000
++++ b/libqdwav/wav_read.c Sat Oct 03 19:12:33 2020 +0000
+@@ -6,7 +6,11 @@
+ #include <sys/stat.h>
+ #include "wav_lib.h"
+
+-
++buffmem_desc binfo;
++count_info cinfo;
++int dsp_fd;
++int *buffer;
++int bsize;
+
+ /* wav header is 44 bytes long */
+ int open_wav(char *header, char file_name[]){
diff --git a/games-kids/lletters/files/lletters-0.1.95-nolang.patch b/games-kids/lletters/files/lletters-0.1.95-nolang.patch
new file mode 100644
index 000000000000..52ff642b8e18
--- /dev/null
+++ b/games-kids/lletters/files/lletters-0.1.95-nolang.patch
@@ -0,0 +1,14 @@
+Don't crash when LANG is not set
+
+--- lletters-0.1.95/lln.c 2020-10-03 20:22:43.470743688 +0100
++++ lletters-0.1.95/lln.c 2020-10-03 20:31:03.322335396 +0100
+@@ -138,7 +138,8 @@ main (int argc, char *argv[])
+ /* End change by Gopal Narayanan */
+
+ /* Change by Lalo Martins, Feb 27 1999: */
+- lang = strtok(getenv ("LANG"), "_");
++ char* envlang = getenv("LANG");
++ lang = strtok(envlang ? envlang : "", "_");
+ // lang = strtok(lang, "_");
+
+ if (!lang)
diff --git a/games-kids/lletters/lletters-0.1.95-r4.ebuild b/games-kids/lletters/lletters-0.1.95-r4.ebuild
new file mode 100644
index 000000000000..83f832552c5a
--- /dev/null
+++ b/games-kids/lletters/lletters-0.1.95-r4.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop
+
+PATCH_LEVEL=3
+
+DESCRIPTION="Game that helps young kids learn their letters and numbers"
+HOMEPAGE="http://lln.sourceforge.net"
+SRC_URI="mirror://debian/pool/main/l/${PN}/${PN}_${PV}+gtk2.orig.tar.gz
+ mirror://debian/pool/main/l/${PN}/${PN}_${PV}+gtk2-${PATCH_LEVEL}.diff.gz
+ mirror://sourceforge/lln/${PN}-media-0.1.9a.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls"
+
+RDEPEND="
+ x11-libs/gtk+:2
+ nls? ( virtual/libintl )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+ "${WORKDIR}"/${PN}_${PV}+gtk2-${PATCH_LEVEL}.diff
+ "${FILESDIR}"/${P}-build-2.patch
+ "${FILESDIR}"/${P}-underlink.patch
+ "${FILESDIR}"/${P}-make-382.patch
+ "${FILESDIR}/${P}-fno-common.patch"
+ "${FILESDIR}/${P}-nolang.patch"
+)
+
+src_prepare() {
+ default
+
+ cp -r "${WORKDIR}"/{images,sounds} . || die
+}
+
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_install() {
+ default
+ newdoc debian/changelog ChangeLog.debian
+ doicon debian/${PN}.xpm
+ make_desktop_entry ${PN} "Linux Letters and Numbers" ${PN}
+}