summaryrefslogtreecommitdiff
path: root/games-arcade/xrick
diff options
context:
space:
mode:
Diffstat (limited to 'games-arcade/xrick')
-rw-r--r--games-arcade/xrick/Manifest4
-rw-r--r--games-arcade/xrick/files/xrick-021212-Makefile.patch30
-rw-r--r--games-arcade/xrick/files/xrick-021212-fno-common.patch34
-rw-r--r--games-arcade/xrick/xrick-021212-r2.ebuild42
4 files changed, 92 insertions, 18 deletions
diff --git a/games-arcade/xrick/Manifest b/games-arcade/xrick/Manifest
index db8d33e76ef8..4a7f34440b04 100644
--- a/games-arcade/xrick/Manifest
+++ b/games-arcade/xrick/Manifest
@@ -1,6 +1,8 @@
+AUX xrick-021212-Makefile.patch 958 BLAKE2B 56d55101afdb995c1adbb0d7e9b6c7a112b1846f35544b987b7aba746c21d30e45056daf0d8b48769bee97d4b2cac8e0c6a42e76db32eb17505b04c17aeee25c SHA512 a517c824be40f61249f7d83ab3b148bf96e053b44ddc3506c5780cc2a554192e0b7d096b2a2466a7cb63b2400a9d14c8c077f2ab5acdbd6c1c1c643239c113fa
AUX xrick-021212-exit.patch 702 BLAKE2B 58323696fb2abde318706e0d37c50d31d7bc65ce3a86163991019d2d43675dcc5d6562d65e13d96a0476164bc1dfd6db1270e63e405449d798cb5996dc9e6b6d SHA512 8d22419f6912297a900d3ad7101684af1c52c093ea3ea513aea52220b41b5b2a5c2b474883da887b4160b16ab3c9f90a885e48694a48a68470083b643be6d551
+AUX xrick-021212-fno-common.patch 630 BLAKE2B 434dea82a782d0ac2dc805a584e50e767c8b2e7bade10706f7fcce84fd455df868d68c38e014e465a854ad56b5eeff50a36befe7aee1d74faf7f6d3fd2784a00 SHA512 2face5e4732eb6b82782fa169cd164d745cef26a4ce07d2cfacc79a4653658e404dc17b455fd36ad8fd346347f296624df09db3389a8bc65ee44fac09ca2b045
AUX xrick-021212-fullscreen.patch 950 BLAKE2B e46b147ef3283f64d985b2e6fa1445b31c27c29a28a6a5859ff420ebc3bda2a15e633f85799cd2c32751ec25e726c6a57f13cead5d6b0829572f3a1a29e10ec8 SHA512 694d56f9094483bf5e11b905bb21408a684669b3c6d1fc150de8c1300b56ca2349dfbceefff5c936328eb202776bc3f5b6ea74b54ffbb082de27aa7827d7ce7c
AUX xrick-021212-zlib.patch 372 BLAKE2B 9811ee9464790c7cb804a06a3f8cc71dff3489ae00bf30f7f56e8bf10f88d7d2eed5c92abda943a47d7913a4885f5f04b0fbfa41afc7653028fa23f86dbcaf35 SHA512 48933852c71f2979ae865fb72e89edeb7a3d314710472bd572e37877ff5fc627ecaa9c39661f8968c19d1e8b3e820600ab0d9985da029739cb78abedd2ff7d0f
DIST xrick-021212.tgz 1648538 BLAKE2B d8ba387f4645d4ef0fd97b346ee202fb8573fd694e4f278791115ea5a2ab6ca509a8fffec3c5754e0160eec919aaa7a90509858bd80ae0244f28c32055070636 SHA512 7a6547dfce586512c3c4aa7fd5aa0d7d8bd223dbec6a9211e858034bd73d44f168266441d8f3475cddbed8f3a19c7c0df31345b62e2ecfb860664e54facb48bf
-EBUILD xrick-021212-r2.ebuild 1179 BLAKE2B 923090bf081e886e7420342cc74e43fbb22b89f7e4b618d5df0c9daf20011beb8fde46df9ee9bfbb91341c44029a3ec4f70c6e0a0fbb8926e7f02adad6b425e8 SHA512 1beecdd448a4da07078c44f581e91b851fb77dd823cbd2eacee9df40f6cf9b7204e7d8b20c13a631302e8654629662495bd39fbcd5f67ca838d97f350d2fce5d
+EBUILD xrick-021212-r2.ebuild 1220 BLAKE2B 27b42530e71377c1eef000c0c1275e9edc6358cf0ad63ec173f2d0a4f11be155b633900d550ea790514aa76a8b2babef2e4710697346158c4a38a8942acde66b SHA512 a00aa2799519bf468f54391da8979ec51716aa919b75fecf6cd53c016bd7ce06033a300656bd3c9b8514874c24388829ac08847af46e6733887eb0d149571e9c
MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-arcade/xrick/files/xrick-021212-Makefile.patch b/games-arcade/xrick/files/xrick-021212-Makefile.patch
new file mode 100644
index 000000000000..2911f4715d45
--- /dev/null
+++ b/games-arcade/xrick/files/xrick-021212-Makefile.patch
@@ -0,0 +1,30 @@
+--- a/Makefile
++++ b/Makefile
+@@ -71,10 +71,8 @@
+ all:
+ @echo "ROOTDIR=$(ROOTDIR)" > Makefile.global
+ @echo "XOBJ=$(XOBJ)" >> Makefile.global
+- @echo "CFLAGS=-g -ansi -pedantic -Wall -W -O2 -I $(ROOTDIR)/include $(shell sdl-config --cflags)" >> Makefile.global
+- @echo "LDFLAGS=-lz $(shell sdl-config --libs)" >> Makefile.global
+- @echo "CC=gcc" >> Makefile.global
+- @echo "CPP=gcc -E" >> Makefile.global
++ @echo "CFLAGS+=-pedantic -Wall -I$(ROOTDIR)/include $(shell sdl-config --cflags)" >> Makefile.global
++ @echo "LIBS+=-lz $(shell sdl-config --libs)" >> Makefile.global
+ $(MAKE) -C src all
+
+ clean:
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -40,10 +40,10 @@
+ all: $(TARGET)
+
+ $(TARGET): $(OBJECTS) $(XOBJ)
+- $(CC) $(OBJECTS) $(XOBJ) $(LDFLAGS) -o $(TARGET)
++ $(CC) $(LDFLAGS) $(OBJECTS) $(XOBJ) -o $(TARGET) $(LIBS)
+
+ %.o: %.c
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+ xrick.res: xrick.rc
+ windres $< -O coff -o $@
diff --git a/games-arcade/xrick/files/xrick-021212-fno-common.patch b/games-arcade/xrick/files/xrick-021212-fno-common.patch
new file mode 100644
index 000000000000..d3c05c30dbef
--- /dev/null
+++ b/games-arcade/xrick/files/xrick-021212-fno-common.patch
@@ -0,0 +1,34 @@
+--- a/include/img.h
++++ b/include/img.h
+@@ -27,7 +27,7 @@
+ U8 *pixels;
+ } img_t;
+
+-img_t *IMG_SPLASH;
++extern img_t *IMG_SPLASH;
+
+ #endif
+
+--- a/src/dat_snd.c
++++ b/src/dat_snd.c
+@@ -19,14 +19,14 @@
+
+ sound_t *WAV_WAA;
+ sound_t *WAV_BOMB;
+-sound_t *WAV_BULLET;
+-sound_t *WAV_WALK;
+-sound_t *WAV_JUMP;
++extern sound_t *WAV_BULLET;
++extern sound_t *WAV_WALK;
++extern sound_t *WAV_JUMP;
+ sound_t *WAV_TING;
+-sound_t *WAV_BOMBSHHT;
+-sound_t *WAV_BONUS;
++extern sound_t *WAV_BOMBSHHT;
++extern sound_t *WAV_BONUS;
+ sound_t *WAV_SHHT;
+-sound_t *WAV_BOX;
++extern sound_t *WAV_BOX;
+ sound_t *WAV_DDDING;
+
+ #endif /* ENABLE_SOUND */
diff --git a/games-arcade/xrick/xrick-021212-r2.ebuild b/games-arcade/xrick/xrick-021212-r2.ebuild
index c24058e2784b..3ef05387653d 100644
--- a/games-arcade/xrick/xrick-021212-r2.ebuild
+++ b/games-arcade/xrick/xrick-021212-r2.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit desktop
+EAPI=7
+
+inherit desktop toolchain-funcs
DESCRIPTION="Clone of the Rick Dangerous adventure game from the 80's"
HOMEPAGE="http://www.bigorno.net/xrick/"
@@ -11,44 +12,51 @@ SRC_URI="http://www.bigorno.net/xrick/${P}.tgz"
LICENSE="GPL-1+ xrick"
SLOT="0"
KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE=""
RESTRICT="mirror bindist" # bug #149097
DEPEND="media-libs/libsdl[video]"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${P}-exit.patch
+ "${FILESDIR}"/${P}-fullscreen.patch
+ "${FILESDIR}"/${P}-zlib.patch
+ "${FILESDIR}"/${P}-Makefile.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+)
+
src_unpack() {
unpack ${A}
- cd "${S}"
+ cd "${S}" || die
unpack ./xrick.6.gz
}
src_prepare() {
default
- eapply "${FILESDIR}"/${P}*.patch
+
sed -i \
-e "/^run from/d" \
- -e "/data.zip/ s:the directory where xrick is:$(get_libdir)/${PN}.:" \
+ -e "/data.zip/ s:the directory where xrick is:$(get_libdir)/xrick.:" \
xrick.6 || die
sed -i \
- -e "s:data.zip:/usr/$(get_libdir)/${PN}/data.zip:" \
+ -e "s:data.zip:${EPREFIX}/usr/$(get_libdir)/xrick/data.zip:" \
src/xrick.c || die
+}
- sed -i \
- -e "s/-g -ansi -pedantic -Wall -W -O2/${CFLAGS}/" \
- -e '/LDFLAGS/s/=/+=/' \
- -e '/CC=/d' \
- -e "/CPP=/ { s/gcc/\$(CC)/; s/\"/'/g }" \
- Makefile || die
+src_configure() {
+ tc-export CC
}
src_install() {
dobin xrick
- insinto /usr/"$(get_libdir)"/${PN}
+
+ insinto /usr/$(get_libdir)/xrick
doins data.zip
- newicon src/xrickST.ico ${PN}.ico
- make_desktop_entry ${PN} ${PN} /usr/share/pixmaps/${PN}.ico
+
dodoc README KeyCodes
doman xrick.6
+
+ newicon src/xrickST.ico xrick.ico
+ make_desktop_entry xrick xrick /usr/share/pixmaps/xrick.ico
}