23 lines
622 B
Plaintext
23 lines
622 B
Plaintext
# Description: Generate C bindings from rust code
|
|
# URL: https://github.com/eqrion/cbindgen
|
|
# Maintainer: John McQuah, jmcquah at disroot dot org
|
|
# Depends on: rust
|
|
# Optional: sccache
|
|
|
|
name=cbindgen
|
|
version=0.26.0
|
|
release=1
|
|
source=(https://github.com/mozilla/$name/archive/v$version/$name-v$version.tar.gz)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
|
mkdir -p "$PKGMK_SOURCE_DIR/rust"
|
|
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
|
|
|
cargo fetch --target x86_64-unknown-linux-gnu
|
|
cargo build --release --frozen --bins
|
|
install -Dt $PKG/usr/bin target/release/cbindgen
|
|
}
|