public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-arcade/xrick/, games-arcade/xrick/files/
@ 2018-04-25 18:29 Pacho Ramos
  0 siblings, 0 replies; 2+ messages in thread
From: Pacho Ramos @ 2018-04-25 18:29 UTC (permalink / raw
  To: gentoo-commits

commit:     5ef981fceffc8fe28e9b308065d8f9591ac04e23
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 25 18:06:23 2018 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Wed Apr 25 18:29:29 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ef981fc

games-arcade/xrick: Stop using games.eclass

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 games-arcade/xrick/files/xrick-021212-zlib.patch |  4 +-
 games-arcade/xrick/xrick-021212-r2.ebuild        | 54 ++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/games-arcade/xrick/files/xrick-021212-zlib.patch b/games-arcade/xrick/files/xrick-021212-zlib.patch
index da09a46369d..bd7d6287925 100644
--- a/games-arcade/xrick/files/xrick-021212-zlib.patch
+++ b/games-arcade/xrick/files/xrick-021212-zlib.patch
@@ -1,5 +1,5 @@
---- include/unzip.h.old	2012-03-24 16:13:16.012854948 +0100
-+++ include/unzip.h	2012-03-24 16:15:42.744346771 +0100
+--- a/include/unzip.h.old	2012-03-24 16:13:16.012854948 +0100
++++ b/include/unzip.h	2012-03-24 16:15:42.744346771 +0100
 @@ -49,6 +49,10 @@
  #include "zlib.h"
  #endif

diff --git a/games-arcade/xrick/xrick-021212-r2.ebuild b/games-arcade/xrick/xrick-021212-r2.ebuild
new file mode 100644
index 00000000000..9e95cbe3a4b
--- /dev/null
+++ b/games-arcade/xrick/xrick-021212-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="Clone of the Rick Dangerous adventure game from the 80's"
+HOMEPAGE="http://www.bigorno.net/xrick/"
+SRC_URI="http://www.bigorno.net/xrick/${P}.tgz"
+
+LICENSE="GPL-1+ xrick"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~x86-fbsd"
+IUSE=""
+RESTRICT="mirror bindist" # bug #149097
+
+DEPEND="media-libs/libsdl[video]"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+	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}.:" \
+		xrick.6 || die
+
+	sed -i \
+		-e "s:data.zip:/usr/$(get_libdir)/${PN}/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_install() {
+	dobin xrick
+	insinto /usr/"$(get_libdir)"/${PN}
+	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
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-arcade/xrick/, games-arcade/xrick/files/
@ 2020-11-22 16:44 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2020-11-22 16:44 UTC (permalink / raw
  To: gentoo-commits

commit:     1073cfb79d527a47ad80625bfd1460e438da6685
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 22 16:43:53 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov 22 16:43:53 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1073cfb7

games-arcade/xrick: Port to EAPI 7

Closes: https://bugs.gentoo.org/707136
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../xrick/files/xrick-021212-Makefile.patch        | 30 ++++++++++++++++
 .../xrick/files/xrick-021212-fno-common.patch      | 34 ++++++++++++++++++
 games-arcade/xrick/xrick-021212-r2.ebuild          | 42 +++++++++++++---------
 3 files changed, 89 insertions(+), 17 deletions(-)

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 00000000000..2911f4715d4
--- /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 00000000000..d3c05c30dbe
--- /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 c24058e2784..3ef05387653 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
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-22 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-22 16:44 [gentoo-commits] repo/gentoo:master commit in: games-arcade/xrick/, games-arcade/xrick/files/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2018-04-25 18:29 Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox