aboutsummaryrefslogtreecommitdiff
path: root/games/moonlight-embedded/Makefile
blob: 17b7723059afbdade16f26a847f2b9079c3df682 (plain) (blame)
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
PORTNAME=	moonlight-embedded
DISTVERSION=	2.5.2
CATEGORIES=	games
MASTER_SITES=	https://github.com/irtimmer/moonlight-embedded/releases/download/v${DISTVERSION}/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Gamestream client

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

BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto
LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
		libcurl.so:ftp/curl \
		libenet.so:net/enet \
		libexpat.so:textproc/expat2 \
		libevdev.so:devel/libevdev \
		libopus.so:audio/opus \
		libudev.so:devel/libudev-devd \
		libuuid.so:misc/e2fsprogs-libuuid

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

NO_WRKSUBDIR=	yes
CFLAGS+=	-DHAS_SOCKLEN_T=1 -I${LOCALBASE}/include/libepoll-shim/
LDFLAGS+=	-lepoll-shim

post-patch:
	@${REINPLACE_CMD} -e '/(ALSA)/d' \
		-e '/libpulse-simple/d' \
		-e '/libcec/d' \
		${WRKSRC}/CMakeLists.txt
	@${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>