Merge from vendor branch TNF:
[pkgsrcv2.git] / x11 / xdm / Makefile
1 # $NetBSD: Makefile,v 1.15 2011/11/01 06:03:11 sbd Exp $
2
3 DISTNAME=       xdm-1.1.11
4 CATEGORIES=     x11
5 MASTER_SITES=   ${MASTER_SITE_XORG:=app/}
6 EXTRACT_SUFX=   .tar.bz2
7
8 MAINTAINER=     blair.sadewitz@gmail.com
9 HOMEPAGE=       http://xorg.freedesktop.org/
10 COMMENT=        X Display Manager from modular X.org
11
12 DEPENDS+=       sessreg-[0-9]*:../../x11/sessreg
13
14 PKG_DESTDIR_SUPPORT=    user-destdir
15
16 CONFIGURE_ARGS+=        --enable-dynamic-greeter
17 CONFIGURE_ARGS+=        --enable-tcp-transport
18 CONFIGURE_ARGS+=        --enable-unix-transport
19 CONFIGURE_ARGS+=        --enable-xdmshell
20
21 USE_TOOLS+=     pkg-config
22 GNU_CONFIGURE=  yes
23 USE_LIBTOOL=    yes
24
25 RCD_SCRIPTS=    xdm
26
27 BUILD_DEFS+=            VARBASE
28 CONFIGURE_ARGS+=        --with-authdir=${VARBASE}/lib/xdm
29 OWN_DIRS_PERMS+=        ${VARBASE}/lib/xdm \
30                           ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
31
32 .include "../../mk/compiler.mk"
33
34 .if !empty(CC_VERSION:Mgcc-[3-4]*)
35 CFLAGS+=        -fno-strict-aliasing
36 .endif
37
38 .if empty(PKGSRC_COMPILER:Mgcc)
39 CONFIGURE_ENV+=         ac_cv_path_RAWCPP="cc -E -Uunix -"
40 .endif
41
42 .if ${OPSYS} == "NetBSD"
43 CONFIGURE_ARGS+=        --with-random-device=/dev/urandom
44 .endif
45
46 # The following forces the X server to start on the 5th virtual terminal.
47 # This is suboptimal but matches the defaults for the xdm configuration,
48 # which should work for most installations.  See the definition of
49 # DEFAULTVT in xsrc/xfree/xc/programs/xdm/config/Imakefile.
50 #
51 # If we do not do this, we hit a very annoying and obscure problem: during
52 # system startup, xdm starts before init spawns gettys.  If the X server
53 # is started before init spawns the gettys (which easily happens on slow
54 # machines), it grabs the first virtual terminal (instead of the first
55 # "free" one).  Later on, when the first getty is started, it grabs the
56 # same terminal X used (the first one).  As a result, only one of them
57 # will receive key presses.  And on slow machines, X will have lost access
58 # to the keyboard.
59 .if (${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD") && \
60     (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64")
61 CONFIGURE_ARGS+=        --with-default-vt=vt05
62 .endif
63
64 MAKE_FLAGS+=            appdefaultdir=${PREFIX}/lib/X11/app-defaults
65
66 .include "options.mk"
67
68 .include "../../x11/libXaw/buildlink3.mk"
69 .include "../../x11/libXft/buildlink3.mk"
70 .include "../../x11/libXmu/buildlink3.mk"
71 .include "../../x11/libXinerama/buildlink3.mk"
72 .include "../../mk/pam.buildlink3.mk"
73 .include "../../mk/bsd.pkg.mk"