summaryrefslogtreecommitdiff
path: root/x11/xlockmore/Makefile
blob: 76d83a1a1d4dac5ac8b927e85ace25c6dc1538af (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# $NetBSD: Makefile,v 1.47 2002/01/26 14:38:17 hubertf Exp $
# FreeBSD Id: Makefile,v 1.23 1997/10/10 09:24:38 tg Exp
#

DISTNAME=       xlockmore-5.03
CATEGORIES=	x11
MASTER_SITES=	ftp://ftp.tux.org/pub/tux/bagleyd/xlockmore/ \
		${MASTER_SITE_XCONTRIB:=applications/}
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	hubertf@netbsd.org
HOMEPAGE=	http://www.tux.org/~bagleyd/xlockmore.html
COMMENT=	Like the XLock session locker/screen saver, but with more

CHECK_MESA=	YES

.include "../../mk/bsd.prefs.mk"

.if defined(XLOCK_LIGHT)
CONFIGURE_ARGS+=--without-gltt --without-ttf --without-opengl --without-mesagl \
		--without-xpm # --without-cxx XXX doesn't work
CONFIGURE_ENV+= CXX="${CC}"	# no dependency on libstdc++
.else
USE_XPM=	YES
USE_MESA=	YES
CONFIGURE_ARGS+= --with-mesagl
.endif

.if !exists(${X11BASE}/lib/libXdpms.a)
XLOCK_NO_DPMS=	YES
.endif

GNU_CONFIGURE=	YES
USE_X11BASE=	YES
#USE_GMAKE=	yes
DEFINES=	-DDEFAULT_SOUND_DIR='\"${PREFIX}/lib/X11/xlock/sounds/\"' \
		-DDEF_MODULEPATH='\"lib/X11/xlock/modules\"'
CC+=		${DEFINES}
CXX+=		${DEFINES}

CONFIGURE_ARGS+= --without-motif --without-sx \
		--without-editres --without-dtsaver --without-rplay \
		--without-nas --without-gtk
.if ${OPSYS} == "NetBSD"
CONFIGURE_ARGS+= --enable-def_play='/usr/bin/audioplay ${PREFIX}/lib/X11/xlockmore/'
.endif

.if defined(XLOCK_NO_DPMS)
CONFIGURE_ARGS+= --without-dpms
.endif

post-patch:
		for i in xlock/resource.c ; do \
			f=${WRKSRC}/$$i ; \
			[ -f $$f.BAK ] || ${MV} $$f $$f.BAK ; \
			${SED} \
				-e 's|@PREFIX@|${PREFIX}|g' \
				<$$f.BAK >$$f ; \
		done
.if defined(XLOCK_DEFAULT_MODE) && ${XLOCK_DEFAULT_MODE} != ""
		cd ${WRKSRC}/xlock; \
			[ -f XLock.ad.BAK ] || ${MV} XLock.ad XLock.ad.BAK ; \
			${SED} \
				-e 's/^\(XLock.mode:[ 	]*\).*/\1${XLOCK_DEFAULT_MODE}/' \
				XLock.ad.BAK >XLock.ad
.endif

post-install:
		${INSTALL_DATA_DIR} ${PREFIX}/lib/X11/xlockmore
		${INSTALL_DATA}	\
			${WRKSRC}/sounds/thank-you.au	\
			${WRKSRC}/sounds/identify-please.au	\
			${WRKSRC}/sounds/not-programmed.au	\
			${WRKSRC}/sounds/complete.au	\
				${PREFIX}/lib/X11/xlockmore

.include "../../mk/bsd.pkg.mk"