diff --git a/dev-rust/cargo_c/cargo_c-0.9.32.recipe b/dev-rust/cargo_c/cargo_c-0.9.32.recipe new file mode 100644 index 000000000..ddefbad85 --- /dev/null +++ b/dev-rust/cargo_c/cargo_c-0.9.32.recipe @@ -0,0 +1,72 @@ +SUMMARY="Cargo applet to build and install C-ABI compatibile dynamic and static libraries" +DESCRIPTION="It produces and installs a correct pkg-config file, a static \ +library and a dynamic library, and a C header to be used by any C (and \ +C-compatible) software." +HOMEPAGE="https://github.com/lu-zero/cargo-c" +COPYRIGHT="2024 Luca Barbato" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/lu-zero/cargo-c/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="a96f3cc6c63d9901c9583083338d50b0132504bb067f68accc17f4116ed01f72" +SOURCE_URI_2="https://github.com/lu-zero/cargo-c/releases/download/v$portVersion/Cargo.lock#noarchive" +CHECKSUM_SHA256_2="77b5392f238960cf298b83e6d744c872f4180172ffa3c752850320ec051c4828" +SOURCE_DIR="cargo-c-$portVersion" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + cargo_c$secondaryArchSuffix + cmd:cargo_capi = $portVersion + cmd:cargo_cbuild = $portVersion + cmd:cargo_cinstall = $portVersion + cmd:cargo_ctest = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libcurl$secondaryArchSuffix + lib:libgit2$secondaryArchSuffix + lib:libssh2$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcrypto$secondaryArchSuffix + devel:libcurl$secondaryArchSuffix + devel:libgit2$secondaryArchSuffix + devel:libssh2$secondaryArchSuffix + devel:libssl$secondaryArchSuffix >= 1.1 + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cargo$secondaryArchSuffix + cmd:gcc$secondaryArchSuffix + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + cp $sourceDir2/Cargo.lock Cargo.lock + + cargo fetch --locked +} + +INSTALL() +{ + export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse + export LIBSSH2_SYS_USE_PKG_CONFIG=1 + export LIBGIT2_SYS_USE_PKG_CONFIG=1 + export PKG_CONFIG_ALLOW_CROSS=1 + + cargo install --locked --root $prefix --path . + + rm -f $prefix/{.crates.toml,.crates2.json} +} + +TEST() +{ + cargo test --release +}