summaryrefslogtreecommitdiff
path: root/sysutils/barrier/Makefile
blob: 43f439a3bae68775fbbef5362a1a2a4437e260e9 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

PORTNAME=	barrier
DISTVERSIONPREFIX=	v
DISTVERSION=	2.3.3
CATEGORIES=	sysutils

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Mouse and keyboard sharing utility

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		cmake compiler:c++14-lang localbase:ldflags pkgconfig ssl xorg
USE_GITHUB=	yes
GH_ACCOUNT=	debauchee
USE_XORG=	ice sm x11 xext xi xinerama xrandr xtst

CMAKE_ARGS=	-DBARRIER_BUILD_DATE=00000000

MAKE_JOBS_UNSAFE=	yes

OPTIONS_DEFINE=		EXAMPLES GUI
OPTIONS_DEFAULT=	GUI
# no GUI option on 11.x with base SSL since qt5-network is not available
OPTIONS_EXCLUDE=	${${OPSYS} == FreeBSD && ${OSVERSION} < 1200085 && ${SSL_DEFAULT} == base:?GUI:}
OPTIONS_SUB=		yes

GUI_DESC=	Build configuration utility (requires Qt 5)

GUI_LIB_DEPENDS=	libcurl.so:ftp/curl \
			libdns_sd.so:net/avahi-libdns
GUI_USES=		qt:5
GUI_USE=		QT=core,gui,network,widgets,buildtools_build,qmake_build
GUI_CMAKE_BOOL=		BARRIER_BUILD_GUI

post-patch:
	@${REINPLACE_CMD} -e 's|"/etc/barrier/|"${ETCDIR}/|' \
		${WRKSRC}/src/lib/arch/unix/ArchDaemonUnix.h
	@${REINPLACE_CMD} -e 's|/etc/barrier.conf|${ETCDIR}/barrier.conf|' \
		${WRKSRC}/doc/barriers.1

post-install:
	cd ${INSTALL_WRKSRC}/bin && \
		${INSTALL_PROGRAM} barrierc barriers ${STAGEDIR}${PREFIX}/bin
	cd ${WRKSRC}/doc && \
		${INSTALL_MAN} barrierc.1 barriers.1 ${STAGEDIR}${PREFIX}/share/man/man1
	@${MKDIR} ${STAGEDIR}${ETCDIR}
	${INSTALL_DATA} ${WRKSRC}/doc/barrier.conf.example-basic \
		${STAGEDIR}${ETCDIR}/barrier.conf.sample

post-install-EXAMPLES-on:
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	cd ${WRKSRC}/doc && \
		${INSTALL_DATA} barrier.conf.example barrier.conf.example-advanced \
		barrier.conf.example-basic ${STAGEDIR}${EXAMPLESDIR}

post-install-GUI-on:
	${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/bin/barrier ${STAGEDIR}${PREFIX}/bin

.include <bsd.port.mk>