commit:     f385307acef50835a7acb963029d592c171f4303
Author:     Pavel Sobolev <contact <AT> paveloom <DOT> dev>
AuthorDate: Wed Jul  9 16:21:01 2025 +0000
Commit:     Pavel Sobolev <contact <AT> paveloom <DOT> dev>
CommitDate: Sat Jul 12 13:43:56 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f385307a

dev-libs/mcl: new package, add 0.1.13

Signed-off-by: Pavel Sobolev <contact <AT> paveloom.dev>

 dev-libs/mcl/Manifest                              |  1 +
 ...cl-0.1.13-build-tests-only-when-requested.patch | 29 +++++++++++++++++
 dev-libs/mcl/mcl-0.1.13.ebuild                     | 36 ++++++++++++++++++++++
 dev-libs/mcl/metadata.xml                          | 12 ++++++++
 4 files changed, 78 insertions(+)

diff --git a/dev-libs/mcl/Manifest b/dev-libs/mcl/Manifest
new file mode 100644
index 0000000000..bf02a14b3b
--- /dev/null
+++ b/dev-libs/mcl/Manifest
@@ -0,0 +1 @@
+DIST mcl-0.1.13.tar.gz 25663 BLAKE2B 
3dbd667338a4697b9a044dca363cbf6f92de51d173116110694d34f6796a3ed2ebc056fa2ce3015ee3840b1435eb367a714ccbe24b4807c7d139ecb446279b6f
 SHA512 
ed394edead795d04583034f569ada69a9ee893431159cb8ee2cc8f47509ad5e4ffdcfdefdeae06a118305b61f74d420f421125fc2e038c21d7ff08612e03ad24

diff --git 
a/dev-libs/mcl/files/mcl-0.1.13-build-tests-only-when-requested.patch 
b/dev-libs/mcl/files/mcl-0.1.13-build-tests-only-when-requested.patch
new file mode 100644
index 0000000000..8087c822c0
--- /dev/null
+++ b/dev-libs/mcl/files/mcl-0.1.13-build-tests-only-when-requested.patch
@@ -0,0 +1,29 @@
+From: Pavel Sobolev <[email protected]>
+Subject: [PATCH] Build tests only when requested.
+
+Signed-off-by: Pavel Sobolev <[email protected]>
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -102,8 +102,10 @@ endif()
+ 
+ # Project files
+ 
++include(CTest)
++
+ add_subdirectory(src)
+-if (TARGET Catch2::Catch2 AND MASTER_PROJECT)
++if (BUILD_TESTING)
+     add_subdirectory(tests)
+ endif()
+ 
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -10,7 +10,6 @@ target_include_directories(mcl-tests PUBLIC .)
+ target_compile_options(mcl-tests PRIVATE ${STAMINA_CXX_FLAGS})
+ target_link_libraries(mcl-tests PRIVATE Catch2::Catch2WithMain mcl)
+ 
+-include(CTest)
+ include(Catch)
+ catch_discover_tests(mcl-tests)
+ enable_testing()

diff --git a/dev-libs/mcl/mcl-0.1.13.ebuild b/dev-libs/mcl/mcl-0.1.13.ebuild
new file mode 100644
index 0000000000..ab7df6462d
--- /dev/null
+++ b/dev-libs/mcl/mcl-0.1.13.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="merry's common library"
+HOMEPAGE="https://github.com/merryhime/mcl";
+SRC_URI="https://github.com/merryhime/mcl/archive/refs/tags/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       dev-libs/libfmt:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       test? ( dev-cpp/catch )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.1.13-build-tests-only-when-requested.patch
+)
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_TESTING=$(usex test)
+       )
+
+       cmake_src_configure
+}

diff --git a/dev-libs/mcl/metadata.xml b/dev-libs/mcl/metadata.xml
new file mode 100644
index 0000000000..705a27f2fc
--- /dev/null
+++ b/dev-libs/mcl/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person">
+    <email>[email protected]</email>
+    <name>Pavel Sobolev</name>
+  </maintainer>
+  <upstream>
+    <bugs-to>https://github.com/merryhime/mcl/issues</bugs-to>
+    <remote-id type="github">merryhime/mcl</remote-id>
+  </upstream>
+</pkgmetadata>

Reply via email to