summaryrefslogtreecommitdiff
path: root/dev-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/mustache/Manifest2
-rw-r--r--dev-cpp/mustache/files/mustache-4.1_p20211210-unbundle-catch.patch48
-rw-r--r--dev-cpp/mustache/metadata.xml10
-rw-r--r--dev-cpp/mustache/mustache-4.1.ebuild22
-rw-r--r--dev-cpp/mustache/mustache-4.1_p20211210.ebuild38
5 files changed, 120 insertions, 0 deletions
diff --git a/dev-cpp/mustache/Manifest b/dev-cpp/mustache/Manifest
new file mode 100644
index 000000000000..9ac5f7573d91
--- /dev/null
+++ b/dev-cpp/mustache/Manifest
@@ -0,0 +1,2 @@
+DIST mustache-4.1.tar.gz 98905 BLAKE2B 1acf265ebc83881ac86c0db0a43c8a0984f2fc0bf70b4c946528e97a49feab7d1945272f3ed8e67087998db2594227776950319d5923cbd2aabafe672ed65ea3 SHA512 609c876fc085d1331355ec1f0396e588edf1fb3ea6765abcd06043cc5f7288f015d6bb7fdeb560df78aab54ae8d97e934375de577b944a09c9ae93f9915e7aff
+DIST mustache-4.1_p20211210.gh.tar.gz 146337 BLAKE2B 5fac7d2ee4ed0e2e8ab80861a2d809287b877786668e87c594bbc5d9ff1b562f98e39bcb89d6fd14374d25ccfa415b38dadb68bf22dd710f37396298b05b4e13 SHA512 5251393f5d31bee04fa57e56fff9c232be35e7b930ca68d9bdd9605a3fda81edb43dc7c7a996d09b854cb50fbcb5b93820ac994331118c53575e75d14ba1f88b
diff --git a/dev-cpp/mustache/files/mustache-4.1_p20211210-unbundle-catch.patch b/dev-cpp/mustache/files/mustache-4.1_p20211210-unbundle-catch.patch
new file mode 100644
index 000000000000..bb68eb4c127c
--- /dev/null
+++ b/dev-cpp/mustache/files/mustache-4.1_p20211210-unbundle-catch.patch
@@ -0,0 +1,48 @@
+Unbundle test dependency dev-cpp/catch and make test compilation optional.
+
+Author: Lucio Sauer <watermanpaint@posteo.net>
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,7 +2,12 @@ cmake_minimum_required(VERSION 3.0.2)
+ project(mustache)
+ add_library(mustache INTERFACE)
+
++option(TESTS "build tests")
++
+ target_compile_features(mustache INTERFACE cxx_std_17)
+ target_sources(mustache INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/mustache.hpp)
+ target_include_directories(mustache INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+-add_subdirectory(tests)
+\ No newline at end of file
++
++if (TESTS)
++ add_subdirectory(tests)
++endif (TESTS)
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,10 +1,12 @@
++find_package(Catch2 REQUIRED)
++
+ add_executable(mustache-unit-tests
+ ../mustache.hpp # to show in IDE
+- catch.hpp # to show in IDE
+ tests.cpp
+ )
+
+-target_link_libraries(mustache-unit-tests PRIVATE mustache)
++
++target_link_libraries(mustache-unit-tests PRIVATE mustache Catch2::Catch2)
+
+ if (UNIX)
+ target_compile_options(mustache-unit-tests PRIVATE -Wall -Wextra -Werror -Wconversion)
+--- a/tests/tests.cpp
++++ b/tests/tests.cpp
+@@ -29,7 +29,7 @@
+ #include "mustache.hpp"
+
+ #define CATCH_CONFIG_MAIN
+-#include "catch.hpp"
++#include <catch2/catch.hpp>
+
+ using namespace kainjow::mustache;
+
diff --git a/dev-cpp/mustache/metadata.xml b/dev-cpp/mustache/metadata.xml
new file mode 100644
index 000000000000..20c1db9bcb36
--- /dev/null
+++ b/dev-cpp/mustache/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zdanevich.vitaly@ya.ru</email>
+ <name>Vitaly Zdanevich</name>
+ </maintainer>
+
+ <origin>gentoo-guru-overlay</origin>
+</pkgmetadata> \ No newline at end of file
diff --git a/dev-cpp/mustache/mustache-4.1.ebuild b/dev-cpp/mustache/mustache-4.1.ebuild
new file mode 100644
index 000000000000..0f3d3ed2ac86
--- /dev/null
+++ b/dev-cpp/mustache/mustache-4.1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Mustache implementation for modern C++"
+HOMEPAGE="https://github.com/kainjow/Mustache"
+SRC_URI="https://github.com/kainjow/$PN/archive/v$PV.tar.gz -> $P.tar.gz"
+
+S="${WORKDIR}/Mustache-${PV}"
+LICENSE="Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+src_compile() {
+ :
+}
+
+src_install() {
+ insinto /usr/include
+ doins mustache.hpp
+}
diff --git a/dev-cpp/mustache/mustache-4.1_p20211210.ebuild b/dev-cpp/mustache/mustache-4.1_p20211210.ebuild
new file mode 100644
index 000000000000..6739909f5bf3
--- /dev/null
+++ b/dev-cpp/mustache/mustache-4.1_p20211210.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+COMMIT="04277d5552c6e46bee41a946b7d175a660ea1b3d"
+DESCRIPTION="Mustache implementation for modern C++"
+HOMEPAGE="https://github.com/kainjow/Mustache"
+SRC_URI="https://github.com/kainjow/${PN}/archive/${COMMIT}.tar.gz -> ${P}.gh.tar.gz"
+
+S="${WORKDIR}/Mustache-${COMMIT}"
+LICENSE="Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="test? ( <dev-cpp/catch-3 )"
+
+PATCHES="${FILESDIR}"/${P}-unbundle-catch.patch
+
+src_configure() {
+ local mycmakeargs=(
+ -DTESTS=$(usex test)
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ "${BUILD_DIR}"/tests/mustache-unit-tests || die "Tests failed!"
+}
+
+src_install() {
+ insinto /usr/include
+ doins mustache.hpp
+}