summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>2020-02-24 17:39:03 +0300
committerJames Le Cuirot <chewi@gentoo.org>2020-05-31 17:19:38 +0100
commit937267cc25f0c65aad8aa5c7d9ebcf9fdd90a5cf (patch)
tree594f421ab0185a71c08525274e8e8843ad096501 /games-rpg
parentmedia-libs/alure: Fix building with newer media-libs/dumb versions (diff)
downloadgentoo-937267cc25f0c65aad8aa5c7d9ebcf9fdd90a5cf.tar.gz
gentoo-937267cc25f0c65aad8aa5c7d9ebcf9fdd90a5cf.tar.bz2
gentoo-937267cc25f0c65aad8aa5c7d9ebcf9fdd90a5cf.zip
games-rpg/kqlives: fixes to package
* Added >=media-libs/dumb-2.0.3 support * Fixed installation step (#661422) * Fixed file collision with dev-lang/qu-prolog (#597790): now package installs ${PN} files instead kq * Fixed GCC 10 compilation error (#709314) Closes: https://bugs.gentoo.org/597790 Closes: https://bugs.gentoo.org/661422 Closes: https://bugs.gentoo.org/709314 Closes: https://github.com/gentoo/gentoo/pull/14760 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-rpg')
-rw-r--r--games-rpg/kqlives/files/kqlives-0.99_autoconf.patch93
-rw-r--r--games-rpg/kqlives/files/kqlives-0.99_dumb2.patch13
-rw-r--r--games-rpg/kqlives/files/kqlives-0.99_gcc10.patch13
-rw-r--r--games-rpg/kqlives/kqlives-0.99-r2.ebuild54
4 files changed, 173 insertions, 0 deletions
diff --git a/games-rpg/kqlives/files/kqlives-0.99_autoconf.patch b/games-rpg/kqlives/files/kqlives-0.99_autoconf.patch
new file mode 100644
index 000000000000..dc4a5f9d4534
--- /dev/null
+++ b/games-rpg/kqlives/files/kqlives-0.99_autoconf.patch
@@ -0,0 +1,93 @@
+diff --git a/Makefile.am b/Makefile.am
+index 799b2c0..ff49ce2 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,8 +1,8 @@
+ SUBDIRS = intl po scripts
+-bin_PROGRAMS = kq mapdraw mapdiff mapdump $(MAPDRAW2)
+-EXTRA_PROGRAMS = mapdraw2
++bin_PROGRAMS = kqlives kqlives-mapdraw kqlives-mapdiff kqlives-mapdump $(MAPDRAW2)
++EXTRA_PROGRAMS = kqlives-mapdraw2
+
+-kq_SOURCES = src/enemyc.c src/intrface.c src/sgame.c src/bounds.c \
++kqlives_SOURCES = src/enemyc.c src/intrface.c src/sgame.c src/bounds.c \
+ src/combat.c src/entity.c src/movement.c src/shopmenu.c \
+ src/credits.c src/eqpmenu.c src/itemmenu.c src/music.c src/timing.c \
+ src/disk.c src/eskill.c src/kq.c src/res.c \
+@@ -20,29 +20,29 @@ kq_SOURCES = src/enemyc.c src/intrface.c src/sgame.c src/bounds.c \
+ include/eskill.h include/magic.h include/selector.h \
+ include/bounds.h include/gettext.h include/console.h
+
+-EXTRA_kq_SOURCES = src/unix.c src/osx.m src/beos.c src/win.c src/dos.c src/winres.rc
+-kq_LDADD = $(kq_extra_files) $(ALLEGRO_LIBS) $(LIBINTL)
+-kq_DEPENDENCIES = $(kq_extra_files)
++EXTRA_kqlives_SOURCES = src/unix.c src/osx.m src/beos.c src/win.c src/dos.c src/winres.rc
++kqlives_LDADD = $(kq_extra_files) $(ALLEGRO_LIBS) $(LIBINTL)
++kqlives_DEPENDENCIES = $(kq_extra_files)
+
+-mapdraw_SOURCES = maps/mapdata.c maps/mapdraw.h maps/mapedit.c \
++kqlives_mapdraw_SOURCES = maps/mapdata.c maps/mapdraw.h maps/mapedit.c \
+ maps/mapfile.c maps/mapent.c maps/mapshared.c src/disk.c \
+ maps/mapstructs.c src/bounds.c include/disk.h include/structs.h
+-mapdraw_LDADD = $(ALLEGRO_LIBS) $(LIBINTL)
++kqlives_mapdraw_LDADD = $(ALLEGRO_LIBS) $(LIBINTL)
+
+-mapdraw2_SOURCES = maps/mapdraw2.c maps/mapdraw2.h \
++kqlives_mapdraw2_SOURCES = maps/mapdraw2.c maps/mapdraw2.h \
+ maps/mainwindow.c maps/mapedit2.c maps/mapedit2.h \
+ maps/mapshared.c maps/mapdraw.h src/disk.c \
+ src/bounds.c include/disk.h include/structs.h
+-mapdraw2_LDADD = $(GTK_LIBS) $(ALLEGRO_LIBS) $(LIBINTL)
+-mapdraw2_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS)
++kqlives_mapdraw2_LDADD = $(GTK_LIBS) $(ALLEGRO_LIBS) $(LIBINTL)
++kqlives_mapdraw2_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS)
+
+-mapdiff_SOURCES = maps/mapdraw.h maps/mapdiff.c src/disk.c \
++kqlives_mapdiff_SOURCES = maps/mapdraw.h maps/mapdiff.c src/disk.c \
+ include/disk.h include/structs.h
+-mapdiff_LDADD = $(ALLEGRO_LIBS) $(LIBINTL)
++kqlives_mapdiff_LDADD = $(ALLEGRO_LIBS) $(LIBINTL)
+
+-mapdump_SOURCES = maps/mapdump.c maps/mapshared.c maps/mapdata.c \
++kqlives_mapdump_SOURCES = maps/mapdump.c maps/mapshared.c maps/mapdata.c \
+ src/disk.c src/bounds.c include/disk.h include/structs.h
+-mapdump_LDADD = $(ALLEGRO_LIBS) $(LIBINTL)
++kqlives_mapdump_LDADD = $(ALLEGRO_LIBS) $(LIBINTL)
+
+ APPR=KQ.app/Contents/Resources
+ KQ.app: kq
+@@ -88,10 +88,10 @@ dist_music_DATA = music/aa_arofl.xm music/exp.s3m music/oxford.s3m \
+
+ musicdir = $(pkgdatadir)/music
+
+-dist_man_MANS = debian/kq.6
++dist_man_MANS = debian/kqlives.6
+
+ AM_CPPFLAGS = $(WARNING_CFLAGS) -I$(top_srcdir)/include \
+- -DKQ_BIN=\"$(bindir)/kq$(EXEEXT)\" \
++ -DKQ_BIN=\"$(bindir)/kqlives$(EXEEXT)\" \
+ -DKQ_DATA=\"$(pkgdatadir)\" \
+ -DKQ_LIB=\"$(pkglibdir)\" \
+ -DKQ_LOCALE=\"$(localedir)\" \
+diff --git a/configure.ac b/configure.ac
+index 679d74f..48db735 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,7 +2,7 @@
+ # Process this file with autoconf to produce a configure script.
+
+ AC_PREREQ(2.61)
+-AC_INIT([KQ],[0.99],[peterhull90@users.sourceforge.net])
++AC_INIT([KQLIVES],[0.99],[peterhull90@users.sourceforge.net])
+ AC_CONFIG_SRCDIR([src/kq.c])
+ AC_CONFIG_HEADER([config.h])
+ AC_CANONICAL_BUILD
+@@ -88,7 +88,7 @@ AC_SEARCH_LIBS(lua_gettop, lua50 lua5.1 lua, [], [AC_MSG_ERROR([Lua not found])]
+ PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0],
+ [AC_SUBST(GTK_LIBS)
+ AC_SUBST(GTK_CFLAGS)
+- MAPDRAW2="mapdraw2${EXEEXT}"],
++ MAPDRAW2="kqlives-mapdraw2${EXEEXT}"],
+ [MAPDRAW2=""])
+ AC_SUBST(MAPDRAW2)
+
diff --git a/games-rpg/kqlives/files/kqlives-0.99_dumb2.patch b/games-rpg/kqlives/files/kqlives-0.99_dumb2.patch
new file mode 100644
index 000000000000..943145b44763
--- /dev/null
+++ b/games-rpg/kqlives/files/kqlives-0.99_dumb2.patch
@@ -0,0 +1,13 @@
+diff --git a/src/music.c b/src/music.c
+index 94c2786..1912d4d 100644
+--- a/src/music.c
++++ b/src/music.c
+@@ -125,7 +125,7 @@ void play_music (const char *music_name, long position)
+ stop_music ();
+ strcpy (filename, kqres (MUSIC_DIR, music_name));
+ if (strstr (filename, ".mod"))
+- mod_song[current_music_player] = dumb_load_mod (filename);
++ mod_song[current_music_player] = dumb_load_mod (filename, 0);
+
+ else if (strstr (filename, ".xm"))
+ mod_song[current_music_player] = dumb_load_xm (filename);
diff --git a/games-rpg/kqlives/files/kqlives-0.99_gcc10.patch b/games-rpg/kqlives/files/kqlives-0.99_gcc10.patch
new file mode 100644
index 000000000000..693b993cdbdf
--- /dev/null
+++ b/games-rpg/kqlives/files/kqlives-0.99_gcc10.patch
@@ -0,0 +1,13 @@
+diff --git a/maps/mapshared.c b/maps/mapshared.c
+index 47fa7af..0c05d81 100644
+--- a/maps/mapshared.c
++++ b/maps/mapshared.c
+@@ -129,7 +129,7 @@ unsigned short *map, *b_map, *f_map, *c_map, *cf_map, *cb_map;
+ unsigned char *z_map, *sh_map, *o_map, *cz_map, *csh_map, *co_map;
+ unsigned char *search_map;
+
+-s_bound bound_box[MAX_BOUNDS]; // WK - not redundant. Used on line 266
++extern s_bound bound_box[MAX_BOUNDS]; // WK - not redundant. Used on line 266
+
+ /*! \brief Blit to screen
+ *
diff --git a/games-rpg/kqlives/kqlives-0.99-r2.ebuild b/games-rpg/kqlives/kqlives-0.99-r2.ebuild
new file mode 100644
index 000000000000..0c16049e1001
--- /dev/null
+++ b/games-rpg/kqlives/kqlives-0.99-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools desktop
+
+MY_P=${P/lives}
+
+DESCRIPTION="A console-style role playing game"
+HOMEPAGE="http://kqlives.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cheats nls"
+
+RDEPEND="
+ dev-lang/lua:0
+ >=gnome-base/libglade-2.4
+ media-libs/allegro:0
+ >=media-libs/dumb-2.0.3[allegro]
+ >=x11-libs/gtk+-2.8:2
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}/${P}_autoconf.patch" # Fix #597790
+ "${FILESDIR}/${P}_dumb2.patch" # >=media-libs/dumb-2.0.3 support
+ "${FILESDIR}/${P}_gcc10.patch" # Fix #661422
+)
+
+src_prepare() {
+ default
+ mv debian/{kq,${PN}}.6 || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable cheats) \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+ doicon "${FILESDIR}"/${PN}.xpm
+ make_desktop_entry ${PN} KqLives ${PN}
+}