summaryrefslogtreecommitdiff
path: root/cbindgen/Pkgfile
blob: 7ef1b23cf3ea869fa8670f587e5c2b92dc65606d (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.14.1
    9 release=1
   10 source=(https://github.com/eqrion/cbindgen/archive/v$version/$name-v$version.tar.gz
   11 	firefox.patch)
   12 
   13 build() {
   14 	cd $name-$version
   15 
   16 	# https://github.com/eqrion/cbindgen/issues/500
   17 	patch -p1 -R -i $SRC/firefox.patch
   18 
   19 	prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
   20 	mkdir "$PKGMK_SOURCE_DIR/rust" || true
   21 	export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
   22 
   23 	cargo fetch --locked --target x86_64-unknown-linux-gnu
   24 	cargo build --release --frozen --all-targets
   25 	install -Dt $PKG/usr/bin target/release/cbindgen
   26 }

Generated by cgit