[glib/wip/pwithnall/962-drop-embedded-pcre] ci: Use default wrap mode for libpcre on cross-build platforms




commit 4fe630db8344eb3613a333b23ec1e6db8728e4a6
Author: Philip Withnall <pwithnall endlessos org>
Date:   Fri Jun 18 15:57:07 2021 +0100

    ci: Use default wrap mode for libpcre on cross-build platforms
    
    Work around a bug in Meson versions < 0.50.0 where
    `--wrap-mode=nodownload` would disable the use of fallback subprojects,
    even if they’d already been downloaded, with the message:
    ```
    Cross dependency libpcre found: NO (tried pkgconfig and cmake)
    Cross dependency libpcre found: NO (tried pkgconfig)
    Not looking for a fallback subproject for the dependency libpcre because:
    Use of fallbackdependencies is disabled.
    meson.build:1998:2: ERROR:  Dependency "libpcre" not found, tried pkgconfig
    ```
    
    This workaround can be dropped in the near future when we bump our Meson
    dependency to something less ancient. We have a self-imposed requirement
    to be buildable using what’s packaged in Debian Stable, which is
    currently Meson 0.49.2 — but the new Debian Stable release is coming
    soon, with an updated Meson.
    
    Using `--force-fallback-for=libpcre` would have been a more constrained
    workaround, but unfortunately that argument didn’t exist in Meson 0.49.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #962

 .gitlab-ci.yml | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e36aaa4e0..73fbc1ba6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -270,7 +270,10 @@ cross-android_api21_arm64:
     # FIXME: add --werror
     # We use -Diconv=auto to test that we successfully detect that iconv is not
     # provided by android api 21, and detect the external iconv instead.
-    - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_21.txt -Diconv=auto _build
+    # FIXME: Work around a bug in Meson 0.49 where --wrap-mode=nodownload also
+    # disables fallback subprojects, by passing --wrap-mode=default. Fixed in
+    # Meson commit 47b9c1a564756ac48a55da9a7c4d91787399c645
+    - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_21.txt -Diconv=auto 
--wrap-mode=default _build
     - ninja -C _build
 
 cross-android_api28_arm64:
@@ -278,7 +281,10 @@ cross-android_api28_arm64:
   image: $ANDROID_IMAGE
   script:
     # FIXME: add --werror
-    - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_28.txt _build
+    # FIXME: Work around a bug in Meson 0.49 where --wrap-mode=nodownload also
+    # disables fallback subprojects, by passing --wrap-mode=default. Fixed in
+    # Meson commit 47b9c1a564756ac48a55da9a7c4d91787399c645
+    - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_28.txt --wrap-mode=default 
_build
     - ninja -C _build
 
 cross-mingw64:
@@ -286,7 +292,10 @@ cross-mingw64:
   image: $MINGW_IMAGE
   script:
     # FIXME: Add --werror
-    - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build
+    # FIXME: Work around a bug in Meson 0.49 where --wrap-mode=nodownload also
+    # disables fallback subprojects, by passing --wrap-mode=default. Fixed in
+    # Meson commit 47b9c1a564756ac48a55da9a7c4d91787399c645
+    - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt --wrap-mode=default _build
     - ninja -C _build
 
 msys2-mingw32:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]