public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-action/battalion/, games-action/battalion/files/
@ 2017-11-19 15:51 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2017-11-19 15:51 UTC (permalink / raw
  To: gentoo-commits

commit:     acdce5c5b1e2dd043bca0e92c762e9142565922f
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 19 15:48:51 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov 19 15:51:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acdce5c5

games-action/battalion: Update to EAPI 6

* Remove games.eclass
* Respect user variables

Package-Manager: Portage-2.3.14, Repoman-2.3.6

 games-action/battalion/battalion-1.4b-r1.ebuild    | 69 ++++++++++++++++++++++
 .../files/battalion-1.4b-fix-build-system.patch    | 55 +++++++++++++++++
 2 files changed, 124 insertions(+)

diff --git a/games-action/battalion/battalion-1.4b-r1.ebuild b/games-action/battalion/battalion-1.4b-r1.ebuild
new file mode 100644
index 00000000000..d601672cf21
--- /dev/null
+++ b/games-action/battalion/battalion-1.4b-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Be a rampaging monster and destroy the city"
+HOMEPAGE="http://evlweb.eecs.uic.edu/aej/AndyBattalion.html"
+SRC_URI="http://evlweb.eecs.uic.edu/aej/BATTALION/${PN}${PV}.tar.bz2"
+
+LICENSE="battalion HPND"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="
+	virtual/glu
+	virtual/opengl
+	x11-libs/libX11"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${PN}${PV}
+PATCHES=(
+	"${FILESDIR}"/${P}-warning.patch
+	"${FILESDIR}"/${PN}-1.4b-fix-build-system.patch
+)
+
+src_prepare() {
+	default
+
+	# Modify data paths
+	sed -i \
+		-e "s:SOUNDS/:${EPREFIX}/usr/share/${PN}/SOUNDS/:" \
+		-e "s:MUSIC/:${EPREFIX}/usr/share/${PN}/MUSIC/:" \
+		audio.c || die
+	sed -i \
+		-e "s:DATA/:${EPREFIX}/usr/share/${PN}/DATA/:" \
+		-e "s:/usr/tmp:${EPREFIX}/var/${PN}:" \
+		battalion.c || die
+	sed -i \
+		-e "s:TEXTURES/:${EPREFIX}/usr/share/${PN}/TEXTURES/:" \
+		graphics.c || die
+
+	# Only .raw sound files are used on Linux. The .au files are not needed.
+	rm {SOUNDS,MUSIC}/*.au || die
+}
+
+src_configure() {
+	tc-export CC
+}
+
+src_install() {
+	dobin battalion
+	einstalldocs
+
+	insinto /usr/share/${PN}
+	doins -r DATA MUSIC SOUNDS TEXTURES
+
+	dodir /var/${PN}
+	touch "${ED%/}"/var/${PN}/battalion_hiscore || die
+	fperms 660 /var/${PN}/battalion_hiscore
+}
+
+pkg_postinst() {
+	elog "Sound and music are not enabled by default."
+	elog "Use the S and M keys to enable them in-game, or start the game with"
+	elog "the -s and -m switches: battalion -s -m"
+}

diff --git a/games-action/battalion/files/battalion-1.4b-fix-build-system.patch b/games-action/battalion/files/battalion-1.4b-fix-build-system.patch
new file mode 100644
index 00000000000..fe209e1db95
--- /dev/null
+++ b/games-action/battalion/files/battalion-1.4b-fix-build-system.patch
@@ -0,0 +1,55 @@
+--- a/Makefile
++++ b/Makefile
+@@ -23,7 +23,6 @@
+ # (the program should compile with no warning messages - if you
+ #  see a warning message please let me know about it)
+ # ------------------------------------------------------------
+-CC = cc
+ 
+ 
+ # STEP 2: IF YOU WANT TO COMPILE WITH THE MESA LIBRARIES THEN
+@@ -39,7 +38,8 @@
+ # ------------------------------------------------------------
+ #GLIB = -lMesaGL -lMesaGLU
+ # or
+-GLIB =  -lGL -lGLU
++GLIB_CFLAGS = `pkg-config --cflags gl` `pkg-config --cflags glu`
++GLIB_LIBS = `pkg-config --libs gl` `pkg-config --libs glu`
+ 
+ 
+ # STEP 4: CHOOSE WHICH HARDWARE / OS YOU ARE RUNNING
+@@ -91,13 +91,11 @@
+ 
+ # STEP 7: CHOOSE ANY OPTIMIZATIONS OR ADD ANY SPECIAL INCLUSIONS
+ # ------------------------------------------------------------
+-CFLAGS     = -O2  -I/usr/local/X11/include -I/usr/demo/SOUND/ -I./. $(AUDIODEF) $(OS)
+ 
+ 
+ # STEP 8: ADD ANY SPECIAL LIBRARY PATHS
+ #         (USEFUL TO POINT TO WHERE THE MESA LIBRARIES RESIDE)
+ # ------------------------------------------------------------
+-LIBFLAGS     = 
+ 
+ # you should now be able to type 'make' and everything should be fine ...
+ 
+@@ -106,15 +104,16 @@
+ TARGET 	= battalion
+ 
+ OBJ 	= battalion.o audio.o net.o gprim.o graphics.o objects.o text.o update.o tk.o font.o soundIt.o
+-LIBS    = -L./. -L/usr/X11R6/lib -lm -lX11 -lXext
++my_CPPFLAGS = -lm `pkg-config --cflags x11` `pkg-config --cflags xext` -I./. $(AUDIODEF) $(OS)
++my_LIBS = -lm `pkg-config --libs x11` `pkg-config --libs xext`
+ 
+ all:	$(TARGET)
+ 
+-#$(OBJ): $(?:.o=.c)
+-#	$(CC) $(CFLAGS) $(LIBFLAG) $(OS) $(WHICHLIB) $(AUDIOLIB) -c $?
++.c.o:
++	$(CC) $(CPPFLAGS) $(my_CPPFLAGS) $(CFLAGS) $(GLIB_CFLAGS) $(OS) $(WHICHLIB) $(AUDIOLIB) -c $<
+ 
+ $(TARGET): $(OBJ)
+-	$(CC) -o $(TARGET) $(OBJ) $(LIBFLAGS) $(GLIB) $(LIBS) $(AUDIODEF)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(GLIB_LIBS) $(LIBS) $(my_LIBS) $(AUDIODEF)
+ 
+ clean:
+ 	rm -f $(OBJ)


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

* [gentoo-commits] repo/gentoo:master commit in: games-action/battalion/, games-action/battalion/files/
@ 2022-11-21  1:36 Ionen Wolkens
  0 siblings, 0 replies; 2+ messages in thread
From: Ionen Wolkens @ 2022-11-21  1:36 UTC (permalink / raw
  To: gentoo-commits

commit:     4385c470211466d5683ac9aa87ff44cbf54d33ba
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 21 01:15:51 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Nov 21 01:35:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4385c470

games-action/battalion: fix build w/ upcoming clang16

Also add missing xorg-proto dep while here.

Closes: https://bugs.gentoo.org/874987
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-action/battalion/battalion-1.4b-r2.ebuild           | 7 +++++--
 games-action/battalion/files/battalion-1.4b-clang16.patch | 8 ++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/games-action/battalion/battalion-1.4b-r2.ebuild b/games-action/battalion/battalion-1.4b-r2.ebuild
index cf5a5613754a..db2d3d24992f 100644
--- a/games-action/battalion/battalion-1.4b-r2.ebuild
+++ b/games-action/battalion/battalion-1.4b-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -21,12 +21,15 @@ RDEPEND="
 	virtual/glu
 	virtual/opengl
 	x11-libs/libX11"
-DEPEND="${RDEPEND}"
+DEPEND="
+	${RDEPEND}
+	x11-base/xorg-proto"
 BDEPEND="virtual/pkgconfig"
 
 PATCHES=(
 	"${FILESDIR}"/${P}-warning.patch
 	"${FILESDIR}"/${P}-fix-build-system.patch
+	"${FILESDIR}"/${P}-clang16.patch
 )
 
 src_prepare() {

diff --git a/games-action/battalion/files/battalion-1.4b-clang16.patch b/games-action/battalion/files/battalion-1.4b-clang16.patch
new file mode 100644
index 000000000000..866e6227de05
--- /dev/null
+++ b/games-action/battalion/files/battalion-1.4b-clang16.patch
@@ -0,0 +1,8 @@
+https://bugs.gentoo.org/874987
+--- a/battalion.c
++++ b/battalion.c
+@@ -5471,3 +5471,3 @@
+ 
+-main (int argc, char*argv[])
++int main (int argc, char*argv[])
+     { 


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

end of thread, other threads:[~2022-11-21  1:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21  1:36 [gentoo-commits] repo/gentoo:master commit in: games-action/battalion/, games-action/battalion/files/ Ionen Wolkens
  -- strict thread matches above, loose matches on Subject: below --
2017-11-19 15:51 David Seifert

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