# $FreeBSD: tags/RELEASE_10_3_0/games/supertux-devel/Makefile 395542 2015-08-29 10:25:51Z rakuco $

PORTNAME=	supertux
PORTVERSION=	0.3.5
PORTREVISION=	1
CATEGORIES=	games
MASTER_SITES=	https://github.com/SuperTux/supertux/releases/download/v${PORTVERSION}/
PKGNAMESUFFIX=	-devel

MAINTAINER=	makc@FreeBSD.org
COMMENT=	Side-scroller game similar to Super Mario Brothers

BUILD_DEPENDS=	${LOCALBASE}/include/boost/smart_ptr.hpp:${PORTSDIR}/devel/boost-libs
LIB_DEPENDS=	libphysfs.so:${PORTSDIR}/devel/physfs \
		libcurl.so:${PORTSDIR}/ftp/curl \
		libvorbis.so:${PORTSDIR}/audio/libvorbis

USE_SDL=	sdl2 image2
USE_GL=		glew
USES=		cmake:outsource compiler:c++11-lib openal:al pkgconfig tar:bzip2
# Unhide std::to_string() to fix build with GCC (see ports/193528 for details)
CFLAGS+=	-D_GLIBCXX_USE_C99

OPTIONS_DEFINE=	DOCS

post-patch:
	${REINPLACE_CMD} -e '/^Icon=/s,supertux.png,supertux2.png,' \
		${WRKSRC}/supertux2.desktop

.include <bsd.port.mk>
