From 6bec400375c20ab6396991ae179a6f586bbb85a6 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 29 Jan 2019 14:08:22 +0100 Subject: [PATCH] New package: Mustache-3.2.1 --- ...001-Fix-compiling-of-tests-on-gcc8.2.patch | 33 +++++++++++++++++++ srcpkgs/Mustache/template | 18 ++++++++++ 2 files changed, 51 insertions(+) create mode 100644 srcpkgs/Mustache/patches/0001-Fix-compiling-of-tests-on-gcc8.2.patch create mode 100644 srcpkgs/Mustache/template diff --git a/srcpkgs/Mustache/patches/0001-Fix-compiling-of-tests-on-gcc8.2.patch b/srcpkgs/Mustache/patches/0001-Fix-compiling-of-tests-on-gcc8.2.patch new file mode 100644 index 00000000000..f446978682e --- /dev/null +++ b/srcpkgs/Mustache/patches/0001-Fix-compiling-of-tests-on-gcc8.2.patch @@ -0,0 +1,33 @@ +From 33c8f46a28fb80144cf6d5a01352de0ef8474880 Mon Sep 17 00:00:00 2001 +From: John Zimmermann +Date: Tue, 29 Jan 2019 13:59:16 +0100 +Subject: [PATCH] Fix compiling of tests on gcc8.2 + +``` +In file included from tests.cpp:32: +tests.cpp: In function 'void ____C_A_T_C_H____T_E_S_T____114()': +tests.cpp:1094:48: error: catching polymorphic type 'class std::bad_function_call' by value [-Werror=catch-value=] + CHECK_THROWS_AS(tmpl.render(dat), std::bad_function_call); + ^~~~~~~~~~~~~~~~~ +cc1plus: all warnings being treated as error +``` +--- + tests.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git tests.cpp tests.cpp +index a9176b7..276f0b3 100644 +--- tests.cpp ++++ tests.cpp +@@ -1091,7 +1091,7 @@ TEST_CASE("custom_escape") { + mustache::escape_handler esc; + tmpl.set_custom_escape(esc); + object dat({ {"what", "\"friend\""} }); +- CHECK_THROWS_AS(tmpl.render(dat), std::bad_function_call); ++ CHECK_THROWS_AS(tmpl.render(dat), std::bad_function_call&); + } + + } +-- +2.20.1 + diff --git a/srcpkgs/Mustache/template b/srcpkgs/Mustache/template new file mode 100644 index 00000000000..503ba54d372 --- /dev/null +++ b/srcpkgs/Mustache/template @@ -0,0 +1,18 @@ +# Template file for 'Mustache' +pkgname=Mustache +version=3.2.1 +revision=1 +short_desc="Mustache text templates for modern C++" +maintainer="John " +license="BSL-1.0" +homepage="https://github.com/kainjow/Mustache" +distfiles="https://github.com/kainjow/Mustache/archive/v${version}.tar.gz" +checksum=0d17298a81c08f12ebc446cdee387268a395d34bb724050fe67d5ce8c4e98b7a + +do_check() { + make +} + +do_install() { + vinstall mustache.hpp 644 usr/include +}