mirror of
https://codeberg.org/kiss-community/repo
synced 2024-12-22 07:10:16 -07:00
xkeyboard-config: Remove perl dependency
This commit is contained in:
parent
16e5680c4d
commit
440f0b2cdf
@ -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 \
|
||||
|
@ -1 +1,2 @@
|
||||
1d4175278bf06000683656763a8b1d3282c61a314b6db41260c8efe92d621802 xkeyboard-config-2.29.tar.bz2
|
||||
d26a67612fe3a204b15104ebd5c9b8a060ac20bd700d60af8d065580aaf05d9f xml2lst
|
||||
|
109
xorg/xkeyboard-config/files/xml2lst
Executable file
109
xorg/xkeyboard-config/files/xml2lst
Executable file
@ -0,0 +1,109 @@
|
||||
#!/bin/sh
|
||||
|
||||
# converts the <rules>.xml file to the old format <rules>.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>'*) configitem=1 ;;
|
||||
*'</configItem>'*) configitem=0 ;;
|
||||
*'<modelList>'*) modellist=1 ;;
|
||||
*'</modelList>'*) break ;;
|
||||
|
||||
*'<name>'*)
|
||||
name=${line##*<name>}
|
||||
name=${name%%</name>*}
|
||||
;;
|
||||
|
||||
*'<description>'*)
|
||||
desc=${line##*<description>}
|
||||
desc=${desc%%</description>*}
|
||||
|
||||
[ "$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
|
||||
*'<layoutList>'*|*'<layout>'*) layout=1 ;;
|
||||
*'</layout>'*) layout=0 ;;
|
||||
*'<configItem>'*) configitem=1 ;;
|
||||
*'</configItem>'*) configitem=0 ;;
|
||||
*'<variantList>'*|*'<variant>'*) variant=1 ;;
|
||||
*'</variantList>'*|*'</variant>'*) variant=0 ;;
|
||||
*'</layoutList>'*) break ;;
|
||||
esac
|
||||
|
||||
if [ "$layout" -ne 0 ]; then
|
||||
if [ "${variant}" -ne 0 ]; then
|
||||
case $line in
|
||||
*'<name>'*)
|
||||
name=${line##*<name>}
|
||||
name=${name%%</name>*}
|
||||
;;
|
||||
|
||||
*'<description>'*)
|
||||
line="$lname: ${line##*<description>}"
|
||||
line=${line%%</description>*}
|
||||
names="$names $(printf '%-15s %s' "$name" "$line")
|
||||
"
|
||||
;;
|
||||
esac
|
||||
|
||||
elif [ "$configitem" -ne 0 ]; then
|
||||
case $line in
|
||||
*'<name>'*)
|
||||
lname=${line##*<name>}
|
||||
lname=${lname%%</name>*}
|
||||
;;
|
||||
|
||||
*'<description>'*)
|
||||
line=${line##*<description>}
|
||||
line=${line%%</description>*}
|
||||
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;;
|
||||
*'<!--'*) comment=1;;
|
||||
*'</optionList>'*) break;;
|
||||
|
||||
*'<name>'*)
|
||||
name=${line##*<name>}
|
||||
name=${name%%</name>*}
|
||||
;;
|
||||
|
||||
*'<description>'*)
|
||||
line=${line##*<description>}
|
||||
line=${line%%</description>*}
|
||||
|
||||
[ "$comment" -ne 0 ] ||
|
||||
printf ' %-20s %s\n' "$name" "$line"
|
||||
;;
|
||||
esac
|
||||
done
|
@ -1 +1,2 @@
|
||||
https://x.org/releases/individual/data/xkeyboard-config/xkeyboard-config-2.29.tar.bz2
|
||||
files/xml2lst rules
|
||||
|
Loading…
Reference in New Issue
Block a user