2019-01-01 14:04:23 +08:00
|
|
|
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2016-12-27 16:17:12 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2016-05-17 00:06:03 +08:00
|
|
|
from spack import *
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
class RustBindgen(Package):
|
|
|
|
"""The rust programming language toolchain"""
|
|
|
|
homepage = "http://www.rust-lang.org"
|
2017-04-04 06:34:16 +08:00
|
|
|
url = "https://github.com/servo/rust-bindgen/archive/v0.20.5.tar.gz"
|
2016-05-17 00:06:03 +08:00
|
|
|
|
2017-04-04 06:34:16 +08:00
|
|
|
version('0.20.5', '3e4d70a5bec540324fdd95bc9e82bebc')
|
2016-05-19 01:57:11 +08:00
|
|
|
|
2016-05-17 00:06:03 +08:00
|
|
|
extends("rust")
|
2016-05-23 02:14:46 +08:00
|
|
|
depends_on("llvm")
|
2016-05-17 00:06:03 +08:00
|
|
|
|
|
|
|
def install(self, spec, prefix):
|
2016-05-23 02:14:46 +08:00
|
|
|
env = dict(os.environ)
|
|
|
|
env['LIBCLANG_PATH'] = os.path.join(spec['llvm'].prefix, 'lib')
|
|
|
|
cargo('install', '--root', prefix, env=env)
|