blob: 1d3c59ddaee7e539802a8941d73ddb7cdb24ab96 (
plain)
1 # Description: Generate C bindings from rust code
2 # URL: https://github.com/eqrion/cbindgen
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: rust
5 # Optional: sccache
6
7 name=cbindgen
8 version=0.24.3
9 release=1
10 source=(https://github.com/eqrion/cbindgen/archive/v$version/$name-v$version.tar.gz)
11
12 build() {
13 cd $name-$version
14
15 prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
16 mkdir "$PKGMK_SOURCE_DIR/rust" || true
17 export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
18
19 cargo fetch --locked --target x86_64-unknown-linux-gnu
20 cargo build --release --frozen --all-targets
21 install -Dt $PKG/usr/bin target/release/cbindgen
22 }
|