1
0
forked from ports/contrib
contrib/cbindgen/Pkgfile

23 lines
622 B
Plaintext
Raw Normal View History

2018-12-26 21:16:30 +11: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 21:16:30 +11:00
# Depends on: rust
# Optional: sccache
name=cbindgen
2023-09-20 11:26:52 +00:00
version=0.26.0
2020-04-11 23:27:55 +10:00
release=1
source=(https://github.com/mozilla/$name/archive/v$version/$name-v$version.tar.gz)
2018-12-26 21:16:30 +11:00
build() {
cd $name-$version
2019-05-08 22:50:24 +10:00
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
mkdir -p "$PKGMK_SOURCE_DIR/rust"
2019-05-19 02:38:37 +10:00
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
2018-12-26 21:16:30 +11:00
cargo fetch --target x86_64-unknown-linux-gnu
cargo build --release --frozen --bins
2020-04-06 22:58:29 +10:00
install -Dt $PKG/usr/bin target/release/cbindgen
2018-12-26 21:16:30 +11:00
}