summaryrefslogtreecommitdiff
path: root/x11/controllermap/Makefile
blob: 98e91c9c8d1df8cdd2b4a53b710e92eda841d4e5 (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

PORTNAME=	controllermap
PORTVERSION=	2.0.12
CATEGORIES=	x11
MASTER_SITES=	https://www.libsdl.org/release/
DISTNAME=	SDL2-${DISTVERSION}

MAINTAINER=	jbeich@FreeBSD.org
COMMENT=	Game controller mapping generator

LICENSE=	PD
LICENSE_FILE=	${WRKSRC}/COPYING

USES=		sdl
USE_SDL=	sdl2
WRKSRC_SUBDIR=	test
CFLAGS+=	`sdl2-config --cflags`
LIBS+=		`sdl2-config --libs`
MAKEFILE=	/dev/null
MAKE_ENV=	LDLIBS="${LIBS}"
ALL_TARGET=	${PORTNAME} testgamecontroller testjoystick
PLIST_FILES=	${ALL_TARGET:S,^,bin/,}
PORTDATA=	${PORTNAME}.bmp axis.bmp button.bmp

post-patch:
	@${REINPLACE_CMD} '/bmp/s,","${DATADIR}/,' \
		${ALL_TARGET:S,^,${WRKSRC}/,:S,$,.c,}

do-install:
	${INSTALL_PROGRAM} ${ALL_TARGET:S,^,${WRKSRC}/,} \
		${STAGEDIR}${PREFIX}/bin
	(cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" \
		${STAGEDIR}${DATADIR})

.include <bsd.port.mk>