summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/setxkbmap/Makefile.am3
-rw-r--r--app/setxkbmap/Makefile.bsd-wrapper11
-rw-r--r--app/setxkbmap/Makefile.in4
-rw-r--r--app/setxkbmap/aclocal.m4107
-rw-r--r--app/setxkbmap/configure15
-rw-r--r--app/setxkbmap/configure.ac7
-rw-r--r--app/xkbcomp/Makefile.bsd-wrapper5
-rw-r--r--data/Makefile8
-rw-r--r--driver/xf86-input-keyboard/src/kbd.c2
-rw-r--r--kdrive/Makefile.bsd-wrapper14
-rw-r--r--share/mk/bsd.xconf.mk5
-rw-r--r--xserver/Makefile.bsd-wrapper14
-rw-r--r--xserver/hw/xfree86/common/xf86Config.c2
13 files changed, 138 insertions, 59 deletions
diff --git a/app/setxkbmap/Makefile.am b/app/setxkbmap/Makefile.am
index a292290d2..eef2cec68 100644
--- a/app/setxkbmap/Makefile.am
+++ b/app/setxkbmap/Makefile.am
@@ -24,7 +24,8 @@ bin_PROGRAMS = setxkbmap
XKBCONFIGROOT=@XKBCONFIGROOT@
AM_CFLAGS = $(CWARNFLAGS) $(SETXKBMAP_CFLAGS) \
- -DDFLT_XKB_CONFIG_ROOT=\"$(XKBCONFIGROOT)\"
+ -DDFLT_XKB_CONFIG_ROOT=\"$(XKBCONFIGROOT)\" \
+ -DDFLT_XKB_RULES_FILE=\"$(XKBDEFAULTRULES)\"
setxkbmap_LDADD = $(SETXKBMAP_LIBS)
setxkbmap_SOURCES = \
diff --git a/app/setxkbmap/Makefile.bsd-wrapper b/app/setxkbmap/Makefile.bsd-wrapper
index 5d4da5f35..be2924aa8 100644
--- a/app/setxkbmap/Makefile.bsd-wrapper
+++ b/app/setxkbmap/Makefile.bsd-wrapper
@@ -1,5 +1,12 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2007/01/01 17:10:08 matthieu Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2011/03/08 07:59:23 matthieu Exp $
+.include <bsd.xconf.mk>
-CONFIGURE_ARGS= --with-xkb-config-root=$(X11ETC)/xkb
+.if ${XENOCARA_USE_XKEYBOARD_CONFIG:L} == "yes"
+CONFIGURE_ARGS= --with-xkb-config-root=${X11BASE}/share/X11/xkb \
+ --with-xkb-default-rules=base
+.else
+CONFIGURE_ARGS= --with-xkb-config-root=$(X11ETC)/xkb \
+ --with-xkb-default-rules=xorg
+.endif
.include <bsd.xorg.mk>
diff --git a/app/setxkbmap/Makefile.in b/app/setxkbmap/Makefile.in
index 7e10503e2..f6cbfde1c 100644
--- a/app/setxkbmap/Makefile.in
+++ b/app/setxkbmap/Makefile.in
@@ -182,6 +182,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
XKBCONFIGROOT = @XKBCONFIGROOT@
+XKBDEFAULTRULES = @XKBDEFAULTRULES@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
ac_ct_CC = @ac_ct_CC@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
@@ -227,7 +228,8 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
AM_CFLAGS = $(CWARNFLAGS) $(SETXKBMAP_CFLAGS) \
- -DDFLT_XKB_CONFIG_ROOT=\"$(XKBCONFIGROOT)\"
+ -DDFLT_XKB_CONFIG_ROOT=\"$(XKBCONFIGROOT)\" \
+ -DDFLT_XKB_RULES_FILE=\"$(XKBDEFAULTRULES)\"
setxkbmap_LDADD = $(SETXKBMAP_LIBS)
setxkbmap_SOURCES = \
diff --git a/app/setxkbmap/aclocal.m4 b/app/setxkbmap/aclocal.m4
index 553960ece..3f71a4321 100644
--- a/app/setxkbmap/aclocal.m4
+++ b/app/setxkbmap/aclocal.m4
@@ -997,7 +997,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
@@ -1034,7 +1034,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.10.0])
+m4_define([vers_have], [1.11.0])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1185,6 +1185,7 @@ MAN_SUBSTS="\
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|\$(prefix)|g' \
+ -e 's|__apploaddir__|\$(appdefaultdir)|g' \
-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
@@ -1342,15 +1343,17 @@ AC_SUBST(MAKE_PDF)
AC_SUBST(MAKE_HTML)
]) # XORG_CHECK_DOCBOOK
-# XORG_WITH_XMLTO([MIN-VERSION])
+# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
# ----------------
# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions
-# as whether or not to use the xmlto package.
+# as whether or not to use the xmlto package. When DEFAULT is not specified,
+# --with-xmlto assumes 'auto'.
#
# Interface to module:
# HAVE_XMLTO: used in makefiles to conditionally generate documentation
@@ -1367,10 +1370,12 @@ AC_SUBST(MAKE_HTML)
#
AC_DEFUN([XORG_WITH_XMLTO],[
AC_ARG_VAR([XMLTO], [Path to xmlto command])
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(xmlto,
AS_HELP_STRING([--with-xmlto],
- [Use xmlto to regenerate documentation (default: yes, if installed)]),
- [use_xmlto=$withval], [use_xmlto=auto])
+ [Use xmlto to regenerate documentation (default: ]_defopt[)]),
+ [use_xmlto=$withval], [use_xmlto=]_defopt)
+m4_undefine([_defopt])
if test "x$use_xmlto" = x"auto"; then
AC_PATH_PROG([XMLTO], [xmlto])
@@ -1424,15 +1429,17 @@ AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
]) # XORG_WITH_XMLTO
-# XORG_WITH_ASCIIDOC([MIN-VERSION])
+# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
# ----------------
# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions
-# as whether or not to use the asciidoc package.
+# as whether or not to use the asciidoc package. When DEFAULT is not specified,
+# --with-asciidoc assumes 'auto'.
#
# Interface to module:
# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
@@ -1445,10 +1452,12 @@ AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
#
AC_DEFUN([XORG_WITH_ASCIIDOC],[
AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(asciidoc,
AS_HELP_STRING([--with-asciidoc],
- [Use asciidoc to regenerate documentation (default: yes, if installed)]),
- [use_asciidoc=$withval], [use_asciidoc=auto])
+ [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
+ [use_asciidoc=$withval], [use_asciidoc=]_defopt)
+m4_undefine([_defopt])
if test "x$use_asciidoc" = x"auto"; then
AC_PATH_PROG([ASCIIDOC], [asciidoc])
@@ -1489,15 +1498,17 @@ fi])
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
]) # XORG_WITH_ASCIIDOC
-# XORG_WITH_DOXYGEN([MIN-VERSION])
+# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
# --------------------------------
# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions
-# as whether or not to use the doxygen package.
+# as whether or not to use the doxygen package. When DEFAULT is not specified,
+# --with-doxygen assumes 'auto'.
#
# Interface to module:
# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
@@ -1510,10 +1521,12 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
#
AC_DEFUN([XORG_WITH_DOXYGEN],[
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(doxygen,
AS_HELP_STRING([--with-doxygen],
- [Use doxygen to regenerate documentation (default: yes, if installed)]),
- [use_doxygen=$withval], [use_doxygen=auto])
+ [Use doxygen to regenerate documentation (default: ]_defopt[)]),
+ [use_doxygen=$withval], [use_doxygen=]_defopt)
+m4_undefine([_defopt])
if test "x$use_doxygen" = x"auto"; then
AC_PATH_PROG([DOXYGEN], [doxygen])
@@ -1554,15 +1567,17 @@ fi])
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
]) # XORG_WITH_DOXYGEN
-# XORG_WITH_GROFF
+# XORG_WITH_GROFF([DEFAULT])
# ----------------
# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions
-# as whether or not to use the groff package.
+# as whether or not to use the groff package. When DEFAULT is not specified,
+# --with-groff assumes 'auto'.
#
# Interface to module:
# HAVE_GROFF: used in makefiles to conditionally generate documentation
@@ -1591,10 +1606,12 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
#
AC_DEFUN([XORG_WITH_GROFF],[
AC_ARG_VAR([GROFF], [Path to groff command])
+m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(groff,
AS_HELP_STRING([--with-groff],
- [Use groff to regenerate documentation (default: yes, if installed)]),
- [use_groff=$withval], [use_groff=auto])
+ [Use groff to regenerate documentation (default: ]_defopt[)]),
+ [use_groff=$withval], [use_groff=]_defopt)
+m4_undefine([_defopt])
if test "x$use_groff" = x"auto"; then
AC_PATH_PROG([GROFF], [groff])
@@ -1657,15 +1674,17 @@ AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
]) # XORG_WITH_GROFF
-# XORG_WITH_FOP
+# XORG_WITH_FOP([DEFAULT])
# ----------------
# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions
-# as whether or not to use the fop package.
+# as whether or not to use the fop package. When DEFAULT is not specified,
+# --with-fop assumes 'auto'.
#
# Interface to module:
# HAVE_FOP: used in makefiles to conditionally generate documentation
@@ -1678,10 +1697,12 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
#
AC_DEFUN([XORG_WITH_FOP],[
AC_ARG_VAR([FOP], [Path to fop command])
+m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(fop,
AS_HELP_STRING([--with-fop],
- [Use fop to regenerate documentation (default: yes, if installed)]),
- [use_fop=$withval], [use_fop=auto])
+ [Use fop to regenerate documentation (default: ]_defopt[)]),
+ [use_fop=$withval], [use_fop=]_defopt)
+m4_undefine([_defopt])
if test "x$use_fop" = x"auto"; then
AC_PATH_PROG([FOP], [fop])
@@ -1708,15 +1729,17 @@ fi
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
]) # XORG_WITH_FOP
-# XORG_WITH_PS2PDF
+# XORG_WITH_PS2PDF([DEFAULT])
# ----------------
# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
-# as whether or not to use the ps2pdf package.
+# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
+# --with-ps2pdf assumes 'auto'.
#
# Interface to module:
# HAVE_PS2PDF: used in makefiles to conditionally generate documentation
@@ -1729,10 +1752,12 @@ AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
#
AC_DEFUN([XORG_WITH_PS2PDF],[
AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(ps2pdf,
AS_HELP_STRING([--with-ps2pdf],
- [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
- [use_ps2pdf=$withval], [use_ps2pdf=auto])
+ [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
+ [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
+m4_undefine([_defopt])
if test "x$use_ps2pdf" = x"auto"; then
AC_PATH_PROG([PS2PDF], [ps2pdf])
@@ -1783,14 +1808,12 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DOCS],[
-default=$1
-if test "x$default" = x ; then
- default="yes"
-fi
+m4_define([default], m4_default([$1], [yes]))
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],
- [Enable building the documentation (default: yes)]),
- [build_docs=$enableval], [build_docs=$default])
+ [Enable building the documentation (default: ]default[)]),
+ [build_docs=$enableval], [build_docs=]default)
+m4_undefine([default])
AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
AC_MSG_CHECKING([whether to build documentation])
AC_MSG_RESULT([$build_docs])
@@ -1818,14 +1841,12 @@ AC_MSG_RESULT([$build_docs])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
-devel_default=$1
-if test "x$devel_default" = x ; then
- devel_default="yes"
-fi
+m4_define([devel_default], m4_default([$1], [yes]))
AC_ARG_ENABLE(devel-docs,
AS_HELP_STRING([--enable-devel-docs],
- [Enable building the developer documentation (default: yes)]),
- [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
+ [Enable building the developer documentation (default: ]devel_default[)]),
+ [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
+m4_undefine([devel_default])
AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
AC_MSG_CHECKING([whether to build developer documentation])
AC_MSG_RESULT([$build_devel_docs])
@@ -1853,14 +1874,12 @@ AC_MSG_RESULT([$build_devel_docs])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_SPECS],[
-spec_default=$1
-if test "x$spec_default" = x ; then
- spec_default="yes"
-fi
+m4_define([spec_default], m4_default([$1], [yes]))
AC_ARG_ENABLE(specs,
AS_HELP_STRING([--enable-specs],
- [Enable building the specs (default: yes)]),
- [build_specs=$enableval], [build_specs=$spec_default])
+ [Enable building the specs (default: ]spec_default[)]),
+ [build_specs=$enableval], [build_specs=]spec_default)
+m4_undefine([spec_default])
AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
AC_MSG_CHECKING([whether to build functional specifications])
AC_MSG_RESULT([$build_specs])
diff --git a/app/setxkbmap/configure b/app/setxkbmap/configure
index 48ce5339d..cd207919c 100644
--- a/app/setxkbmap/configure
+++ b/app/setxkbmap/configure
@@ -745,6 +745,7 @@ XORG_MAN_PAGE
MAN_SUBSTS
AM_DEFAULT_VERBOSITY
XKBCONFIGROOT
+XKBDEFAULTRULES
SETXKBMAP_CFLAGS
SETXKBMAP_LIBS
LINT
@@ -760,6 +761,7 @@ enable_maintainer_mode
enable_dependency_tracking
enable_strict_compilation
with_xkb_config_root
+with_xkb_default_rules
with_lint
'
ac_precious_vars='build_alias
@@ -1420,6 +1422,8 @@ Optional Packages:
--with-xkb-config-root=<paths>
Set default XKB config root (default:
${datadir}/X11/xkb)
+ --with-xkb-default-rules=<rules>
+ Set default XKB rules (default: xorg)
--with-lint Use a lint-style source code checker (default:
disabled)
@@ -4899,6 +4903,7 @@ MAN_SUBSTS="\
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|\$(prefix)|g' \
+ -e 's|__apploaddir__|\$(appdefaultdir)|g' \
-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
@@ -4922,6 +4927,16 @@ fi
+
+# Check whether --with-xkb-default-rules was given.
+if test "${with_xkb_default_rules+set}" = set; then
+ withval=$with_xkb_default_rules; XKBDEFAULTRULES="$withval"
+else
+ XKBDEFAULTRULES=xorg
+fi
+
+
+
# Checks for pkg-config packages
pkg_failed=no
diff --git a/app/setxkbmap/configure.ac b/app/setxkbmap/configure.ac
index adcbc26f1..05fda0125 100644
--- a/app/setxkbmap/configure.ac
+++ b/app/setxkbmap/configure.ac
@@ -45,6 +45,13 @@ AC_ARG_WITH(xkb-config-root,
[XKBCONFIGROOT=${datadir}/X11/xkb])
AC_SUBST([XKBCONFIGROOT])
+AC_ARG_WITH(xkb-default-rules,
+ AC_HELP_STRING([--with-xkb-default-rules=<rules>],
+ [Set default XKB rules (default: xorg)]),
+ [XKBDEFAULTRULES="$withval"],
+ [XKBDEFAULTRULES=xorg])
+AC_SUBST([XKBDEFAULTRULES])
+
# Checks for pkg-config packages
PKG_CHECK_MODULES(SETXKBMAP, xkbfile x11)
diff --git a/app/xkbcomp/Makefile.bsd-wrapper b/app/xkbcomp/Makefile.bsd-wrapper
index a09127169..1b0e97a08 100644
--- a/app/xkbcomp/Makefile.bsd-wrapper
+++ b/app/xkbcomp/Makefile.bsd-wrapper
@@ -1,5 +1,8 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2006/11/28 19:06:59 matthieu Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2011/03/08 07:59:23 matthieu Exp $
+.include <bsd.xconf.mk>
+.if defined(XENOCARA_USE_XKEYBOARD_CONFIG) && ${XENOCARA_USE_XKEYBOARD_CONFIG:L} != "yes"
CONFIGURE_ARGS= --datadir=/etc
+.endif
.include <bsd.xorg.mk>
diff --git a/data/Makefile b/data/Makefile
index 7e81b4bdc..32b12a514 100644
--- a/data/Makefile
+++ b/data/Makefile
@@ -1,7 +1,13 @@
-# $OpenBSD: Makefile,v 1.4 2007/04/04 22:30:55 david Exp $
+# $OpenBSD: Makefile,v 1.5 2011/03/08 07:59:23 matthieu Exp $
# bitmaps needed for building apps, so has to be done separately first
+
+.include <bsd.xconf.mk>
+.if ${XENOCARA_USE_XKEYBOARD_CONFIG:L} == "yes"
+SUBDIR= xkeyboard-config
+.else
SUBDIR= xkbdata
+.endif
build: _SUBDIRUSE
diff --git a/driver/xf86-input-keyboard/src/kbd.c b/driver/xf86-input-keyboard/src/kbd.c
index 7a37dfa98..5add332c3 100644
--- a/driver/xf86-input-keyboard/src/kbd.c
+++ b/driver/xf86-input-keyboard/src/kbd.c
@@ -83,7 +83,7 @@ static const char *kbdDefaults[] = {
#else
"Protocol", "standard",
#endif
- "XkbRules", "xorg",
+ "XkbRules", XKB_DFLT_RULES,
"XkbModel", "pc105",
"CustomKeycodes", "off",
NULL
diff --git a/kdrive/Makefile.bsd-wrapper b/kdrive/Makefile.bsd-wrapper
index 498dbf113..d3235bef5 100644
--- a/kdrive/Makefile.bsd-wrapper
+++ b/kdrive/Makefile.bsd-wrapper
@@ -1,13 +1,21 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.7 2011/01/02 14:23:40 matthieu Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.8 2011/03/08 07:59:23 matthieu Exp $
.include <bsd.xconf.mk>
_SRCDIR= ${.CURDIR}/../xserver
+.if ${XENOCARA_USE_XKEYBOARD_CONFIG:L} == "yes"
+XKB_PATH= ${X11BASE}/share/X11/xkb
+XKB_RULES= base
+.else
+XKB_PATH= /etc/X11/xkb
+XKB_RULES= xorg
+.endif
+
CONFIGURE_ARGS= --localstatedir=/var --sysconfdir=/etc/X11 \
- --with-xkb-path=/etc/X11/xkb \
+ --with-xkb-path=${XKB_PATH} \
--with-xkb-output=/var/db/xkb \
- --with-default-xkb-rules=xorg \
+ --with-default-xkb-rules=${XKB_RULES} \
--with-dri-driver-path=${LIBDIR}/modules/dri \
--enable-dri \
--disable-xorg \
diff --git a/share/mk/bsd.xconf.mk b/share/mk/bsd.xconf.mk
index 3656a006f..e48b6eae5 100644
--- a/share/mk/bsd.xconf.mk
+++ b/share/mk/bsd.xconf.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.xconf.mk,v 1.16 2010/11/27 14:20:47 matthieu Exp $
+# $OpenBSD: bsd.xconf.mk,v 1.17 2011/03/08 07:59:23 matthieu Exp $
# Shared libs?
.if ${MACHINE_ARCH} == "m88k" || ${MACHINE} == "vax"
@@ -20,3 +20,6 @@ XENOCARA_BUILD_PIXMAN?=no
.else
XENOCARA_BUILD_PIXMAN?=yes
.endif
+
+# Build xkeyboard-config?
+XENOCARA_USE_XKEYBOARD_CONFIG?=no
diff --git a/xserver/Makefile.bsd-wrapper b/xserver/Makefile.bsd-wrapper
index 75876d9e3..c19c5c8a7 100644
--- a/xserver/Makefile.bsd-wrapper
+++ b/xserver/Makefile.bsd-wrapper
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.34 2011/02/20 13:42:17 matthieu Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.35 2011/03/08 07:59:23 matthieu Exp $
.include <bsd.xconf.mk>
@@ -31,10 +31,18 @@ DRI_OPTION= --enable-dri --enable-dri2 \
DRI_OPTION= --disable-dri --disable-dri2
.endif
+.if ${XENOCARA_USE_XKEYBOARD_CONFIG:L} == "yes"
+XKB_PATH= ${X11BASE}/share/X11/xkb
+XKB_RULES= base
+.else
+XKB_PATH= /etc/X11/xkb
+XKB_RULES= xorg
+.endif
+
CONFIGURE_ARGS= --localstatedir=/var --sysconfdir=/etc/X11 \
- --with-xkb-path=/etc/X11/xkb \
+ --with-xkb-path=${XKB_PATH} \
--with-xkb-output=/var/db/xkb \
- --with-default-xkb-rules=xorg \
+ --with-default-xkb-rules=${XKB_RULES} \
--with-module-dir=${LIBDIR}/modules ${GLX_OPTION} \
--enable-install-setuid --enable-privsep \
--disable-dmx ${NO_XORG_OPTION} ${NO_XF86_UTIL_OPTION} \
diff --git a/xserver/hw/xfree86/common/xf86Config.c b/xserver/hw/xfree86/common/xf86Config.c
index 6fb73e5a9..dc84eed64 100644
--- a/xserver/hw/xfree86/common/xf86Config.c
+++ b/xserver/hw/xfree86/common/xf86Config.c
@@ -807,7 +807,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
const char *s;
XkbRMLVOSet set;
/* Default options. */
- set.rules = "xorg";
+ set.rules = XKB_DFLT_RULES;
set.model = "pc105";
set.layout = "us";
set.variant = NULL;