games-arcade/wop: Revbump for EAPI 6 support
authorPeter Levine <plevine457@gmail.com>
Sat, 18 Mar 2017 17:28:22 +0000 (13:28 -0400)
committerDavid Seifert <soap@gentoo.org>
Sat, 25 Mar 2017 12:47:46 +0000 (13:47 +0100)
Closes: https://github.com/gentoo/gentoo/pull/4222

games-arcade/wop/files/wop-0.4.3-Makefile.patch
games-arcade/wop/files/wop-0.4.3-fix-build-system.patch [new file with mode: 0644]
games-arcade/wop/files/wop-0.4.3-gcc43.patch
games-arcade/wop/files/wop-0.4.3-gcc6.patch
games-arcade/wop/wop-0.4.3-r2.ebuild [new file with mode: 0644]

index a7d2e67f9dc6d2ecc1e9f5d9d046ebcec70dd969..8a94462f7bd9ae7f583dd18d9ee03b7861e79699 100644 (file)
@@ -1,5 +1,5 @@
---- Makefile.orig      2007-04-23 18:27:32 +0000
-+++ Makefile   2007-04-23 18:27:50 +0000
+--- a/Makefile.orig    2007-04-23 18:27:32 +0000
++++ b/Makefile 2007-04-23 18:27:50 +0000
 @@ -3,22 +3,22 @@
  sinclude Makefile.local
  
@@ -32,8 +32,8 @@
  snapshot-src:
        ln -s . wop;                                           \
        tar cjvf wop-`date +%F`.tar.bz2                        \
---- src/Makefile.orig  2006-02-13 10:14:01.000000000 +0100
-+++ src/Makefile       2007-04-27 18:36:22.000000000 +0200
+--- a/src/Makefile.orig        2006-02-13 10:14:01.000000000 +0100
++++ b/src/Makefile     2007-04-27 18:36:22.000000000 +0200
 @@ -18,7 +18,7 @@
              -DUSE_SDL -DNEW=new\(std::nothrow\) \
              -I../sdlwidgets \
@@ -51,4 +51,4 @@
 +      $(CXX) $(LDFLAGS) $(OBJECT_FILES) -o $(TARGET) $(LIBS)
  
  %.o: %.cpp Makefile
-       $(CXX) $(CXXFLAGS) -c $< -o $@
\ No newline at end of file
+       $(CXX) $(CXXFLAGS) -c $< -o $@
diff --git a/games-arcade/wop/files/wop-0.4.3-fix-build-system.patch b/games-arcade/wop/files/wop-0.4.3-fix-build-system.patch
new file mode 100644 (file)
index 0000000..5af1696
--- /dev/null
@@ -0,0 +1,100 @@
+* Remove hardcoded user variables
+* Respect LDFLAGS and CPPFLAGS
+* Fix installation dir for arch-independent files
+
+--- a/Makefile
++++ b/Makefile
+@@ -3,22 +3,22 @@
+ sinclude Makefile.local
+ all:
+-      +cd sdlwidgets; make
+-      +cd src; make
++      $(MAKE) -C sdlwidgets
++      $(MAKE) -C src
+ runc:
+-      +cd src; make runc
++      $(MAKE) -C src runc
+ runs:
+-      +cd src; make runs
++      $(MAKE) -C src runs
+ doc:
+-      cd src; make doc
++      $(MAKE) -C src doc
+ clean:
+-      cd sdlwidgets; make clean
+-      cd src; make clean
++      $(MAKE) -C sdlwidgets clean
++      $(MAKE) -C src clean
+       cd doc; rm -rf html
+ unison:
+-      cd src; make unison
++      $(MAKE) -C src unison
+ gunison:
+-      cd src; make gunison
++      $(MAKE) -C src gunison
+ snapshot-src:
+       ln -s . wop;                                           \
+       tar cjvf wop-`date +%F`.tar.bz2                        \
+--- a/sdlwidgets/Makefile
++++ b/sdlwidgets/Makefile
+@@ -9,16 +9,12 @@
+ CXXFLAGS ?= -Wall -Wshadow -Wsign-compare -Wparentheses -Wconversion -g -O3 -ansi
+ CXXFLAGS += $(shell sdl-config --cflags)
+-CXX = g++
+-AR = ar cru
+-RANLIB = ranlib
+-
+ sinclude ../src/Makefile.local
+ all: $(TARGET)
+ $(TARGET): $(OBJECT_FILES) Makefile
+-      $(AR) $(TARGET) $(OBJECT_FILES)
++      $(AR) cru $(TARGET) $(OBJECT_FILES)
+       $(RANLIB) $(TARGET)
+ %.o: %.cpp Makefile
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -18,14 +18,13 @@
+             -DUSE_SDL -DNEW=new\(std::nothrow\) \
+             -I../sdlwidgets \
+             $(shell sdl-config --cflags) # -g
+-LDFLAGS  = -L../sdlwidgets -lsdlwidgets -lz \
++LIBS      = -L../sdlwidgets -lsdlwidgets -lz \
+            -lm -lSDL_net -lSDL_mixer -lSDL_ttf -lSDL_image \
+            $(shell sdl-config --libs) # -g
+ WOPFLAGS = data=../data
+ DOXYGENFLAGS = ../doc/doxygen.rc
+-CXX = g++
+ DOXYGEN = doxygen
+ UNISON_SOURCE = ssh://131.188.67.22//homes/staff/pohlt/wop/.unison_data
+@@ -56,10 +55,10 @@
+ $(TARGET): $(OBJECT_FILES) Makefile ../sdlwidgets/libsdlwidgets.a
+       -mkdir ../bin
+-      $(CXX) $(OBJECT_FILES) -o $(TARGET) $(LDFLAGS)
++      $(CXX) $(LDFLAGS) $(OBJECT_FILES) -o $(TARGET) $(LIBS)
+ %.o: %.cpp Makefile
+-      $(CXX) $(CXXFLAGS) -c $< -o $@
++      $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
+ clean:
+       -rm -f $(TARGET) *.o Makefile.depend*
+--- a/woprc
++++ b/woprc
+@@ -30,7 +30,7 @@
+ ## path of the data directory
+ ##  - optional, default "./data"
+-data = ./data
++data = /usr/share/wop
+ ## server name or IP address
+ ##  - optional, default "localhost"
index 903a97ba92ce5acc1ae48536de8dc41c702ea256..d4273f18ff6eb2b8eae6dd020bb29a4a3e555dbf 100644 (file)
@@ -1,5 +1,5 @@
---- src/scusibot.cpp.old       2010-01-05 15:41:23.000000000 +0100
-+++ src/scusibot.cpp   2010-01-05 15:41:46.000000000 +0100
+--- a/src/scusibot.cpp
++++ b/src/scusibot.cpp
 @@ -5,6 +5,7 @@
  #include "stationarygun.hpp"
  #include "global.hpp"
