commit bddb5242f7bb1273ad4379f74eb68b639f1527fe Author: Tim Biermann <tbier@posteo.de> Date: Sun Oct 30 11:03:57 2022 +0000 cargo-c: initial commit, version 0.9.12 diff --git a/cargo-c/.footprint b/cargo-c/.footprint new file mode 100644 index 000000000..d9f7d3988 --- /dev/null +++ b/cargo-c/.footprint @@ -0,0 +1,6 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/cargo-capi +-rwxr-xr-x root/root usr/bin/cargo-cbuild +-rwxr-xr-x root/root usr/bin/cargo-cinstall +-rwxr-xr-x root/root usr/bin/cargo-ctest diff --git a/cargo-c/.signature b/cargo-c/.signature new file mode 100644 index 000000000..00974c304 --- /dev/null +++ b/cargo-c/.signature @@ -0,0 +1,5 @@ +untrusted comment: verify with /etc/ports/contrib.pub +RWSagIOpLGJF33u1mwnDoa/L+sk1HxqLQVmUQJYlOJxe0bRvV3qmmwgPqOiTMiUsDwo3MHQoFpOGbCouIic+coNDK+4/Hor6DQk= +SHA256 (Pkgfile) = 2b13abd92c7ce9777c2c78a5e5346c295eb071173788a952c94bcd1517e4d0d9 +SHA256 (.footprint) = 120f05ca57fb0dbc82b26d55fe14f3719e1bf43681a430bb813e7310a9a6a1e0 +SHA256 (cargo-c-0.9.12.tar.gz) = d700c6cc93d06c5ed7a887f51d87d47e88e783dfc1b28d00b951625c4d3ce509 diff --git a/cargo-c/Pkgfile b/cargo-c/Pkgfile new file mode 100644 index 000000000..2f064bc13 --- /dev/null +++ b/cargo-c/Pkgfile @@ -0,0 +1,19 @@ +# Description: A cargo subcommand to build and install C-ABI compatibile dynamic and static libraries +# URL: https://github.com/lu-zero/cargo-c/ +# Maintainer: Tim Biermann, tbier at posteo dot de +# Depends on: rust + +name=cargo-c +version=0.9.12 +release=1 +source=(https://github.com/lu-zero/cargo-c/archive/v$version/$name-$version.tar.gz) + +build() { + prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache + [[ ! -e $PKGMK_SOURCE_DIR/rust ]] && mkdir $PKGMK_SOURCE_DIR/rust + + export CFLAGS+=' -ffat-lto-objects' + cargo build --release --manifest-path $name-$version/Cargo.toml + + cargo install --offline --no-track --path $name-$version --root $PKG/usr +}