summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarmac <xiaojun2@hisilicon.com>2020-03-28 00:35:08 +0800
committerGitHub <noreply@github.com>2020-03-27 11:35:08 -0500
commitd7454baa558e28bb3135bfeb03510da323a467a9 (patch)
tree3e94afbd2d4f1ccd1779b1c6ddea634e2a147340
parentc3e41444ffe39f158412ac3619bc78a750c2dac2 (diff)
downloadspack-d7454baa558e28bb3135bfeb03510da323a467a9.tar.gz
spack-d7454baa558e28bb3135bfeb03510da323a467a9.tar.bz2
spack-d7454baa558e28bb3135bfeb03510da323a467a9.tar.xz
spack-d7454baa558e28bb3135bfeb03510da323a467a9.zip
util-linux: add libmount variant (#15631)
-rw-r--r--var/spack/repos/builtin/packages/util-linux/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/util-linux/package.py b/var/spack/repos/builtin/packages/util-linux/package.py
index d4887601a0..ccd6bba9aa 100644
--- a/var/spack/repos/builtin/packages/util-linux/package.py
+++ b/var/spack/repos/builtin/packages/util-linux/package.py
@@ -24,15 +24,22 @@ class UtilLinux(AutotoolsPackage):
depends_on('python@2.7:')
depends_on('pkgconfig')
+ depends_on('gettext', when='+libmount')
# Make it possible to disable util-linux's libuuid so that you may
# reliably depend_on(`libuuid`).
variant('libuuid', default=True, description='Build libuuid')
+ variant('libmount', default=False, description='Build libmount.so with gettext')
def url_for_version(self, version):
url = "https://www.kernel.org/pub/linux/utils/util-linux/v{0}/util-linux-{1}.tar.gz"
return url.format(version.up_to(2), version)
+ def setup_build_environment(self, env):
+ if '+libmount' in self.spec:
+ env.append_flags('LDFLAGS', '-L{0} -lintl'.format(
+ self.spec['gettext'].prefix.lib))
+
def configure_args(self):
config_args = [
'--disable-use-tty-group',