summaryrefslogtreecommitdiff
path: root/games-action/battalion
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-action/battalion
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-action/battalion')
-rw-r--r--games-action/battalion/Manifest5
-rw-r--r--games-action/battalion/battalion-1.4b-r1.ebuild69
-rw-r--r--games-action/battalion/files/battalion-1.4b-fix-build-system.patch55
-rw-r--r--games-action/battalion/files/battalion-1.4b-warning.patch12
-rw-r--r--games-action/battalion/metadata.xml8
5 files changed, 149 insertions, 0 deletions
diff --git a/games-action/battalion/Manifest b/games-action/battalion/Manifest
new file mode 100644
index 000000000000..3d3f8b7e0742
--- /dev/null
+++ b/games-action/battalion/Manifest
@@ -0,0 +1,5 @@
+AUX battalion-1.4b-fix-build-system.patch 1899 BLAKE2B cb53fff37506c874701549c1c4bdbae9760ece3bc7a51dd01da5d3acad6bfc491d36ff31eb6874f73680f67502210d58dacc28c11c22fcb7347d0d396ea07222 SHA512 66248fee82a88f416d255ff7e23c5ffeaac6a10bca22b93231645f9c9923b18df339dea2e38f6b4ab0a5189ce2650e7e21813060576ce1f70fe5e7c29d0f0bb0
+AUX battalion-1.4b-warning.patch 490 BLAKE2B 21f4bca09c2581e4054c0a03f7c1f65f527bbdf05dca8554c9da2350b01a56d6ad6efcfe2ed390392a48df40a82fb25f7a6d308d65131a5155594ec336e232d3 SHA512 ba216b192f454b07b14891dbc6c412b301257a91546b77c1e2053324248243422bfac43794849f44068afb65919958f466416d39826248b28dc71a644a1ee660
+DIST battalion1.4b.tar.bz2 942342 BLAKE2B 6a4bd9afc7202d68c2cf62fbfe5b3b8377069263d71adaad006d2b4803d5989b130e0ef7fd5b1479a7698d79c819bc463ab19f2fa1493d4caf616708091e2c83 SHA512 c3c615772012c63a709aaeaf4f23246760bf577b82eeec7cf5b2a479c6240fe4a2f839aca50540299ed4bee9b297f61fb8b7e1f5af74ea357f0d7e749d86f84b
+EBUILD battalion-1.4b-r1.ebuild 1545 BLAKE2B 9f11a189da4dea715299d7a18f205b7a42d6da9ac2ba359cab96a5562f9ca1d62a1c272b99e53245d1fbd467aa20ec3fc2059a1857544f2af739481a61affe7c SHA512 2c2a348a748108e648a439d3aa3a2c8ba3828ff8acbdce855a32b0f5e892a04c0db0de24bb3ba6a07254f1c8472ab0959ae000f1359390fd571d491f5e725830
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
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 000000000000..d601672cf212
--- /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 000000000000..fe209e1db953
--- /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)
diff --git a/games-action/battalion/files/battalion-1.4b-warning.patch b/games-action/battalion/files/battalion-1.4b-warning.patch
new file mode 100644
index 000000000000..91fd8ee51d3b
--- /dev/null
+++ b/games-action/battalion/files/battalion-1.4b-warning.patch
@@ -0,0 +1,12 @@
+diff -ru battalion1.4b.orig/net.c battalion1.4b/net.c
+--- battalion1.4b.orig/net.c 2002-05-06 09:57:01.000000000 -0400
++++ battalion1.4b/net.c 2015-03-30 18:29:23.885306334 -0400
+@@ -378,7 +378,7 @@
+
+ /* nother copy of this elsewhere */
+
+- sprintf(mesg, "%s %d %3.1f %3.1f %3.1f %3.1f %0.3f %d %d #", MESG_NEW_TANK,
++ sprintf(mesg, "%s %d %3.1f %3.1f %3.1f %3.1f %0.3f %d #", MESG_NEW_TANK,
+ tempTank->number,
+ tempTank->x-globalxshift,
+ tempTank->z-globalzshift,
diff --git a/games-action/battalion/metadata.xml b/games-action/battalion/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-action/battalion/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>