24 lines
593 B
Plaintext
24 lines
593 B
Plaintext
# Description: Generate C bindings from rust code
|
|
# URL: https://github.com/eqrion/cbindgen
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: rust
|
|
# Optional: sccache
|
|
|
|
name=cbindgen
|
|
version=0.11.1
|
|
release=1
|
|
source=(https://github.com/eqrion/cbindgen/archive/v$version/$name-v$version.tar.gz)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
|
mkdir "$PKGMK_SOURCE_DIR/rust" || true
|
|
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
|
|
|
cargo fetch
|
|
cargo build --release
|
|
cargo install --path . --root $PKG/usr
|
|
rm $PKG/usr/.crates.toml
|
|
}
|