Re: git: 784de56b2037 - main - devel/reflection-cpp: add port: C++ static reflection support library

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Thu, 05 Jun 2025 18:46:02 UTC
On 2025-06-05 14:19, Hiroki Tagato wrote:
> The branch main has been updated by tagattie:
>
> URL:https://cgit.FreeBSD.org/ports/commit/?id=784de56b2037917686e211955aef96e0e0138246
>
> commit 784de56b2037917686e211955aef96e0e0138246
> Author:     Hiroki Tagato<tagattie@FreeBSD.org>
> AuthorDate: 2025-06-05 12:14:42 +0000
> Commit:     Hiroki Tagato<tagattie@FreeBSD.org>
> CommitDate: 2025-06-05 12:19:36 +0000
>
>      devel/reflection-cpp: add port: C++ static reflection support library
>      
>      This is a C++ static reflection library.
>      
>      Goals:
>      - Trivial to integrate into existing codebases (no code generation, no
>        macros, no build system changes)
>      - Minimal to zero runtime overhead
>      - Works with C++20 and later
>      - Prepared to integrate C++26 reflections when they are available
>      
>      WWW:https://github.com/contour-terminal/reflection-cpp
> ---
>   devel/Makefile                 |  1 +
>   devel/reflection-cpp/Makefile  | 30 ++++++++++++++++++++++++++++++
>   devel/reflection-cpp/distinfo  |  3 +++
>   devel/reflection-cpp/pkg-descr |  8 ++++++++
>   devel/reflection-cpp/pkg-plist |  4 ++++
>   5 files changed, 46 insertions(+)
>
> diff --git a/devel/Makefile b/devel/Makefile
> index df3ad23db180..951249111205 100644
> --- a/devel/Makefile
> +++ b/devel/Makefile
> @@ -6373,6 +6373,7 @@
>       SUBDIR += recycle
>       SUBDIR += redasm
>       SUBDIR += redo
> +    SUBDIR += reflection-cpp
>       SUBDIR += regexx
>       SUBDIR += regexxer
>       SUBDIR += remake
> diff --git a/devel/reflection-cpp/Makefile b/devel/reflection-cpp/Makefile
> new file mode 100644
> index 000000000000..8806e380a1d3
> --- /dev/null
> +++ b/devel/reflection-cpp/Makefile
> @@ -0,0 +1,30 @@
> +PORTNAME=	reflection-cpp
> +DISTVERSIONPREFIX=	v
> +DISTVERSION=	0.4.0
> +CATEGORIES=	devel
> +
> +MAINTAINER=	tagattie@FreeBSD.org
> +COMMENT=	C++ static reflection support library
> +WWW=		https://github.com/contour-terminal/reflection-cpp
> +
> +LICENSE=	APACHE20
> +LICENSE_FILE=	${WRKSRC}/LICENSE.txt
> +
> +BUILD_DEPENDS=	${LOCALBASE}/lib/cmake/Catch2/Catch2Config.cmake:devel/catch2
> +
> +USES=		cmake:testing
> +
> +USE_GITHUB=	yes
> +GH_ACCOUNT=	contour-terminal
> +
> +CMAKE_ON=	REFLECTION_TESTING
> +
> +PORTDOCS=	README.md
> +
> +OPTIONS_DEFINE=	DOCS
> +
> +post-install-DOCS-on:
> +	@${MKDIR} ${STAGEDIR}${DOCSDIR}
> +	${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
> +
> +.include <bsd.port.mk>
> diff --git a/devel/reflection-cpp/distinfo b/devel/reflection-cpp/distinfo
> new file mode 100644
> index 000000000000..cc4d9f549a7a
> --- /dev/null
> +++ b/devel/reflection-cpp/distinfo
> @@ -0,0 +1,3 @@
> +TIMESTAMP = 1748843917
> +SHA256 (contour-terminal-reflection-cpp-v0.4.0_GH0.tar.gz) = 898e0d653860f996b0b4881d3715a4d236a25e3e82548426c6079ed5192fea08
> +SIZE (contour-terminal-reflection-cpp-v0.4.0_GH0.tar.gz) = 20562
> diff --git a/devel/reflection-cpp/pkg-descr b/devel/reflection-cpp/pkg-descr
> new file mode 100644
> index 000000000000..7d8c1036c99d
> --- /dev/null
> +++ b/devel/reflection-cpp/pkg-descr
> @@ -0,0 +1,8 @@
> +This is a C++ static reflection library.
> +
> +Goals:
> +- Trivial to integrate into existing codebases (no code generation, no
> +  macros, no build system changes)
> +- Minimal to zero runtime overhead
> +- Works with C++20 and later
> +- Prepared to integrate C++26 reflections when they are available
> diff --git a/devel/reflection-cpp/pkg-plist b/devel/reflection-cpp/pkg-plist
> new file mode 100644
> index 000000000000..28488a1138e5
> --- /dev/null
> +++ b/devel/reflection-cpp/pkg-plist
> @@ -0,0 +1,4 @@
> +include/reflection-cpp/reflection.hpp
> +lib/cmake/reflection-cpp/reflection-cpp-config-version.cmake
> +lib/cmake/reflection-cpp/reflection-cpp-config.cmake
> +lib/cmake/reflection-cpp/reflection-cpp-targets.cmake

CMAKE_ON should probably be CMAKE_TESTING_ON?
No need to force everyone to build unit tests
It also depends on cache2 according to upstream for testing only not build

https://github.com/contour-terminal/reflection-cpp/blob/v0.4.0/CMakeLists.txt#L55

Best regards,
Daniel