]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
WIP meson: Add bootstrap subproject and adjust meson-bootstrap.sh
authorLorenz Wildberg <lorenz@wild-fisch.de>
Tue, 23 Nov 2021 23:26:20 +0000 (23:26 +0000)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 14 Nov 2022 09:39:35 +0000 (10:39 +0100)
meson-bootstrap.sh
subprojects/vala-bootstrap.wrap [new file with mode: 0644]

index ddeac3fdf1b41342aad7287709eab3047812bd16..35aecd3464e931213dee7850b33724e48bee23c2 100755 (executable)
@@ -1,13 +1,26 @@
 #!/bin/sh
 
 API=`grep -e "^vala_api_version = '\([0-9]\.[0-9]*\)'$" meson.build | sed -r "s/vala_api_version = '([^ ]+)'/\1/"`
+CUR_DIR=`pwd`
 
-PWD=$(pwd)
-rm -rf _bootstrap _bootstrap_install _build
+rm -rf subprojects/vala-bootstrap/_build _bootstrap _build
 
-meson _bootstrap -Dvaladoc=false -Dprefix=$PWD/_bootstrap_install || exit 1
-ninja -C _bootstrap || exit 1
+echo ">>> Building vala-bootstrap <<<"
+meson subprojects download || exit 1
+cd subprojects/vala-bootstrap
+meson _build -Ddefault_library=static || exit 1
+meson compile -C _build || exit 1
 
-LD_LIBRARY_PATH="$PWD/_bootstrap/vala:$PWD/_bootstrap/codegen" VALAC="$PWD/_bootstrap/compiler/valac-$API --vapidir $PWD/vapi" meson _build -Dprefix=/usr || exit 1
-LD_LIBRARY_PATH="$PWD/_bootstrap/vala:$PWD/_bootstrap/codegen" ninja -C _build || exit 1
-LD_LIBRARY_PATH="$PWD/_bootstrap/vala:$PWD/_bootstrap/codegen" ninja -C _build test || exit 1
+echo ">>> Building vala (stage 1) <<<"
+cd "$CUR_DIR"
+VALAC="$CUR_DIR/subprojects/vala-bootstrap/_build/compiler/valac --vapidir=$CUR_DIR/vapi" \
+       meson _bootstrap -Dvaladoc=false -Ddefault_library=static || exit 1
+meson compile -C _bootstrap || exit 1
+meson test -C _bootstrap || exit 1
+
+echo ">>> Building vala (stage 2) <<<"
+cd "$CUR_DIR"
+VALAC="$CUR_DIR/_bootstrap/compiler/valac-$API --vapidir=$CUR_DIR/vapi" \
+       meson _build -Dprefix=/usr || exit 1
+meson compile -C _build || exit 1
+meson test -C _build || exit 1
diff --git a/subprojects/vala-bootstrap.wrap b/subprojects/vala-bootstrap.wrap
new file mode 100644 (file)
index 0000000..547caf5
--- /dev/null
@@ -0,0 +1,5 @@
+[wrap-git]
+directory = vala-bootstrap
+url = https://gitlab.gnome.org/ricotz/vala-bootstrap.git
+revision = master
+depth = 1