contrib/cbindgen/Pkgfile

23 lines
622 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: John McQuah, jmcquah at disroot dot org
2018-12-26 11:16:30 +01:00
# Depends on: rust
# Optional: sccache
name=cbindgen
2023-08-25 21:46:28 +02:00
version=0.25.0
2020-04-11 15:27:55 +02:00
release=1
source=(https://github.com/mozilla/$name/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
mkdir -p "$PKGMK_SOURCE_DIR/rust"
2019-05-18 18:38:37 +02:00
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
2018-12-26 11:16:30 +01:00
cargo fetch --target x86_64-unknown-linux-gnu
cargo build --release --frozen --bins
2020-04-06 14:58:29 +02:00
install -Dt $PKG/usr/bin target/release/cbindgen
2018-12-26 11:16:30 +01:00
}