1998-08-11 15:04:09 +00:00
|
|
|
CONFFILE= host.def.local
|
|
|
|
CP= /bin/cp
|
|
|
|
DO_NADA= /usr/bin/true
|
|
|
|
ECHO_MSG= echo
|
1998-10-10 04:22:12 +00:00
|
|
|
ECHO= echo
|
1998-08-11 15:04:09 +00:00
|
|
|
WRKDIR?= .
|
|
|
|
DISTDIR?= /usr/ports/distfiles
|
|
|
|
FILESDIR?= ../files
|
1998-09-01 13:41:11 +00:00
|
|
|
LOCALBASE?= /usr/local
|
1998-08-11 15:04:09 +00:00
|
|
|
|
1998-09-01 13:41:11 +00:00
|
|
|
#if BuildXInputExt
|
|
|
|
BUILDXINPUTEXT= YES
|
|
|
|
#else
|
|
|
|
JOYSTICSUPPORT= YES
|
1998-08-11 15:04:09 +00:00
|
|
|
#endif
|
1998-09-01 13:41:11 +00:00
|
|
|
#if BuildPexExt
|
|
|
|
BUILDPEXEXT= YES
|
1998-08-11 15:04:09 +00:00
|
|
|
#endif
|
1998-09-01 13:41:11 +00:00
|
|
|
#if BuildXIE
|
|
|
|
BUILDXIE= YES
|
|
|
|
#endif
|
|
|
|
#if HasSecureRPC
|
|
|
|
HASSECURERPC= YES
|
|
|
|
#endif
|
|
|
|
#if HasXdmAuth
|
|
|
|
HASXDMAUTH= YES
|
|
|
|
#endif
|
|
|
|
#if HasKrb4
|
|
|
|
HASKRB4= YES
|
1998-08-11 15:04:09 +00:00
|
|
|
#endif
|
|
|
|
|
1998-10-10 04:22:12 +00:00
|
|
|
all:: SecureRPCCheck XdmAuthCheck Krb4Check \
|
|
|
|
InputExtCheck pexCheck xieCheck \
|
|
|
|
ELFCheck
|
1998-08-11 15:04:09 +00:00
|
|
|
|
|
|
|
initialize::
|
1998-09-01 13:41:11 +00:00
|
|
|
@( \
|
|
|
|
${ECHO_MSG} " Now checking your XFree86 environment."; \
|
|
|
|
rm -f ${CONFFILE}; \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO} "#define FreeTypeLibDir ${LOCALBASE}/lib" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#define FreeTypeIncDir ${LOCALBASE}/include" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86SVGAServer" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86VGA16Server" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86VGA16DualServer" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86MonoServer" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86MonoDualServer" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86S3Server" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86S3VServer" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86I8514Server" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86Mach8Server" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86Mach32Server" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86Mach64Server" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86P9000Server" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86AGXServer" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86W32Server" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XF86I128Server" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef BuildFontServer" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef BuildFonts" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XnestServer" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XVirtualFramebufferServer" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#undef XprtServer" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#define BuildFonts NO" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#define XnestServer NO" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#define XVirtualFramebufferServer NO" >> ${CONFFILE}; \
|
|
|
|
${ECHO} "#define XprtServer NO" >> ${CONFFILE}; \
|
1998-09-01 13:41:11 +00:00
|
|
|
)
|
1998-08-11 15:04:09 +00:00
|
|
|
|
1998-09-01 13:41:11 +00:00
|
|
|
InputExtCheck:: initialize
|
|
|
|
.if defined(BUILDXINPUTEXT) && ${BUILDXINPUTEXT} == YES
|
|
|
|
@( \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO} "#define BuildXInputExt YES" >> ${CONFFILE}; \
|
1998-09-01 13:41:11 +00:00
|
|
|
${ECHO_MSG} " Using BuildXInputExt." )
|
|
|
|
.else
|
|
|
|
@( \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO} "#define JoystickSupport YES" >> ${CONFFILE}; \
|
1998-09-01 13:41:11 +00:00
|
|
|
${ECHO_MSG} " Using JoystickSupport." )
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pexCheck:: initialize
|
|
|
|
.if defined(BUILDPEXEXT) && ${BUILDPEXEXT} == YES
|
|
|
|
@( \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO} "#define BuildPexExt YES" >> ${CONFFILE}; \
|
1998-09-01 13:41:11 +00:00
|
|
|
${ECHO_MSG} " Using BuildPexExt." )
|
1998-10-10 04:22:12 +00:00
|
|
|
.else
|
|
|
|
@${DO_NADA}
|
1998-09-01 13:41:11 +00:00
|
|
|
.endif
|
|
|
|
|
1998-10-10 04:22:12 +00:00
|
|
|
|
1998-09-01 13:41:11 +00:00
|
|
|
xieCheck:: initialize
|
|
|
|
.if defined(BUILDXIE) && ${BUILDXIE} == YES
|
|
|
|
@( \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO} "#define BuildXIE YES" >> ${CONFFILE}; \
|
1998-09-01 13:41:11 +00:00
|
|
|
${ECHO_MSG} " Using BuildXIE." )
|
1998-10-10 04:22:12 +00:00
|
|
|
.else
|
|
|
|
@${DO_NADA}
|
1998-09-01 13:41:11 +00:00
|
|
|
.endif
|
1998-10-10 04:22:12 +00:00
|
|
|
|
|
|
|
ELFCheck:: initialize
|
|
|
|
.if defined(PORTOBJFORMAT) && ${PORTOBJFORMAT} == elf
|
|
|
|
@( \
|
|
|
|
${ECHO} "#define UseElfFormat YES" >> ${CONFFILE}; \
|
1998-10-22 00:25:57 +00:00
|
|
|
${ECHO} "#define BuildDynamicLoading YES" >> ${CONFFILE}; \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO_MSG} " Using ELF format." )
|
|
|
|
.else
|
|
|
|
@${DO_NADA}
|
|
|
|
.endif
|
|
|
|
|
1998-08-11 15:04:09 +00:00
|
|
|
SecureRPCCheck:: initialize
|
|
|
|
.if defined(HASSECURERPC) && ${HASSECURERPC} == YES
|
1998-09-01 13:41:11 +00:00
|
|
|
@( \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO} "#define HasSecureRPC ${HASSECURERPC}" >> ${CONFFILE}; \
|
1998-09-01 13:41:11 +00:00
|
|
|
${ECHO_MSG} " Using Secure RPC"; \
|
|
|
|
)
|
1998-08-11 15:04:09 +00:00
|
|
|
.else
|
|
|
|
@${DO_NADA}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
XdmAuthCheck:: initialize
|
|
|
|
.if defined(HASXDMAUTH) && ${HASXDMAUTH} == YES
|
|
|
|
@( \
|
1998-09-01 13:41:11 +00:00
|
|
|
${ECHO_MSG} " Using XdmAuth." ; \
|
1998-08-11 15:04:09 +00:00
|
|
|
if [ ! -f ${WRKDIR}/xc/lib/Xdmcp/Wraphelp.c ]; then \
|
|
|
|
if [ -f ${DISTDIR}/xc/Wraphelp.c ]; then \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO_MSG} " Whaphelp.c found in DISTDIR directory, copying it to source tree." ; \
|
1998-08-11 15:04:09 +00:00
|
|
|
${CP} ${DISTDIR}/xc/Wraphelp.c ${WRKDIR}/xc/lib/Xdmcp/ ; \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO} "#define HasXdmAuth ${HASXDMAUTH}" >> ${CONFFILE} ; \
|
1998-08-11 15:04:09 +00:00
|
|
|
elif [ -f ${FILESDIR}/Wraphelp.c ]; then \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO_MSG} " Whaphelp.c found in FILESDIR directory, copying it to source tree." ; \
|
1998-08-11 15:04:09 +00:00
|
|
|
${CP} ${FILESDIR}/Wraphelp.c ${WRKDIR}/xc/lib/Xdmcp/ ; \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO} "#define HasXdmAuth ${HASXDMAUTH}" >> ${CONFFILE} ; \
|
1998-08-11 15:04:09 +00:00
|
|
|
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
|
|
|
|
@( \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO} "#define HasKrb4 ${HASKRB4}" >> ${CONFFILE} ; \
|
1998-09-01 13:41:11 +00:00
|
|
|
${ECHO_MSG} " Using KerberosIV." ; \
|
1998-10-10 04:22:12 +00:00
|
|
|
${ECHO_MSG} " Applying KerberosIV patches" ; \
|
|
|
|
${CP} ${FILESDIR}/krb4auth.c ${FILESDIR}/krb4auth.h ${WRKDIR}/xc/programs/xdm/; \
|
1998-08-11 15:04:09 +00:00
|
|
|
patch -s -d ${WRKDIR}/xc -E -p0 < ${FILESDIR}/kerberos4.diffs ; \
|
|
|
|
)
|
|
|
|
.else
|
|
|
|
@${DO_NADA}
|
|
|
|
.endif
|
|
|
|
|