summaryrefslogtreecommitdiff
path: root/x11/xscreensaver/options.mk
blob: bcfd4947d6cab92755b2f749155a503f42de31b2 (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
# $NetBSD: options.mk,v 1.12 2019/05/01 02:51:49 gutteridge Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.xscreensaver
PKG_SUPPORTED_OPTIONS=	pam webcollage opengl
PKG_SUGGESTED_OPTIONS=	opengl

.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mpam)
.  include "../../mk/pam.buildlink3.mk"
CONFIGURE_ARGS+=	--with-pam
CONFIGURE_ARGS+=	--without-shadow
.  if ${OPSYS} == "NetBSD"
# needed to read shadow passwords
DEPENDS+=	pam-pwauth_suid-[0-9]*:../../security/pam-pwauth_suid
.  endif
.else
CONFIGURE_ARGS+=	--without-pam
# configure should figure out
#CONFIGURE_ARGS+=	--without-shadow
SPECIAL_PERMS+=		bin/xscreensaver ${SETUID_ROOT_PERMS}
.endif

PLIST_SRC+=	PLIST
.if !empty(PKG_OPTIONS:Mwebcollage)
PLIST_SRC+=	PLIST.webcollage
.else
.PHONY: delwebcollage
post-install: delwebcollage
delwebcollage:
	rm ${DESTDIR}${PREFIX}/libexec/xscreensaver/config/webcollage.xml
	rm ${DESTDIR}${PREFIX}/libexec/xscreensaver/webcollage
	rm ${DESTDIR}${PREFIX}/${PKGMANDIR}/man6/webcollage.6
.endif

.if !empty(PKG_OPTIONS:Mopengl)
PLIST_SRC+=		PLIST.opengl
CONFIGURE_ARGS+=	--with-gl
CONFIGURE_ARGS+=	--with-gle
.include "../../graphics/gle/buildlink3.mk"
.else
CONFIGURE_ARGS+=	--without-gl
CONFIGURE_ARGS+=	--without-gle
.endif