1 # $NetBSD: Makefile,v 1.21 2013/06/03 10:06:27 wiz Exp $
6 MASTER_SITES= ${MASTER_SITE_XORG:=app/}
9 MAINTAINER= blair.sadewitz@gmail.com
10 HOMEPAGE= http://xorg.freedesktop.org/
11 COMMENT= X Display Manager from modular X.org
13 DEPENDS+= sessreg-[0-9]*:../../x11/sessreg
15 PKG_SYSCONFSUBDIR= xdm
16 CONFIGURE_ARGS+= --with-xdmconfigdir=${PKG_SYSCONFDIR:Q}
18 EGDIR= ${PREFIX}/share/examples/xdm
19 INSTALL_MAKE_FLAGS+= xdmconfigdir=${EGDIR:Q}
21 CONF_FILES+= ${EGDIR}/xdm-config ${PKG_SYSCONFDIR}/xdm-config
22 CONF_FILES+= ${EGDIR}/Xaccess ${PKG_SYSCONFDIR}/Xaccess
23 CONF_FILES+= ${EGDIR}/Xresources ${PKG_SYSCONFDIR}/Xresources
24 CONF_FILES+= ${EGDIR}/Xservers ${PKG_SYSCONFDIR}/Xservers
26 CONFIGURE_ARGS+= --enable-dynamic-greeter
27 CONFIGURE_ARGS+= --enable-tcp-transport
28 CONFIGURE_ARGS+= --enable-unix-transport
29 CONFIGURE_ARGS+= --enable-xdmshell
30 CONFIGURE_ARGS+= --with-appdefaultdir=${PREFIX}/lib/X11/app-defaults
32 USE_TOOLS+= pkg-config
39 CONFIGURE_ARGS+= --with-logdir=${VARBASE}/log
40 CONFIGURE_ARGS+= --with-piddir=${VARBASE}/run
41 CONFIGURE_ARGS+= --with-authdir=${VARBASE}/lib/xdm
42 OWN_DIRS_PERMS+= ${VARBASE}/lib/xdm \
43 ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
45 .include "../../mk/compiler.mk"
47 .if !empty(CC_VERSION:Mgcc-[3-4]*)
48 CFLAGS+= -fno-strict-aliasing
51 .if !empty(PKGSRC_COMPILER:Mclang)
52 BUILD_DEPENDS+= ucpp-[0-9]*:../../devel/ucpp
53 CONFIGURE_ENV+= ac_cv_path_RAWCPP="${PREFIX}/bin/ucpp -t -c90 -Uunix"
54 .elif empty(PKGSRC_COMPILER:Mgcc)
55 CONFIGURE_ENV+= ac_cv_path_RAWCPP="cc -E -Uunix -"
58 .if ${OPSYS} == "NetBSD"
59 CONFIGURE_ARGS+= --with-random-device=/dev/urandom
62 # The following forces the X server to start on the 5th virtual terminal.
63 # This is suboptimal but matches the defaults for the xdm configuration,
64 # which should work for most installations. See the definition of
65 # DEFAULTVT in xsrc/xfree/xc/programs/xdm/config/Imakefile.
67 # If we do not do this, we hit a very annoying and obscure problem: during
68 # system startup, xdm starts before init spawns gettys. If the X server
69 # is started before init spawns the gettys (which easily happens on slow
70 # machines), it grabs the first virtual terminal (instead of the first
71 # "free" one). Later on, when the first getty is started, it grabs the
72 # same terminal X used (the first one). As a result, only one of them
73 # will receive key presses. And on slow machines, X will have lost access
75 .if (${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD") && \
76 (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64")
77 CONFIGURE_ARGS+= --with-default-vt=vt05
82 .include "../../x11/libXaw/buildlink3.mk"
83 .include "../../x11/libXft/buildlink3.mk"
84 .include "../../x11/libXmu/buildlink3.mk"
85 .include "../../x11/libXinerama/buildlink3.mk"
86 .include "../../mk/pam.buildlink3.mk"
87 .include "../../mk/bsd.pkg.mk"