summaryrefslogtreecommitdiffstats
path: root/x11-servers/XttXF86srv-common/files/Imakefile
blob: 8cfac8b5295a0d4d1115c7670f1b71351b2cbadf (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
CONFFILE=	host.def.local
CP=		/bin/cp
DO_NADA=	/usr/bin/true
ECHO_MSG=	echo
WRKDIR?=	.
DISTDIR?=	/usr/ports/distfiles
FILESDIR?=	../files

#ifdef HasSecureRPC
HASSECURERPC=	 HasSecureRPC
#endif
#ifdef HasXdmAuth
HASXDMAUTH=	HasXdmAuth
#endif
#
#ifdef HasKrb4
HASKRB4=	HasKrb4
#endif	

all:: SecureRPCCheck XdmAuthCheck Krb4Check

initialize::
	@${ECHO_MSG} "Now checking your XFree86 environment."
	@rm -f ${CONFFILE}

SecureRPCCheck:: initialize
.if defined(HASSECURERPC) && ${HASSECURERPC} == YES
	@echo "#define HasSecureRPC ${HASSECURERPC}" >> ${CONFFILE}
.else
	@${DO_NADA}
.endif

XdmAuthCheck:: initialize
.if defined(HASXDMAUTH) && ${HASXDMAUTH} == YES
	@( \
	echo "#define HasXdmAuth ${HASXDMAUTH}" >> ${CONFFILE} ; \
	if [ ! -f ${WRKDIR}/xc/lib/Xdmcp/Wraphelp.c ]; then \
	   if [ -f ${DISTDIR}/xc/Wraphelp.c ]; then \
		${ECHO_MSG} "===> Whaphelp.c found in DISTDIR directory, copying it to source tree." ; \
		${CP} ${DISTDIR}/xc/Wraphelp.c ${WRKDIR}/xc/lib/Xdmcp/ ; \
	   elif [ -f ${FILESDIR}/Wraphelp.c ]; then \
		${ECHO_MSG} "===> Whaphelp.c found in FILESDIR directory, copying it to source tree." ; \
		${CP} ${FILESDIR}/Wraphelp.c ${WRKDIR}/xc/lib/Xdmcp/ ; \
	   else \
		${ECHO_MSG} "Wraphelp.c not found. You can not use XDM-AUTHORIZATION-1!" ; \
		false ; \
	   fi ; \
	fi ; \
	)
.else
	@${DO_NADA}
.endif

Krb4Check:: initialize
.if defined(HASKRB4) && ${HASKRB4} == YES
	@( \
	echo "#define HasKrb4 ${HASKRB4}" >> ${CONFFILE} ; \
	${ECHO_MSG} "===>  Applying KerberosIV patches" ; \
	patch -s -d ${WRKDIR}/xc -E -p0 < ${FILESDIR}/kerberos4.diffs ; \
	)
.else
	@${DO_NADA}
.endif

OpenPOWER on IntegriCloud