| @@ -1,39 +1,39 @@ | | | @@ -1,39 +1,39 @@ |
1 | $NetBSD: patch-mesonbuild_dependencies_dev.py,v 1.1 2019/08/22 17:45:51 nia Exp $ | | 1 | $NetBSD: patch-mesonbuild_dependencies_dev.py,v 1.2 2019/08/23 11:07:00 nia Exp $ |
2 | | | 2 | |
3 | Allow handling different versions of LLVM in pkgsrc using LLVM_CONFIG_PATH. | | 3 | Allow handling different versions of LLVM in pkgsrc using LLVM_CONFIG_PATH. |
4 | | | 4 | |
5 | --- mesonbuild/dependencies/dev.py.orig 2019-07-09 16:34:42.000000000 +0000 | | 5 | --- mesonbuild/dependencies/dev.py.orig 2019-07-09 16:34:42.000000000 +0000 |
6 | +++ mesonbuild/dependencies/dev.py | | 6 | +++ mesonbuild/dependencies/dev.py |
7 | @@ -212,21 +212,24 @@ class LLVMDependencyConfigTool(ConfigToo | | 7 | @@ -212,21 +212,24 @@ class LLVMDependencyConfigTool(ConfigToo |
8 | # newest back to oldest (3.5 is arbitrary), and finally the devel version. | | 8 | # newest back to oldest (3.5 is arbitrary), and finally the devel version. |
9 | # Please note that llvm-config-6.0 is a development snapshot and it should | | 9 | # Please note that llvm-config-6.0 is a development snapshot and it should |
10 | # not be moved to the beginning of the list. | | 10 | # not be moved to the beginning of the list. |
11 | - self.tools = [ | | 11 | - self.tools = [ |
12 | - 'llvm-config', # base | | 12 | - 'llvm-config', # base |
13 | - 'llvm-config-8', 'llvm-config80', | | 13 | - 'llvm-config-8', 'llvm-config80', |
14 | - 'llvm-config-7', 'llvm-config70', | | 14 | - 'llvm-config-7', 'llvm-config70', |
15 | - 'llvm-config-6.0', 'llvm-config60', | | 15 | - 'llvm-config-6.0', 'llvm-config60', |
16 | - 'llvm-config-5.0', 'llvm-config50', | | 16 | - 'llvm-config-5.0', 'llvm-config50', |
17 | - 'llvm-config-4.0', 'llvm-config40', | | 17 | - 'llvm-config-4.0', 'llvm-config40', |
18 | - 'llvm-config-3.9', 'llvm-config39', | | 18 | - 'llvm-config-3.9', 'llvm-config39', |
19 | - 'llvm-config-3.8', 'llvm-config38', | | 19 | - 'llvm-config-3.8', 'llvm-config38', |
20 | - 'llvm-config-3.7', 'llvm-config37', | | 20 | - 'llvm-config-3.7', 'llvm-config37', |
21 | - 'llvm-config-3.6', 'llvm-config36', | | 21 | - 'llvm-config-3.6', 'llvm-config36', |
22 | - 'llvm-config-3.5', 'llvm-config35', | | 22 | - 'llvm-config-3.5', 'llvm-config35', |
23 | - 'llvm-config-9', # Debian development snapshot | | 23 | - 'llvm-config-9', # Debian development snapshot |
24 | - 'llvm-config-devel', # FreeBSD development snapshot | | 24 | - 'llvm-config-devel', # FreeBSD development snapshot |
25 | - ] | | 25 | - ] |
26 | + if os.environ['LLVM_CONFIG_PATH']: | | 26 | + if 'LLVM_CONFIG_PATH' in os.environ: |
27 | + self.tools = [ os.environ['LLVM_CONFIG_PATH'] ] | | 27 | + self.tools = [ os.environ['LLVM_CONFIG_PATH'] ] |
28 | + else: | | 28 | + else: |
29 | + self.tools = [ | | 29 | + self.tools = [ |
30 | + 'llvm-config', # base | | 30 | + 'llvm-config', # base |
31 | + 'llvm-config-8', 'llvm-config80', | | 31 | + 'llvm-config-8', 'llvm-config80', |
32 | + 'llvm-config-7', 'llvm-config70', | | 32 | + 'llvm-config-7', 'llvm-config70', |
33 | + 'llvm-config-6.0', 'llvm-config60', | | 33 | + 'llvm-config-6.0', 'llvm-config60', |
34 | + 'llvm-config-5.0', 'llvm-config50', | | 34 | + 'llvm-config-5.0', 'llvm-config50', |
35 | + 'llvm-config-4.0', 'llvm-config40', | | 35 | + 'llvm-config-4.0', 'llvm-config40', |
36 | + 'llvm-config-3.9', 'llvm-config39', | | 36 | + 'llvm-config-3.9', 'llvm-config39', |
37 | + 'llvm-config-3.8', 'llvm-config38', | | 37 | + 'llvm-config-3.8', 'llvm-config38', |
38 | + 'llvm-config-3.7', 'llvm-config37', | | 38 | + 'llvm-config-3.7', 'llvm-config37', |
39 | + 'llvm-config-3.6', 'llvm-config36', | | 39 | + 'llvm-config-3.6', 'llvm-config36', |