From f2019eb3a0aa8b785407f79bc9ac2a35a976501f Mon Sep 17 00:00:00 2001 From: sam#gemmi-win10 Date: Sat, 4 Nov 2023 01:36:32 +0800 Subject: [PATCH] XKB_REF_PATH=$TARGETPATH --- compile/src/tigervnc/build.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/compile/src/tigervnc/build.sh b/compile/src/tigervnc/build.sh index 792af573..901274f0 100644 --- a/compile/src/tigervnc/build.sh +++ b/compile/src/tigervnc/build.sh @@ -76,6 +76,8 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" # set -u; err if not exist test -z "$TARGETPATH" && export TARGETPATH=/opt/base DEST_DIR="/" #/tmp/xx-install> / +XKB_DEST_DIR="/tmp/xkb-install" #final: /tmp/xkb-install/usr/local/share/X11/xkb> /usr/local/static/tigervnc/usr/local/share/X11/xkb +XKB_REF_PATH=$TARGETPATH INS_PREFIX=$TARGETPATH # rm -rf $LOGS; #avoid deleted @batch-mode CACHE=$TARGETPATH/../.cache; LOGS=$TARGETPATH/../.logs; mkdir -p $CACHE $LOGS @@ -341,9 +343,9 @@ autoreconf -fiv /tmp/tigervnc/unix/xserver --prefix=$INS_PREFIX \ --sysconfdir=/etc/X11 \ --localstatedir=/var \ - --with-xkb-path=${TARGETPATH}/usr/share/X11/xkb \ + --with-xkb-path=${XKB_REF_PATH}/share/X11/xkb \ --with-xkb-output=/var/lib/xkb \ - --with-xkb-bin-directory=${TARGETPATH}/bin \ + --with-xkb-bin-directory=${XKB_REF_PATH}/bin \ --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/100dpi:unscaled,/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \ --disable-docs \ --disable-unit-tests \ @@ -417,7 +419,7 @@ log "Configuring XKeyboardConfig..." log "Compiling XKeyboardConfig..." meson compile -C /tmp/xkb/build log "Installing XKeyboardConfig..." -DESTDIR="$TARGETPATH" meson install --no-rebuild -C /tmp/xkb/build +DESTDIR="$XKB_DEST_DIR" meson install --no-rebuild -C /tmp/xkb/build log "Stripping XKeyboardConfig..." # We keep only the files needed by Xvnc. @@ -453,8 +455,11 @@ TO_KEEP=" types/pc rules/evdev " -find $TARGETPATH/usr/share/X11/xkb -mindepth 2 -maxdepth 2 -type d -print -exec rm -r {} ';' -find $TARGETPATH/usr/share/X11/xkb -mindepth 1 ! -type d $(printf "! -wholename $TARGETPATH/usr/share/X11/xkb/%s " $(echo "$TO_KEEP")) -print -delete +find $XKB_DEST_DIR/usr/share/X11/xkb -mindepth 2 -maxdepth 2 -type d -print -exec rm -r {} ';' +find $XKB_DEST_DIR/usr/share/X11/xkb -mindepth 1 ! -type d $(printf "! -wholename $XKB_DEST_DIR/usr/share/X11/xkb/%s " $(echo "$TO_KEEP")) -print -delete +# + +mkdir -p ${XKB_REF_PATH}/share/X11; +\cp -a $XKB_DEST_DIR/usr/share/X11/xkb ${XKB_REF_PATH}/share/X11/xkb } #