[libsoup] Meson: fallback for apache 2.4.39 and above



commit 75c24aaed2b7667cf36f1907b0157d152aa5f6d1
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Thu Aug 1 12:26:38 2019 +0300

    Meson: fallback for apache 2.4.39 and above
    
    It seems that from 2.4.39 apachectl doesn't take arguments,
    that breaks CI in Fedora 30 (which we use in gitlab). Add a
    few fallback calls to http directly for now.

 meson.build | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/meson.build b/meson.build
index 99a1ea5f..a6d12ddc 100644
--- a/meson.build
+++ b/meson.build
@@ -201,6 +201,11 @@ have_apache=false
 apache_httpd2_version = ''
 if apache_httpd2.found() and apachectl.found()
   apache_httpd2_version_raw = run_command(apachectl.path(), '-v')
+  # It seems that from version 2.4.39 apachectl doesn't take arguments, fallback
+  # to calling apache directly just in case.
+  if apache_httpd2_version_raw.returncode() != 0
+    apache_httpd2_version_raw = run_command(apache_httpd2.path(), '-v')
+  endif
   if apache_httpd2_version_raw.returncode() == 0
     apache_httpd2_version = apache_httpd2_version_raw.stdout().split('\n')[0]
     apache_httpd2_version = apache_httpd2_version.split('/')[1].split(' ')[0]
@@ -216,6 +221,11 @@ endif
 if have_apache
   apache_modules_dirs_out = run_command('get_apache_modules_dirs.py', apachectl.path())
   have_apache = (apache_modules_dirs_out.returncode() == 0)
+  # Same as above, using apachectl might fail, try apache directly.
+  if not have_apache
+    apache_modules_dirs_out = run_command('get_apache_modules_dirs.py', apache_httpd2.path())
+    have_apache = (apache_modules_dirs_out.returncode() == 0)
+  endif
   if have_apache
     apache_modules_dirs = apache_modules_dirs_out.stdout().split(':')
     message('Apache modules directory: ' + apache_modules_dirs[0])


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