diff options
Diffstat (limited to 'games-misc')
-rw-r--r-- | games-misc/c++robots/Manifest | 2 | ||||
-rw-r--r-- | games-misc/c++robots/c++robots-0-r1.ebuild | 22 | ||||
-rw-r--r-- | games-misc/c++robots/files/c++robots-0-fix-build-system.patch (renamed from games-misc/c++robots/files/proper-coding.patch) | 33 |
3 files changed, 27 insertions, 30 deletions
diff --git a/games-misc/c++robots/Manifest b/games-misc/c++robots/Manifest index 7af5f1ae7bab..92d1f38d0733 100644 --- a/games-misc/c++robots/Manifest +++ b/games-misc/c++robots/Manifest @@ -1 +1 @@ -DIST c++robots.tar.gz 10896 BLAKE2B 8ca61cccd2b08992ece77cedb98e86642d00b797b1d34cf7039d7e3788e91ac5b20426766284bc7e4bca1625fd96a649110cac3b3afea8afd17e9dc0ff23898b SHA512 410a08c920f8e54abe74b085d67607bcc381e768c0127cf98eabab894a106d5d1466a1cac4146924b53c29ccffddd5eb77c9383c42b6fe6e48c7e89691e691f3 +DIST c++robots-0.tar.gz 10896 BLAKE2B 8ca61cccd2b08992ece77cedb98e86642d00b797b1d34cf7039d7e3788e91ac5b20426766284bc7e4bca1625fd96a649110cac3b3afea8afd17e9dc0ff23898b SHA512 410a08c920f8e54abe74b085d67607bcc381e768c0127cf98eabab894a106d5d1466a1cac4146924b53c29ccffddd5eb77c9383c42b6fe6e48c7e89691e691f3 diff --git a/games-misc/c++robots/c++robots-0-r1.ebuild b/games-misc/c++robots/c++robots-0-r1.ebuild index bb398f5ac30a..06fad1c7d3c5 100644 --- a/games-misc/c++robots/c++robots-0-r1.ebuild +++ b/games-misc/c++robots/c++robots-0-r1.ebuild @@ -1,30 +1,26 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 + +inherit toolchain-funcs DESCRIPTION="ongoing 'King of the Hill' (KotH) tournament" HOMEPAGE="http://www.gamerz.net/c++robots/" -SRC_URI="http://www.gamerz.net/c++robots/c++robots.tar.gz" +SRC_URI="mirror://gentoo/${PN}.tar.gz -> ${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~x86" -IUSE="static" S=${WORKDIR}/${PN} +PATCHES=( "${FILESDIR}"/${P}-fix-build-system.patch ) -PATCHES=( - "${FILESDIR}/proper-coding.patch" -) - -src_compile() { - local myldflags="${LDFLAGS}" - use static && myldflags="${myldflags} -static" - emake CFLAGS="${CFLAGS}" LDFLAGS="${myldflags}" +src_configure() { + tc-export CXX } src_install() { dobin combat cylon target tracker - dodoc README + einstalldocs } diff --git a/games-misc/c++robots/files/proper-coding.patch b/games-misc/c++robots/files/c++robots-0-fix-build-system.patch index 93b87c1c1da5..ece48ff1c407 100644 --- a/games-misc/c++robots/files/proper-coding.patch +++ b/games-misc/c++robots/files/c++robots-0-fix-build-system.patch @@ -1,8 +1,7 @@ ---- c++robots.orig/Makefile -+++ c++robots/Makefile -@@ -1,38 +1,37 @@ - CFLAGS=-g -+LDFLAGS= +--- a/Makefile ++++ b/Makefile +@@ -1,38 +1,35 @@ +-CFLAGS=-g PROGRAMS=combat ROBOTS=cylon tracker target @@ -13,39 +12,41 @@ clean: rm -f $(PROGRAMS) $(ROBOTS) *.o core - combat: combat.o +-combat: combat.o - $(CC) $(CFLAGS) -o $@ combat.o -lm -+ $(CXX) -o $@ $(LDFLAGS) combat.o -lm ++combat: combat.o ++ $(CXX) $(LDFLAGS) -o $@ combat.o -lm - combat.o: combat.c +-combat.o: combat.c - $(CC) $(CFLAGS) -c combat.c -+ $(CXX) $(CXXFLAGS) -c combat.c ++combat.o: combat.c ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c combat.c robots.o: robots.C robots.h - g++ -c robots.C -+ $(CXX) $(CXXFLAGS) -c robots.C ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c robots.C cylon: cylon.o robots.o - g++ -static -o $@ cylon.o robots.o -+ $(CXX) -o $@ $(LDFLAGS) cylon.o robots.o ++ $(CXX) $(LDFLAGS) -o $@ cylon.o robots.o cylon.o: cylon.c robots.h - g++ -c cylon.c -+ $(CXX) $(CXXFLAGS) -c cylon.c ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c cylon.c tracker: tracker.o robots.o - g++ -static -o $@ tracker.o robots.o -+ $(CXX) -o $@ $(LDFLAGS) tracker.o robots.o ++ $(CXX) $(LDFLAGS) -o $@ tracker.o robots.o tracker.o: tracker.c robots.h - g++ -c tracker.c -+ $(CXX) $(CXXFLAGS) -c tracker.c ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c tracker.c target: target.o robots.o - g++ -static -o $@ target.o robots.o -+ $(CXX) -o $@ $(LDFLAGS) target.o robots.o ++ $(CXX) $(LDFLAGS) -o $@ target.o robots.o target.o: target.c robots.h - g++ -c target.c -+ $(CXX) $(CXXFLAGS) -c target.c ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c target.c |