contrib/cbindgen/Pkgfile

23 lines
643 B
Plaintext
Raw Normal View History

2018-12-26 11:16:30 +01:00
# 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
2020-10-08 14:12:26 +02:00
version=0.15.0
2020-04-11 15:27:55 +02:00
release=1
2020-05-01 15:44:14 +02:00
source=(https://github.com/eqrion/cbindgen/archive/v$version/$name-v$version.tar.gz)
2018-12-26 11:16:30 +01:00
build() {
cd $name-$version
2019-05-08 14:50:24 +02:00
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
2019-05-18 18:38:37 +02:00
mkdir "$PKGMK_SOURCE_DIR/rust" || true
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
2018-12-26 11:16:30 +01:00
2020-04-06 14:58:29 +02:00
cargo fetch --locked --target x86_64-unknown-linux-gnu
cargo build --release --frozen --all-targets
install -Dt $PKG/usr/bin target/release/cbindgen
2018-12-26 11:16:30 +01:00
}