aboutsummaryrefslogtreecommitdiff
path: root/sysutils/libdisplay-info/Makefile
blob: a2b866c8813a0472ac36f3a3045a91e72853b01f (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
PORTNAME=	libdisplay-info
DISTVERSION=	0.1.1
CATEGORIES=	sysutils

MAINTAINER=	jbeich@FreeBSD.org
COMMENT=	EDID and DisplayID library
WWW=		https://gitlab.freedesktop.org/emersion/libdisplay-info

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	hwdata>0:misc/hwdata
TEST_DEPENDS=	edid-decode:sysutils/edid-decode

USES=		compiler:c11 meson pkgconfig python:build shebangfix
USE_GITLAB=	yes
GL_SITE=	https://gitlab.freedesktop.org
GL_ACCOUNT=	emersion
GL_COMMIT=	92b031749c0fe84ef5cdf895067b84a829920e25
SHEBANG_FILES=	tool/*.py

post-patch:
# XXX Drop after FreeBSD 12.3 EOL around 2023-03-31
# https://cgit.freebsd.org/src/commit/?id=773538247007
	@if [ ${OPSYS} = FreeBSD -a ${OSVERSION} -lt 1203501 ]; then \
		${REINPLACE_CMD} -e 's/static_assert/_Static_assert/' \
			${WRKSRC}/edid.c; \
	fi

pre-test:
	@if [ ! -e ${WRKDIR}/.meson_build_tests ]; then \
		${RM} ${CONFIGURE_COOKIE} ${BUILD_COOKIE}; \
		${MAKE} -C${.CURDIR} build MESON_ARGS="${MESON_ARGS} --reconfigure"; \
		${TOUCH} ${WRKDIR}/.meson_build_tests; \
	fi

.include <bsd.port.mk>