git: bea3c6ba3b06 - main - devel/corrosion: New port: Easy Rust and C/C++ integration

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Mon, 06 May 2024 08:23:33 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bea3c6ba3b06a43e5953d06299540639f489a484

commit bea3c6ba3b06a43e5953d06299540639f489a484
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-05-06 08:22:52 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-05-06 08:23:25 +0000

    devel/corrosion: New port: Easy Rust and C/C++ integration
---
 devel/Makefile            |  1 +
 devel/corrosion/Makefile  | 31 +++++++++++++++++++++++++++++++
 devel/corrosion/distinfo  |  3 +++
 devel/corrosion/pkg-descr |  4 ++++
 4 files changed, 39 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index aa1e59771040..26c2b4d93aa5 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -454,6 +454,7 @@
     SUBDIR += containers
     SUBDIR += convco
     SUBDIR += corrade
+    SUBDIR += corrosion
     SUBDIR += courier-unicode
     SUBDIR += coursier
     SUBDIR += covtool
diff --git a/devel/corrosion/Makefile b/devel/corrosion/Makefile
new file mode 100644
index 000000000000..11d2a25fbd00
--- /dev/null
+++ b/devel/corrosion/Makefile
@@ -0,0 +1,31 @@
+PORTNAME=	corrosion
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.4.9
+CATEGORIES=	devel
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Easy Rust and C/C++ integration
+WWW=		https://corrosion-rs.github.io/corrosion/
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	rustc:lang/rust
+RUN_DEPENDS=	rustc:lang/rust
+
+USES=		cmake:testing compiler:c++14-lang
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	corrosion-rs
+
+PLIST_FILES=	lib/cmake/Corrosion/CorrosionConfig.cmake \
+		lib/cmake/Corrosion/CorrosionConfigVersion.cmake \
+		share/cmake/Corrosion.cmake \
+		share/cmake/CorrosionGenerator.cmake \
+		share/cmake/FindRust.cmake
+
+CMAKE_TESTING_ON=	CORROSION_BUILD_TESTS # 2 tests fail
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/corrosion/distinfo b/devel/corrosion/distinfo
new file mode 100644
index 000000000000..1e449b61f573
--- /dev/null
+++ b/devel/corrosion/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1714978036
+SHA256 (corrosion-rs-corrosion-v0.4.9_GH0.tar.gz) = 3346b21c4986c077988e10a19b8737a7b56f6f84ef8e800058b58d1f138e8fa9
+SIZE (corrosion-rs-corrosion-v0.4.9_GH0.tar.gz) = 89764
diff --git a/devel/corrosion/pkg-descr b/devel/corrosion/pkg-descr
new file mode 100644
index 000000000000..a72436f1f30c
--- /dev/null
+++ b/devel/corrosion/pkg-descr
@@ -0,0 +1,4 @@
+Corrosion, formerly known as cmake-cargo, is a tool for integrating Rust into an
+existing CMake project. Corrosion can automatically import executables, static
+libraries, and dynamic libraries from a workspace or package manifest
+(Cargo.toml file).