Fixup fromcvs/togit conversion
[pkgsrcv2.git] / x11 / xdm / Makefile
1 # $NetBSD: Makefile,v 1.23 2013/06/06 12:55:23 wiz Exp $
2
3 DISTNAME=       xdm-1.1.11
4 PKGREVISION=    4
5 CATEGORIES=     x11
6 MASTER_SITES=   ${MASTER_SITE_XORG:=app/}
7 EXTRACT_SUFX=   .tar.bz2
8
9 MAINTAINER=     blair.sadewitz@gmail.com
10 HOMEPAGE=       http://xorg.freedesktop.org/
11 COMMENT=        X Display Manager from modular X.org
12
13 DEPENDS+=       sessreg-[0-9]*:../../x11/sessreg
14
15 PKG_SYSCONFSUBDIR=      xdm
16 CONFIGURE_ARGS+=        --with-xdmconfigdir=${PKG_SYSCONFDIR:Q}
17
18 EGDIR=                  ${PREFIX}/share/examples/xdm
19 INSTALL_MAKE_FLAGS+=    xdmconfigdir=${EGDIR:Q}
20
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
25
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
31
32 USE_TOOLS+=     pkg-config
33 GNU_CONFIGURE=  yes
34 USE_LIBTOOL=    yes
35
36 RCD_SCRIPTS=    xdm
37
38 BUILD_DEFS+=            VARBASE
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
44
45 .include "../../mk/compiler.mk"
46
47 .if !empty(CC_VERSION:Mgcc-[3-4]*)
48 CFLAGS+=        -fno-strict-aliasing
49 .endif
50
51 BUILD_DEPENDS+=         tradcpp-[0-9]*:../../devel/tradcpp
52 CONFIGURE_ENV+=         ac_cv_path_RAWCPP="${PREFIX}/bin/tradcpp -Uunix"
53
54 .if ${OPSYS} == "NetBSD"
55 CONFIGURE_ARGS+=        --with-random-device=/dev/urandom
56 .endif
57
58 # The following forces the X server to start on the 5th virtual terminal.
59 # This is suboptimal but matches the defaults for the xdm configuration,
60 # which should work for most installations.  See the definition of
61 # DEFAULTVT in xsrc/xfree/xc/programs/xdm/config/Imakefile.
62 #
63 # If we do not do this, we hit a very annoying and obscure problem: during
64 # system startup, xdm starts before init spawns gettys.  If the X server
65 # is started before init spawns the gettys (which easily happens on slow
66 # machines), it grabs the first virtual terminal (instead of the first
67 # "free" one).  Later on, when the first getty is started, it grabs the
68 # same terminal X used (the first one).  As a result, only one of them
69 # will receive key presses.  And on slow machines, X will have lost access
70 # to the keyboard.
71 .if (${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD") && \
72     (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64")
73 CONFIGURE_ARGS+=        --with-default-vt=vt05
74 .endif
75
76 .include "options.mk"
77
78 .include "../../x11/libXaw/buildlink3.mk"
79 .include "../../x11/libXft/buildlink3.mk"
80 .include "../../x11/libXmu/buildlink3.mk"
81 .include "../../x11/libXinerama/buildlink3.mk"
82 .include "../../mk/pam.buildlink3.mk"
83 .include "../../mk/bsd.pkg.mk"