git: 187646b9a44d - main - lang/c3c: New port: Compiler for the C3 language

From: Jimmy Olgeni <olgeni_at_FreeBSD.org>
Date: Sun, 12 Jul 2026 10:11:09 UTC
The branch main has been updated by olgeni:

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

commit 187646b9a44dc67758b866e574b32fb8e133ea1c
Author:     Jimmy Olgeni <olgeni@FreeBSD.org>
AuthorDate: 2026-07-11 19:24:37 +0000
Commit:     Jimmy Olgeni <olgeni@FreeBSD.org>
CommitDate: 2026-07-12 10:10:23 +0000

    lang/c3c: New port: Compiler for the C3 language
---
 lang/Makefile      |  1 +
 lang/c3c/Makefile  | 32 ++++++++++++++++++++++++++++++++
 lang/c3c/distinfo  |  3 +++
 lang/c3c/pkg-descr |  9 +++++++++
 lang/c3c/pkg-plist |  3 +++
 5 files changed, 48 insertions(+)

diff --git a/lang/Makefile b/lang/Makefile
index 4a6e6ff06b67..229d5c2233f6 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -20,6 +20,7 @@
     SUBDIR += bun
     SUBDIR += bwbasic
     SUBDIR += c
+    SUBDIR += c3c
     SUBDIR += cairo
     SUBDIR += cairo-language-server
     SUBDIR += cbmbasic
diff --git a/lang/c3c/Makefile b/lang/c3c/Makefile
new file mode 100644
index 000000000000..d154b683a30a
--- /dev/null
+++ b/lang/c3c/Makefile
@@ -0,0 +1,32 @@
+PORTNAME=	c3c
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.8.1
+CATEGORIES=	lang
+
+MAINTAINER=	olgeni@FreeBSD.org
+COMMENT=	Compiler for the C3 language
+WWW=		https://c3-lang.org/ \
+		https://github.com/c3lang/c3c
+
+LICENSE=	LGPL3 MIT
+LICENSE_COMB=	multi
+LICENSE_FILE_MIT=	${WRKSRC}/LICENSE
+
+USES=		cmake compiler:c++17-lang llvm:19
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	c3lang
+
+CMAKE_ARGS=	-DCMAKE_PREFIX_PATH="${LLVM_PREFIX};${LOCALBASE}"
+
+OPTIONS_DEFINE=		CURL
+OPTIONS_DEFAULT=	CURL
+
+CURL_DESC=		Vendor library fetching via libcurl
+CURL_LIB_DEPENDS=	libcurl.so:ftp/curl
+
+post-stage:
+	@cd ${STAGEDIR}${PREFIX} && \
+		${FIND} lib/c3 -type f | ${SORT} >> ${TMPPLIST}
+
+.include <bsd.port.mk>
diff --git a/lang/c3c/distinfo b/lang/c3c/distinfo
new file mode 100644
index 000000000000..886dd7d8b4ec
--- /dev/null
+++ b/lang/c3c/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1783779356
+SHA256 (c3lang-c3c-v0.8.1_GH0.tar.gz) = fb4091d3c8e33c3d348124396ee46a826289428c2e9e4afde23c936245bbda30
+SIZE (c3lang-c3c-v0.8.1_GH0.tar.gz) = 21431852
diff --git a/lang/c3c/pkg-descr b/lang/c3c/pkg-descr
new file mode 100644
index 000000000000..946f84130f8b
--- /dev/null
+++ b/lang/c3c/pkg-descr
@@ -0,0 +1,9 @@
+C3 is a programming language that is an evolution of C, enabling the same
+paradigms and retaining the same syntax as far as possible.
+
+It introduces module namespacing, generic modules, optional-based error
+handling, defer, slices, compile-time evaluation, contracts, and built-in
+support for foreign function interfaces, while staying binary compatible
+with C and keeping the low-level control C programmers expect.
+
+c3c is the C3 compiler, using LLVM as its backend.
diff --git a/lang/c3c/pkg-plist b/lang/c3c/pkg-plist
new file mode 100644
index 000000000000..066b22da39a8
--- /dev/null
+++ b/lang/c3c/pkg-plist
@@ -0,0 +1,3 @@
+bin/c3c
+share/man/man1/c3c.1.gz
+@comment lib/c3 generated dynamically in post-stage