1 |
commit: 937267cc25f0c65aad8aa5c7d9ebcf9fdd90a5cf |
2 |
Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Feb 24 14:39:03 2020 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 31 16:19:38 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=937267cc |
7 |
|
8 |
games-rpg/kqlives: fixes to package |
9 |
|
10 |
* Added >=media-libs/dumb-2.0.3 support |
11 |
* Fixed installation step (#661422) |
12 |
* Fixed file collision with dev-lang/qu-prolog (#597790): now package |
13 |
installs ${PN} files instead kq |
14 |
* Fixed GCC 10 compilation error (#709314) |
15 |
|
16 |
Closes: https://bugs.gentoo.org/597790 |
17 |
Closes: https://bugs.gentoo.org/661422 |
18 |
Closes: https://bugs.gentoo.org/709314 |
19 |
Closes: https://github.com/gentoo/gentoo/pull/14760 |
20 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
21 |
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com> |
22 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
23 |
|
24 |
.../kqlives/files/kqlives-0.99_autoconf.patch | 93 ++++++++++++++++++++++ |
25 |
games-rpg/kqlives/files/kqlives-0.99_dumb2.patch | 13 +++ |
26 |
games-rpg/kqlives/files/kqlives-0.99_gcc10.patch | 13 +++ |
27 |
games-rpg/kqlives/kqlives-0.99-r2.ebuild | 54 +++++++++++++ |
28 |
4 files changed, 173 insertions(+) |
29 |
|
30 |
diff --git a/games-rpg/kqlives/files/kqlives-0.99_autoconf.patch b/games-rpg/kqlives/files/kqlives-0.99_autoconf.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..dc4a5f9d453 |
33 |
--- /dev/null |
34 |
+++ b/games-rpg/kqlives/files/kqlives-0.99_autoconf.patch |
35 |
@@ -0,0 +1,93 @@ |
36 |
+diff --git a/Makefile.am b/Makefile.am |
37 |
+index 799b2c0..ff49ce2 100644 |
38 |
+--- a/Makefile.am |
39 |
++++ b/Makefile.am |
40 |
+@@ -1,8 +1,8 @@ |
41 |
+ SUBDIRS = intl po scripts |
42 |
+-bin_PROGRAMS = kq mapdraw mapdiff mapdump $(MAPDRAW2) |
43 |
+-EXTRA_PROGRAMS = mapdraw2 |
44 |
++bin_PROGRAMS = kqlives kqlives-mapdraw kqlives-mapdiff kqlives-mapdump $(MAPDRAW2) |
45 |
++EXTRA_PROGRAMS = kqlives-mapdraw2 |
46 |
+ |
47 |
+-kq_SOURCES = src/enemyc.c src/intrface.c src/sgame.c src/bounds.c \ |
48 |
++kqlives_SOURCES = src/enemyc.c src/intrface.c src/sgame.c src/bounds.c \ |
49 |
+ src/combat.c src/entity.c src/movement.c src/shopmenu.c \ |
50 |
+ src/credits.c src/eqpmenu.c src/itemmenu.c src/music.c src/timing.c \ |
51 |
+ src/disk.c src/eskill.c src/kq.c src/res.c \ |
52 |
+@@ -20,29 +20,29 @@ kq_SOURCES = src/enemyc.c src/intrface.c src/sgame.c src/bounds.c \ |
53 |
+ include/eskill.h include/magic.h include/selector.h \ |
54 |
+ include/bounds.h include/gettext.h include/console.h |
55 |
+ |
56 |
+-EXTRA_kq_SOURCES = src/unix.c src/osx.m src/beos.c src/win.c src/dos.c src/winres.rc |
57 |
+-kq_LDADD = $(kq_extra_files) $(ALLEGRO_LIBS) $(LIBINTL) |
58 |
+-kq_DEPENDENCIES = $(kq_extra_files) |
59 |
++EXTRA_kqlives_SOURCES = src/unix.c src/osx.m src/beos.c src/win.c src/dos.c src/winres.rc |
60 |
++kqlives_LDADD = $(kq_extra_files) $(ALLEGRO_LIBS) $(LIBINTL) |
61 |
++kqlives_DEPENDENCIES = $(kq_extra_files) |
62 |
+ |
63 |
+-mapdraw_SOURCES = maps/mapdata.c maps/mapdraw.h maps/mapedit.c \ |
64 |
++kqlives_mapdraw_SOURCES = maps/mapdata.c maps/mapdraw.h maps/mapedit.c \ |
65 |
+ maps/mapfile.c maps/mapent.c maps/mapshared.c src/disk.c \ |
66 |
+ maps/mapstructs.c src/bounds.c include/disk.h include/structs.h |
67 |
+-mapdraw_LDADD = $(ALLEGRO_LIBS) $(LIBINTL) |
68 |
++kqlives_mapdraw_LDADD = $(ALLEGRO_LIBS) $(LIBINTL) |
69 |
+ |
70 |
+-mapdraw2_SOURCES = maps/mapdraw2.c maps/mapdraw2.h \ |
71 |
++kqlives_mapdraw2_SOURCES = maps/mapdraw2.c maps/mapdraw2.h \ |
72 |
+ maps/mainwindow.c maps/mapedit2.c maps/mapedit2.h \ |
73 |
+ maps/mapshared.c maps/mapdraw.h src/disk.c \ |
74 |
+ src/bounds.c include/disk.h include/structs.h |
75 |
+-mapdraw2_LDADD = $(GTK_LIBS) $(ALLEGRO_LIBS) $(LIBINTL) |
76 |
+-mapdraw2_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS) |
77 |
++kqlives_mapdraw2_LDADD = $(GTK_LIBS) $(ALLEGRO_LIBS) $(LIBINTL) |
78 |
++kqlives_mapdraw2_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS) |
79 |
+ |
80 |
+-mapdiff_SOURCES = maps/mapdraw.h maps/mapdiff.c src/disk.c \ |
81 |
++kqlives_mapdiff_SOURCES = maps/mapdraw.h maps/mapdiff.c src/disk.c \ |
82 |
+ include/disk.h include/structs.h |
83 |
+-mapdiff_LDADD = $(ALLEGRO_LIBS) $(LIBINTL) |
84 |
++kqlives_mapdiff_LDADD = $(ALLEGRO_LIBS) $(LIBINTL) |
85 |
+ |
86 |
+-mapdump_SOURCES = maps/mapdump.c maps/mapshared.c maps/mapdata.c \ |
87 |
++kqlives_mapdump_SOURCES = maps/mapdump.c maps/mapshared.c maps/mapdata.c \ |
88 |
+ src/disk.c src/bounds.c include/disk.h include/structs.h |
89 |
+-mapdump_LDADD = $(ALLEGRO_LIBS) $(LIBINTL) |
90 |
++kqlives_mapdump_LDADD = $(ALLEGRO_LIBS) $(LIBINTL) |
91 |
+ |
92 |
+ APPR=KQ.app/Contents/Resources |
93 |
+ KQ.app: kq |
94 |
+@@ -88,10 +88,10 @@ dist_music_DATA = music/aa_arofl.xm music/exp.s3m music/oxford.s3m \ |
95 |
+ |
96 |
+ musicdir = $(pkgdatadir)/music |
97 |
+ |
98 |
+-dist_man_MANS = debian/kq.6 |
99 |
++dist_man_MANS = debian/kqlives.6 |
100 |
+ |
101 |
+ AM_CPPFLAGS = $(WARNING_CFLAGS) -I$(top_srcdir)/include \ |
102 |
+- -DKQ_BIN=\"$(bindir)/kq$(EXEEXT)\" \ |
103 |
++ -DKQ_BIN=\"$(bindir)/kqlives$(EXEEXT)\" \ |
104 |
+ -DKQ_DATA=\"$(pkgdatadir)\" \ |
105 |
+ -DKQ_LIB=\"$(pkglibdir)\" \ |
106 |
+ -DKQ_LOCALE=\"$(localedir)\" \ |
107 |
+diff --git a/configure.ac b/configure.ac |
108 |
+index 679d74f..48db735 100644 |
109 |
+--- a/configure.ac |
110 |
++++ b/configure.ac |
111 |
+@@ -2,7 +2,7 @@ |
112 |
+ # Process this file with autoconf to produce a configure script. |
113 |
+ |
114 |
+ AC_PREREQ(2.61) |
115 |
+-AC_INIT([KQ],[0.99],[peterhull90@×××××××××××××××××.net]) |
116 |
++AC_INIT([KQLIVES],[0.99],[peterhull90@×××××××××××××××××.net]) |
117 |
+ AC_CONFIG_SRCDIR([src/kq.c]) |
118 |
+ AC_CONFIG_HEADER([config.h]) |
119 |
+ AC_CANONICAL_BUILD |
120 |
+@@ -88,7 +88,7 @@ AC_SEARCH_LIBS(lua_gettop, lua50 lua5.1 lua, [], [AC_MSG_ERROR([Lua not found])] |
121 |
+ PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0], |
122 |
+ [AC_SUBST(GTK_LIBS) |
123 |
+ AC_SUBST(GTK_CFLAGS) |
124 |
+- MAPDRAW2="mapdraw2${EXEEXT}"], |
125 |
++ MAPDRAW2="kqlives-mapdraw2${EXEEXT}"], |
126 |
+ [MAPDRAW2=""]) |
127 |
+ AC_SUBST(MAPDRAW2) |
128 |
+ |
129 |
|
130 |
diff --git a/games-rpg/kqlives/files/kqlives-0.99_dumb2.patch b/games-rpg/kqlives/files/kqlives-0.99_dumb2.patch |
131 |
new file mode 100644 |
132 |
index 00000000000..943145b4476 |
133 |
--- /dev/null |
134 |
+++ b/games-rpg/kqlives/files/kqlives-0.99_dumb2.patch |
135 |
@@ -0,0 +1,13 @@ |
136 |
+diff --git a/src/music.c b/src/music.c |
137 |
+index 94c2786..1912d4d 100644 |
138 |
+--- a/src/music.c |
139 |
++++ b/src/music.c |
140 |
+@@ -125,7 +125,7 @@ void play_music (const char *music_name, long position) |
141 |
+ stop_music (); |
142 |
+ strcpy (filename, kqres (MUSIC_DIR, music_name)); |
143 |
+ if (strstr (filename, ".mod")) |
144 |
+- mod_song[current_music_player] = dumb_load_mod (filename); |
145 |
++ mod_song[current_music_player] = dumb_load_mod (filename, 0); |
146 |
+ |
147 |
+ else if (strstr (filename, ".xm")) |
148 |
+ mod_song[current_music_player] = dumb_load_xm (filename); |
149 |
|
150 |
diff --git a/games-rpg/kqlives/files/kqlives-0.99_gcc10.patch b/games-rpg/kqlives/files/kqlives-0.99_gcc10.patch |
151 |
new file mode 100644 |
152 |
index 00000000000..693b993cdbd |
153 |
--- /dev/null |
154 |
+++ b/games-rpg/kqlives/files/kqlives-0.99_gcc10.patch |
155 |
@@ -0,0 +1,13 @@ |
156 |
+diff --git a/maps/mapshared.c b/maps/mapshared.c |
157 |
+index 47fa7af..0c05d81 100644 |
158 |
+--- a/maps/mapshared.c |
159 |
++++ b/maps/mapshared.c |
160 |
+@@ -129,7 +129,7 @@ unsigned short *map, *b_map, *f_map, *c_map, *cf_map, *cb_map; |
161 |
+ unsigned char *z_map, *sh_map, *o_map, *cz_map, *csh_map, *co_map; |
162 |
+ unsigned char *search_map; |
163 |
+ |
164 |
+-s_bound bound_box[MAX_BOUNDS]; // WK - not redundant. Used on line 266 |
165 |
++extern s_bound bound_box[MAX_BOUNDS]; // WK - not redundant. Used on line 266 |
166 |
+ |
167 |
+ /*! \brief Blit to screen |
168 |
+ * |
169 |
|
170 |
diff --git a/games-rpg/kqlives/kqlives-0.99-r2.ebuild b/games-rpg/kqlives/kqlives-0.99-r2.ebuild |
171 |
new file mode 100644 |
172 |
index 00000000000..0c16049e100 |
173 |
--- /dev/null |
174 |
+++ b/games-rpg/kqlives/kqlives-0.99-r2.ebuild |
175 |
@@ -0,0 +1,54 @@ |
176 |
+# Copyright 1999-2020 Gentoo Authors |
177 |
+# Distributed under the terms of the GNU General Public License v2 |
178 |
+ |
179 |
+EAPI=7 |
180 |
+ |
181 |
+inherit autotools desktop |
182 |
+ |
183 |
+MY_P=${P/lives} |
184 |
+ |
185 |
+DESCRIPTION="A console-style role playing game" |
186 |
+HOMEPAGE="http://kqlives.sourceforge.net/" |
187 |
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" |
188 |
+ |
189 |
+LICENSE="GPL-2" |
190 |
+SLOT="0" |
191 |
+KEYWORDS="~amd64 ~x86" |
192 |
+IUSE="cheats nls" |
193 |
+ |
194 |
+RDEPEND=" |
195 |
+ dev-lang/lua:0 |
196 |
+ >=gnome-base/libglade-2.4 |
197 |
+ media-libs/allegro:0 |
198 |
+ >=media-libs/dumb-2.0.3[allegro] |
199 |
+ >=x11-libs/gtk+-2.8:2 |
200 |
+ nls? ( virtual/libintl )" |
201 |
+DEPEND="${RDEPEND} |
202 |
+ virtual/pkgconfig |
203 |
+ nls? ( sys-devel/gettext )" |
204 |
+ |
205 |
+S=${WORKDIR}/${MY_P} |
206 |
+ |
207 |
+PATCHES=( |
208 |
+ "${FILESDIR}/${P}_autoconf.patch" # Fix #597790 |
209 |
+ "${FILESDIR}/${P}_dumb2.patch" # >=media-libs/dumb-2.0.3 support |
210 |
+ "${FILESDIR}/${P}_gcc10.patch" # Fix #661422 |
211 |
+) |
212 |
+ |
213 |
+src_prepare() { |
214 |
+ default |
215 |
+ mv debian/{kq,${PN}}.6 || die |
216 |
+ eautoreconf |
217 |
+} |
218 |
+ |
219 |
+src_configure() { |
220 |
+ econf \ |
221 |
+ $(use_enable cheats) \ |
222 |
+ $(use_enable nls) |
223 |
+} |
224 |
+ |
225 |
+src_install() { |
226 |
+ default |
227 |
+ doicon "${FILESDIR}"/${PN}.xpm |
228 |
+ make_desktop_entry ${PN} KqLives ${PN} |
229 |
+} |