summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2017-03-18 13:28:22 -0400
committerDavid Seifert <soap@gentoo.org>2017-03-25 13:47:46 +0100
commit0eb18391f5e7645108d27317c2c2afd379013532 (patch)
tree65daee9ac0deccb5eecb8c2b8086716596fe1e43 /games-arcade
parentgames-arcade/wop: Fix GCC-6 build (diff)
downloadgentoo-0eb18391f5e7645108d27317c2c2afd379013532.tar.gz
gentoo-0eb18391f5e7645108d27317c2c2afd379013532.tar.bz2
gentoo-0eb18391f5e7645108d27317c2c2afd379013532.zip
games-arcade/wop: Revbump for EAPI 6 support
Closes: https://github.com/gentoo/gentoo/pull/4222
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/wop/files/wop-0.4.3-Makefile.patch10
-rw-r--r--games-arcade/wop/files/wop-0.4.3-fix-build-system.patch100
-rw-r--r--games-arcade/wop/files/wop-0.4.3-gcc43.patch12
-rw-r--r--games-arcade/wop/files/wop-0.4.3-gcc6.patch5
-rw-r--r--games-arcade/wop/wop-0.4.3-r2.ebuild54
5 files changed, 167 insertions, 14 deletions
diff --git a/games-arcade/wop/files/wop-0.4.3-Makefile.patch b/games-arcade/wop/files/wop-0.4.3-Makefile.patch
index a7d2e67f9dc6..8a94462f7bd9 100644
--- a/games-arcade/wop/files/wop-0.4.3-Makefile.patch
+++ b/games-arcade/wop/files/wop-0.4.3-Makefile.patch
@@ -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
index 000000000000..5af16960a95a
--- /dev/null
+++ b/games-arcade/wop/files/wop-0.4.3-fix-build-system.patch
@@ -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"
diff --git a/games-arcade/wop/files/wop-0.4.3-gcc43.patch b/games-arcade/wop/files/wop-0.4.3-gcc43.patch
index 903a97ba92ce..d4273f18ff6e 100644
--- a/games-arcade/wop/files/wop-0.4.3-gcc43.patch
+++ b/games-arcade/wop/files/wop-0.4.3-gcc43.patch
@@ -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"
diff --git a/games-arcade/wop/files/wop-0.4.3-gcc6.patch b/games-arcade/wop/files/wop-0.4.3-gcc6.patch
index add9e06c83a5..14eea98c1a4e 100644
--- a/games-arcade/wop/files/wop-0.4.3-gcc6.patch
+++ b/games-arcade/wop/files/wop-0.4.3-gcc6.patch
@@ -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
index 000000000000..f0ef50085b68
--- /dev/null
+++ b/games-arcade/wop/wop-0.4.3-r2.ebuild
@@ -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
+}