diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-11-20 18:45:28 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-11-20 18:45:28 +0000 |
commit | 796cae72cf9ed18ba01256ac1f83a686a2a76036 (patch) | |
tree | 5ca737a2562d8c0a09fcfacd81d1f9004df37b00 /games-action/battalion | |
parent | 20d8e9cfb95a9f054d654ab6405e848807186aa0 (diff) |
gentoo resync : 20.11.2017
Diffstat (limited to 'games-action/battalion')
-rw-r--r-- | games-action/battalion/Manifest | 3 | ||||
-rw-r--r-- | games-action/battalion/battalion-1.4b-r1.ebuild (renamed from games-action/battalion/battalion-1.4b.ebuild) | 54 | ||||
-rw-r--r-- | games-action/battalion/files/battalion-1.4b-fix-build-system.patch | 55 |
3 files changed, 84 insertions, 28 deletions
diff --git a/games-action/battalion/Manifest b/games-action/battalion/Manifest index 48ef30afb62a..a0689e610071 100644 --- a/games-action/battalion/Manifest +++ b/games-action/battalion/Manifest @@ -1,6 +1,7 @@ +AUX battalion-1.4b-fix-build-system.patch 1899 SHA256 b93c61b585fa374336097d38bc491eb0bcf60370c9337e54abf6f9d4c5cb4e11 SHA512 66248fee82a88f416d255ff7e23c5ffeaac6a10bca22b93231645f9c9923b18df339dea2e38f6b4ab0a5189ce2650e7e21813060576ce1f70fe5e7c29d0f0bb0 WHIRLPOOL 66dd06ab3f0cff00cfde9e3741b04b0071129eb595cdbacd2fa55620990e0d04c0776a84b34fffada9837281d37cf058f72c6fe6c0f4b2f5f05d5a3b96387934 AUX battalion-1.4b-warning.patch 490 SHA256 78c09c947112102773f27a7068f2bdc535a77ba72c855a0246890f0b1ff76efe SHA512 ba216b192f454b07b14891dbc6c412b301257a91546b77c1e2053324248243422bfac43794849f44068afb65919958f466416d39826248b28dc71a644a1ee660 WHIRLPOOL 962781748a7abbf780b771c91c4a6ca0e65294502ff4872f9b0bc463cf785f7e3d016861ad2bdfe6ed0baab8dc6803491b04471fd0a2898c72d8b58a752844d8 DIST battalion1.4b.tar.bz2 942342 SHA256 983db152b44b33396ab242946b51d33c405e0bef8649e2cc9e38d6229d9735f7 SHA512 c3c615772012c63a709aaeaf4f23246760bf577b82eeec7cf5b2a479c6240fe4a2f839aca50540299ed4bee9b297f61fb8b7e1f5af74ea357f0d7e749d86f84b WHIRLPOOL 4816460b6e07046934852ca7c079f13eca05827f34b19c13b00f98ced0caa57e848b9d1f3badaa31a82a0dcfba61a9591d70f815cb83596a6901728fd45088c5 -EBUILD battalion-1.4b.ebuild 1632 SHA256 cd1e3694c57af5a3b2a30a12acb10c7bf66b73e308441b21410069dd332eaf6a SHA512 82d61a18b52f2ad2a6685c6b274ebd1587d4c9f4e2e4d597bc5f5985a66ea7ef544b02dc958424d1d47829e77bdec3aca2ce552ea216e624d9698c896bea7f43 WHIRLPOOL 4420ff2f40ff7161ef7e939022d01f0c4348d881539a5b71780ae66d32b35adaa9a3a8a9c76afd2489ab270f5e38cb9c9faa239f3eb99c483288a18fbfffba6b +EBUILD battalion-1.4b-r1.ebuild 1545 SHA256 44c40f4a33b5b373873550377ff7ef54fa45c9920339afe740c61d02207e8b53 SHA512 2c2a348a748108e648a439d3aa3a2c8ba3828ff8acbdce855a32b0f5e892a04c0db0de24bb3ba6a07254f1c8472ab0959ae000f1359390fd571d491f5e725830 WHIRLPOOL 700ff8b373d72e53163b1ba5101fcf9e157b521464d1c0e9a75fbb406cd567bf6ced43d7a9a9906b80c1d09ab1b01b839b281f4dc064df43d810beac29632617 MISC ChangeLog 2472 SHA256 a9f625f6e1b9488dfacbbfdd7cf40c7a0bf2a3cf9acf3bd77f549c20adbae4f2 SHA512 a50f34ec2420d9a2b4823fa87db813e4a0ba37c289816457b2ca17033f7a7499f4c38e9f0272875c5fbc03d83fa2ee1e712156137ac088b594eb545a4f59f65b WHIRLPOOL 5f09cfe73e0e2c7328a2d0ff7a9e21ff5630d1ea29e9d6c1060d6cbdc11090844a79c9ba0469e74cf1936ae7235d06027ea79a3cf377664fe0faca1b3e81af4b MISC ChangeLog-2015 1819 SHA256 dbcca58416adec02f5f7df1c20a5bed108eba4931e402c80aeb71260c5eb00bb SHA512 ee78de1a2d4a934d37a64d62484ecf1d9691799b732a6f7ffb190724a7fa63b6b925be9246484c90e5977256275a45d564f76e039fff2e27d591577010a53b08 WHIRLPOOL adfc2dbc9fe958b753294cdfc2409d52267f7cc05bbb889186ebd543c21f9dd114476c32ca8f8f03a35c8ae875ecd01c08cb688dea94385bfb77c45c8405947e MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088 diff --git a/games-action/battalion/battalion-1.4b.ebuild b/games-action/battalion/battalion-1.4b-r1.ebuild index 0ded9a00d39b..d601672cf212 100644 --- a/games-action/battalion/battalion-1.4b.ebuild +++ b/games-action/battalion/battalion-1.4b-r1.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=5 -inherit eutils games +EAPI=6 + +inherit toolchain-funcs DESCRIPTION="Be a rampaging monster and destroy the city" HOMEPAGE="http://evlweb.eecs.uic.edu/aej/AndyBattalion.html" @@ -13,56 +14,55 @@ SLOT="0" KEYWORDS="~x86" IUSE="" -DEPEND="virtual/opengl +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() { - epatch "${FILESDIR}"/${P}-warning.patch + default + # Modify data paths sed -i \ - -e "s:SOUNDS/:${GAMES_DATADIR}/${PN}/SOUNDS/:" \ - -e "s:MUSIC/:${GAMES_DATADIR}/${PN}/MUSIC/:" \ + -e "s:SOUNDS/:${EPREFIX}/usr/share/${PN}/SOUNDS/:" \ + -e "s:MUSIC/:${EPREFIX}/usr/share/${PN}/MUSIC/:" \ audio.c || die sed -i \ - -e "s:DATA/:${GAMES_DATADIR}/${PN}/DATA/:" \ - -e "s:/usr/tmp:${GAMES_STATEDIR}:" \ + -e "s:DATA/:${EPREFIX}/usr/share/${PN}/DATA/:" \ + -e "s:/usr/tmp:${EPREFIX}/var/${PN}:" \ battalion.c || die sed -i \ - -e "s:TEXTURES/:${GAMES_DATADIR}/${PN}/TEXTURES/:" \ + -e "s:TEXTURES/:${EPREFIX}/usr/share/${PN}/TEXTURES/:" \ graphics.c || die - # Modify Makefile and add CFLAGS - sed -i \ - -e "s:-O2:${CFLAGS}:" \ - -e "/^CC/d" \ - Makefile || die # Only .raw sound files are used on Linux. The .au files are not needed. - rm -f {SOUNDS,MUSIC}/*.au + rm {SOUNDS,MUSIC}/*.au || die } -src_compile() { - emake LIBFLAGS="${LDFLAGS}" +src_configure() { + tc-export CC } src_install() { - dogamesbin battalion - insinto "${GAMES_DATADIR}"/${PN} - doins -r DATA MUSIC SOUNDS TEXTURES - dodoc README + dobin battalion + einstalldocs - dodir "${GAMES_STATEDIR}" - touch "${D}${GAMES_STATEDIR}"/battalion_hiscore - fperms 660 "${GAMES_STATEDIR}"/battalion_hiscore + insinto /usr/share/${PN} + doins -r DATA MUSIC SOUNDS TEXTURES - prepgamesdirs + dodir /var/${PN} + touch "${ED%/}"/var/${PN}/battalion_hiscore || die + fperms 660 /var/${PN}/battalion_hiscore } pkg_postinst() { - games_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) |