Skip to content

Commit

Permalink
XKB_REF_PATH=$TARGETPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
sam#gemmi-win10 committed Nov 3, 2023
1 parent 384055d commit f2019eb
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions compile/src/tigervnc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
}

#
Expand Down

0 comments on commit f2019eb

Please sign in to comment.