mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-26 01:27:42 +00:00
chore(core): handle meson version 0.53.2
This commit is contained in:
parent
20cc47714e
commit
d74b08f37c
2 changed files with 31 additions and 11 deletions
|
|
@ -18,6 +18,12 @@ cd "$THIS_SCRIPT_PATH"
|
|||
|
||||
get_builder_OS
|
||||
|
||||
MESON_LOW_VERSION=false
|
||||
|
||||
if [[ `meson --version` < 0.54 ]]; then
|
||||
MESON_LOW_VERSION=true
|
||||
fi
|
||||
|
||||
#
|
||||
# Restrict available targets to those that can be built on the current system
|
||||
#
|
||||
|
|
|
|||
|
|
@ -46,7 +46,13 @@ do_configure() {
|
|||
do_build() {
|
||||
local target=$1
|
||||
builder_start_action build:$target || return 0
|
||||
meson compile -C "$MESON_PATH"
|
||||
if $MESON_LOW_VERSION; then
|
||||
pushd "$MESON_PATH" > /dev/null
|
||||
ninja
|
||||
popd
|
||||
else
|
||||
meson compile -C "$MESON_PATH"
|
||||
fi
|
||||
builder_finish_action success build:$target
|
||||
}
|
||||
|
||||
|
|
@ -66,19 +72,27 @@ do_test() {
|
|||
# ----------------------------------------------------------------------------
|
||||
|
||||
do_install() {
|
||||
do_command install $1
|
||||
local target=$1
|
||||
builder_start_action install:$target || return 0
|
||||
if $MESON_LOW_VERSION; then
|
||||
pushd "$MESON_PATH" > /dev/null
|
||||
ninja install
|
||||
popd > /dev/null
|
||||
else
|
||||
meson install -C "$MESON_PATH"
|
||||
fi
|
||||
builder_finish_action success install:$target
|
||||
}
|
||||
|
||||
do_uninstall() {
|
||||
do_command uninstall $1
|
||||
}
|
||||
|
||||
do_command() {
|
||||
local command=$1
|
||||
local target=$2
|
||||
builder_start_action $command:$target || return 0
|
||||
meson $command -C "$MESON_PATH"
|
||||
builder_finish_action success $command:$target
|
||||
local target=$1
|
||||
builder_start_action uninstall:$target || return 0
|
||||
pushd "$MESON_PATH" > /dev/null
|
||||
# Note: there is no meson uninstall command, which means
|
||||
# this probably won't work on Windows
|
||||
ninja uninstall
|
||||
popd > /dev/null
|
||||
builder_finish_action success uninsatll:$target
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue