Files
haikuports/dev-rust/cargo_c/cargo_c-0.9.8.recipe
2023-07-11 07:35:45 +00:00

73 lines
1.9 KiB
Bash

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="2020 Luca Barbato"
LICENSE="MIT"
REVISION="3"
SOURCE_URI="https://github.com/lu-zero/cargo-c/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="7c649061826e0ad3c2c8735718f4a0c4afd12eed9b9fdc5fe59e34582902e1c5"
SOURCE_URI_2="https://github.com/lu-zero/cargo-c/releases/download/v$portVersion/Cargo.lock#noarchive"
CHECKSUM_SHA256_2="11f23a09ef06ca2125027e24574124a99089863fb4226570b6adbe317848b670"
SOURCE_DIR="cargo-c-$portVersion"
PATCHES="cargo_c-$portVersion.patchset"
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 >= 0.70
cmd:gcc$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cp $sourceDir2/Cargo.lock Cargo.lock
cargo fetch --locked
}
INSTALL()
{
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
}