1 # Created by: Scott Mace <smace@FreeBSD.org>
7 MASTER_SITES= http://www.sillycycle.com/xlock/ \
8 LOCAL/jgh/x11/${PORTNAME}/
10 MAINTAINER= jgh@FreeBSD.org
11 COMMENT= Like XLock session locker/screen saver, but just more
18 CONFIGURE_ARGS= --without-motif --without-ttf --without-editres \
19 --without-dtsaver --without-rplay --without-nas \
20 --without-gtk --without-esound --disable-setuid
22 USE_XORG= x11 xaw ice sm xpm xext xinerama
24 LIB_DEPENDS+= libfreetype.so:print/freetype2 \
25 libpng.so:graphics/png
27 OPTIONS_DEFINE= MESAGL MB SYSLOG DISABLE_ALLOW_ROOT NICE_ONLY BLANK_ONLY \
28 KERBEROS4 BAD_PAM GTK2 TIME_BOMB CUSTOMIZATION MAGICK JP \
30 OPTIONS_DEFAULT= XINERAMA
33 MESAGL_DESC= Mesa 3D (for GL modes)
34 MB_DESC= Xmb function series
35 SYSLOG_DESC= Syslog logging
36 DISABLE_ALLOW_ROOT_DESC= Allows users to turn off allowroot
37 NICE_ONLY_DESC= Only low cpu modes
38 BLANK_ONLY_DESC= Blank mode only (boring)
39 BAD_PAM_DESC= Xlock will ask PAM with root rights
40 GTK2_DESC= Build Gtk2 graphical shell
41 XLOCK_GROUP_DESC= Allow xlock group to logout
42 TIME_BOMB_DESC= Allow autologout
43 CUSTOMIZATION_DESC= Allow tune through resource file
44 JP_DESC= Japanese Language Support
47 OPTIONS_RADIO_ONE= PAM XLOCK_GROUP
53 MAKE_ARGS+= bindir=${PREFIX}/bin \
54 mandir=${PREFIX}/man/man1 \
55 datarootdir=${PREFIX}/share \
56 xapploaddir=${PREFIX}/lib/X11/app-defaults
58 .include <bsd.port.options.mk>
60 .if ${PORT_OPTIONS:MKERBEROS4}
61 CONFIGURE_ARGS+=--enable-kerberos4
62 KRB4LIB= -lcom_err -lcrypto
64 .if defined(KRB5_HOME) && exists(${KRB5_HOME})
65 CONFIGURE_ARGS+=--enable-kerberos5
66 CFLAGS+= -I${KRB5_HOME}/include
67 KRB5LIB= -L${KRB5_HOME}/lib
70 .if ${PORT_OPTIONS:MMESAGL}
71 CONFIGURE_ARGS+= --with-mesa
74 LIB_DEPENDS+= libftgl.so:graphics/ftgl
75 CFLAGS+= -I${LOCALBASE}/include/FTGL -I${LOCALBASE}/include/freetype2
77 CONFIGURE_ARGS+= --without-mesa --without-opengl --without-ftgl
80 .if ${PORT_OPTIONS:MNICE_ONLY}
81 CONFIGURE_ARGS+= --enable-nice-only
84 .if ${PORT_OPTIONS:MBAD_PAM}
85 CONFIGURE_ARGS+= --enable-bad-pam
88 .if ${PORT_OPTIONS:MPAM}
89 CONFIGURE_ARGS+= --enable-pam
92 .if ${PORT_OPTIONS:MNICE_ONLY}
93 CONFIGURE_ARGS+= --enable-nice-only
96 .if ${PORT_OPTIONS:MBLANK_ONLY}
97 CONFIGURE_ARGS+= --enable-blank-only
100 .if ${PORT_OPTIONS:MMB}
101 CONFIGURE_ARGS+= --enable-use-mb
104 .if ${PORT_OPTIONS:MJP}
106 CATEGORIES+= japanese
109 .if defined(XLOCKMORE_LANG)
110 CONFIGURE_ARGS+= --with-lang=${XLOCKMORE_LANG}
113 .if ${PORT_OPTIONS:MSYSLOG}
114 CONFIGURE_ARGS+= --enable-syslog
117 .if ${PORT_OPTIONS:MGTK2}
118 CONFIGURE_ARGS+= --with-gtk2
121 CONFIGURE_ARGS+= --without-gtk2
124 .if ${PORT_OPTIONS:MXLOCK_GROUP}
125 CONFIGURE_ARGS+= --enable-xlock-group
128 .if ${PORT_OPTIONS:MTIME_BOMB}
129 CONFIGURE_ARGS+= --enable-bomb
131 CONFIGURE_ARGS+= --disable-bomb
134 .if ${PORT_OPTIONS:MCUSTOMIZATION}
135 CONFIGURE_ARGS+= --enable-customization
138 .if ${PORT_OPTIONS:MMAGICK}
139 LIB_DEPENDS+= libMagickCore-6.so:graphics/ImageMagick6
141 CONFIGURE_ARGS+= --without-magick
144 CONFIGURE_ENV+= XLOCKLIBS="${KRB5LIB} ${KRB4LIB} ${MESALIB}"
146 .if ${PORT_OPTIONS:MDISABLE_ALLOW_ROOT}
147 CONFIGURE_ARGS+= --disable-allow-root
150 .if ${PORT_OPTIONS:MXINERAMA}
151 CONFIGURE_ARGS+= --with-xinerama
154 .if ${PORT_OPTIONS:MPAM} && empty(PORT_OPTIONS:MBAD_PAM)
157 @${ECHO} "You have enabled PAM support. If you want to authenticate against"
158 @${ECHO} "root only accessible PAM modules then define WITH_BAD_PAM=yes also."
159 @${ECHO} "For example, pam_unix requires root rights to access shadow passwords."
164 @${REINPLACE_CMD} -e '/xglockrc/ s|PROGRAM|DATA|' ${WRKSRC}/xglock/Makefile.in
166 .include <bsd.port.mk>