$OpenBSD: patch-moz_configure,v 1.3 2020/06/30 10:21:32 ajacoutot Exp $

- Fix awk detection
- Remove unused LLVM and Rust build dependencies, from:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959144

Index: moz.configure
--- moz.configure.orig
+++ moz.configure
@@ -360,7 +360,7 @@ add_old_configure_assignment('CLANG_PLUGIN', clang_plu
 
 # Awk detection
 # ==============================================================
-awk = check_prog('AWK', ('gawk', 'mawk', 'nawk', 'awk'))
+awk = check_prog('AWK', ('awk',))
 
 # Until the AWK variable is not necessary in old-configure
 @depends(awk)
@@ -597,36 +597,6 @@ def nsis_flags(host):
 set_config('MAKENSISU_FLAGS', nsis_flags)
 
 check_prog('7Z', ('7z', '7za'), allow_missing=True, when=target_is_windows)
-
-
-@depends(host_c_compiler, c_compiler, bindgen_config_paths)
-def llvm_objdump(host_c_compiler, c_compiler, bindgen_config_paths):
-    clang = None
-    for compiler in (host_c_compiler, c_compiler):
-        if compiler and compiler.type == 'clang':
-            clang = compiler.compiler
-            break
-        elif compiler and compiler.type == 'clang-cl':
-            clang = os.path.join(os.path.dirname(compiler.compiler), 'clang')
-            break
-
-    if not clang and bindgen_config_paths:
-        clang = bindgen_config_paths.clang_path
-    llvm_objdump = 'llvm-objdump'
-    if clang:
-        out = check_cmd_output(clang, '--print-prog-name=llvm-objdump',
-                               onerror=lambda: None)
-        if out:
-            llvm_objdump = out.rstrip()
-    return (llvm_objdump,)
-
-
-llvm_objdump = check_prog('LLVM_OBJDUMP', llvm_objdump, what='llvm-objdump',
-                          when='--enable-compile-environment',
-                          paths=toolchain_search_path)
-
-add_old_configure_assignment('LLVM_OBJDUMP', llvm_objdump)
-
 
 # Please do not add configure checks from here on.
 
