Bug 1295784 - Use the argument name for `when` when passing it to Python configure's pkg_check_modules. r=glandium draft
authorChris Manchester <cmanchester@mozilla.com>
Tue, 16 Aug 2016 16:17:35 -0700
changeset 401425 27ad2289e19afdbd9531df475a5146fbd6396aaa
parent 401424 b3dcb2974210aa7443375692dfb63f0bf3233dde
child 528476 c0eda4084334786e7f5ea957905b2473859edc72
push id26446
push usercmanchester@mozilla.com
push dateTue, 16 Aug 2016 23:18:25 +0000
reviewersglandium
bugs1295784
milestone51.0a1
Bug 1295784 - Use the argument name for `when` when passing it to Python configure's pkg_check_modules. r=glandium MozReview-Commit-ID: GcVEzS3nLql
build/moz.configure/ffi.configure
moz.configure
toolkit/moz.configure
--- a/build/moz.configure/ffi.configure
+++ b/build/moz.configure/ffi.configure
@@ -4,17 +4,18 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 js_option('--with-system-ffi',
           help='Use system libffi (located with pkgconfig)')
 
 use_system_ffi = depends_if('--with-system-ffi')(lambda _: True)
 
-system_ffi = pkg_check_modules('MOZ_FFI', 'libffi > 3.0.9', use_system_ffi)
+system_ffi = pkg_check_modules('MOZ_FFI', 'libffi > 3.0.9',
+                               when=use_system_ffi)
 
 set_config('MOZ_SYSTEM_FFI', system_ffi)
 add_old_configure_assignment('MOZ_SYSTEM_FFI', system_ffi)
 
 @depends(building_js, '--help')
 def ctypes_default(building_js, _):
     return not building_js
 
--- a/moz.configure
+++ b/moz.configure
@@ -242,17 +242,17 @@ check_prog('RPMBUILD', delayed_getattr(e
 option('--enable-system-hunspell',
        help="Use system hunspell (located with pkgconfig)")
 
 @depends('--enable-system-hunspell', compile_environment)
 def check_for_hunspell(value, compile_env):
     return value and compile_env
 
 system_hunspell = pkg_check_modules('MOZ_HUNSPELL', 'hunspell',
-                                    check_for_hunspell)
+                                    when=check_for_hunspell)
 
 set_config('MOZ_SYSTEM_HUNSPELL', system_hunspell)
 
 
 @depends(target)
 def makensis_progs(target):
     if target.kernel == 'WINNT':
         return ('makensis-3.0b3.exe', 'makensis-3.0b1.exe', 'makensis.exe', 'makensis')
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -448,17 +448,18 @@ def check_places_and_android_history(pla
 # ==============================================================
 option('--enable-gpsd', env='MOZ_GPSD',
        help='Enable gpsd support')
 
 @depends('--enable-gpsd')
 def gpsd(value):
     return bool(value)
 
-system_gpsd = pkg_check_modules('MOZ_GPSD', 'libgps >= 3.11', gpsd)
+system_gpsd = pkg_check_modules('MOZ_GPSD', 'libgps >= 3.11',
+                                when=gpsd)
 
 set_config('MOZ_GPSD', system_gpsd)
 
 # Miscellaneous programs
 # ==============================================================
 
 check_prog('TAR', ('gnutar', 'gtar', 'tar'))
 check_prog('UNZIP', ('unzip',))