1 # $NetBSD: Makefile,v 1.16 2011/11/09 18:28:40 cheusov Exp $
5 MASTER_SITES= ${MASTER_SITE_XORG:=app/}
8 MAINTAINER= blair.sadewitz@gmail.com
9 HOMEPAGE= http://xorg.freedesktop.org/
10 COMMENT= X Display Manager from modular X.org
12 DEPENDS+= sessreg-[0-9]*:../../x11/sessreg
14 PKG_DESTDIR_SUPPORT= user-destdir
16 CONFIGURE_ARGS+= --enable-dynamic-greeter
17 CONFIGURE_ARGS+= --enable-tcp-transport
18 CONFIGURE_ARGS+= --enable-unix-transport
19 CONFIGURE_ARGS+= --enable-xdmshell
21 USE_TOOLS+= pkg-config
28 CONFIGURE_ARGS+= --with-authdir=${VARBASE}/lib/xdm
29 OWN_DIRS_PERMS+= ${VARBASE}/lib/xdm \
30 ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
32 .include "../../mk/compiler.mk"
34 .if !empty(CC_VERSION:Mgcc-[3-4]*)
35 CFLAGS+= -fno-strict-aliasing
38 .if !empty(PKGSRC_COMPILER:Mclang)
39 BUILD_DEPENDS+= ucpp-[0-9]*:../../devel/ucpp
40 CONFIGURE_ENV+= ac_cv_path_RAWCPP="${PREFIX}/bin/ucpp -t -c90 -Uunix"
41 .elif empty(PKGSRC_COMPILER:Mgcc)
42 CONFIGURE_ENV+= ac_cv_path_RAWCPP="cc -E -Uunix -"
45 .if ${OPSYS} == "NetBSD"
46 CONFIGURE_ARGS+= --with-random-device=/dev/urandom
49 # The following forces the X server to start on the 5th virtual terminal.
50 # This is suboptimal but matches the defaults for the xdm configuration,
51 # which should work for most installations. See the definition of
52 # DEFAULTVT in xsrc/xfree/xc/programs/xdm/config/Imakefile.
54 # If we do not do this, we hit a very annoying and obscure problem: during
55 # system startup, xdm starts before init spawns gettys. If the X server
56 # is started before init spawns the gettys (which easily happens on slow
57 # machines), it grabs the first virtual terminal (instead of the first
58 # "free" one). Later on, when the first getty is started, it grabs the
59 # same terminal X used (the first one). As a result, only one of them
60 # will receive key presses. And on slow machines, X will have lost access
62 .if (${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD") && \
63 (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64")
64 CONFIGURE_ARGS+= --with-default-vt=vt05
67 MAKE_FLAGS+= appdefaultdir=${PREFIX}/lib/X11/app-defaults
71 .include "../../x11/libXaw/buildlink3.mk"
72 .include "../../x11/libXft/buildlink3.mk"
73 .include "../../x11/libXmu/buildlink3.mk"
74 .include "../../x11/libXinerama/buildlink3.mk"
75 .include "../../mk/pam.buildlink3.mk"
76 .include "../../mk/bsd.pkg.mk"