build: move glib-networking modules into our custom glib prefix.

Since gio searches its modules based on the paths as advertized by the
pkg-config, let's just move the pre-compiled modules (by MSYS2
packages). We build the same version of glib2 with the same options, and
only one additional patch. So this should not be a problem to use the
pre-built modules rather than rebuilding glib-networking too.
This commit is contained in:
Jehan
2021-06-22 11:59:06 +02:00
parent 9572cb43bd
commit dc3cc6fb26
2 changed files with 12 additions and 4 deletions

View File

@ -9,11 +9,13 @@ if [[ "$MSYSTEM" == "MINGW32" ]]; then
# it for this architecture. # it for this architecture.
export BABL_OPTIONS="-Denable-vapi=false" export BABL_OPTIONS="-Denable-vapi=false"
export GEGL_OPTIONS="-Dvapigen=disabled" export GEGL_OPTIONS="-Dvapigen=disabled"
export MSYS_PREFIX="/c/msys64/mingw32/"
else else
export ARTIFACTS_SUFFIX="-w64" export ARTIFACTS_SUFFIX="-w64"
export MSYS2_ARCH="x86_64" export MSYS2_ARCH="x86_64"
export BABL_OPTIONS="" export BABL_OPTIONS=""
export GEGL_OPTIONS="" export GEGL_OPTIONS=""
export MSYS_PREFIX="/c/msys64/mingw64/"
fi fi
# Update everything # Update everything
@ -27,6 +29,7 @@ pacman --noconfirm -S --needed \
\ \
mingw-w64-$MSYS2_ARCH-cairo \ mingw-w64-$MSYS2_ARCH-cairo \
mingw-w64-$MSYS2_ARCH-crt-git \ mingw-w64-$MSYS2_ARCH-crt-git \
mingw-w64-$MSYS2_ARCH-glib-networking \
mingw-w64-$MSYS2_ARCH-gobject-introspection \ mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-json-glib \ mingw-w64-$MSYS2_ARCH-json-glib \
mingw-w64-$MSYS2_ARCH-lcms2 \ mingw-w64-$MSYS2_ARCH-lcms2 \
@ -93,6 +96,13 @@ ninja
ninja install ninja install
cd ../.. cd ../..
# glib-networking is needed. No need to rebuild it, since we build the
# same version of glib with the same options, and just some additional
# patches, so we assume MSYS2-built packages should be fine.
mkdir -p ${GIMP_PREFIX}/lib/gio/modules/
cp -fr ${MSYS_PREFIX}/lib/gio/modules/*.dll ${GIMP_PREFIX}/lib/gio/modules/
# TODO: what about /mingw64/share/locale/*/LC_MESSAGES/glib-networking.mo ?
## babl and GEGL (follow master branch) ## ## babl and GEGL (follow master branch) ##
git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git _babl git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git _babl

View File

@ -32,8 +32,6 @@ pacman --noconfirm -S --needed \
mingw-w64-$MSYS2_ARCH-drmingw \ mingw-w64-$MSYS2_ARCH-drmingw \
mingw-w64-$MSYS2_ARCH-gexiv2 \ mingw-w64-$MSYS2_ARCH-gexiv2 \
mingw-w64-$MSYS2_ARCH-ghostscript \ mingw-w64-$MSYS2_ARCH-ghostscript \
mingw-w64-$MSYS2_ARCH-glib2 \
mingw-w64-$MSYS2_ARCH-glib-networking \
mingw-w64-$MSYS2_ARCH-gobject-introspection \ mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-gobject-introspection-runtime \ mingw-w64-$MSYS2_ARCH-gobject-introspection-runtime \
mingw-w64-$MSYS2_ARCH-graphviz \ mingw-w64-$MSYS2_ARCH-graphviz \
@ -99,14 +97,14 @@ cp -fr ${GIMP_PREFIX}/lib/babl-0.1 ${GIMP_DISTRIB}/lib/
cp -fr ${MSYS_PREFIX}/lib/girepository-1.0 ${GIMP_DISTRIB}/lib/ cp -fr ${MSYS_PREFIX}/lib/girepository-1.0 ${GIMP_DISTRIB}/lib/
cp -fr ${GIMP_PREFIX}/lib/girepository-1.0/* ${GIMP_DISTRIB}/lib/girepository-1.0/ cp -fr ${GIMP_PREFIX}/lib/girepository-1.0/* ${GIMP_DISTRIB}/lib/girepository-1.0/
cp -fr ${MSYS_PREFIX}/lib/gio ${GIMP_DISTRIB}/lib/ cp -fr ${GIMP_PREFIX}/lib/gio ${GIMP_DISTRIB}/lib/
cp -fr ${MSYS_PREFIX}/lib/gdk-pixbuf-2.0 ${GIMP_DISTRIB}/lib/ cp -fr ${MSYS_PREFIX}/lib/gdk-pixbuf-2.0 ${GIMP_DISTRIB}/lib/
cp -fr ${MSYS_PREFIX}/lib/gtk-3.0 ${GIMP_DISTRIB}/lib/ cp -fr ${MSYS_PREFIX}/lib/gtk-3.0 ${GIMP_DISTRIB}/lib/
cp -fr ${MSYS_PREFIX}/lib/python3.8 ${GIMP_DISTRIB}/lib/ cp -fr ${MSYS_PREFIX}/lib/python3.8 ${GIMP_DISTRIB}/lib/
cp -fr ${MSYS_PREFIX}/share/ghostscript ${GIMP_DISTRIB}/share/ cp -fr ${MSYS_PREFIX}/share/ghostscript ${GIMP_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/share/glib-2.0 ${GIMP_DISTRIB}/share/ cp -fr ${GIMP_PREFIX}/share/glib-2.0 ${GIMP_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/share/libthai ${GIMP_DISTRIB}/share/ cp -fr ${MSYS_PREFIX}/share/libthai ${GIMP_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/share/libwmf ${GIMP_DISTRIB}/share/ cp -fr ${MSYS_PREFIX}/share/libwmf ${GIMP_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/share/mypaint-data ${GIMP_DISTRIB}/share/ cp -fr ${MSYS_PREFIX}/share/mypaint-data ${GIMP_DISTRIB}/share/