mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-21 12:24:17 +08:00
34 lines
812 B
TOML
34 lines
812 B
TOML
[source]
|
|
git = "https://github.com/rust-lang/cargo.git"
|
|
rev = "d73d2caf9e41a39daf2a8d6ce60ec80bf354d2a7" # 0.86
|
|
patches = [
|
|
"redox.patch"
|
|
]
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"curl",
|
|
"libssh2",
|
|
"nghttp2",
|
|
"openssl1",
|
|
"zlib",
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
|
export LIBZ_SYS_STATIC=1
|
|
export DEP_NGHTTP2_ROOT="${COOKBOOK_SYSROOT}"
|
|
export DEP_OPENSSL_ROOT="${COOKBOOK_SYSROOT}"
|
|
export DEP_Z_ROOT="${COOKBOOK_SYSROOT}"
|
|
"${COOKBOOK_CARGO}" rustc \
|
|
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
|
--release \
|
|
--bin cargo \
|
|
-- \
|
|
-L "${COOKBOOK_SYSROOT}/lib" \
|
|
-C link-arg=-Wl,-rpath-link,${COOKBOOK_SYSROOT}/lib
|
|
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
|
cp -v "target/${TARGET}/release/cargo" "${COOKBOOK_STAGE}/usr/bin/cargo"
|
|
"""
|