meson: moving away from meson subprojects in favor of git submodules.

Meson subprojects just have too many problems and limitations and I can foresee
the maintenance headache and the future incoming false-positive bug reports if
we start using meson subprojects.

Comparing to the simplicity of git submodule which also has much better
notifications to help people understand when the submodule is not in sync and
how to remedy to it.

See commit gimp-data@c364adb explaining the main reasons in detail.
This commit is contained in:
Jehan 2024-03-01 15:15:18 +01:00
parent 1854e65667
commit 9d279a60ce
7 changed files with 16 additions and 17 deletions

View file

@ -322,6 +322,7 @@ deps-debian-x64:
- export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib/`gcc -print-multiarch`:$LD_LIBRARY_PATH" - export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib/`gcc -print-multiarch`:$LD_LIBRARY_PATH"
- export XDG_DATA_DIRS="${GIMP_PREFIX}/share:/usr/local/share:/usr/share" - export XDG_DATA_DIRS="${GIMP_PREFIX}/share:/usr/local/share:/usr/share"
- export GI_TYPELIB_PATH="${GIMP_PREFIX}/lib/`gcc -print-multiarch`/girepository-1.0/:${GI_TYPELIB_PATH}" - export GI_TYPELIB_PATH="${GIMP_PREFIX}/lib/`gcc -print-multiarch`/girepository-1.0/:${GI_TYPELIB_PATH}"
- git submodule update --init
needs: ["deps-debian-x64"] needs: ["deps-debian-x64"]
gimp-debian-x64: gimp-debian-x64:
@ -542,6 +543,7 @@ gimp-win-x64-cross:
- apt-cache - apt-cache
script: script:
- export PATH="`pwd`/.local/bin:$PATH" - export PATH="`pwd`/.local/bin:$PATH"
- git submodule update --init
- crossroad w64 gimp --run="build/windows/gitlab-ci/2_build-gimp-crossroad.sh" - crossroad w64 gimp --run="build/windows/gitlab-ci/2_build-gimp-crossroad.sh"
needs: ["deps-win-x64-cross"] needs: ["deps-win-x64-cross"]
artifacts: artifacts:
@ -641,6 +643,7 @@ gimp-win-x86-cross:
- apt-cache - apt-cache
script: script:
- export PATH="`pwd`/.local/bin:$PATH" - export PATH="`pwd`/.local/bin:$PATH"
- git submodule update --init
- crossroad w32 gimp --run="build/windows/gitlab-ci/2_build-gimp-crossroad.sh" - crossroad w32 gimp --run="build/windows/gitlab-ci/2_build-gimp-crossroad.sh"
needs: ["deps-win-x86-cross", "deps-win-x64-cross"] needs: ["deps-win-x86-cross", "deps-win-x64-cross"]
artifacts: artifacts:
@ -741,6 +744,7 @@ gimp-win-a64:
- windows-aarch64 - windows-aarch64
before_script: before_script:
# C:\msys64\usr\bin\pacman --noconfirm -Syyuu # C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- git submodule update --init
script: script:
- $stuck = Test-Path -Path "C:\msys64\var\lib\pacman\db.lck" -PathType Leaf - $stuck = Test-Path -Path "C:\msys64\var\lib\pacman\db.lck" -PathType Leaf
- if ($stuck -eq "True") { - if ($stuck -eq "True") {
@ -848,6 +852,7 @@ gimp-win-x64:
- win32-ps - win32-ps
before_script: before_script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- git submodule update --init
script: script:
- C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/2_build-gimp-msys2.sh" - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/2_build-gimp-msys2.sh"
artifacts: artifacts:
@ -940,6 +945,7 @@ gimp-win-x86:
- win32-ps - win32-ps
before_script: before_script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- git submodule update --init
script: script:
- C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/2_build-gimp-msys2.sh" - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/2_build-gimp-msys2.sh"
artifacts: artifacts:

5
.gitmodules vendored Normal file
View file

@ -0,0 +1,5 @@
[submodule "gimp-data"]
path = gimp-data
url = https://gitlab.gnome.org/GNOME/gimp-data.git
shallow = true
branch = wip/Jehan/git-submodules

View file

@ -255,8 +255,7 @@ icons_apply_theme (Gimp *gimp,
gchar *path; gchar *path;
path = g_build_filename (g_getenv ("GIMP_TESTING_ABS_TOP_SRCDIR"), path = g_build_filename (g_getenv ("GIMP_TESTING_ABS_TOP_SRCDIR"),
"subprojects", "gimp-data", "icons", "gimp-data", "icons", icon_theme_name, NULL);
icon_theme_name, NULL);
file = g_file_new_for_path (path); file = g_file_new_for_path (path);
applied = gimp_icons_set_icon_theme (file); applied = gimp_icons_set_icon_theme (file);

View file

@ -64,6 +64,6 @@ BEGIN
END END
#include "winuser.h" #include "winuser.h"
1 ICON QUOTE(TOP_SRCDIR) "/subprojects/gimp-data/images/gimp.ico" 1 ICON QUOTE(TOP_SRCDIR) "/gimp-data/images/gimp.ico"
2 ICON QUOTE(TOP_SRCDIR) "/build/windows/fileicon.ico" 2 ICON QUOTE(TOP_SRCDIR) "/build/windows/fileicon.ico"
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST QUOTE(TOP_SRCDIR) "/build/windows/gimp.manifest" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST QUOTE(TOP_SRCDIR) "/build/windows/gimp.manifest"

1
gimp-data Submodule

@ -0,0 +1 @@
Subproject commit c364adb888ad2299f56451706c5cd875c98e3059

View file

@ -1827,16 +1827,8 @@ else
gimp_exe_name=gimpmain_exe_name gimp_exe_name=gimpmain_exe_name
endif endif
# Loading gimp-data subproject, the versions must be in sync. # gimp-data submodule
gimp_data = subproject('gimp-data', version: '=' + gimp_version, subdir('gimp-data')
default_options: [
'gimp-datadir=' + gimpdatadir,
'gimp-exe=' + gimp_exe_name,
])
icons_imgs_sources = gimp_data.get_variable('icons_imgs_sources')
icons_core_sources = gimp_data.get_variable('icons_core_sources')
cursors_sources = gimp_data.get_variable('cursors_sources')
pickers_sources = gimp_data.get_variable('pickers_sources')
# Libraries (order here is important!) # Libraries (order here is important!)
subdir('libgimpcolor') subdir('libgimpcolor')

View file

@ -1,4 +0,0 @@
[wrap-git]
url = https://gitlab.gnome.org/GNOME/gimp-data
revision = main
depth = 1