b8c242
From d5cefb7293d2999dcad81bd71933b319ca6c3590 Mon Sep 17 00:00:00 2001
b8c242
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
b8c242
Date: Mon, 12 Apr 2021 14:03:32 +0200
b8c242
Subject: [PATCH] meson: do not fail if rsync is not installed with meson
b8c242
 0.57.2
b8c242
b8c242
https://github.com/mesonbuild/meson/issues/8641
b8c242
b8c242
Our CI started to fail. Even if the change is reverted in meson,
b8c242
we need a quick workaround here.
b8c242
b8c242
(cherry picked from commit 7c5fd25119a495009ea62f79e5daec34cc464628)
b8c242
b8c242
Related: #2017033
b8c242
---
b8c242
 man/meson.build | 25 ++++++++++++++-----------
b8c242
 1 file changed, 14 insertions(+), 11 deletions(-)
b8c242
b8c242
diff --git a/man/meson.build b/man/meson.build
b8c242
index a953d34098..efc8836d0c 100644
b8c242
--- a/man/meson.build
b8c242
+++ b/man/meson.build
b8c242
@@ -178,17 +178,20 @@ html = custom_target(
b8c242
         depends : html_pages,
b8c242
         command : ['echo'])
b8c242
 
b8c242
-run_target(
b8c242
-        'doc-sync',
b8c242
-        depends : man_pages + html_pages,
b8c242
-        command : ['rsync', '-rlv',
b8c242
-                   '--delete-excluded',
b8c242
-                   '--include=man',
b8c242
-                   '--include=*.html',
b8c242
-                   '--exclude=*',
b8c242
-                   '--omit-dir-times',
b8c242
-                   meson.current_build_dir(),
b8c242
-                   get_option('www-target')])
b8c242
+rsync = find_program('rsync', required : false)
b8c242
+if rsync.found()
b8c242
+        run_target(
b8c242
+                'doc-sync',
b8c242
+                depends : man_pages + html_pages,
b8c242
+                command : [rsync, '-rlv',
b8c242
+                           '--delete-excluded',
b8c242
+                           '--include=man',
b8c242
+                           '--include=*.html',
b8c242
+                           '--exclude=*',
b8c242
+                           '--omit-dir-times',
b8c242
+                           meson.current_build_dir(),
b8c242
+                           get_option('www-target')])
b8c242
+endif
b8c242
 
b8c242
 ############################################################
b8c242