summaryrefslogtreecommitdiff
path: root/games/moonlight-embedded/Makefile
blob: 3b13ae515e1b94b1e0886fe6ba5f39889b9694ba (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

PORTNAME=	moonlight-embedded
DISTVERSION=	2.4.11
CATEGORIES=	games
MASTER_SITES=	https://github.com/irtimmer/moonlight-embedded/releases/download/v${DISTVERSION}/

PATCH_SITES=	https://github.com/irtimmer/moonlight-embedded/commit/
PATCHFILES=	5b6639c8a76c4bbb5e0b4bcfe41b8df136608885.patch:-p1

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Gamestream client

LICENSE=	GPLv3+
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
		libcurl.so:ftp/curl \
		libenet.so:net/enet \
		libexpat.so:textproc/expat2 \
		libopus.so:audio/opus \
		libuuid.so:misc/e2fsprogs-libuuid

USES=		cmake localbase:ldflags perl5 pkgconfig sdl ssl tar:xz
USE_LDCONFIG=	yes
USE_PERL5=	build
USE_SDL=	sdl2

CFLAGS+=	-DPREFIX="\\\"${PREFIX}\\\""

post-patch:
	@${REINPLACE_CMD} -e '/(ALSA)/d' \
		-e '/libpulse-simple/d' \
		-e '/libcec/d' \
		-e '/libevdev/d' -e 's@./src/input/evdev.c@@' \
		-e '/libudev/d' -e 's@./src/input/udev.c@@' \
		-e '/libva/d' \
		-e '/vdpau/d' \
		-e '/egl/d' \
		-e '/glesv2/d' \
		-e '/x11/d' \
		${WRKSRC}/CMakeLists.txt
	@${RM} ${WRKSRC}/src/loop.c
	@${REINPLACE_CMD} -e '/avahi-client/d' -e 's@SHARED@STATIC@' \
		-e 's@OpenSSL 1.0.2@OpenSSL@' -e '/^install(/d' \
		${WRKSRC}/libgamestream/CMakeLists.txt
	@${RM} ${WRKSRC}/libgamestream/discover.c
	@${REINPLACE_CMD} -e 's@/etc/moonlight/moonlight.conf@${PREFIX}/etc/moonlight.conf@' \
		-e 's@moonligt@moonlight@g' \
		${WRKSRC}/docs/README.pod

post-install:
	@${MV} ${STAGEDIR}${PREFIX}/etc/moonlight.conf \
		${STAGEDIR}${PREFIX}/etc/moonlight.conf.sample

.include <bsd.port.mk>