[Frugalware-git] frugalware-current: xorg-server-1.9.2-4-i686 *now we verify if the layout is correct *with /usr/share/X11/xkb/rules/xorg.lst *if the layout is not good use us *now the layout can't be break \o/

bouleetbil bouleetbil at frogdev.info
Mon Nov 15 23:02:29 CET 2010


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=b24ed14e1ebf6402f51afc08c65374728774c553

commit b24ed14e1ebf6402f51afc08c65374728774c553
Author: bouleetbil <bouleetbil at frogdev.info>
Date:   Mon Nov 15 22:56:21 2010 +0100

xorg-server-1.9.2-4-i686
*now we verify if the layout is correct
*with /usr/share/X11/xkb/rules/xorg.lst
*if the layout is not good use us
*now the layout can't be break \o/

diff --git a/source/x11/xorg-server/FrugalBuild b/source/x11/xorg-server/FrugalBuild
index 5b8e52c..2a6157e 100644
--- a/source/x11/xorg-server/FrugalBuild
+++ b/source/x11/xorg-server/FrugalBuild
@@ -10,7 +10,7 @@ USE_MULTIBUFFER=${USE_MULTIBUFFER:-"n"}

pkgname=xorg-server
pkgver=1.9.2
-pkgrel=3
+pkgrel=4
pkgdesc="Modular X.Org X Server"
groups=('x11' 'xorg-core')
archs=('i686' 'x86_64' 'ppc')
diff --git a/source/x11/xorg-server/xorg-server.install b/source/x11/xorg-server/xorg-server.install
index ac6a8ca..d280e65 100644
--- a/source/x11/xorg-server/xorg-server.install
+++ b/source/x11/xorg-server/xorg-server.install
@@ -16,10 +16,10 @@ function UpdateConf
post_install()
{
layout="us"
+	Findxkb="0"
if [ -e /etc/sysconfig/keymap ]; then
# setting the layout from the tty console layout created by the installer
layout=`awk -F'=' '/^keymap=/ {print $2}' /etc/sysconfig/keymap | sed 's|-.*||g'`
-		#TODO : verify the layout with /usr/share/X11/xkb/rules/xorg.lst
#if we should fix some others layout
#FS#4353
case "$layout" in
@@ -29,6 +29,33 @@ post_install()
"fr_CH") layout=ch  ;;
esac
fi
+
+	filexkb="/usr/share/X11/xkb/rules/xorg.lst"
+	canread="0"
+	while read linexkb
+	do
+		if [ "$linexkb" == "! variant" ] ; then
+			break
+			#layout finish read variant
+		fi
+		if [ "$linexkb" == "! layout" ] ; then
+			#begin to define layout now we can read file
+			canread="1";
+		fi
+		if [ "$canread" == "1" ] ; then
+			lineLayout=`echo $linexkb |cut -d ' ' -f1`
+			if [ "$lineLayout" == "$layout" ] ; then
+				Findxkb="1"
+				echo "Find correct layout xkb : $layout"
+				break
+			fi
+		fi
+	done < $filexkb
+	if [ "$Findxkb" == "0" ] ; then
+		layout="us"
+		echo "Xorg will use layout us"
+		echo "You can edit /etc/X11/xorg.conf.d/10-evdev.conf for change it"
+	fi
echo "Update layout keyboard with $layout"
sed -i "/xkb_layout/s/Keyboard_Layout/$layout/" /etc/X11/xorg.conf.d/10-evdev.conf


More information about the Frugalware-git mailing list