commit:     2c4c719528dd2364a8c33fe5f05b6847ea0711fe
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 19 14:06:03 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov 19 14:07:24 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c4c7195

games-action/atanks: Respect user variables

Package-Manager: Portage-2.3.14, Repoman-2.3.6

 games-action/atanks/atanks-6.4-r1.ebuild           | 18 ++++++++++----
 .../atanks/files/atanks-6.4-fix-build-system.patch | 28 ++++++++++++++++++++++
 2 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/games-action/atanks/atanks-6.4-r1.ebuild 
b/games-action/atanks/atanks-6.4-r1.ebuild
index d17df9c83dc..ed2deed7904 100644
--- a/games-action/atanks/atanks-6.4-r1.ebuild
+++ b/games-action/atanks/atanks-6.4-r1.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-inherit eutils gnome2-utils
+
+inherit eutils gnome2-utils toolchain-funcs
 
 DESCRIPTION="Worms and Scorched Earth-like game"
 HOMEPAGE="http://atanks.sourceforge.net/";
@@ -16,18 +17,27 @@ IUSE=""
 DEPEND="media-libs/allegro:0[X]"
 RDEPEND=${DEPEND}
 
+PATCHES=( "${FILESDIR}"/${PN}-6.4-fix-build-system.patch )
+
+src_configure() {
+       tc-export CXX
+}
+
 src_compile() {
        emake \
-               INSTALLDIR="/usr/share/${PN}"
+               INSTALLDIR="${EPREFIX}/usr/share/${PN}"
 }
 
 src_install() {
        dobin ${PN}
+       local DOCS=( Changelog README TODO )
+       einstalldocs
+
        insinto /usr/share/${PN}
        doins -r button misc missile sound stock tank tankgun text title 
unicode.dat *.txt
+
        doicon -s 48 ${PN}.png
        make_desktop_entry atanks "Atomic Tanks"
-       dodoc Changelog README TODO
 }
 
 pkg_preinst() {

diff --git a/games-action/atanks/files/atanks-6.4-fix-build-system.patch 
b/games-action/atanks/files/atanks-6.4-fix-build-system.patch
new file mode 100644
index 00000000000..e13ebb1d142
--- /dev/null
+++ b/games-action/atanks/files/atanks-6.4-fix-build-system.patch
@@ -0,0 +1,28 @@
+* Don't try to find where $(CXX) is, just use it
+* Don't muck with CXXFLAGS
+
+--- a/Makefile
++++ b/Makefile
+@@ -85,13 +85,9 @@
+ # ------------------------------------
+ INSTALL := $(shell which install)
+ RM      := $(shell which rm) -f
+-CXX     ?= g++
+ SED     := $(shell which sed)
+ WINDRES :=
+ 
+-ifeq (,$(findstring /,$(CXX)))
+-  CXX   := $(shell which $(CXX))
+-endif
+ 
+ 
+ # if this is a Windows target, prefer mingw32-g++ over g++
+@@ -231,8 +227,6 @@
+     CPPFLAGS := ${CPPFLAGS} -DATANKS_DEBUG_LOGTOFILE
+   endif
+ 
+-else
+-  CXXFLAGS := -march=native ${CXXFLAGS} -O2
+ endif
+ 
+ 

Reply via email to