@@ -8,8 +8,8 @@
  
  ScusiBot::ScusiBot()
        : m_event( Event::EMPTY ), m_count( 0 ), m_state( IDLE ) {
---- src/gameinfowindow.cpp.old 2010-01-05 15:45:09.000000000 +0100
-+++ src/gameinfowindow.cpp     2010-01-05 15:46:08.000000000 +0100
+--- a/src/gameinfowindow.cpp
++++ b/src/gameinfowindow.cpp
 @@ -10,6 +10,8 @@
  #include "avatarworm.hpp"
  #include "wopsprites.hpp"
@@ -19,8 +19,8 @@
  #include "scorekeeper.hpp"
  #include "wopgui.hpp"
  
---- src/map.cpp.old    2010-01-05 15:46:35.000000000 +0100
-+++ src/map.cpp        2010-01-05 15:47:06.000000000 +0100
+--- a/src/map.cpp
++++ b/src/map.cpp
 @@ -9,6 +9,8 @@
  #include "world.hpp"
  #include "wopsettings.hpp"
index add9e06c83a5e678e8572722a7c9e636b602e4b8..14eea98c1a4ec5e750fddc5e9d7a78995cb9a271 100644 (file)
@@ -1,6 +1,5 @@
-diff -Naur wop-0.4.3.old/src/global.cpp wop-0.4.3/src/global.cpp
---- wop-0.4.3.old/src/global.cpp       2017-03-16 18:48:49.114967592 -0400
-+++ wop-0.4.3/src/global.cpp   2017-03-16 18:48:55.592903512 -0400
+--- a/src/global.cpp
++++ b/src/global.cpp
 @@ -44,10 +44,10 @@
  #define GREEN(s)                 s
  #define RED(s)                   s
diff --git a/games-arcade/wop/wop-0.4.3-r2.ebuild b/games-arcade/wop/wop-0.4.3-r2.ebuild
new file mode 100644 (file)
index 0000000..f0ef500
--- /dev/null
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+MY_DATA_V="2005-12-21"
+MY_DATA_P="${PN}data-${MY_DATA_V}"
+
+DESCRIPTION="Worms of Prey - A multi-player, real-time clone of Worms"
+HOMEPAGE="http://wormsofprey.org/"
+SRC_URI="
+       http://wormsofprey.org/download/${P}-src.tar.bz2
+       http://wormsofprey.org/download/${MY_DATA_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="
+       media-libs/libsdl
+       media-libs/sdl-image
+       media-libs/sdl-mixer
+       media-libs/sdl-net
+       media-libs/sdl-ttf"
+DEPEND="${RDEPEND}
+       x11-misc/makedepend"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-fix-build-system.patch
+       "${FILESDIR}"/${P}-gcc43.patch
+       "${FILESDIR}"/${P}-gcc6.patch
+)
+
+src_configure() {
+       tc-export AR CXX RANLIB
+}
+
+src_install() {
+       dobin bin/${PN}
+
+       insinto /usr/share/${PN}
+       doins -r "${WORKDIR}/${MY_DATA_P}"/.
+
+       insinto /etc
+       doins woprc
+
+       newicon "${WORKDIR}/${MY_DATA_P}"/images/misc/icons/wop16.png ${PN}.png
+       make_desktop_entry wop "Worms of Prey"
+
+       dodoc AUTHORS ChangeLog README{,-Libraries.txt} REVIEWS
+}