# $OpenBSD: Makefile.template,v 1.71 2014/07/10 12:33:17 sthen Exp $

COMMENT-main =		Game Boy Advance emulator
COMMENT-qt =		Game Boy Advance emulator with GUI

V =			0.2.1
DISTNAME =		mgba-$V
PKGNAME-main =		mgba-$V
PKGNAME-qt =		mgba-qt-$V

MULTI_PACKAGES =	-main -qt

.include <bsd.port.arch.mk>
.if ${BUILD_PACKAGES:M-main}
SHARED_LIBS +=  mgba                      0.0 # 0.1
.endif

CATEGORIES =		emulators

HOMEPAGE =		https://endrift.com/mgba/

MAINTAINER =		Anthony J. Bentley <anthony@cathet.us>

# MPL 2.0
PERMIT_PACKAGE_CDROM =	Yes

WANTLIB += GL GLU MagickCore MagickWand SDL avcodec avformat
WANTLIB += avresample avutil c edit m png pthread swscale termcap
WANTLIB += z zip

GH_ACCOUNT =		mgba-emu
GH_PROJECT =		mgba
GH_TAGNAME =		$V

MODULES =		devel/cmake \
			gcc4 \
			x11/qt5
MODGCC4_ARCHS =		*
MODGCC4_LANGS =		c c++
LIB_DEPENDS =		archivers/libzip \
			graphics/ImageMagick \
			graphics/ffmpeg \
			devel/sdl

.if ${BUILD_PACKAGES:M-qt}
#WANTLIB-qt = Qt5Core.1 Qt5Gui.1 Qt5Multimedia.1 Qt5Network.1 Qt5OpenGL.1 \
#	Qt5Widgets.1
LIB_DEPENDS-qt +=	emulators/mgba,-main
.endif

CONFIGURE_ARGS +=	-DUSE_PIXMAN=No

NO_TEST =		Yes

.include <bsd.port.mk>
