Import devel/tl-expected 1.0.0

Feedback OK rsadowski
---
tl-expected is a single header implementation of `std::expected` with
functional-style extensions.

std::expected is proposed as the preferred way to represent an 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.
This commit is contained in:
kn 2021-12-17 17:17:32 +00:00
parent 0d7e83edab
commit 52dcaf41a3
4 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,45 @@
# $OpenBSD: Makefile,v 1.1.1.1 2021/12/17 17:17:32 kn Exp $
COMMENT = c++11/14/17 std::expected with functional-style extensions
GH_ACCOUNT = TartanLlama
GH_PROJECT = expected
GH_TAGNAME = v1.0.0
PKGNAME = tl-${DISTNAME}
CATEGORIES = devel
# cmake file for build and install; no release or tags, use latest master
ADD_TL_COMMIT = 284c6a3f0f61823cc3871b0f193e8df699e2c4ce
MASTER_SITES0 = https://raw.githubusercontent.com/${GH_ACCOUNT}/tl-cmake/${ADD_TL_COMMIT}/
DISTFILES = ${GH_DISTFILE} \
add-tl.cmake:0
EXTRACT_ONLY = ${GH_DISTFILE}
HOMEPAGE = https://tl.tartanllama.xyz
# CC0 1.0 Universal (public domain)
PERMIT_PACKAGE = Yes
MAINTAINER = Klemens Nanni <kn@openbsd.org>
# C++11 or higher
COMPILER = base-clang ports-gcc
COMPILER_LANGS = c++
MODULES = devel/cmake
# avoid network and point at prefetched SUPDISTFILES
CONFIGURE_ARGS += -DFETCHCONTENT_FULLY_DISCONNECTED=ON \
-DFETCHCONTENT_SOURCE_DIR_TL_CMAKE=${FULLDISTDIR}
# avoid building anything for now, enable later
CONFIGURE_ARGS += -DEXPECTED_ENABLE_TESTS=OFF
# just header files
PKG_ARCH = *
# with tests disabled and no docs or examples:
# "ninja: no work to do."
NO_BUILD = Yes
NO_TEST = Yes
.include <bsd.port.mk>

View File

@ -0,0 +1,4 @@
SHA256 (add-tl.cmake) = 5wh8w31CXmUx53/Q8pbOpr21AOVFH+aSvS8FsAN+SGY=
SHA256 (expected-1.0.0.tar.gz) = j1EkCFoSQRPnXjiQtOkj46TeWyapc7iRs960DhnAPO4=
SIZE (add-tl.cmake) = 1366
SIZE (expected-1.0.0.tar.gz) = 102672

View File

@ -0,0 +1,9 @@
tl-expected is a single header implementation of `std::expected` with
functional-style extensions.
std::expected is proposed as the preferred way to represent an 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.

View File

@ -0,0 +1,8 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2021/12/17 17:17:32 kn Exp $
include/tl/
include/tl/expected.hpp
share/cmake/
share/cmake/tl-expected/
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