Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-arcade/kobodeluxe/, games-arcade/kobodeluxe/files/
Date: Fri, 25 Dec 2020 15:19:36
Message-Id: 1608909550.e624893590dfecf6979b4cf5a4b6a5047424ea5c.soap@gentoo
1 commit: e624893590dfecf6979b4cf5a4b6a5047424ea5c
2 Author: Alexey Sokolov <sokolov <AT> google <DOT> com>
3 AuthorDate: Fri Dec 25 15:19:10 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 25 15:19:10 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6248935
7
8 games-arcade/kobodeluxe: fix build with clang, bump EAPI
9
10 Closes: https://bugs.gentoo.org/739080
11 (Portage version: 3.0.9/hg/Linux x86_64, unsigned Manifest commit)
12 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
13 Signed-off-by: David Seifert <soap <AT> gentoo.org>
14
15 .../kobodeluxe/files/kobodeluxe-0.5.1-clang.patch | 22 ++++++++
16 games-arcade/kobodeluxe/kobodeluxe-0.5.1-r2.ebuild | 59 ++++++++++++++++++++++
17 2 files changed, 81 insertions(+)
18
19 diff --git a/games-arcade/kobodeluxe/files/kobodeluxe-0.5.1-clang.patch b/games-arcade/kobodeluxe/files/kobodeluxe-0.5.1-clang.patch
20 new file mode 100644
21 index 00000000000..7732b6e147d
22 --- /dev/null
23 +++ b/games-arcade/kobodeluxe/files/kobodeluxe-0.5.1-clang.patch
24 @@ -0,0 +1,22 @@
25 +--- a/filemap.cpp
26 ++++ b/filemap.cpp
27 +@@ -851,7 +851,7 @@
28 + while(k)
29 + {
30 + if(strcmp(k->key, key) == 0 || all)
31 +- fprintf(f, "%s"FM_DEREF_TOKEN" --> \"%s\"\n", k->key, k->path);
32 ++ fprintf(f, "%s" FM_DEREF_TOKEN " --> \"%s\"\n", k->key, k->path);
33 + k = k->next;
34 + }
35 + }
36 +--- a/prefs.cpp
37 ++++ b/prefs.cpp
38 +@@ -30,7 +30,7 @@
39 + void prefs_t::init()
40 + {
41 + comment("--------------------------------------------");
42 +- comment(" Kobo Deluxe "VERSION" Configuration File");
43 ++ comment(" Kobo Deluxe " VERSION " Configuration File");
44 + comment("--------------------------------------------");
45 + comment(" Switches - [no]<switch>");
46 + comment(" Values - <key> [<value>|\"<string>\"]");
47
48 diff --git a/games-arcade/kobodeluxe/kobodeluxe-0.5.1-r2.ebuild b/games-arcade/kobodeluxe/kobodeluxe-0.5.1-r2.ebuild
49 new file mode 100644
50 index 00000000000..b813ddc2a1b
51 --- /dev/null
52 +++ b/games-arcade/kobodeluxe/kobodeluxe-0.5.1-r2.ebuild
53 @@ -0,0 +1,59 @@
54 +# Copyright 1999-2020 Gentoo Authors
55 +# Distributed under the terms of the GNU General Public License v2
56 +
57 +EAPI=7
58 +inherit desktop
59 +
60 +MY_P="KoboDeluxe-${PV/_/}"
61 +DESCRIPTION="An SDL port of xkobo, a addictive space shoot-em-up"
62 +HOMEPAGE="http://www.olofson.net/kobodl/"
63 +SRC_URI="http://www.olofson.net/kobodl/download/${MY_P}.tar.bz2"
64 +
65 +LICENSE="GPL-2"
66 +SLOT="0"
67 +KEYWORDS="~alpha ~amd64 ~ppc64 ~x86"
68 +IUSE="opengl"
69 +
70 +DEPEND="media-libs/libsdl
71 + media-libs/sdl-image[png]
72 + opengl? ( virtual/opengl )
73 +"
74 +RDEPEND="${DEPEND}"
75 +
76 +S="${WORKDIR}/${MY_P}"
77 +
78 +PATCHES=(
79 + "${FILESDIR}"/${P}-glibc29.patch
80 + "${FILESDIR}"/${P}-glibc2.10.patch
81 + "${FILESDIR}"/${P}-clang.patch
82 +)
83 +
84 +src_unpack() {
85 + unpack ${A}
86 + cd "${S}" || die
87 + unpack ./icons.tar.gz
88 +}
89 +
90 +src_prepare() {
91 + default
92 + # Fix paths
93 + sed -i \
94 + -e 's:\$(datadir)/kobo-deluxe:$(datadir)/kobodeluxe:' \
95 + -e 's:\$(sharedstatedir)/kobo-deluxe/scores:$(localstatedir)/kobodeluxe:' \
96 + configure || die "sed configure failed"
97 + sed -i \
98 + -e 's:kobo-deluxe:kobodeluxe:' \
99 + data/gfx/Makefile.in \
100 + data/sfx/Makefile.in || die "sed data/Makefile.in failed"
101 +}
102 +
103 +src_configure() {
104 + econf $(use_enable opengl)
105 +}
106 +
107 +src_install() {
108 + default
109 + newicon icons/KDE/icons/32x32/kobodl.png ${PN}.png
110 + make_desktop_entry kobodl "Kobo Deluxe"
111 + keepdir /var/lib/${PN}
112 +}