We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
improve installation of Zoltran: imposing +int64 constrains on parmetis
<!--*Please add a concise summary of your suggestion here.*-->

### Rationale
zoltan spec has a variant called  `int64` which imposes the corresponding constrain on metis. 
https://github.com/spack/spack/blob/6947951aaf9954b1dfd12ca7a9266d7335f07105/var/spack/repos/builtin/packages/zoltan/package.py#L37-L44

The same constrain must be applied to parmetis. 


<!--*Is your feature request related to a problem? Please describe it!*-->

### Description
I guess a solution can be something like
```
depends_on('parmetis@4:', when='+parmetis') 
depends_on('parmetis@4: +int64', when='+parmetis+int64')
```

<!--*Describe the solution you'd like and the alternatives you have considered.*-->


### Additional information
<!--*Add any other context about the feature request here.*-->
I guess this happens because parmetis package has been recently updated and `int64` has been added. Because there was no such an option in parmetis for a long time people came up with a workaround by specifying `metis+int64` explicitly in their script. The parametis update brings an inconsistency because `int64`   is off by default in parmetis, however, and the ''legacy'' workaround imposes `int64` on metis.
My spack version is 0.16.0

### General information

- [x] I have run `spack --version` and reported the version of Spack
- [x] I have searched the issues of this repo and believe this is not a duplicate



<!--If you want to ask a question about the tool (how to use it, what it can currently do, etc.), try the `#general` channel on our Slack first. We have a welcoming community and chances are you'll get your reply faster and without opening an issue.

