pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel devel: Add tl-expected



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1c1b5b33a767
branches:  trunk
changeset: 414667:1c1b5b33a767
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Mar 31 10:03:35 2020 +0000

description:
devel: Add tl-expected

Single header implementation of std::expected with functional-style extensions.

std::expected is proposed as the preferred way to represent object which
will either have an expected value, or an unexpected value giving information
about why something failed. Unfortunately, chaining together many computations
which may fail can be verbose, as error-checking code will be mixed in with
the actual programming logic. This implementation provides a number of
utilities to make coding with expected cleaner.

diffstat:

 devel/Makefile                  |   3 ++-
 devel/tl-expected/DESCR         |   8 ++++++++
 devel/tl-expected/Makefile      |  19 +++++++++++++++++++
 devel/tl-expected/PLIST         |   5 +++++
 devel/tl-expected/buildlink3.mk |  14 ++++++++++++++
 devel/tl-expected/distinfo      |   6 ++++++
 6 files changed, 54 insertions(+), 1 deletions(-)

diffs (89 lines):

diff -r de37d414f786 -r 1c1b5b33a767 devel/Makefile
--- a/devel/Makefile    Tue Mar 31 09:44:34 2020 +0000
+++ b/devel/Makefile    Tue Mar 31 10:03:35 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3084 2020/03/30 16:51:43 riastradh Exp $
+# $NetBSD: Makefile,v 1.3085 2020/03/31 10:03:35 nia Exp $
 #
 
 COMMENT=       Development utilities
@@ -2923,6 +2923,7 @@
 SUBDIR+=       tkcon
 SUBDIR+=       tkcvs
 SUBDIR+=       tkdiff
+SUBDIR+=       tl-expected
 SUBDIR+=       tla
 SUBDIR+=       tlsh
 SUBDIR+=       tmake
diff -r de37d414f786 -r 1c1b5b33a767 devel/tl-expected/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tl-expected/DESCR   Tue Mar 31 10:03:35 2020 +0000
@@ -0,0 +1,8 @@
+Single header implementation of std::expected with functional-style extensions.
+
+std::expected is proposed as the preferred way to represent object which
+will either have an expected value, or an unexpected value giving information
+about why something failed. Unfortunately, chaining together many computations
+which may fail can be verbose, as error-checking code will be mixed in with
+the actual programming logic. This implementation provides a number of
+utilities to make coding with expected cleaner.
diff -r de37d414f786 -r 1c1b5b33a767 devel/tl-expected/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tl-expected/Makefile        Tue Mar 31 10:03:35 2020 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1 2020/03/31 10:03:35 nia Exp $
+
+DISTNAME=      tl-expected-1.0.0
+CATEGORIES=    devel
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=TartanLlama/}
+GITHUB_PROJECT=        expected
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/TartanLlama/expected
+COMMENT=       C++11/14/17 std::expected with functional-style extensions
+LICENSE=       cc0-1.0-universal
+
+USE_CMAKE=     yes
+USE_LANGUAGES= c c++
+
+CMAKE_ARGS+=   -DEXPECTED_ENABLE_TESTS=OFF
+
+.include "../../mk/bsd.pkg.mk"
diff -r de37d414f786 -r 1c1b5b33a767 devel/tl-expected/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tl-expected/PLIST   Tue Mar 31 10:03:35 2020 +0000
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1 2020/03/31 10:03:35 nia Exp $
+include/tl/expected.hpp
+share/cmake/tl-expected/tl-expected-config-version.cmake
+share/cmake/tl-expected/tl-expected-config.cmake
+share/cmake/tl-expected/tl-expected-targets.cmake
diff -r de37d414f786 -r 1c1b5b33a767 devel/tl-expected/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tl-expected/buildlink3.mk   Tue Mar 31 10:03:35 2020 +0000
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/03/31 10:03:35 nia Exp $
+
+BUILDLINK_TREE+=       tl-expected
+
+.if !defined(TL_EXPECTED_BUILDLINK3_MK)
+TL_EXPECTED_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.tl-expected+=    tl-expected>=1.0.0
+BUILDLINK_PKGSRCDIR.tl-expected?=      ../../devel/tl-expected
+# Only installs headers.
+BUILDLINK_DEPMETHOD.tl-expected?=      build
+.endif # TL_EXPECTED_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -tl-expected
diff -r de37d414f786 -r 1c1b5b33a767 devel/tl-expected/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tl-expected/distinfo        Tue Mar 31 10:03:35 2020 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2020/03/31 10:03:35 nia Exp $
+
+SHA1 (tl-expected-1.0.0.tar.gz) = 2ce5120ef6b4238b092a73214a48516462f809ce
+RMD160 (tl-expected-1.0.0.tar.gz) = 554d783c23c26a27d68bcc015599f4cd69000c1c
+SHA512 (tl-expected-1.0.0.tar.gz) = 747ea34b5540dfcf595896332851f10c52a823ab8ba3fc8152478b0a9e8ca01f0f26827348407249827f4106ff577bd6e697ea6f749c1f21bd1f0913a621075d
+Size (tl-expected-1.0.0.tar.gz) = 102672 bytes



Home | Main Index | Thread Index | Old Index