2018-04-06 16:15:38 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [[ "$MSYSTEM" == "MINGW32" ]]; then
|
|
|
|
export MSYS2_ARCH="i686"
|
|
|
|
else
|
|
|
|
export MSYS2_ARCH="x86_64"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Update everything
|
|
|
|
pacman --noconfirm -Suy
|
|
|
|
|
|
|
|
# Install the required packages
|
|
|
|
pacman --noconfirm -S --needed \
|
|
|
|
base-devel \
|
|
|
|
git \
|
2022-03-27 17:08:36 +00:00
|
|
|
mingw-w64-$MSYS2_ARCH-cc \
|
2018-04-11 10:18:55 +00:00
|
|
|
mingw-w64-$MSYS2_ARCH-ccache \
|
2022-03-27 17:08:36 +00:00
|
|
|
mingw-w64-$MSYS2_ARCH-pkgconf \
|
2018-04-06 16:15:38 +00:00
|
|
|
mingw-w64-$MSYS2_ARCH-gobject-introspection \
|
|
|
|
mingw-w64-$MSYS2_ARCH-meson \
|
|
|
|
mingw-w64-$MSYS2_ARCH-adwaita-icon-theme \
|
|
|
|
mingw-w64-$MSYS2_ARCH-atk \
|
|
|
|
mingw-w64-$MSYS2_ARCH-cairo \
|
|
|
|
mingw-w64-$MSYS2_ARCH-gdk-pixbuf2 \
|
|
|
|
mingw-w64-$MSYS2_ARCH-glib2 \
|
|
|
|
mingw-w64-$MSYS2_ARCH-graphene \
|
|
|
|
mingw-w64-$MSYS2_ARCH-json-glib \
|
|
|
|
mingw-w64-$MSYS2_ARCH-libepoxy \
|
|
|
|
mingw-w64-$MSYS2_ARCH-pango \
|
|
|
|
mingw-w64-$MSYS2_ARCH-fribidi \
|
2022-03-27 17:08:36 +00:00
|
|
|
mingw-w64-$MSYS2_ARCH-gst-plugins-bad-libs \
|
2021-12-19 16:26:37 +00:00
|
|
|
mingw-w64-$MSYS2_ARCH-shared-mime-info \
|
|
|
|
mingw-w64-$MSYS2_ARCH-python-gobject
|
2018-04-06 16:15:38 +00:00
|
|
|
|
2020-08-05 19:58:46 +00:00
|
|
|
mkdir -p _ccache
|
|
|
|
export CCACHE_BASEDIR="$(pwd)"
|
|
|
|
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
|
|
|
|
2020-08-05 17:57:31 +00:00
|
|
|
# https://gitlab.gnome.org/GNOME/gtk/-/issues/2243
|
|
|
|
# https://gitlab.gnome.org/GNOME/gtk/-/issues/3002
|
2019-12-17 19:23:28 +00:00
|
|
|
|
2021-08-22 19:19:18 +00:00
|
|
|
if ! pkg-config --atleast-version=2.66.0 glib-2.0; then
|
2020-08-05 17:57:31 +00:00
|
|
|
git clone https://gitlab.gnome.org/GNOME/glib.git _glib
|
|
|
|
meson setup _glib_build _glib
|
|
|
|
meson compile -C _glib_build
|
|
|
|
meson install -C _glib_build
|
|
|
|
fi
|
|
|
|
pkg-config --modversion glib-2.0
|
|
|
|
|
2021-11-29 14:27:00 +00:00
|
|
|
if ! pkg-config --atleast-version=1.50.0 pango; then
|
2020-08-05 17:57:31 +00:00
|
|
|
git clone https://gitlab.gnome.org/GNOME/pango.git _pango
|
|
|
|
meson setup _pango_build _pango
|
|
|
|
meson compile -C _pango_build
|
|
|
|
meson install -C _pango_build
|
|
|
|
fi
|
|
|
|
pkg-config --modversion pango
|
2020-05-10 06:31:37 +00:00
|
|
|
|
2018-04-06 16:15:38 +00:00
|
|
|
# Build
|
2018-04-11 10:18:55 +00:00
|
|
|
ccache --zero-stats
|
|
|
|
ccache --show-stats
|
|
|
|
export CCACHE_DISABLE=true
|
2018-04-06 16:15:38 +00:00
|
|
|
meson \
|
2019-05-21 05:46:42 +00:00
|
|
|
-Dx11-backend=false \
|
|
|
|
-Dwayland-backend=false \
|
|
|
|
-Dwin32-backend=true \
|
2020-08-21 23:36:17 +00:00
|
|
|
-Dvulkan=disabled \
|
2020-10-01 13:16:18 +00:00
|
|
|
-Dintrospection=enabled \
|
2020-08-02 23:59:25 +00:00
|
|
|
-Dgtk:werror=true \
|
2018-04-06 16:15:38 +00:00
|
|
|
_build
|
2018-04-11 10:18:55 +00:00
|
|
|
unset CCACHE_DISABLE
|
2018-04-06 16:15:38 +00:00
|
|
|
|
|
|
|
ninja -C _build
|
2018-04-11 10:18:55 +00:00
|
|
|
ccache --show-stats
|
2022-01-19 15:37:36 +00:00
|
|
|
|
|
|
|
tar zcf _build/gtkdll.tar.gz _build/gtk/libgtk*.dll
|