git: 9ac3a7834593 - main - devel/trompeloeil: New port: Header only C++14 mocking framework
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 02 Dec 2022 23:59:53 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=9ac3a7834593aa3f2aaaeaace9de5c3922adcc0d
commit 9ac3a7834593aa3f2aaaeaace9de5c3922adcc0d
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-12-02 15:44:59 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-12-02 15:44:59 +0000
devel/trompeloeil: New port: Header only C++14 mocking framework
---
devel/Makefile | 1 +
devel/trompeloeil/Makefile | 34 ++++++++++++++++++++++++++++
devel/trompeloeil/distinfo | 3 +++
devel/trompeloeil/files/patch-CMakeLists.txt | 20 ++++++++++++++++
devel/trompeloeil/pkg-descr | 1 +
devel/trompeloeil/pkg-plist | 11 +++++++++
6 files changed, 70 insertions(+)
diff --git a/devel/Makefile b/devel/Makefile
index 7facbcd4a0ed..fc2eab4043ff 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -7392,6 +7392,7 @@
SUBDIR += treepy.el
SUBDIR += trellis
SUBDIR += trio
+ SUBDIR += trompeloeil
SUBDIR += truc
SUBDIR += tup
SUBDIR += ua_parser-core
diff --git a/devel/trompeloeil/Makefile b/devel/trompeloeil/Makefile
new file mode 100644
index 000000000000..c0e279d15497
--- /dev/null
+++ b/devel/trompeloeil/Makefile
@@ -0,0 +1,34 @@
+PORTNAME= trompeloeil
+DISTVERSIONPREFIX= v
+DISTVERSION= 43
+CATEGORIES= devel
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Header only C++14 mocking framework
+WWW= https://github.com/rollbear/trompeloeil
+
+LICENSE= BSL
+LICENSE_FILE= ${WRKSRC}/LICENSE_1_0.txt
+
+TEST_DEPENDS= ${LOCALBASE}/include/catch2/catch.hpp:devel/catch \
+ criterion>0:devel/criterion
+
+USES= cmake:testing # unclear how to run tests, see https://github.com/rollbear/trompeloeil/issues/287
+
+USE_GITHUB= yes
+GH_ACCOUNT= rollbear
+
+NO_BUILD= yes
+NO_ARCH= yes
+
+OPTIONS_DEFINE= DOCS
+
+PORTDOCS= *
+
+post-install:
+ @cd ${STAGEDIR}${DOCSDIR} && \
+ ${RM} LICENSE_1_0.txt && \
+ ${MV} docs/* . && \
+ ${RMDIR} docs
+
+.include <bsd.port.mk>
diff --git a/devel/trompeloeil/distinfo b/devel/trompeloeil/distinfo
new file mode 100644
index 000000000000..43669b84a7bc
--- /dev/null
+++ b/devel/trompeloeil/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1670024517
+SHA256 (rollbear-trompeloeil-v43_GH0.tar.gz) = 86a0afa2e97347202a0a883ab43da78c1d4bfff0d6cb93205cfc433d0d9eb9eb
+SIZE (rollbear-trompeloeil-v43_GH0.tar.gz) = 305074
diff --git a/devel/trompeloeil/files/patch-CMakeLists.txt b/devel/trompeloeil/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..e5ec855cbecd
--- /dev/null
+++ b/devel/trompeloeil/files/patch-CMakeLists.txt
@@ -0,0 +1,20 @@
+--- CMakeLists.txt.orig 2022-10-26 09:57:07 UTC
++++ CMakeLists.txt
+@@ -37,7 +37,7 @@ endif()
+ option(TROMPELOEIL_INSTALL_TARGETS "Sets whether trompeloeil should be installed" ${MASTER_PROJECT})
+ option(TROMPELOEIL_INSTALL_DOCS "Install documentation" ${TROMPELOEIL_INSTALL_TARGETS})
+
+-if (MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug)
++if (BUILD_TESTING)
+
+ if (${CXX_STANDARD})
+ set(CMAKE_CXX_STANDARD ${CXX_STANDARD})
+@@ -47,7 +47,7 @@ if (MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug)
+ set(CMAKE_CXX_STANDARD_REQUIRED YES)
+ set(CMAKE_CXX_EXTENSIONS OFF)
+
+- set(CATCH_DIR ${CMAKE_CURRENT_BINARY_DIR}/catch)
++ set(CATCH_DIR ${CMAKE_INSTALL_PREFIX}/include/catch2)
+ if(NOT EXISTS ${CATCH_DIR}/catch.hpp)
+ if (NOT EXISTS ${CATCH_DIR})
+ make_directory(${CATCH_DIR})
diff --git a/devel/trompeloeil/pkg-descr b/devel/trompeloeil/pkg-descr
new file mode 100644
index 000000000000..6e9f18934be7
--- /dev/null
+++ b/devel/trompeloeil/pkg-descr
@@ -0,0 +1 @@
+trompeloeil is a thread-safe header-only mocking framework for C++11/14.
diff --git a/devel/trompeloeil/pkg-plist b/devel/trompeloeil/pkg-plist
new file mode 100644
index 000000000000..e3a298cb3b07
--- /dev/null
+++ b/devel/trompeloeil/pkg-plist
@@ -0,0 +1,11 @@
+include/boost/trompeloeil.hpp
+include/catch2/trompeloeil.hpp
+include/criterion/trompeloeil.hpp
+include/crpcut/trompeloeil.hpp
+include/cxxtest/trompeloeil.hpp
+include/doctest/trompeloeil.hpp
+include/gtest/trompeloeil.hpp
+include/trompeloeil.hpp
+lib/cmake/trompeloeil/trompeloeil-config-version.cmake
+lib/cmake/trompeloeil/trompeloeil-config.cmake
+lib/cmake/trompeloeil/trompeloeil-targets.cmake