Skip to content

Commit 817a18e

Browse files
committed
Switch to new build system
1 parent 8aa3130 commit 817a18e

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
.idea
2+
.env
3+
.buildkit
4+
artifacts
5+
venv

build.sh

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
# shellcheck disable=SC1090
2-
source <(curl -s https://raw.githubusercontent.com/pytgcalls/build-toolkit/refs/heads/master/build-toolkit.sh)
1+
source /dev/stdin <<< "$(curl -s https://raw.githubusercontent.com/pytgcalls/build-toolkit/refs/heads/master/build-toolkit.sh)"
32

4-
require_venv
3+
require venv
54

6-
GLIB_VERSION=$(get_version "glib")
7-
EXPAT_VERSION=$(get_version "expat")
5+
import .env
6+
import libraries.properties
7+
import meson from python3
8+
import ninja from python3
89

9-
ARCH=$(uname -m)
10-
if [[ "$ARCH" == "x86_64" ]]; then
10+
if [[ "$(uname -m)" == "x86_64" ]]; then
1111
C_ARGS="-mno-avx2"
1212
CPP_ARGS="-mno-avx2"
1313
else
1414
C_ARGS=""
1515
CPP_ARGS=""
1616
fi
17-
build_and_install https://github.com/libexpat/libexpat.git "R_${EXPAT_VERSION//./_}" configure-static --prefix="$(pwd)/libexpat/build/" --setup-commands="cd expat" --cleanup-commands="cd .."
18-
build_and_install https://github.com/GNOME/glib.git "$GLIB_VERSION" meson-static --prefix="$(pwd)/glib/build/" --buildtype=plain -Dtests=false -Dc_args="$C_ARGS" -Dcpp_args="$CPP_ARGS"
1917

20-
mkdir -p artifacts/lib
21-
mkdir -p artifacts/include
22-
cp -r "$(pwd)"/glib/build/lib/*.a artifacts/lib/
23-
cp -r "$(pwd)"/libexpat/build/lib/*.a artifacts/lib/
24-
cp -r "$(pwd)"/glib/build/include/glib-2.0/* artifacts/include/
25-
cp "$(pwd)"/glib/build/lib/glib-2.0/include/glibconfig.h artifacts/include/
18+
build_and_install "libexpat/expat" configure-static
19+
build_and_install "glib" meson-static --buildtype=plain -Dtests=false -Dc_args="$C_ARGS" -Dcpp_args="$CPP_ARGS"
20+
21+
copy_libs "libexpat" "artifacts"
22+
copy_libs "glib" "artifacts" "ffi" "pcre2-8" "gmodule-2.0" "glib-2.0" "gobject-2.0" "gio-2.0"
23+
cp "$DEFAULT_BUILD_FOLDER/glib/build/lib/glib-2.0/include/glibconfig.h" artifacts/include/glib-2.0

libraries.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
glib=2.84.1
2-
expat=2.7.1
1+
github.com/GNOME/glib=2.84.1
2+
github.com/libexpat/libexpat=2.7.1

0 commit comments

Comments
 (0)