Update x11/xlockmore to version 5.57
[dports.git] / x11 / xlockmore / Makefile
1 # Created by: Scott Mace <smace@FreeBSD.org>
2 # $FreeBSD$
3
4 PORTNAME=       xlockmore
5 PORTVERSION=    5.57
6 CATEGORIES?=    x11
7 MASTER_SITES=   http://www.sillycycle.com/xlock/ \
8                 LOCAL/jgh/x11/${PORTNAME}/
9
10 MAINTAINER=     jgh@FreeBSD.org
11 COMMENT=        Like XLock session locker/screen saver, but just more
12
13 LICENSE=        BSD2CLAUSE
14
15 USES=           tar:xz gnome
16
17 GNU_CONFIGURE=  yes
18 CONFIGURE_ARGS= --without-motif --without-ttf --without-editres \
19                 --without-dtsaver --without-rplay --without-nas \
20                 --without-gtk --without-esound --disable-setuid
21
22 USE_XORG=       x11 xaw ice sm xpm xext xinerama
23
24 LIB_DEPENDS+=   libfreetype.so:print/freetype2 \
25                 libpng.so:graphics/png
26
27 OPTIONS_DEFINE= MESAGL MB SYSLOG DISABLE_ALLOW_ROOT NICE_ONLY BLANK_ONLY \
28                 KERBEROS4 BAD_PAM GTK2 TIME_BOMB CUSTOMIZATION MAGICK JP \
29                 XINERAMA
30 OPTIONS_DEFAULT=        XINERAMA
31 OPTIONS_SUB=    yes
32
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
45
46 OPTIONS_RADIO=  ONE
47 OPTIONS_RADIO_ONE=      PAM XLOCK_GROUP
48
49 NO_OPTIONS_SORT=yes
50
51 JP_IMPLIES=     MB
52
53 MAKE_ARGS+=     bindir=${PREFIX}/bin \
54                 mandir=${PREFIX}/man/man1 \
55                 datarootdir=${PREFIX}/share \
56                 xapploaddir=${PREFIX}/lib/X11/app-defaults
57
58 .include <bsd.port.options.mk>
59
60 .if ${PORT_OPTIONS:MKERBEROS4}
61 CONFIGURE_ARGS+=--enable-kerberos4
62 KRB4LIB=        -lcom_err -lcrypto
63 .endif
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
68 .endif
69
70 .if ${PORT_OPTIONS:MMESAGL}
71 CONFIGURE_ARGS+=        --with-mesa
72 MESALIB=        -lpthread
73 USE_GL=         yes
74 LIB_DEPENDS+=   libftgl.so:graphics/ftgl
75 CFLAGS+=        -I${LOCALBASE}/include/FTGL -I${LOCALBASE}/include/freetype2
76 .else
77 CONFIGURE_ARGS+=        --without-mesa --without-opengl --without-ftgl
78 .endif
79
80 .if ${PORT_OPTIONS:MNICE_ONLY}
81 CONFIGURE_ARGS+=        --enable-nice-only
82 .endif
83
84 .if ${PORT_OPTIONS:MBAD_PAM}
85 CONFIGURE_ARGS+=        --enable-bad-pam
86 .endif
87
88 .if ${PORT_OPTIONS:MPAM}
89 CONFIGURE_ARGS+=        --enable-pam
90 .endif
91
92 .if ${PORT_OPTIONS:MNICE_ONLY}
93 CONFIGURE_ARGS+=        --enable-nice-only
94 .endif
95
96 .if ${PORT_OPTIONS:MBLANK_ONLY}
97 CONFIGURE_ARGS+=        --enable-blank-only
98 .endif
99
100 .if ${PORT_OPTIONS:MMB}
101 CONFIGURE_ARGS+=        --enable-use-mb
102 .endif
103
104 .if ${PORT_OPTIONS:MJP}
105 XLOCKMORE_LANG= ja
106 CATEGORIES+=    japanese
107 .endif
108
109 .if defined(XLOCKMORE_LANG)
110 CONFIGURE_ARGS+=        --with-lang=${XLOCKMORE_LANG}
111 .endif
112
113 .if ${PORT_OPTIONS:MSYSLOG}
114 CONFIGURE_ARGS+=        --enable-syslog
115 .endif
116
117 .if ${PORT_OPTIONS:MGTK2}
118 CONFIGURE_ARGS+=        --with-gtk2
119 USE_GNOME+=     gtk20
120 .else
121 CONFIGURE_ARGS+=        --without-gtk2
122 .endif
123
124 .if ${PORT_OPTIONS:MXLOCK_GROUP}
125 CONFIGURE_ARGS+=        --enable-xlock-group
126 .endif
127
128 .if ${PORT_OPTIONS:MTIME_BOMB}
129 CONFIGURE_ARGS+=        --enable-bomb
130 .else
131 CONFIGURE_ARGS+=        --disable-bomb
132 .endif
133
134 .if ${PORT_OPTIONS:MCUSTOMIZATION}
135 CONFIGURE_ARGS+=        --enable-customization
136 .endif
137
138 .if ${PORT_OPTIONS:MMAGICK}
139 LIB_DEPENDS+=   libMagickCore-6.so:graphics/ImageMagick6
140 .else
141 CONFIGURE_ARGS+=        --without-magick
142 .endif
143
144 CONFIGURE_ENV+=         XLOCKLIBS="${KRB5LIB} ${KRB4LIB} ${MESALIB}"
145
146 .if ${PORT_OPTIONS:MDISABLE_ALLOW_ROOT}
147 CONFIGURE_ARGS+=        --disable-allow-root
148 .endif
149
150 .if ${PORT_OPTIONS:MXINERAMA}
151 CONFIGURE_ARGS+=        --with-xinerama
152 .endif
153
154 .if ${PORT_OPTIONS:MPAM} && empty(PORT_OPTIONS:MBAD_PAM)
155 pre-extract:
156         @${ECHO}
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."
160         @${ECHO}
161 .endif
162
163 post-patch:
164         @${REINPLACE_CMD} -e '/xglockrc/ s|PROGRAM|DATA|' ${WRKSRC}/xglock/Makefile.in
165
166 .include <bsd.port.mk>