2022-10-30 11:03:57 +00:00
|
|
|
# Description: A cargo subcommand to build and install C-ABI compatibile dynamic and static libraries
|
|
|
|
# URL: https://github.com/lu-zero/cargo-c/
|
|
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
2023-02-25 20:04:04 +01:00
|
|
|
# Depends on: libgit2 rust
|
2022-10-30 11:03:57 +00:00
|
|
|
|
|
|
|
name=cargo-c
|
2023-10-12 19:08:22 +02:00
|
|
|
version=0.9.27
|
2023-03-12 14:40:12 +01:00
|
|
|
release=1
|
2022-10-30 11:03:57 +00:00
|
|
|
source=(https://github.com/lu-zero/cargo-c/archive/v$version/$name-$version.tar.gz)
|
|
|
|
|
|
|
|
build() {
|
|
|
|
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
|
|
|
[[ ! -e $PKGMK_SOURCE_DIR/rust ]] && mkdir $PKGMK_SOURCE_DIR/rust
|
|
|
|
|
|
|
|
export CFLAGS+=' -ffat-lto-objects'
|
|
|
|
cargo build --release --manifest-path $name-$version/Cargo.toml
|
|
|
|
|
|
|
|
cargo install --offline --no-track --path $name-$version --root $PKG/usr
|
|
|
|
}
|