Other than that, thanks for taking the time to contribute to Spack!
-->

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `var/spack/repos/builtin/packages/zoltan/package.py`
Content:
```
1 # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
2 # Spack Project Developers. See the top-level COPYRIGHT file for details.
3 #
4 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
5 
6 
7 from spack import *
8 import re
9 
10 
11 class Zoltan(AutotoolsPackage):
12     """The Zoltan library is a toolkit of parallel combinatorial algorithms
13        for parallel, unstructured, and/or adaptive scientific
14        applications.  Zoltan's largest component is a suite of dynamic
15        load-balancing and partitioning algorithms that increase
16        applications' parallel performance by reducing idle time.  Zoltan
17        also has graph coloring and graph ordering algorithms, which are
18        useful in task schedulers and parallel preconditioners.
19 
20     """
21 
22     homepage = "http://www.cs.sandia.gov/zoltan"
23     url      = "http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions/zoltan_distrib_v3.83.tar.gz"
24 
25     version('3.83', sha256='d0d78fdeab7a385c87d3666b8a8dc748994ff04d3fd846872a4845e12d79c1bb')
26     version('3.8', sha256='5bdd46548fb9c73b225bbcf3d206c558c318cb292f0b19645e536315d14aafb7')
27     version('3.6', sha256='d2cb41e5fb72ca564b24bc5f21d82d9f7992f2c977bc82b243a01a8a8ee4eb9c')
28     version('3.3', sha256='8a90585674ab1bbd011dab29f778b9816519712c78d0aab4cdde9c68f02b30dc')
29 
30     patch('notparallel.patch', when='@3.8')
31 
32     variant('debug', default=False, description='Builds a debug version of the library.')
33     variant('shared', default=True, description='Builds a shared version of the library.')
34 
35     variant('fortran', default=True, description='Enable Fortran support.')
36     variant('mpi', default=True, description='Enable MPI support.')
37     variant('parmetis', default=False, description='Enable ParMETIS support.')
38     variant('int64', default=False, description='Enable 64bit indices.')
39 
40     depends_on('mpi', when='+mpi')
41 
42     depends_on('parmetis@4:', when='+parmetis')
43     depends_on('metis+int64', when='+parmetis+int64')
44     depends_on('metis', when='+parmetis')
45 
46     depends_on('perl@:5.21', type='build', when='@:3.6')
47     depends_on('autoconf', type='build')
48     depends_on('automake', type='build')
49     depends_on('m4', type='build')
50 
51     conflicts('+parmetis', when='~mpi')
52 
53     build_directory = 'spack-build'
54 
55     @property
56     def configure_directory(self):
57         spec = self.spec
58 
59         # FIXME: The older Zoltan versions fail to compile the F90 MPI wrappers
60         # because of some complicated generic type problem.
61         if spec.satisfies('@:3.6+fortran+mpi'):
62             raise RuntimeError(('Cannot build Zoltan v{0} with +fortran and '
63                                 '+mpi; please disable one of these features '
64                                 'or upgrade versions.').format(self.version))
65         if spec.satisfies('@:3.6'):
66             zoltan_path = 'Zoltan_v{0}'.format(self.version)
67             return zoltan_path
68         return '.'
69 
70     @property
71     def parallel(self):
72         # NOTE: Earlier versions of Zoltan cannot be built in parallel
73         # because they contain nested Makefile dependency bugs.
74         return not self.spec.satisfies('@:3.6+fortran')
75 
76     def autoreconf(self, spec, prefix):
77         autoreconf = which('autoreconf')
78         with working_dir(self.configure_directory):
79             autoreconf('-ivf')
80 
81     def configure_args(self):
82         spec = self.spec
83 
84         config_args = [
85             self.get_config_flag('f90interface', 'fortran'),
86             self.get_config_flag('mpi', 'mpi'),
87         ]
88         config_cflags = [
89             '-O0' if '+debug' in spec else '-O3',
90             '-g' if '+debug' in spec else '',
91         ]
92 
93         config_ldflags = []
94         # PGI runtime libraries
95         if '%pgi' in spec:
96             config_ldflags.append('-pgf90libs')
97         if '+shared' in spec:
98             config_args.extend([
99                 'RANLIB=echo',
100                 '--with-ar=$(CXX) -shared $(LDFLAGS) -o'
101             ])
102             config_cflags.append(self.compiler.cc_pic_flag)
103             if spec.satisfies('%gcc'):
104                 config_args.append('--with-libs=-lgfortran')
105             if spec.satisfies('%intel'):
106                 config_args.append('--with-libs=-lifcore')
107 
108         if '+int64' in spec:
109             config_args.append('--with-id-type=ulong')
110 
111         if '+parmetis' in spec:
112             parmetis_prefix = spec['parmetis'].prefix
113             config_args.extend([
114                 '--with-parmetis',
115                 '--with-parmetis-libdir={0}'.format(parmetis_prefix.lib),
116                 '--with-parmetis-incdir={0}'.format(parmetis_prefix.include),
117                 '--with-incdirs=-I{0}'.format(spec['metis'].prefix.include),
118                 '--with-ldflags=-L{0}'.format(spec['metis'].prefix.lib)
119             ])
120             if '+int64' in spec['metis']:
121                 config_args.append('--with-id-type=ulong')
122             else:
123                 config_args.append('--with-id-type=uint')
124 
125         if '+mpi' in spec:
126             config_args.extend([
127                 'CC={0}'.format(spec['mpi'].mpicc),
128                 'CXX={0}'.format(spec['mpi'].mpicxx),
129                 'FC={0}'.format(spec['mpi'].mpifc),
130                 '--with-mpi={0}'.format(spec['mpi'].prefix),
131 
132                 # NOTE: Zoltan assumes that it's linking against an MPI library
133                 # that can be found with '-lmpi' which isn't the case for many
134                 # MPI packages. We rely on the MPI-wrappers to automatically
135                 # add what is required for linking and thus pass an empty
136                 # list of libs
137                 '--with-mpi-libs= '
138             ])
139 
140         config_fcflags = config_cflags[:]
141         if spec.satisfies('%gcc@10:+fortran'):
142             config_fcflags.append('-fallow-argument-mismatch')
143         # NOTE: Early versions of Zoltan come packaged with a few embedded
144         # library packages (e.g. ParMETIS, Scotch), which messes with Spack's
145         # ability to descend directly into the package's source directory.
146         config_args.extend([
147             '--with-cflags={0}'.format(' '.join(config_cflags)),
148             '--with-cxxflags={0}'.format(' '.join(config_cflags)),
149             '--with-fcflags={0}'.format(' '.join(config_fcflags)),
150             '--with-ldflags={0}'.format(' '.join(config_ldflags))
151         ])
152         return config_args
153 
154     # NOTE: Unfortunately, Zoltan doesn't provide any configuration
155     # options for the extension of the output library files, so this
156     # script must change these extensions as a post-processing step.
157     @run_after('install')
158     def solib_install(self):
159         if '+shared' in self.spec:
160             for lib_path in find(self.spec.prefix.lib, 'lib*.a'):
161                 lib_shared_name = re.sub(r'\.a$', '.{0}'.format(dso_suffix),
162                                          lib_path)
163                 move(lib_path, lib_shared_name)
164 
165     def get_config_flag(self, flag_name, flag_variant):
166         flag_pre = 'en' if '+{0}'.format(flag_variant) in self.spec else 'dis'
167         return '--{0}able-{1}'.format(flag_pre, flag_name)
168
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py
--- a/var/spack/repos/builtin/packages/zoltan/package.py
+++ b/var/spack/repos/builtin/packages/zoltan/package.py
@@ -39,6 +39,7 @@
 
     depends_on('mpi', when='+mpi')
 
+    depends_on('parmetis@4: +int64', when='+parmetis+int64')
     depends_on('parmetis@4:', when='+parmetis')
     depends_on('metis+int64', when='+parmetis+int64')
     depends_on('metis', when='+parmetis')

{"golden_diff": "diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py\n--- a/var/spack/repos/builtin/packages/zoltan/package.py\n+++ b/var/spack/repos/builtin/packages/zoltan/package.py\n@@ -39,6 +39,7 @@\n \n     depends_on('mpi', when='+mpi')\n \n+    depends_on('parmetis@4: +int64', when='+parmetis+int64')\n     depends_on('parmetis@4:', when='+parmetis')\n     depends_on('metis+int64', when='+parmetis+int64')\n     depends_on('metis', when='+parmetis')\n", "issue": "improve installation of Zoltran: imposing +int64 constrains on parmetis\n<!--*Please add a concise summary of your suggestion here.*-->\r\n\r\n### Rationale\r\nzoltan spec has a variant called  `int64` which imposes the corresponding constrain on metis. \r\nhttps://github.com/spack/spack/blob/6947951aaf9954b1dfd12ca7a9266d7335f07105/var/spack/repos/builtin/packages/zoltan/package.py#L37-L44\r\n\r\nThe same constrain must be applied to parmetis. \r\n\r\n\r\n<!--*Is your feature request related to a problem? Please describe it!*-->\r\n\r\n### Description\r\nI guess a solution can be something like\r\n```\r\ndepends_on('parmetis@4:', when='+parmetis') \r\ndepends_on('parmetis@4: +int64', when='+parmetis+int64')\r\n```\r\n\r\n<!--*Describe the solution you'd like and the alternatives you have considered.*-->\r\n\r\n\r\n### Additional information\r\n<!--*Add any other context about the feature request here.*-->\r\nI guess this happens because parmetis package has been recently updated and `int64` has been added. Because there was no such an option in parmetis for a long time people came up with a workaround by specifying `metis+int64` explicitly in their script. The parametis update brings an inconsistency because `int64`   is off by default in parmetis, however, and the ''legacy'' workaround imposes `int64` on metis.\r\nMy spack version is 0.16.0\r\n\r\n### General information\r\n\r\n- [x] I have run `spack --version` and reported the version of Spack\r\n- [x] I have searched the issues of this repo and believe this is not a duplicate\r\n\r\n\r\n\r\n<!--If you want to ask a question about the tool (how to use it, what it can currently do, etc.), try the `#general` channel on our Slack first. We have a welcoming community and chances are you'll get your reply faster and without opening an issue.\r\n\r\nOther than that, thanks for taking the time to contribute to Spack!\r\n-->\n", "before_files": [{"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\n\nfrom spack import *\nimport re\n\n\nclass Zoltan(AutotoolsPackage):\n    \"\"\"The Zoltan library is a toolkit of parallel combinatorial algorithms\n       for parallel, unstructured, and/or adaptive scientific\n       applications.  Zoltan's largest component is a suite of dynamic\n       load-balancing and partitioning algorithms that increase\n       applications' parallel performance by reducing idle time.  Zoltan\n       also has graph coloring and graph ordering algorithms, which are\n       useful in task schedulers and parallel preconditioners.\n\n    \"\"\"\n\n    homepage = \"http://www.cs.sandia.gov/zoltan\"\n    url      = \"http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions/zoltan_distrib_v3.83.tar.gz\"\n\n    version('3.83', sha256='d0d78fdeab7a385c87d3666b8a8dc748994ff04d3fd846872a4845e12d79c1bb')\n    version('3.8', sha256='5bdd46548fb9c73b225bbcf3d206c558c318cb292f0b19645e536315d14aafb7')\n    version('3.6', sha256='d2cb41e5fb72ca564b24bc5f21d82d9f7992f2c977bc82b243a01a8a8ee4eb9c')\n    version('3.3', sha256='8a90585674ab1bbd011dab29f778b9816519712c78d0aab4cdde9c68f02b30dc')\n\n    patch('notparallel.patch', when='@3.8')\n\n    variant('debug', default=False, description='Builds a debug version of the library.')\n    variant('shared', default=True, description='Builds a shared version of the library.')\n\n    variant('fortran', default=True, description='Enable Fortran support.')\n    variant('mpi', default=True, description='Enable MPI support.')\n    variant('parmetis', default=False, description='Enable ParMETIS support.')\n    variant('int64', default=False, description='Enable 64bit indices.')\n\n    depends_on('mpi', when='+mpi')\n\n    depends_on('parmetis@4:', when='+parmetis')\n    depends_on('metis+int64', when='+parmetis+int64')\n    depends_on('metis', when='+parmetis')\n\n    depends_on('perl@:5.21', type='build', when='@:3.6')\n    depends_on('autoconf', type='build')\n    depends_on('automake', type='build')\n    depends_on('m4', type='build')\n\n    conflicts('+parmetis', when='~mpi')\n\n    build_directory = 'spack-build'\n\n    @property\n    def configure_directory(self):\n        spec = self.spec\n\n        # FIXME: The older Zoltan versions fail to compile the F90 MPI wrappers\n        # because of some complicated generic type problem.\n        if spec.satisfies('@:3.6+fortran+mpi'):\n            raise RuntimeError(('Cannot build Zoltan v{0} with +fortran and '\n                                '+mpi; please disable one of these features '\n                                'or upgrade versions.').format(self.version))\n        if spec.satisfies('@:3.6'):\n            zoltan_path = 'Zoltan_v{0}'.format(self.version)\n            return zoltan_path\n        return '.'\n\n    @property\n    def parallel(self):\n        # NOTE: Earlier versions of Zoltan cannot be built in parallel\n        # because they contain nested Makefile dependency bugs.\n        return not self.spec.satisfies('@:3.6+fortran')\n\n    def autoreconf(self, spec, prefix):\n        autoreconf = which('autoreconf')\n        with working_dir(self.configure_directory):\n            autoreconf('-ivf')\n\n    def configure_args(self):\n        spec = self.spec\n\n        config_args = [\n            self.get_config_flag('f90interface', 'fortran'),\n            self.get_config_flag('mpi', 'mpi'),\n        ]\n        config_cflags = [\n            '-O0' if '+debug' in spec else '-O3',\n            '-g' if '+debug' in spec else '',\n        ]\n\n        config_ldflags = []\n        # PGI runtime libraries\n        if '%pgi' in spec:\n            config_ldflags.append('-pgf90libs')\n        if '+shared' in spec:\n            config_args.extend([\n                'RANLIB=echo',\n                '--with-ar=$(CXX) -shared $(LDFLAGS) -o'\n            ])\n            config_cflags.append(self.compiler.cc_pic_flag)\n            if spec.satisfies('%gcc'):\n                config_args.append('--with-libs=-lgfortran')\n            if spec.satisfies('%intel'):\n                config_args.append('--with-libs=-lifcore')\n\n        if '+int64' in spec:\n            config_args.append('--with-id-type=ulong')\n\n        if '+parmetis' in spec:\n            parmetis_prefix = spec['parmetis'].prefix\n            config_args.extend([\n                '--with-parmetis',\n                '--with-parmetis-libdir={0}'.format(parmetis_prefix.lib),\n                '--with-parmetis-incdir={0}'.format(parmetis_prefix.include),\n                '--with-incdirs=-I{0}'.format(spec['metis'].prefix.include),\n                '--with-ldflags=-L{0}'.format(spec['metis'].prefix.lib)\n            ])\n            if '+int64' in spec['metis']:\n                config_args.append('--with-id-type=ulong')\n            else:\n                config_args.append('--with-id-type=uint')\n\n        if '+mpi' in spec:\n            config_args.extend([\n                'CC={0}'.format(spec['mpi'].mpicc),\n                'CXX={0}'.format(spec['mpi'].mpicxx),\n                'FC={0}'.format(spec['mpi'].mpifc),\n                '--with-mpi={0}'.format(spec['mpi'].prefix),\n\n                # NOTE: Zoltan assumes that it's linking against an MPI library\n                # that can be found with '-lmpi' which isn't the case for many\n                # MPI packages. We rely on the MPI-wrappers to automatically\n                # add what is required for linking and thus pass an empty\n                # list of libs\n                '--with-mpi-libs= '\n            ])\n\n        config_fcflags = config_cflags[:]\n        if spec.satisfies('%gcc@10:+fortran'):\n            config_fcflags.append('-fallow-argument-mismatch')\n        # NOTE: Early versions of Zoltan come packaged with a few embedded\n        # library packages (e.g. ParMETIS, Scotch), which messes with Spack's\n        # ability to descend directly into the package's source directory.\n        config_args.extend([\n            '--with-cflags={0}'.format(' '.join(config_cflags)),\n            '--with-cxxflags={0}'.format(' '.join(config_cflags)),\n            '--with-fcflags={0}'.format(' '.join(config_fcflags)),\n            '--with-ldflags={0}'.format(' '.join(config_ldflags))\n        ])\n        return config_args\n\n    # NOTE: Unfortunately, Zoltan doesn't provide any configuration\n    # options for the extension of the output library files, so this\n    # script must change these extensions as a post-processing step.\n    @run_after('install')\n    def solib_install(self):\n        if '+shared' in self.spec:\n            for lib_path in find(self.spec.prefix.lib, 'lib*.a'):\n                lib_shared_name = re.sub(r'\\.a$', '.{0}'.format(dso_suffix),\n                                         lib_path)\n                move(lib_path, lib_shared_name)\n\n    def get_config_flag(self, flag_name, flag_variant):\n        flag_pre = 'en' if '+{0}'.format(flag_variant) in self.spec else 'dis'\n        return '--{0}able-{1}'.format(flag_pre, flag_name)\n", "path": "var/spack/repos/builtin/packages/zoltan/package.py"}], "after_files": [{"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\n\nfrom spack import *\nimport re\n\n\nclass Zoltan(AutotoolsPackage):\n    \"\"\"The Zoltan library is a toolkit of parallel combinatorial algorithms\n       for parallel, unstructured, and/or adaptive scientific\n       applications.  Zoltan's largest component is a suite of dynamic\n       load-balancing and partitioning algorithms that increase\n       applications' parallel performance by reducing idle time.  Zoltan\n       also has graph coloring and graph ordering algorithms, which are\n       useful in task schedulers and parallel preconditioners.\n\n    \"\"\"\n\n    homepage = \"http://www.cs.sandia.gov/zoltan\"\n    url      = \"http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions/zoltan_distrib_v3.83.tar.gz\"\n\n    version('3.83', sha256='d0d78fdeab7a385c87d3666b8a8dc748994ff04d3fd846872a4845e12d79c1bb')\n    version('3.8', sha256='5bdd46548fb9c73b225bbcf3d206c558c318cb292f0b19645e536315d14aafb7')\n    version('3.6', sha256='d2cb41e5fb72ca564b24bc5f21d82d9f7992f2c977bc82b243a01a8a8ee4eb9c')\n    version('3.3', sha256='8a90585674ab1bbd011dab29f778b9816519712c78d0aab4cdde9c68f02b30dc')\n\n    patch('notparallel.patch', when='@3.8')\n\n    variant('debug', default=False, description='Builds a debug version of the library.')\n    variant('shared', default=True, description='Builds a shared version of the library.')\n\n    variant('fortran', default=True, description='Enable Fortran support.')\n    variant('mpi', default=True, description='Enable MPI support.')\n    variant('parmetis', default=False, description='Enable ParMETIS support.')\n    variant('int64', default=False, description='Enable 64bit indices.')\n\n    depends_on('mpi', when='+mpi')\n\n    depends_on('parmetis@4: +int64', when='+parmetis+int64')\n    depends_on('parmetis@4:', when='+parmetis')\n    depends_on('metis+int64', when='+parmetis+int64')\n    depends_on('metis', when='+parmetis')\n\n    depends_on('perl@:5.21', type='build', when='@:3.6')\n    depends_on('autoconf', type='build')\n    depends_on('automake', type='build')\n    depends_on('m4', type='build')\n\n    conflicts('+parmetis', when='~mpi')\n\n    build_directory = 'spack-build'\n\n    @property\n    def configure_directory(self):\n        spec = self.spec\n\n        # FIXME: The older Zoltan versions fail to compile the F90 MPI wrappers\n        # because of some complicated generic type problem.\n        if spec.satisfies('@:3.6+fortran+mpi'):\n            raise RuntimeError(('Cannot build Zoltan v{0} with +fortran and '\n                                '+mpi; please disable one of these features '\n                                'or upgrade versions.').format(self.version))\n        if spec.satisfies('@:3.6'):\n            zoltan_path = 'Zoltan_v{0}'.format(self.version)\n            return zoltan_path\n        return '.'\n\n    @property\n    def parallel(self):\n        # NOTE: Earlier versions of Zoltan cannot be built in parallel\n        # because they contain nested Makefile dependency bugs.\n        return not self.spec.satisfies('@:3.6+fortran')\n\n    def autoreconf(self, spec, prefix):\n        autoreconf = which('autoreconf')\n        with working_dir(self.configure_directory):\n            autoreconf('-ivf')\n\n    def configure_args(self):\n        spec = self.spec\n\n        config_args = [\n            self.get_config_flag('f90interface', 'fortran'),\n            self.get_config_flag('mpi', 'mpi'),\n        ]\n        config_cflags = [\n            '-O0' if '+debug' in spec else '-O3',\n            '-g' if '+debug' in spec else '',\n        ]\n\n        config_ldflags = []\n        # PGI runtime libraries\n        if '%pgi' in spec:\n            config_ldflags.append('-pgf90libs')\n        if '+shared' in spec:\n            config_args.extend([\n                'RANLIB=echo',\n                '--with-ar=$(CXX) -shared $(LDFLAGS) -o'\n            ])\n            config_cflags.append(self.compiler.cc_pic_flag)\n            if spec.satisfies('%gcc'):\n                config_args.append('--with-libs=-lgfortran')\n            if spec.satisfies('%intel'):\n                config_args.append('--with-libs=-lifcore')\n\n        if '+int64' in spec:\n            config_args.append('--with-id-type=ulong')\n\n        if '+parmetis' in spec:\n            parmetis_prefix = spec['parmetis'].prefix\n            config_args.extend([\n                '--with-parmetis',\n                '--with-parmetis-libdir={0}'.format(parmetis_prefix.lib),\n                '--with-parmetis-incdir={0}'.format(parmetis_prefix.include),\n                '--with-incdirs=-I{0}'.format(spec['metis'].prefix.include),\n                '--with-ldflags=-L{0}'.format(spec['metis'].prefix.lib)\n            ])\n            if '+int64' in spec['metis']:\n                config_args.append('--with-id-type=ulong')\n            else:\n                config_args.append('--with-id-type=uint')\n\n        if '+mpi' in spec:\n            config_args.extend([\n                'CC={0}'.format(spec['mpi'].mpicc),\n                'CXX={0}'.format(spec['mpi'].mpicxx),\n                'FC={0}'.format(spec['mpi'].mpifc),\n                '--with-mpi={0}'.format(spec['mpi'].prefix),\n\n                # NOTE: Zoltan assumes that it's linking against an MPI library\n                # that can be found with '-lmpi' which isn't the case for many\n                # MPI packages. We rely on the MPI-wrappers to automatically\n                # add what is required for linking and thus pass an empty\n                # list of libs\n                '--with-mpi-libs= '\n            ])\n\n        config_fcflags = config_cflags[:]\n        if spec.satisfies('%gcc@10:+fortran'):\n            config_fcflags.append('-fallow-argument-mismatch')\n        # NOTE: Early versions of Zoltan come packaged with a few embedded\n        # library packages (e.g. ParMETIS, Scotch), which messes with Spack's\n        # ability to descend directly into the package's source directory.\n        config_args.extend([\n            '--with-cflags={0}'.format(' '.join(config_cflags)),\n            '--with-cxxflags={0}'.format(' '.join(config_cflags)),\n            '--with-fcflags={0}'.format(' '.join(config_fcflags)),\n            '--with-ldflags={0}'.format(' '.join(config_ldflags))\n        ])\n        return config_args\n\n    # NOTE: Unfortunately, Zoltan doesn't provide any configuration\n    # options for the extension of the output library files, so this\n    # script must change these extensions as a post-processing step.\n    @run_after('install')\n    def solib_install(self):\n        if '+shared' in self.spec:\n            for lib_path in find(self.spec.prefix.lib, 'lib*.a'):\n                lib_shared_name = re.sub(r'\\.a$', '.{0}'.format(dso_suffix),\n                                         lib_path)\n                move(lib_path, lib_shared_name)\n\n    def get_config_flag(self, flag_name, flag_variant):\n        flag_pre = 'en' if '+{0}'.format(flag_variant) in self.spec else 'dis'\n        return '--{0}able-{1}'.format(flag_pre, flag_name)\n", "path": "var/spack/repos/builtin/packages/zoltan/package.py"}]}