aboutsummaryrefslogtreecommitdiff
path: root/x11/xlockmore/Makefile
blob: 1416db8e17e17fe8c352b4c3cc15a1234359429b (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# Created by: Scott Mace <smace@FreeBSD.org>
# $FreeBSD$

PORTNAME=	xlockmore
PORTVERSION=	5.51
CATEGORIES?=	x11
MASTER_SITES=	http://www.sillycycle.com/xlock/ \
		LOCAL/jgh/x11/${PORTNAME}/

MAINTAINER=	jgh@FreeBSD.org
COMMENT=	Like XLock session locker/screen saver, but just more

LICENSE=	BSD2CLAUSE

USES=		tar:xz
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--without-motif --without-ttf --without-editres \
		--without-dtsaver --without-rplay --without-nas \
		--without-gtk --without-esound --disable-setuid

USE_GNOME=	#
USE_XORG=	x11 xaw ice sm xpm xext xinerama

LIB_DEPENDS+=	libfreetype.so:print/freetype2

OPTIONS_DEFINE=	MESAGL MB SYSLOG DISABLE_ALLOW_ROOT NICE_ONLY BLANK_ONLY \
		KERBEROS4 BAD_PAM GTK2 TIME_BOMB CUSTOMIZATION MAGICK JP \
		XINERAMA
OPTIONS_DEFAULT=	XINERAMA
OPTIONS_SUB=	yes

MESAGL_DESC=	Mesa 3D (for GL modes)
MB_DESC=	Xmb function series
SYSLOG_DESC=	Syslog logging
DISABLE_ALLOW_ROOT_DESC=	Allows users to turn off allowroot
NICE_ONLY_DESC=	Only low cpu modes
BLANK_ONLY_DESC=	Blank mode only (boring)
BAD_PAM_DESC=	Xlock will ask PAM with root rights
GTK2_DESC=	Build Gtk2 graphical shell
XLOCK_GROUP_DESC=	Allow xlock group to logout
TIME_BOMB_DESC=	Allow autologout
CUSTOMIZATION_DESC=	Allow tune through resource file
JP_DESC=	Japanese Language Support

OPTIONS_RADIO=	ONE
OPTIONS_RADIO_ONE=	PAM XLOCK_GROUP

NO_OPTIONS_SORT=yes

MAKE_ARGS+=	bindir=${PREFIX}/bin \
		mandir=${PREFIX}/man/man1 \
		datarootdir=${PREFIX}/share \
		xapploaddir=${PREFIX}/lib/X11/app-defaults

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MKERBEROS4}
CONFIGURE_ARGS+=--enable-kerberos4
KRB4LIB=	-lcom_err -lcrypto
.endif
.if defined(KRB5_HOME) && exists(${KRB5_HOME})
CONFIGURE_ARGS+=--enable-kerberos5
CFLAGS+=	-I${KRB5_HOME}/include
KRB5LIB=	-L${KRB5_HOME}/lib
.endif

.if ${PORT_OPTIONS:MMESAGL}
CONFIGURE_ARGS+=	--with-mesa
MESALIB=	-lpthread
USE_GL=	yes
CFLAGS+=	-I${LOCALBASE}/include/FTGL -I${LOCALBASE}/include/freetype2
.else
CONFIGURE_ARGS+=	--without-mesa --without-opengl
.endif

.if ${PORT_OPTIONS:MNICE_ONLY}
CONFIGURE_ARGS+=	--enable-nice-only
.endif

.if ${PORT_OPTIONS:MBAD_PAM}
CONFIGURE_ARGS+=	--enable-bad-pam
.endif

.if ${PORT_OPTIONS:MPAM}
CONFIGURE_ARGS+=	--enable-pam
.endif

.if ${PORT_OPTIONS:MNICE_ONLY}
CONFIGURE_ARGS+=	--enable-nice-only
.endif

.if ${PORT_OPTIONS:MBLANK_ONLY}
CONFIGURE_ARGS+=	--enable-blank-only
.endif

.if ${PORT_OPTIONS:MMB}
CONFIGURE_ARGS+=	--enable-use-mb
.endif

.if ${PORT_OPTIONS:MJP}
XLOCKMORE_LANG=	ja
CATEGORIES+=	japanese
PORT_OPTIONS+=	MB
.endif

.if defined(XLOCKMORE_LANG)
CONFIGURE_ARGS+=	--with-lang=${XLOCKMORE_LANG}
.endif

.if ${PORT_OPTIONS:MSYSLOG}
CONFIGURE_ARGS+=	--enable-syslog
.endif

.if ${PORT_OPTIONS:MGTK2}
CONFIGURE_ARGS+=	--with-gtk2
USE_GNOME+=	gtk20
.else
CONFIGURE_ARGS+=	--without-gtk2
.endif

.if ${PORT_OPTIONS:MXLOCK_GROUP}
CONFIGURE_ARGS+=	--enable-xlock-group
.endif

.if ${PORT_OPTIONS:MTIME_BOMB}
CONFIGURE_ARGS+=	--enable-bomb
.else
CONFIGURE_ARGS+=	--disable-bomb
.endif

.if ${PORT_OPTIONS:MCUSTOMIZATION}
CONFIGURE_ARGS+=	--enable-customization
.endif

.if ${PORT_OPTIONS:MMAGICK}
LIB_DEPENDS+=	libMagickCore-6.so:graphics/ImageMagick
.else
CONFIGURE_ARGS+=	--without-magick
.endif

CONFIGURE_ENV+=		XLOCKLIBS="${KRB5LIB} ${KRB4LIB} ${MESALIB}"

.if ${PORT_OPTIONS:MDISABLE_ALLOW_ROOT}
CONFIGURE_ARGS+=	--disable-allow-root
.endif

.if ${PORT_OPTIONS:MXINERAMA}
CONFIGURE_ARGS+=	--with-xinerama
.endif

.if ${PORT_OPTIONS:MPAM} && empty(PORT_OPTIONS:MBAD_PAM)
pre-extract:
	@${ECHO}
	@${ECHO} "You have enabled PAM support. If you want to authenticate against"
	@${ECHO} "root only accessible PAM modules then define WITH_BAD_PAM=yes also."
	@${ECHO} "For example, pam_unix requires root rights to access shadow passwords."
	@${ECHO}
.endif

post-patch:
	@${REINPLACE_CMD} -e '/xglockrc/ s|PROGRAM|DATA|' ${WRKSRC}/xglock/Makefile.in
.if ${OSVERSION} > 1003500
	@${REINPLACE_CMD} -e 's|/usr/games/fortune|/usr/bin/fortune|' ${WRKSRC}/modes/Makefile.in
.endif

post-configure:
	${REINPLACE_CMD} -e 's/-lXdpms//g' ${WRKSRC}/modes/Makefile

.include <bsd.port.mk>