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

87 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
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
- 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:
tea.xyz/gx/cc: c99
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:
tea.xyz/gx/make: '*' #FIXME surely we dont need make AND ninja
cmake.org: ^3.20
ninja-build.org: ^1.10
python.org: 3
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 {{ version }}; then
sed -i.bak -e 's/if CiEnv::is_ci() {/if CiEnv::is_ci() \&\& config.rust_info.is_managed_git_subrepository() {/' src/bootstrap/native.rs
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
2022-08-27 18:58:16 +03:00
- --disable-docs # docs are online
- --tools=clippy,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
}