diff --git a/xorg/xkeyboard-config/build b/xorg/xkeyboard-config/build index d9f461aa..91552c62 100755 --- a/xorg/xkeyboard-config/build +++ b/xorg/xkeyboard-config/build @@ -1,5 +1,9 @@ #!/bin/sh -e +# Swap to shell script instead of perl script +# for conversion of rules files. See files/xml2lst. +sed -i 's/perl //;s/xml2lst\.pl/xml2lst/' rules/Makefile.in + ./configure \ --prefix=/usr \ --with-xkb-rules-symlink=xfree86,xorg \ diff --git a/xorg/xkeyboard-config/checksums b/xorg/xkeyboard-config/checksums index 6174efaa..bdfecd76 100644 --- a/xorg/xkeyboard-config/checksums +++ b/xorg/xkeyboard-config/checksums @@ -1 +1,2 @@ 1d4175278bf06000683656763a8b1d3282c61a314b6db41260c8efe92d621802 xkeyboard-config-2.29.tar.bz2 +d26a67612fe3a204b15104ebd5c9b8a060ac20bd700d60af8d065580aaf05d9f xml2lst diff --git a/xorg/xkeyboard-config/files/xml2lst b/xorg/xkeyboard-config/files/xml2lst new file mode 100755 index 00000000..9c734383 --- /dev/null +++ b/xorg/xkeyboard-config/files/xml2lst @@ -0,0 +1,109 @@ +#!/bin/sh + +# converts the .xml file to the old format .lst file +# +# Usage: +# +# sh xml2lst.sh < filename.xml > filename.lst +# +# author Ivan Pascal + +configitem=0 +modellist=0 +layout=0 +configitem=0 +variant=0 +comment=0 + +printf '! model\n' + +while read -r line || [ "$line" ]; do + case $line in + *''*) configitem=1 ;; + *''*) configitem=0 ;; + *''*) modellist=1 ;; + *''*) break ;; + + *''*) + name=${line##*} + name=${name%%*} + ;; + + *''*) + desc=${line##*} + desc=${desc%%*} + + [ "$configitem" -eq 0 ] || [ "$modellist" -eq 0 ] || + printf ' %-15s %s\n' "$name" "$desc" + ;; + esac +done + +printf '\n! layout\n' + +while read -r line || [ "$line" ]; do + case $line in + *''*|*''*) layout=1 ;; + *''*) layout=0 ;; + *''*) configitem=1 ;; + *''*) configitem=0 ;; + *''*|*''*) variant=1 ;; + *''*|*''*) variant=0 ;; + *''*) break ;; + esac + + if [ "$layout" -ne 0 ]; then + if [ "${variant}" -ne 0 ]; then + case $line in + *''*) + name=${line##*} + name=${name%%*} + ;; + + *''*) + line="$lname: ${line##*}" + line=${line%%*} + names="$names $(printf '%-15s %s' "$name" "$line") +" + ;; + esac + + elif [ "$configitem" -ne 0 ]; then + case $line in + *''*) + lname=${line##*} + lname=${lname%%*} + ;; + + *''*) + line=${line##*} + line=${line%%*} + printf ' %-15s %s\n' "$lname" "$line" + ;; + esac + fi + fi +done + +printf '\n! variant\n%s\n! option\n' "$names" + +while read -r line || [ "$line" ]; do + case $line in + *'-->'*) comment=0;; + *'