Skip to content

Commit

Permalink
games-strategy/warmux: Fix building with GCC 6
Browse files Browse the repository at this point in the history
Gentoo-bug: 598639

Package-Manager: Portage-2.3.3, Repoman-2.3.1
  • Loading branch information
SoapGentoo committed Dec 17, 2016
1 parent ba3180a commit 0455ee0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
14 changes: 14 additions & 0 deletions games-strategy/warmux/files/warmux-11.04.1-fix-c++14.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
In C++14, bool -> T* implicit conversions are not allowed anymore.
See also: https://bugs.gentoo.org/show_bug.cgi?id=598639

--- a/src/interface/weapon_menu.cpp
+++ b/src/interface/weapon_menu.cpp
@@ -391,7 +391,7 @@
Weapon * WeaponsMenu::UpdateCurrentOverflyItem(const Polygon * poly)
{
if (!show)
- return false;
+ return NULL;
const std::vector<PolygonItem *>& items = poly->GetItem();
WeaponMenuItem * tmp;
Interface::GetInstance()->SetCurrentOverflyWeapon(NULL);
21 changes: 12 additions & 9 deletions games-strategy/warmux/warmux-11.04.1-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# $Id$

EAPI=6

inherit autotools eutils

DESCRIPTION="A free Worms clone"
Expand All @@ -14,15 +15,16 @@ SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
IUSE="debug nls unicode"

RDEPEND="media-libs/libsdl[joystick,video,X]
RDEPEND="
dev-libs/libxml2
media-libs/libsdl[joystick,video,X]
media-libs/sdl-image[jpeg,png]
media-libs/sdl-mixer[vorbis]
media-libs/sdl-ttf
media-libs/sdl-net
>=media-libs/sdl-gfx-2.0.22
net-misc/curl
media-libs/sdl-gfx
media-fonts/dejavu
dev-libs/libxml2
net-misc/curl
x11-libs/libX11
nls? ( virtual/libintl )
unicode? ( dev-libs/fribidi )"
Expand All @@ -38,27 +40,28 @@ PATCHES=(
"${FILESDIR}"/${P}-action.patch
"${FILESDIR}"/${P}-gcc47.patch
"${FILESDIR}"/${P}-stat.patch
"${FILESDIR}"/${P}-fix-c++14.patch
)

src_prepare() {
default

eautoreconf
}

src_configure() {
econf \
--with-localedir-name=/usr/share/locale \
--with-datadir-name=/usr/share/${PN} \
--with-font-path=/usr/share/fonts/dejavu/DejaVuSans.ttf \
--with-localedir-name="${EPREFIX}"/usr/share/locale \
--with-datadir-name="${EPREFIX}"/usr/share/${PN} \
--with-font-path="${EPREFIX}"/usr/share/fonts/dejavu/DejaVuSans.ttf \
$(use_enable debug) \
$(use_enable nls) \
$(use_enable unicode fribidi)
}

src_install() {
default
rm -f "${D}/usr/share/${PN}/font/DejaVuSans.ttf"

rm -f "${ED%/}"/usr/share/${PN}/font/DejaVuSans.ttf || die
doicon data/icon/warmux.svg
make_desktop_entry warmux Warmux
}

0 comments on commit 0455ee0

Please sign in to comment.