From 8e72b6254de51f514334e9db665feb5114fee0bc Mon Sep 17 00:00:00 2001 From: Owen Rafferty Date: Tue, 10 May 2022 09:06:45 -0500 Subject: [PATCH] xkeyboard-config: stop using Alpine packages --- wayland/xkeyboard-config/build | 33 ++++++- wayland/xkeyboard-config/checksums | 6 +- wayland/xkeyboard-config/depends | 1 + wayland/xkeyboard-config/files/xml2lst | 49 +++++++++++ .../patches/compose-only.patch | 85 +++++++++++++++++++ wayland/xkeyboard-config/sources | 6 +- 6 files changed, 172 insertions(+), 8 deletions(-) create mode 100644 wayland/xkeyboard-config/depends create mode 100755 wayland/xkeyboard-config/files/xml2lst create mode 100644 wayland/xkeyboard-config/patches/compose-only.patch diff --git a/wayland/xkeyboard-config/build b/wayland/xkeyboard-config/build index 389ea229..394de06c 100755 --- a/wayland/xkeyboard-config/build +++ b/wayland/xkeyboard-config/build @@ -1,8 +1,33 @@ #!/bin/sh -e -cd "$1" +( + cd libX11 -tar xf "$OLDPWD/xkeyboard-config-"*.apk -tar xf "$OLDPWD/libx11-"*.apk + patch -p1 < ../compose-only.patch -rm -rf usr/lib .PKGINFO .*.pub + ./configure \ + --prefix=/usr \ + --disable-specs \ + --disable-xkb \ + --without-fop \ + --without-xmlto + + make -C nls + make -C nls install +) + +# Swap to shell script instead of perl script +# for conversion of rules files. See files/xml2lst. +sed 's/xml2lst\.pl/xml2lst/' rules/meson.build > _ +mv -f _ rules/meson.build + +# Remove po/ dir. +sed "/subdir('po')/d" meson.build > _ +mv -f _ meson.build + +meson setup \ + -Dprefix=/usr \ + output + +ninja -C output +ninja -C output install diff --git a/wayland/xkeyboard-config/checksums b/wayland/xkeyboard-config/checksums index 6604628b..dd069102 100644 --- a/wayland/xkeyboard-config/checksums +++ b/wayland/xkeyboard-config/checksums @@ -1,2 +1,4 @@ -88ce0b2748670550fa034de4ba6c056c8cfa05a5c3643b72d422aa1a0a804c67 -8e7e1c4e80657a1104547f96105d8d218a49c1c97df67b40666c5dba3b45f859 +18ce50ff0c74ae6093062bce1aeab3d363913ea35162fe271f8a0ce399de85cc +081bf42ebab023aa92cfdb20c7af8c5ae13d13e88a5e22f90f4453ef80bbdde4 +441932e963ed1c8eae327bc6f328ad419df72d12a8b0241d7860fdda1c7a75d4 +e1ecd235757fe2afdd06c7cb2f94461fac8db3544ba8248275d18b06a3b2d51d diff --git a/wayland/xkeyboard-config/depends b/wayland/xkeyboard-config/depends new file mode 100644 index 00000000..69856447 --- /dev/null +++ b/wayland/xkeyboard-config/depends @@ -0,0 +1 @@ +meson build diff --git a/wayland/xkeyboard-config/files/xml2lst b/wayland/xkeyboard-config/files/xml2lst new file mode 100755 index 00000000..d04c084d --- /dev/null +++ b/wayland/xkeyboard-config/files/xml2lst @@ -0,0 +1,49 @@ +#!/bin/sh +# converts the .xml file to the old format .lst file +# Usage: xml2lst < filename.xml > filename.lst + +[ "$1" ] && "$0" < "$1" && exit + +var=0 com=0 nam='' + +printf '! model\n' +while read -r l || [ "$l" ]; do case $l in + *''*) n=${l#*>} n=${n%<*};; + *''*) l=${l#*>}; printf ' %-15s %s\n' "$n" "${l%<*}" ;; + *''*) break +esac; done + +printf '\n! layout\n' +while read -r l || [ "$l" ]; do case $l in + *''*) var=1;; + *''*) var=0;; + *''*) break;; + + *''*) + l="${l#*>}" + [ "$var" -eq 0 ] && ln=${l%<*} || n=${l%<*} + ;; + + *''*) + l=${l#*>} + + case $var in + 0) printf ' %-15s %s\n' "${ln}" "${l%<*}" ;; + *) nam="${nam%x} $(printf '%-15s %s: %s\nx' "$n" "$ln" "${l%<*}")" + esac + ;; +esac; done + +printf '\n! variant\n%s\n! option\n' "${nam%x}" +while read -r l || [ "$l" ]; do case $l in + *'-->'*) com=0;; + *'