[libsoup] meson: Rename variables and the Apache script for clarification



commit 0d86b87b4cca4e222bf65dea5397330a40f442d3
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Aug 31 10:25:06 2018 +0200

    meson: Rename variables and the Apache script for clarification
    
    We are checking for multiple modules in multiple directories.

 get_apache_module_dirs.py => get_apache_modules_dirs.py |  8 ++++----
 meson.build                                             | 16 ++++++++--------
 2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/get_apache_module_dirs.py b/get_apache_modules_dirs.py
similarity index 95%
rename from get_apache_module_dirs.py
rename to get_apache_modules_dirs.py
index b58f6961..d1a44ac8 100755
--- a/get_apache_module_dirs.py
+++ b/get_apache_modules_dirs.py
@@ -65,7 +65,7 @@ def main():
     mpm_regex = re.compile(r'\nServer MPM:[\s]+([\w]+)\n')
     mpm = mpm_regex.search(apache_httpd_output.stdout.decode('utf-8')).group(1).lower()
 
-    apache_module_dir = ''
+    apache_modules_dir = ''
     apache_ssl_module_dir = ''
     apache_php_module_file = ''
     apache_mod_unixd_module_file = ''
@@ -76,7 +76,7 @@ def main():
                 for modules_dir in ['', 'modules']:
                     modules_path = os.path.join(apache_prefix, lib_dir, httpd_dir + mpm_suffix, modules_dir)
                     if check_module(modules_path, 'mod_auth_digest.so'):
-                        apache_module_dir = modules_path
+                        apache_modules_dir = modules_path
                     if check_module(modules_path, 'mod_ssl.so'):
                         apache_ssl_module_dir = modules_path
                     php_module = check_php_module(modules_path)
@@ -86,10 +86,10 @@ def main():
                         apache_mod_unixd_module_file = modules_path
 
     # These two are mandatory for having properly configured Apache
-    if apache_module_dir == '' or apache_ssl_module_dir == '':
+    if apache_modules_dir == '' or apache_ssl_module_dir == '':
         sys.exit(1)
 
-    print(apache_module_dir + ":" +
+    print(apache_modules_dir + ":" +
           apache_ssl_module_dir + ":" +
           apache_php_module_file + ":" +
           apache_mod_unixd_module_file, end='')
diff --git a/meson.build b/meson.build
index 949fa306..5117059e 100644
--- a/meson.build
+++ b/meson.build
@@ -125,15 +125,15 @@ if apache_httpd2.found()
 endif
 
 if have_apache
-  apache_module_dirs_out = run_command('get_apache_module_dirs.py', apache_httpd2.path())
-  have_apache = (apache_module_dirs_out.returncode() == 0)
+  apache_modules_dirs_out = run_command('get_apache_modules_dirs.py', apache_httpd2.path())
+  have_apache = (apache_modules_dirs_out.returncode() == 0)
   if have_apache
-    apache_module_dirs = apache_module_dirs_out.stdout().split(':')
-    message('Apache module directory: ' + apache_module_dirs[0])
-    cdata.set('APACHE_MODULE_DIR', apache_module_dirs[0])
-    cdata.set('APACHE_SSL_MODULE_DIR', apache_module_dirs[1])
-    cdata.set('APACHE_PHP_MODULE_FILE', apache_module_dirs[2])
-    cdata.set('IF_HAVE_MOD_UNIXD', apache_module_dirs[3] != '' ? '' : '#')
+    apache_modules_dirs = apache_modules_dirs_out.stdout().split(':')
+    message('Apache modules directory: ' + apache_modules_dirs[0])
+    cdata.set('APACHE_MODULE_DIR', apache_modules_dirs[0])
+    cdata.set('APACHE_SSL_MODULE_DIR', apache_modules_dirs[1])
+    cdata.set('APACHE_PHP_MODULE_FILE', apache_modules_dirs[2])
+    cdata.set('IF_HAVE_MOD_UNIXD', apache_modules_dirs[3] != '' ? '' : '#')
     cdata.set('HAVE_APACHE', have_apache)
   endif
 endif


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