summaryrefslogtreecommitdiff
path: root/emulators/retroarch/Makefile
blob: b0051d20fce553d67bf2c6a51381d7e27e11db25 (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
# $NetBSD: Makefile,v 1.24 2019/05/19 23:13:03 nia Exp $

PKGNAME=	retroarch-${RETROARCH_VERSION}
DISTNAME=	RetroArch-${RETROARCH_VERSION}
PKGREVISION=	4
CATEGORIES=	emulators
MASTER_SITES=	${MASTER_SITE_GITHUB:=libretro/RetroArch/releases/download/v${RETROARCH_VERSION}/}
EXTRACT_SUFX=	.tar.xz

MAINTAINER=	nia@NetBSD.org
HOMEPAGE=	https://www.retroarch.com/
COMMENT=	Official reference frontend for the libretro API
LICENSE=	gnu-gpl-v3

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

HAS_CONFIGURE=	yes

# Needed for certain cores, e.g. Dolphin, Reicast.
NOT_PAX_MPROTECT_SAFE+=	bin/retroarch

CONFIGURE_ARGS+=	--disable-builtinmbedtls
CONFIGURE_ARGS+=	--disable-builtinminiupnpc
CONFIGURE_ARGS+=	--disable-builtinzlib
CONFIGURE_ARGS+=	--disable-builtinflac
CONFIGURE_ARGS+=	--disable-discord

# necessity for loading cores, might as well fail early without it
CONFIGURE_ARGS+=	--enable-dylib

CONFIGURE_ENV+=	BIN_DIR=${PREFIX}/bin
CONFIGURE_ENV+=	MAN_DIR=${PREFIX}/${PKGMANDIR}

MAKE_FLAGS+=	GIT_VERSION="-pkgsrc"

DEPENDS+=	libretro-core-info>=${RETROARCH_VERSION}:../../emulators/libretro-core-info
DEPENDS+=	libretro-database>=0:../../emulators/libretro-database

CPPFLAGS+=	-DPREFIX=\"${PREFIX}\"
LDFLAGS.SunOS+=	-lsocket -lnsl

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

.if ${OPSYS} == "NetBSD"
# On exit (load a game first):
# assertion "pthread__tsd_destructors[key] != NULL" failed:
# file "/usr/src/lib/libpthread/pthread_tsd.c", line 287, function "pthread_key_delete"
# [1]   Abort trap (core dumped) retroarch
CONFIGURE_ARGS+=	--disable-thread_storage
# doesn't work yet
CONFIGURE_ARGS+=	--disable-kms
.endif

.include "version.mk"
.include "options.mk"
.include "../../audio/flac/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../net/miniupnpc/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"