pantry/projects/rust-lang.org/package.yml

89 lines
1.9 KiB
YAML
Raw Normal View History

2022-08-04 00:39:16 +03:00
distributable:
url: https://static.rust-lang.org/dist/rustc-{{ version }}-src.tar.gz
strip-components: 1
versions:
github: rust-lang/rust
strip: /^Rust /
2022-10-30 17:32:32 +03:00
companions:
rust-lang.org/cargo: '*'
2022-08-04 00:39:16 +03:00
2023-08-08 17:07:11 +03:00
display-name: rust
2023-08-08 12:24:35 +03:00
2022-08-04 00:39:16 +03:00
provides:
2022-10-27 09:05:13 +03:00
- bin/cargo-clippy
- bin/cargo-fmt
- bin/clippy-driver
- bin/rust-analyzer
2022-08-04 00:39:16 +03:00
- bin/rust-gdb
- bin/rust-gdbgui
2022-10-27 09:05:13 +03:00
- bin/rust-lldb
- bin/rustc
- bin/rustdoc
2022-10-27 09:05:13 +03:00
- bin/rustfmt
2022-08-04 00:39:16 +03:00
2022-10-30 17:32:32 +03:00
#TODO: unimplemented idea for the “options” feature
2022-08-04 00:39:16 +03:00
options:
- clippy
- rustfmt
- analysis
- { name: rust-demangler, default: false }
dependencies:
2023-10-02 06:11:32 +03:00
linux:
llvm.org: '*'
2022-10-30 17:32:32 +03:00
#FIXME ^^ strictly rustc only needs a linker
zlib.net: 1
2022-08-04 00:39:16 +03:00
build:
dependencies:
cmake.org: ^3.20
ninja-build.org: ^1.10
2023-10-03 18:23:56 +03:00
python.org: '>=3<3.12'
2022-10-27 09:05:13 +03:00
openssl.org: '*' # needed to build openssl-sys
freedesktop.org/pkg-config: ^0.29
2023-03-10 00:44:43 +03:00
crates.io/semverator: 0
2022-08-04 00:39:16 +03:00
script: |-
# --enable-optimize not available as of 1.63.0
2023-03-10 00:44:43 +03:00
if semverator satisfies '<1.63' {{ version }}; then
export ARGS="$ARGS --enable-optimize"
fi
2023-03-10 00:44:43 +03:00
# 1.68.0 introduced a regression w.r.t. CI builds
# https://github.com/rust-lang/rust/issues/108959
if semverator satisfies '>=1.68<1.70' {{ version }}; then
2023-04-20 21:21:50 +03:00
sed -i.bak -e 's/CiEnv::is_ci()/CiEnv::is_ci() \&\& config.rust_info.is_managed_git_subrepository()/' src/bootstrap/native.rs
2023-03-10 00:44:43 +03:00
rm src/bootstrap/native.rs.bak
fi
2022-08-04 00:39:16 +03:00
./configure $ARGS
make install
2022-10-27 09:05:13 +03:00
for tool in $tools; do
./x.py install $tool
done
2022-08-27 18:58:16 +03:00
rm -rf {{prefix}}/share/doc
2022-08-04 00:39:16 +03:00
env:
ARGS:
- --enable-vendor
- --prefix={{ prefix }}
- --enable-ninja
2023-10-02 06:11:32 +03:00
- --disable-docs # docs are online
- --tools=clippy,rustdoc,rustfmt,analysis
2022-10-27 09:05:13 +03:00
tools:
- clippy
- rustfmt
- rust-analyzer
2022-08-04 00:39:16 +03:00
test:
script: |
2023-03-10 00:44:43 +03:00
mv $FIXTURE hello.rs
rustc hello.rs
2022-08-04 00:39:16 +03:00
./hello
fixture: |
fn main() {
println!("Hello World!");
2022-10-30 17:32:32 +03:00
}