summaryrefslogtreecommitdiff
path: root/multimedia/kodi-addon-peripheral-joystick/Makefile
blob: c6405394c3f2f74b4d7702ab4b38704e4bb1d63e (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
# Created by: Rozhuk Ivan 2018 <rozhuk.im@gmail.com>
# $FreeBSD$

PORTNAME=	kodi-addon-peripheral-joystick
PORTVERSION=	1.3.4
DISTVERSIONPREFIX=v
CATEGORIES=	multimedia

MAINTAINER=	rozhuk.im@gmail.com
COMMENT=	Joystick support for Kodi

LICENSE=	GPLv2+

BUILD_DEPENDS=	${LOCALBASE}/lib/kodi/KodiConfig.cmake:multimedia/kodi
LIB_DEPENDS=	libp8-platform.so:devel/p8-platform \
		libkodiplatform.so:devel/kodi-platform \
		libudev.so:devel/libudev-devd
RUN_DEPENDS=	kodi:multimedia/kodi

USES=		cmake:outsource,noninja

USE_GITHUB=	yes
GH_ACCOUNT=	xbmc
GH_PROJECT=	peripheral.joystick

post-extract:
	@${MKDIR} ${WRKSRC}/src/linux/
	@${CP} -f ${FILESDIR}/input.h ${WRKSRC}/src/linux/
	@${CP} -f ${FILESDIR}/input-event-codes.h ${WRKSRC}/src/linux/
	@${CP} -f ${FILESDIR}/joystick.h ${WRKSRC}/src/linux/
	@${CP} -f ${FILESDIR}/types.h ${WRKSRC}/src/linux/

post-patch:
	@${REINPLACE_CMD} -e \
	    's|if(HAVE_LINUX_JOYSTICK_H)|if(1)|g ; \
	     s|if(UDEV_FOUND)|if(1)|g' \
		${WRKSRC}/CMakeLists.txt
	@${REINPLACE_CMD} -e 's|#define __stat64 stat64|#define __stat64 stat|g' \
		${WRKSRC}/src/utils/CommonIncludes.h

.include <bsd.port.mk>