summaryrefslogtreecommitdiff
path: root/emulators/bsnes/Makefile
blob: 1064ae20da18272e5080ba950f452fd181ade3c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# $NetBSD: Makefile,v 1.9 2021/12/08 16:04:14 adam Exp $

DISTNAME=	bsnes-115
PKGREVISION=	7
CATEGORIES=	emulators
MASTER_SITES=	${MASTER_SITE_GITHUB:=bsnes-emu/}
GITHUB_TAG=	v${PKGVERSION_NOREV}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://github.com/bsnes-emu/bsnes
COMMENT=	SNES/SFC emulator focused on performance, features, and ease of use
LICENSE=	gnu-gpl-v3

USE_TOOLS+=	gmake pkg-config
USE_LANGUAGES=	c c++

# c++17
GCC_REQD+=	7

# incorrect warnings for certain strings with gcc-7.5.0.
CXXFLAGS+=	-Wno-trigraphs

MAKE_FILE=	GNUmakefile

BUILD_DIRS=	bsnes
INSTALL_DIRS=	bsnes

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "Linux"
BUILD_MAKE_FLAGS+=	platform=linux
.elif ${OPSYS} == "Darwin"
BUILD_MAKE_FLAGS+=	platform=macos
.else
BUILD_MAKE_FLAGS+=	platform=bsd
.endif

.if ${OPSYS} != "Darwin"
MAKE_FLAGS+=	hiro=gtk3
.  if ${X11_TYPE} == "native"
LDFLAGS+=	${COMPILER_RPATH_FLAG}${X11BASE}/lib
.  endif
.  include "../../mk/oss.buildlink3.mk"
.  if ${OSS_TYPE} != "none"
LDFLAGS+=		${LIBOSSAUDIO}
SUBST_CLASSES+=		oss
SUBST_STAGE.oss=	pre-configure
SUBST_MESSAGE.oss=	Correcting the path to the OSS device.
SUBST_FILES.oss+=	ruby/audio/oss.cpp
SUBST_SED.oss+=		-e "s,/dev/dsp,${DEVOSSAUDIO},g"
.  endif
.endif

MAKE_FLAGS+=	compiler=${CXX}
MAKE_FLAGS+=	openmp=false
# Disable -march=native.
MAKE_FLAGS+=	local=false

INSTALL_MAKE_FLAGS+=	platform=bsd
INSTALL_MAKE_FLAGS+=	prefix=${DESTDIR}${PREFIX}

.if ${OPSYS} == "Linux"
.  include "../../audio/alsa-lib/buildlink3.mk"
.  include "../../audio/pulseaudio/buildlink3.mk"
.endif
.if ${OPSYS} != "Darwin"
.  include "../../audio/openal-soft/buildlink3.mk"
.  include "../../devel/SDL2/buildlink3.mk"
.  include "../../sysutils/desktop-file-utils/desktopdb.mk"
.  include "../../x11/gtk3/buildlink3.mk"
.  include "../../x11/gtksourceview3/buildlink3.mk"
.  include "../../x11/libX11/buildlink3.mk"
.  include "../../x11/libXext/buildlink3.mk"
.  include "../../x11/libXrandr/buildlink3.mk"
.  include "../../x11/libXv/buildlink3.mk"
.endif
.include "../../mk/bsd.pkg.mk"