summaryrefslogtreecommitdiff
path: root/x11/hypridle/Makefile
blob: d3da0aed76725506180b7d8edcbe55987c46e108 (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
PORTNAME=	hypridle
DISTVERSIONPREFIX=	v
DISTVERSION=	0.1.7
CATEGORIES=	x11 wayland

MAINTAINER=	tagattie@FreeBSD.org
COMMENT=	Hyprland's idle daemon #'
WWW=		https://github.com/hyprwm/hypridle

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	hyprland-protocols>=0.6.0:graphics/hyprland-protocols \
		hyprwayland-scanner>=0.4.4:devel/hyprwayland-scanner \
		wayland-protocols>0:graphics/wayland-protocols
LIB_DEPENDS=	libhyprlang.so:devel/hyprlang \
		libhyprutils.so:devel/hyprutils \
		libsdbus-c++.so:devel/sdbus-cpp \
		libwayland-client.so:graphics/wayland

USES=		compiler:c++11-lib cmake pkgconfig

USE_GITHUB=	yes
GH_ACCOUNT=	hyprwm

LDFLAGS+=	-Wl,--as-needed # sdbus-cpp deps

PLIST_FILES=	bin/${PORTNAME} \
		lib/systemd/user/${PORTNAME}.service \
		share/hypr/${PORTNAME}.conf

post-patch:
# https://github.com/ConsoleKit2/ConsoleKit2/issues/150
# https://github.com/ConsoleKit2/ConsoleKit2/issues/151
	@${REINPLACE_CMD} -e 's,/login1,/ConsoleKit/Manager,' \
		-e 's,login1,ConsoleKit,' \
		-e 's,logind,consolekit2,' \
		-e 's,GetSession,&ByPID,' \
		-e 's,string{"auto"},to_string(getpid()),' \
		${WRKSRC}/src/core/Hypridle.cpp

.include <bsd.port.mk>