[glib/wip/pwithnall/962-drop-embedded-pcre] ci: Force fallback for libpcre on cross-build platforms



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

    ci: Force fallback 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.
    
    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..3685ea7df 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 --force-fallback-for. Fixed in
+    # Meson commit 47b9c1a564756ac48a55da9a7c4d91787399c645
+    - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_21.txt -Diconv=auto 
--force-fallback-for=libpcre _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 --force-fallback-for. Fixed in
+    # Meson commit 47b9c1a564756ac48a55da9a7c4d91787399c645
+    - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_28.txt 
--force-fallback-for=libpcre _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 --force-fallback-for. Fixed in
+    # Meson commit 47b9c1a564756ac48a55da9a7c4d91787399c645
+    - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt --force-fallback-for=libpcre 
_build
     - ninja -C _build
 
 msys2-mingw32:


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