Skip to content

Commit

Permalink
build: do not build GLib for Windows anymore.
Browse files Browse the repository at this point in the history
We were building it to add the patch glib!2020, but it has now been
backported in MSYS2 package:
msys2/MINGW-packages#9154
This was about the most infamous bug #913 for very slow file dialogs on
Windows when some drives are disconnected, or with slow/non-accessible
network drives or even fake floppy drives created in the Bios.

Similarly we also wanted glib!2205 and glib!2210 for bug #6780 about
GIMP crashing unexpectedly when images are opened in other (apparently
unrelated applications). I had not updated our build scripts yet, but
anyway, it got backport to the MSYS2 package first, then even to GLib
2.68.4 which has been recently released (and bumped in MSYS2 as well).
See: msys2/MINGW-packages#9283

So let's rely again on MSYS2 package!
  • Loading branch information
Jehan committed Aug 22, 2021
1 parent 887bab0 commit 6312248
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 302 deletions.
32 changes: 0 additions & 32 deletions build/windows/gitlab-ci/build-deps-msys2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,38 +71,6 @@ make
make install
cd ../..

## GLib (patched from MSYS2) ##

git clone --branch 2.68.0 --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/glib.git _glib

cd _glib/
wget "https://raw.githubusercontent.com/msys2/MINGW-packages/master/mingw-w64-glib2/0001-Update-g_fopen-g_open-and-g_creat-to-open-with-FILE_.patch"
wget "https://raw.githubusercontent.com/msys2/MINGW-packages/master/mingw-w64-glib2/0001-disable-some-tests-when-static.patch"
wget "https://raw.githubusercontent.com/msys2/MINGW-packages/master/mingw-w64-glib2/0001-win32-Make-the-static-build-work-with-MinGW-when-pos.patch"
wget "https://raw.githubusercontent.com/msys2/MINGW-packages/master/mingw-w64-glib2/0002-disable_glib_compile_schemas_warning.patch"
git apply 0001-Update-g_fopen-g_open-and-g_creat-to-open-with-FILE_.patch
git apply 0001-win32-Make-the-static-build-work-with-MinGW-when-pos.patch
patch -p1 < 0001-disable-some-tests-when-static.patch
git apply 0002-disable_glib_compile_schemas_warning.patch
# Only this patch is different from MSYS2 build.
git apply ../build/windows/patches/glib-mr2020.patch

mkdir _build
cd _build
meson -Dprefix="${GIMP_PREFIX}" -Dlibelf=disabled --buildtype=release \
--wrap-mode=nodownload --auto-features=enabled \
-Ddefault_library=shared -Dforce_posix_threads=true -Dgtk_doc=false ..
ninja
ninja install
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 ?

## GTK (patched from MSYS2) ##

pacman --noconfirm -S --needed \
Expand Down
270 changes: 0 additions & 270 deletions build/windows/patches/glib-mr2020.patch

This file was deleted.

0 comments on commit 6312248

Please sign in to comment.