pkgsrc-WIP-changes archive

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

Update actor-framework to version 0.18.5



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%pkgsrc.org@localhost>
Pushed By:	nros
Date:		Wed Jan 5 13:00:15 2022 +0100
Changeset:	559b1e189134e386a46db9e4ab7ca9bc87284cc5

Modified Files:
	actor-framework/Makefile
	actor-framework/PLIST
	actor-framework/distinfo
Added Files:
	actor-framework/buildlink3.mk
	actor-framework/patches/patch-libcaf__core_caf_config.hpp
	actor-framework/patches/patch-libcaf__core_src_detail_set__thread__name.cpp

Log Message:
Update actor-framework to version 0.18.5

Update actor-framework to version 0.18.5 .

Pkgsrc changes:
Don't use the configure script, hit CMake directly.
License change.
Add buildlink3.mk file.

Changes from changelog:

# Changelog

## [0.18.5] - 2021-07-16

### Fixed

- 0.18.4 introduced a potential crash when using the OpenSSL module and
  encountering `SSL_ERROR_WANT_READ`. The crash manifested if CAF resumed a
  write operation but failed to fully reset its state. The state management
  (and consequently the crash) has been fixed.
- CAF now clears the actor registry before calling the destructors of loaded
  modules. This fixes undefined behavior that could occur in rare cases where
  actor cleanup code could run after loaded modules had been destroyed.

## [0.18.4] - 2021-07-07

### Added

- The new class `caf::telemetry::importer::process` allows users to get access
  to process metrics even when not configuring CAF to export metrics to
  Prometheus via HTTP.

### Changed

- Message views now perform the type-check in their constructor. With this
  change, the `make_*` utility functions are no longer mandatory and users may
  instead simply construct the view directly.

### Fixed

- Printing a `config_value` that contains a zero duration `timespan` now
  properly prints `0s` instead of `1s` (#1262). This bug most notably showed up
  when setting a `timespan` parameter such as `caf.middleman.heartbeat-interval`
  via config file or CLI to `0s` and then printing the config parameter, e.g.,
  via `--dump-config`.
- Blocking actors now release their private thread before decrementing the
  running-actors count to resolve a race condition during system shutdown that
  could result in the system hanging (#1266).
- When using the OpenSSL module, CAF could run into a state where the SSL layer
  wants to read data while CAF is trying to send data. In this case, CAF did not
  properly back off, causing high CPU load due to spinning and in some scenarios
  never recovering. This issue has been resolved by properly handling
  `SSL_ERROR_WANT_READ` on the transport (#1060).
- Scheduled actors now accept default handlers for down messages etc. with
  non-const apply operator such as lambda expressions declared as `mutable`.

### Removed

- Dropped three obsolete (and broken) macros in the `unit_test.hpp` header:
  `CAF_CHECK_FAILED`, `CAF_CHECK_FAIL` and `CAF_CHECK_PASSED`.

## [0.18.3] - 2021-05-21

### Added

- The `actor_system_config` now has an additional member called
  `config_file_path_alternatives`. With this, users can configure fallback paths
  for locating a configuration file. For example, an application `my-app` on a
  UNIX-like system could set `config_file_path` to `my-app.conf` and then add
  `/etc/my-app.conf` to `config_file_path_alternatives` in order to follow the
  common practice of looking into the current directory first before looking for
  a system-wide configuration file.

### Changed

- Counters in histogram buckets are now always integers, independently on the
  value type of the histogram. Buckets can never increase by fractional values.

### Deprecated

- All `parse` function overloads in `actor_system_config` that took a custom
  configuration file path as argument were deprecated in favor of consistently
  asking users to use the `config_file_path` and `config_file_path_alternatives`
  member variables instead

### Fixed

- For types that offer implicit type conversion, trying to construct a
  `result<T>` could result in ambiguity since compilers could construct either
  `T` itself or `expected<T>` for calling a constructor of `result<T>`. To fix
  the ambiguity, `result<T>` now accepts any type that allows constructing a `T`
  internally without requiring a type conversion to `T` as an argument (#1245).
- Fix configuration parameter lookup for the `work-stealing` scheduler policy.
- Applications that expose metrics to Prometheus properly terminate now.

## [0.18.2] - 2021-03-26

### Added

- CAF includes two new inspector types for consuming and generating
  JSON-formatted text: `json_writer` and `json_reader`.

### Changed

- Setter functions for fields may now return either `bool`, `caf::error` or
  `void`. Previously, CAF only allowed `bool`.

### Fixed

- Passing a getter and setter pair to an inspector via `apply` produced a
  compiler error for non-builtin types. The inspection API now recursively
  inspects user-defined types instead, as was the original intend (#1216).
- The handle type `typed_actor` now can construct from a `typed_actor_pointer`.
  This resolves a compiler error when trying to initialize a handle for
  `my_handle` from a self pointer of type `my_handle::pointer_view` (#1218).
- Passing a function reference to the constructor of an actor caused a compiler
  error when building with logging enabled. CAF now properly handles this edge
  case and logs such constructor arguments as `<unprintable>` (#1229).
- The CLI parser did not recognize metrics filters. Hence, passing
  `--caf.metrics-filters.actors.includes=...` to a CAF application resulted in
  an error. The `includes` and `excludes` filters are now consistently handled
  and accepted in config files as well as on the command line (#1238).
- Silence a deprecated-enum-conversion warning for `std::byte` (#1230).
- Fix heap-use-after-free when accessing the meta objects table in applications
  that leave the `main` function while the actor system and its worker threads
  are still running (#1241).
- The testing DSL now properly accounts for the message prioritization of actors
  (suspending regular behavior until receiving the response) when using
  `request.await` (#1232).

## [0.18.1] - 2021-03-19

### Fixed

- Version 0.18.0 introduced a regression on the system parameter
  `caf.middleman.heartbeat-interval` (#1235). We have addressed the issue by
  porting the original fix for CAF 0.17.5 (#1095) to the 0.18 series.

## [0.18.0] - 2021-01-25

### Added

- The enum `caf::sec` received an additional error code: `connection_closed`.
- The new `byte_span` and `const_byte_span` aliases provide convenient
  definitions when working with sequences of bytes.
- The base metrics now include four new histograms for illuminating the I/O
  module: `caf.middleman.inbound-messages-size`,
  `caf.middleman.outbound-messages-size`, `caf.middleman.deserialization-time`
  and `caf.middleman.serialization-time`.
- The macro `CAF_ADD_TYPE_ID` now accepts an optional third parameter for
  allowing users to override the default type name.
- The new function pair `get_as` and `get_or` model type conversions on a
  `config_value`. For example, `get_as<int>(x)` would convert the content of `x`
  to an `int` by either casting numeric values to `int` (with bound checks) or
  trying to parse the input of `x` if it contains a string. The function
  `get_or` already existed for `settings`, but we have added new overloads for
  generalizing the function to `config_value` as well.
- The `typed_response_promise` received additional member functions to mirror
  the interface of the untyped `response_promise`.
- Configuration files now allow dot-separated notation for keys. For example,
  users may write `caf.scheduler.max-threads = 4` instead of the nested form
  `caf { scheduler { max-threads = 4 } }`.

### Deprecated

- The new `get_as` and `get_or` function pair makes type conversions on a
  `config_value` via `get`, `get_if`, etc. obsolete. We will retain the
  STL-style interface for treating a `config_value` as a `variant`-like type.

### Changed

- When using `CAF_MAIN`, CAF now looks for the correct default config file name,
  i.e., `caf-application.conf`.
- Simplify the type inspection API by removing the distinction between
  `apply_object` and `apply_value`. Instead, inspectors only offer `apply` and
  users may now also call `map`, `list`, and `tuple` for unboxing simple wrapper
  types. Furthermore, CAF no longer automatically serializes enumeration types
  using their underlying value because this is fundamentally unsafe.
- CAF no longer parses the input to string options on the command line. For
  example, `my_app '--msg="hello"'` results in CAF storing `"hello"` (including
  the quotes) for the config option `msg`. Previously, CAF tried to parse any
  string input on the command-line that starts with quotes in the same way it
  would parse strings from a config file, leading to very unintuitive results in
  some cases (#1113).
- Response promises now implicitly share their state when copied. Once the
  reference count for the state reaches zero, CAF now produces a
  `broken_promise` error if the actor failed to fulfill the promise by calling
  either `dispatch` or `delegate`.

### Fixed

- Setting an invalid credit policy no longer results in a segfault (#1140).
- Version 0.18.0-rc.1 introduced a regression that prevented CAF from writing
  parameters parsed from configuration files back to variables. The original
  behavior has been restored, i.e., variables synchronize with user input from
  configuration files and CLI arguments (#1145).
- Restore correct functionality of `middleman::remote_lookup` (#1146). This
  fixes a regression introduced in version 0.18.0-rc.1
- Fixed an endless recursion when using the `default_inspector` from `inspect`
  overloads (#1147).
- CAF 0.18 added support for `make_behavior` in state classes. However, CAF
  erroneously picked this member function over running the function body when
  spawning function-based actors (#1149).
- When passing `nullptr` or custom types with implicit conversions to
  `const char*` to `deep_to_string`, CAF could run into a segfault in the former
  case or do unexpected things in the latter case. The stringification inspector
  now matches precisely on pointer types to stop the compiler from doing
  implicit conversions in the first place.
- Building executables that link to CAF on 32-bit Linux versions using GCC
  failed due to undefined references to `__atomic_fetch` symbols. Adding a CMake
  dependency for `caf_core` to libatomic gets executables to compile and link as
  expected (#1153).
- Fixed a regression for remote groups introduced in 0.18.0-rc.1 (#1157).
- CAF 0.18 introduced the option to set different `excluded-components` filters
  for file and console log output. However, CAF rejected all events that matched
  either filter. The new implementation uses the *intersection* of both filters
  to reject log messages immediately (before enqueueing it to the logger's
  queue) and then applies the filters individually when generating file or
  console output.
- Fix memory leaks when deserializing URIs and when detaching the content of
  messages (#1160).
- Fix undefined behavior in `string_view::compare` (#1164).
- Fix undefined behavior when passing `--config-file=` (i.e., without actual
  argument) to CAF applications (#1167).
- Protect against self-assignment in a couple of CAF classes (#1169).
- Skipping high-priority messages resulted in CAF lowering the priority to
  normal. This unintentional demotion has been fixed (#1171).
- Fix undefined behavior in the experimental datagram brokers (#1174).
- Response promises no longer send empty messages in response to asynchronous
  messages.
- `CAF_ADD_TYPE_ID` now works with types that live in namespaces that also exist
  as nested namespace in CAF such as `detail` or `io` (#1195).
- Solved a race condition on detached actors that blocked ordinary shutdown of
  actor systems in some cases (#1196).

## [0.18.0-rc.1] - 2020-09-09

### Added

- The new `fan_out_request` function streamlines fan-out/fan-in work flows (see
  the new example in `examples/message_passing/fan_out_request.cpp` as well as
  the new manual entry). The policy-based design further allows us to support
  more use cases in the future (#932, #964).
- We introduced the lightweight template class `error_code` as an alternative to
  the generic but more heavyweight class `error`. The new error code abstraction
  simply wraps an enumeration type without allowing users to add additional
  context such as error messages. However, whenever such information is
  unneeded, the new class is much more efficient than using `error`.
- Tracing messages in distributed systems is a common practice for monitoring
  and debugging message-based systems. The new `tracing_data` abstraction in CAF
  enables users to augment messages between actors with arbitrary meta data.
  This is an experimental API that requires building CAF with the CMake option
  `CAF_ENABLE_ACTOR_PROFILER` (#981).
- Add compact `from..to..step` list notation in configuration files. For
  example, `[1..3]` expands to `[1, 2, 3]` and `[4..-4..-2]` expands to
  `[4, 2, 0, -2, -4]` (#999).
- Allow config keys to start with numbers (#1014).
- The `fan_out_request` function got an additional policy for picking just the
  fist result: `select_any` (#1012).
- Run-time type information in CAF now uses 16-bit type IDs. Users can assign
  this ID by specializing `type_id` manually (not recommended) or use the new
  API for automatically assigning ascending IDs inside `CAF_BEGIN_TYPE_ID_BLOCK`
  and `CAF_END_TYPE_ID_BLOCK` code blocks.
- The new typed view types `typed_message_view` and `const_typed_message_view`
  make working with `message` easier by providing a `std::tuple`-like interface
  (#1034).
- The class `exit_msg` finally got its missing `operator==` (#1039).
- The class `node_id` received an overload for `parse` to allow users to convert
  the output of `to_string` back to the original ID (#1058).
- Actors can now `monitor` and `demonitor` CAF nodes (#1042). Monitoring a CAF
  node causes the actor system to send a `node_down_msg` to the observer when
  losing connection to the monitored node.
- In preparation of potential future API additions/changes, CAF now includes an
  RFC4122-compliant `uuid` class.
- The new trait class `is_error_code_enum` allows users to enable conversion of
  custom error code enums to `error` and `error_code`.
- CAF now enables users to tap into internal CAF metrics as well as adding their
  own instrumentation! Since this addition is too large to cover in a changelog
  entry, please have a look at the new *Metrics* Section of the manual to learn
  more.

### Deprecated

- The `to_string` output for `error` now renders the error code enum by default.
  This renders the member functions `actor_system::render` and
  `actor_system_config::render` obsolete.
- Actors that die due to an unhandled exception now use `sec::runtime_error`
  consistently. This makes `exit_reason::unhandled_exception` obsolete.

### Changed

- CAF now requires C++17 to build.
- On UNIX, CAF now uses *visibility hidden* by default. All API functions and
  types that form the ABI are explicitly exported using module-specific macros.
  On Windows, this change finally enables building native DLL files.
- We switched our coding style to the C++17 nested namespace syntax.
- CAF used to generate the same node ID when running on the same machine and
  only differentiates actors systems by their process ID. When running CAF
  instances in a container, this process ID is most likely the same for each
  run. This means two containers can produce the same node ID and thus
  equivalent actor IDs. In order to make it easier to use CAF in a containerized
  environment, we now generate unique (random) node IDs (#970).
- We did a complete redesign of all things serialization. The central class
  `data_processor` got removed. The two classes for binary serialization no
  longer extend the generic interfaces `serializer` and `deserializer` in order
  to avoid the overhead of dynamic dispatching as well as the runtime cost of
  `error` return values. This set of changes leads so some code duplication,
  because many CAF types now accept a generic `(de)serializer` as well as a
  `binary_(de)serializer` but significantly boosts performance in the hot code
  paths of CAF (#975).
- With C++17, we no longer support compilers without support for `thread_local`.
  Consequently, we removed all workarounds and switched to the C++ keyword
  (#996).
- Our manual now uses `reStructuredText` instead of `LaTeX`. We hope this makes
  extending the manual easier and lowers the barrier to entry for new
  contributors.
- A `stateful_actor` now forwards excess arguments to the `State` rather than to
  the `Base`. This enables states with non-default constructors. When using
  `stateful_actor<State>` as pointer type in function-based actors, nothing
  changes (i.e. the new API is backwards compatible for this case). However,
  calling `spawn<stateful_actor<State>>(xs...)` now initializes the `State` with
  the argument pack `xs...` (plus optionally a `self` pointer as first
  argument). Furthermore, the state class can now provide a `make_behavior`
  member function to initialize the actor (this has no effect for function-based
  actors).
- In order to stay more consistent with naming conventions of the standard
  library, we have renamed some values of the `pec` enumeration:
  + `illegal_escape_sequence` => `invalid_escape_sequence`
  + `illegal_argument` => `invalid_argument`
  + `illegal_category` => `invalid_category`
- CAF no longer automagically flattens `tuple`, `optional`, or `expected` when
  returning these types from message handlers. Users can simply replace
  `std::tuple<A, B, C>` with `caf::result<A, B, C>` for returning more than one
  value from a message handler.
- A `caf::result` can no longer represent `skip`. Whether a message gets skipped
  or not is now only for the default handler to decide. Consequently, default
  handlers now return `skippable_result` instead of `result<message>`. A
  skippable result is a variant over `delegated<message>`, `message`, `error`,
  or `skip_t`. The only good use case for message handlers that skip a message
  in their body was in typed actors for getting around the limitation that a
  typed behavior always must provide all message handlers (typed behavior assume
  a complete implementation of the interface). This use case received direct
  support: constructing a typed behavior with `partial_behavior_init` as first
  argument suppresses the check for completeness.
- In order to reduce complexity of typed actors, CAF defines interfaces as a set
  of function signatures rather than using custom metaprogramming facilities.
  Function signatures *must* always wrap the return type in a `result<T>`. For
  example: `typed_actor<result<double>(double)>`. We have reimplemented the
  metaprogramming facilities `racts_to<...>` and `replies_to<...>::with<...>`
  as an alternative way of writing the function signature.
- All parsing functions in `actor_system_config` that take an input stream
  exclusively use the new configuration syntax (please consult the manual for
  details and examples for the configuration syntax).
- The returned string of `name()` must not change during the lifetime of an
  actor. Hence, `stateful_actor` now only considers static `name` members in its
  `State` for overriding this function. CAF always assumed names belonging to
  *types*, but did not enforce it because the name was only used for logging.
  Since the new metrics use this name for filtering now, we enforce static names
  in order to help avoid hard-to-find issues with the filtering mechanism.
- The type inspection API received a complete overhaul. The new DSL for writing
  `inspect` functions exposes the entire structure of an object to CAF. This
  enables inspectors to read and write a wider range of data formats. In
  particular human-readable, structured data such as configuration files, JSON,
  XML, etc. The inspection API received too many changes to list them here.
  Please refer to the manual section on type inspection instead.

### Removed

- A vendor-neutral API for GPGPU programming sure sounds great. Unfortunately,
  OpenCL did not catch on in the way we had hoped. At this point, we can call
  OpenCL dead and gone. There is only legacy support available and recent
  versions of the standard were never implemented in the first place.
  Consequently, we've dropped the `opencl` module.
- The old `duration` type is now superseded by `timespan` (#994).
- The enum `match_result` became obsolete. Individual message handlers can no
  longer skip messages. Hence, message handlers can only succeed (match) or not.
  Consequently, invoking a message handler or behavior now returns a boolean.
- All member functions of `scheduled_actor` for adding stream managers (such as
  `make_source`) were removed in favor their free-function equivalent, e.g.,
  `attach_stream_source`
- The configuration format of CAF has come a long way since first starting to
  allow user-defined configuration via `.ini` files. Rather than sticking with
  the weird hybrid that evolved over the years, we finally get rid of the last
  pieces of INI syntax and go with the much cleaner, scoped syntax. The new
  default file name for configuration files is `caf-application.conf`.

### Fixed

- Fix uninstall target when building CAF as CMake subdirectory.
- Using `inline_all_enqueues` in deterministic unit tests could result in
  deadlocks when calling blocking functions in message handlers. This function
  now behaves as expected (#1016).
- Exceptions while handling requests now trigger error messages (#1055).
- The member function `demonitor` falsely refused typed actor handles. Actors
  could monitor typed actors but not demonitoring it again. This member function
  is now a template that accepts any actor handle in the same way `monitor`
  already did.
- The `typed_actor_view` decorator lacked several member functions such as
  `link_to`, `send_exit`, etc. These are now available.
- Constructing a `typed_actor` handle from a pointer view failed du to a missing
  constructor overload. This (explicit) overload now exists and the conversion
  should work as expected.
- Sending floating points to remote actors changed `infinity` and `NaN` to
  garbage values (#1107). The fixed packing / unpacking routines for IEEE 754
  values keep these non-numeric values intact now. It is worth mentioning that
  the new algorithm downgrades signaling NaN values to silent NaN values,
  because the standard API does not provide predicates to distinguish between the
  two. This should have no implications for real-world applications, because
  actors that produce a signaling NaN trigger trap handlers before sending
  the result to another actor.
- The URI parser stored IPv4 addresses as strings (#1123). Users can now safely
  assume that the parsed URI for `tcp://127.0.0.1:8080` returns an IP address
  when calling `authority().host`.

## [0.17.7] - Unreleased

### Fixed

- Datagram servants of UDP socket managers were not added as children to their
  parent broker on creation, which prevented proper system shutdown in some
  cases. Adding all servants consistently to the broker should make sure UDP
  brokers terminate correctly (#1133).
- Backport stream manager fix from CAF 0.18 for fused downstream managers that
  prevent loss of messages during regular actor shutdown.

## [0.17.6] - 2020-07-24

### Fixed

- Trying to connect to an actor published via the OpenSSL module with the I/O
  module no longer hangs indefinitely (#1119). Instead, the OpenSSL module
  immediately closes the socket if initializing the SSL session fails.

## [0.17.5] - 2020-05-13

### Added

- In order to allow users to start migrating towards upcoming API changes, CAF
  0.17.5 includes a subset of the CAF 0.18 `type_id` API. Listing all
  user-defined types between `CAF_BEGIN_TYPE_ID_BLOCK` and
  `CAF_END_TYPE_ID_BLOCK` assigns ascending type IDs. Only one syntax for
  `CAF_ADD_ATOM` exists, since the atom text is still mandatory. Assigning type
  IDs has no immediate effect by default. However, the new function
  `actor_system_config::add_message_types` accepts an ID block and adds
  runtime-type information for all types in the block.
- In order to opt into the compile-time checks for all message types, users can
  set the `CAF_ENABLE_TYPE_ID_CHECKS` CMake flag to `ON` (pass
  `--enable-type-id-checks` when using the `configure` script). Building CAF
  with this option causes compiler errors when sending a type without a type ID.
  This option in conjunction with the new `add_message_types` function removes a
  common source of bugs: forgetting to call `add_message_type<T>` for all types
  that can cross the wire.

### Changed

- Our manual now uses `reStructuredText` instead of `LaTeX` (backport from
  [0.18.0]).

### Fixed

- Fix handling of OS-specific threading dependency in CMake.
- Fix uninstall target when building CAF as CMake subdirectory (backport from
  [0.18.0]).
- Fix potential deadlock with `inline_all_enqueues` (backport from [0.18.0]).
- Exceptions while handling requests now trigger error messages (backport from
  [0.18.0]).
- Fix build on GCC 7.2
- Fix build error in the OpenSSL module under some MSVC configurations
- Serializer and deserializer now accept `std::chrono::time_point` for all clock
  types instead of hard-wiring `std::system_clock`.
- In some edge cases, actors failed to shut down properly when hosting a stream
  source (#1076). The handshake process for a graceful shutdown has been fixed.
- Fixed a compiler error on Clang 10 (#1077).
- Setting lists and dictionaries on the command line now properly overrides
  default values and values from configuration files instead of appending to
  them (#942).
- Using unquoted strings in command-line arguments inside lists now works as
  expected. For example, `--foo=abc,def` is now equivalent to
  `--foo=["abc", "def"]`.
- Fixed a type mismatch in the parameter `middleman.heartbeat-interval` (#1095).
  CAF consistently uses `timespan` for this parameter now.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=559b1e189134e386a46db9e4ab7ca9bc87284cc5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 actor-framework/Makefile                           |  21 +--
 actor-framework/PLIST                              | 178 +++++++++++----------
 actor-framework/buildlink3.mk                      |  14 ++
 actor-framework/distinfo                           |   8 +-
 .../patches/patch-libcaf__core_caf_config.hpp      |  15 ++
 ...h-libcaf__core_src_detail_set__thread__name.cpp |  30 ++++
 6 files changed, 161 insertions(+), 105 deletions(-)

diffs:
diff --git a/actor-framework/Makefile b/actor-framework/Makefile
index fa82f831b1..27b40edcb4 100644
--- a/actor-framework/Makefile
+++ b/actor-framework/Makefile
@@ -1,31 +1,18 @@
 # $NetBSD$
 
-DISTNAME=	actor-framework-0.17.4
+DISTNAME=	actor-framework-0.18.5
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_GITHUB:=actor-framework/}
 GITHUB_TAG=	${PKGVERSION_NOREV}
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=	http://www.actor-framework.org
-COMMENT=	An Open Source Implementation of the Actor Model in C++
-LICENSE=	boost-license
+HOMEPAGE=	http://www.actor-framework.org/
+COMMENT=	Open Source Implementation of the Actor Model in C++
+LICENSE=	modified-bsd
 
 USE_CMAKE=	yes
 USE_TOOLS+=	gmake
 USE_LANGUAGES=	c c++
 
-# ./configure is a wrapper around cmake, and doesn't seem to honor PREFIX env variable.
-do-configure:
-	cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} && \
-		./configure --prefix=${PREFIX}
-
-do-build:
-	cd ${WRKSRC}/build && ${SETENV} ${MAKE_ENV} && \
-		gmake DESTDIR=${DESTDIR} PREFIX=${PREFIX}
-
-do-install:
-	cd ${WRKSRC}/build && ${SETENV} ${INSTALL_ENV} && \
-		gmake DESTDIR=${DESTDIR} PREFIX=${PREFIX} install
-
 .include "../../security/openssl/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/actor-framework/PLIST b/actor-framework/PLIST
index 2815c1edc2..639016ca00 100644
--- a/actor-framework/PLIST
+++ b/actor-framework/PLIST
@@ -1,7 +1,6 @@
 @comment $NetBSD$
 include/caf/abstract_actor.hpp
 include/caf/abstract_channel.hpp
-include/caf/abstract_composable_behavior.hpp
 include/caf/abstract_group.hpp
 include/caf/actor.hpp
 include/caf/actor_addr.hpp
@@ -39,31 +38,30 @@ include/caf/broadcast_downstream_manager.hpp
 include/caf/buffered_downstream_manager.hpp
 include/caf/byte.hpp
 include/caf/byte_address.hpp
+include/caf/byte_buffer.hpp
+include/caf/byte_span.hpp
+include/caf/caf_main.hpp
 include/caf/callback.hpp
 include/caf/catch_all.hpp
 include/caf/check_typed_input.hpp
-include/caf/composable_behavior.hpp
-include/caf/composable_behavior_based_actor.hpp
-include/caf/composed_behavior.hpp
 include/caf/composed_type.hpp
 include/caf/config.hpp
 include/caf/config_option.hpp
 include/caf/config_option_adder.hpp
 include/caf/config_option_set.hpp
 include/caf/config_value.hpp
-include/caf/config_value_adaptor.hpp
-include/caf/config_value_adaptor_access.hpp
-include/caf/config_value_adaptor_field.hpp
-include/caf/config_value_field.hpp
-include/caf/config_value_object_access.hpp
+include/caf/config_value_reader.hpp
+include/caf/config_value_writer.hpp
+include/caf/const_typed_message_view.hpp
 include/caf/cow_tuple.hpp
-include/caf/data_processor.hpp
+include/caf/credit_controller.hpp
 include/caf/decorator/sequencer.hpp
 include/caf/decorator/splitter.hpp
 include/caf/deduce_mpi.hpp
 include/caf/deep_to_string.hpp
 include/caf/default_attachable.hpp
 include/caf/default_downstream_manager.hpp
+include/caf/default_enum_inspect.hpp
 include/caf/default_sum_type_access.hpp
 include/caf/defaults.hpp
 include/caf/delegated.hpp
@@ -74,9 +72,10 @@ include/caf/detail/algorithms.hpp
 include/caf/detail/append_hex.hpp
 include/caf/detail/append_percent_encoded.hpp
 include/caf/detail/apply_args.hpp
-include/caf/detail/arg_match_t.hpp
 include/caf/detail/arg_wrapper.hpp
-include/caf/detail/atom_val.hpp
+include/caf/detail/as_mutable_ref.hpp
+include/caf/detail/assign_inspector_try_result.hpp
+include/caf/detail/base64.hpp
 include/caf/detail/behavior_impl.hpp
 include/caf/detail/behavior_stack.hpp
 include/caf/detail/blocking_behavior.hpp
@@ -84,47 +83,50 @@ include/caf/detail/bounds_checker.hpp
 include/caf/detail/build_config.hpp
 include/caf/detail/call_cfun.hpp
 include/caf/detail/cas_weak.hpp
-include/caf/detail/command_helper.hpp
 include/caf/detail/comparable.hpp
-include/caf/detail/concatenated_tuple.hpp
-include/caf/detail/config_value_adaptor_field_impl.hpp
-include/caf/detail/config_value_field_base.hpp
-include/caf/detail/config_value_field_impl.hpp
+include/caf/detail/config_consumer.hpp
 include/caf/detail/consumer.hpp
-include/caf/detail/decorated_tuple.hpp
+include/caf/detail/core_export.hpp
 include/caf/detail/default_invoke_result_visitor.hpp
 include/caf/detail/delegate_serialize.hpp
-include/caf/detail/dispatch_parse_cli.hpp
-include/caf/detail/disposer.hpp
 include/caf/detail/double_ended_queue.hpp
-include/caf/detail/dynamic_message_data.hpp
-include/caf/detail/embedded.hpp
+include/caf/detail/encode_base64.hpp
 include/caf/detail/enqueue_result.hpp
-include/caf/detail/fnv_hash.hpp
 include/caf/detail/functor_attachable.hpp
 include/caf/detail/gcd.hpp
 include/caf/detail/get_mac_addresses.hpp
 include/caf/detail/get_process_id.hpp
 include/caf/detail/get_root_uuid.hpp
+include/caf/detail/glob_match.hpp
+include/caf/detail/group_tunnel.hpp
 include/caf/detail/ieee_754.hpp
 include/caf/detail/implicit_conversions.hpp
-include/caf/detail/ini_consumer.hpp
 include/caf/detail/init_fun_factory.hpp
 include/caf/detail/int_list.hpp
 include/caf/detail/invoke_result_visitor.hpp
+include/caf/detail/io_export.hpp
+include/caf/detail/is_complete.hpp
 include/caf/detail/is_one_of.hpp
-include/caf/detail/is_primitive_config_value.hpp
+include/caf/detail/json.hpp
+include/caf/detail/latch.hpp
 include/caf/detail/limited_vector.hpp
+include/caf/detail/local_group_module.hpp
 include/caf/detail/log_level.hpp
+include/caf/detail/make_meta_object.hpp
 include/caf/detail/make_unique.hpp
 include/caf/detail/mask_bits.hpp
-include/caf/detail/merged_tuple.hpp
+include/caf/detail/message_builder_element.hpp
 include/caf/detail/message_data.hpp
+include/caf/detail/meta_object.hpp
+include/caf/detail/monotonic_buffer_resource.hpp
 include/caf/detail/move_if_not_ptr.hpp
-include/caf/detail/mpi_splice.hpp
+include/caf/detail/mtl_util.hpp
 include/caf/detail/network_order.hpp
+include/caf/detail/offset_at.hpp
+include/caf/detail/openssl_export.hpp
 include/caf/detail/optional_message_visitor.hpp
 include/caf/detail/overload.hpp
+include/caf/detail/padded_size.hpp
 include/caf/detail/parse.hpp
 include/caf/detail/parser/add_ascii.hpp
 include/caf/detail/parser/ascii_to_int.hpp
@@ -133,10 +135,9 @@ include/caf/detail/parser/fsm.hpp
 include/caf/detail/parser/fsm_undef.hpp
 include/caf/detail/parser/is_char.hpp
 include/caf/detail/parser/is_digit.hpp
-include/caf/detail/parser/read_atom.hpp
 include/caf/detail/parser/read_bool.hpp
+include/caf/detail/parser/read_config.hpp
 include/caf/detail/parser/read_floating_point.hpp
-include/caf/detail/parser/read_ini.hpp
 include/caf/detail/parser/read_ipv4_address.hpp
 include/caf/detail/parser/read_ipv6_address.hpp
 include/caf/detail/parser/read_number.hpp
@@ -150,11 +151,14 @@ include/caf/detail/parser/sub_ascii.hpp
 include/caf/detail/path_state.hpp
 include/caf/detail/pp.hpp
 include/caf/detail/pretty_type_name.hpp
+include/caf/detail/print.hpp
 include/caf/detail/private_thread.hpp
+include/caf/detail/private_thread_pool.hpp
 include/caf/detail/profiled_send.hpp
+include/caf/detail/prometheus_broker.hpp
 include/caf/detail/pseudo_tuple.hpp
 include/caf/detail/raw_access.hpp
-include/caf/detail/raw_ptr.hpp
+include/caf/detail/remote_group_module.hpp
 include/caf/detail/ringbuffer.hpp
 include/caf/detail/ripemd_160.hpp
 include/caf/detail/safe_equal.hpp
@@ -165,9 +169,9 @@ include/caf/detail/serialized_size.hpp
 include/caf/detail/set_thread_name.hpp
 include/caf/detail/shared_spinlock.hpp
 include/caf/detail/simple_actor_clock.hpp
+include/caf/detail/size_based_credit_controller.hpp
 include/caf/detail/socket_guard.hpp
 include/caf/detail/spawn_fwd.hpp
-include/caf/detail/spawn_helper.hpp
 include/caf/detail/spawnable.hpp
 include/caf/detail/split_join.hpp
 include/caf/detail/squashed_int.hpp
@@ -185,18 +189,15 @@ include/caf/detail/tbind.hpp
 include/caf/detail/test_actor_clock.hpp
 include/caf/detail/thread_safe_actor_clock.hpp
 include/caf/detail/tick_emitter.hpp
-include/caf/detail/try_match.hpp
+include/caf/detail/token_based_credit_controller.hpp
 include/caf/detail/try_serialize.hpp
-include/caf/detail/tuple_vals.hpp
-include/caf/detail/type_erased_tuple_view.hpp
-include/caf/detail/type_erased_value_impl.hpp
+include/caf/detail/type_id_list_builder.hpp
 include/caf/detail/type_list.hpp
 include/caf/detail/type_pair.hpp
 include/caf/detail/type_traits.hpp
 include/caf/detail/typed_actor_util.hpp
 include/caf/detail/unique_function.hpp
 include/caf/detail/unordered_flat_map.hpp
-include/caf/detail/uri_impl.hpp
 include/caf/detail/variant_data.hpp
 include/caf/detail/worker_hub.hpp
 include/caf/dictionary.hpp
@@ -204,8 +205,8 @@ include/caf/downstream.hpp
 include/caf/downstream_manager.hpp
 include/caf/downstream_manager_base.hpp
 include/caf/downstream_msg.hpp
-include/caf/duration.hpp
 include/caf/error.hpp
+include/caf/error_code.hpp
 include/caf/event_based_actor.hpp
 include/caf/exec_main.hpp
 include/caf/execution_unit.hpp
@@ -219,11 +220,16 @@ include/caf/fwd.hpp
 include/caf/group.hpp
 include/caf/group_manager.hpp
 include/caf/group_module.hpp
+include/caf/hash/fnv.hpp
+include/caf/hash/sha1.hpp
 include/caf/illegal_message_element.hpp
 include/caf/inbound_path.hpp
-include/caf/index_mapping.hpp
 include/caf/infer_handle.hpp
+include/caf/init_global_meta_objects.hpp
 include/caf/input_range.hpp
+include/caf/inspector_access.hpp
+include/caf/inspector_access_base.hpp
+include/caf/inspector_access_type.hpp
 include/caf/interface_mismatch.hpp
 include/caf/intrusive/drr_cached_queue.hpp
 include/caf/intrusive/drr_queue.hpp
@@ -245,7 +251,6 @@ include/caf/io/abstract_broker.hpp
 include/caf/io/accept_handle.hpp
 include/caf/io/all.hpp
 include/caf/io/basp/all.hpp
-include/caf/io/basp/buffer_type.hpp
 include/caf/io/basp/connection_state.hpp
 include/caf/io/basp/endpoint_context.hpp
 include/caf/io/basp/fwd.hpp
@@ -317,27 +322,26 @@ include/caf/ipv6_address.hpp
 include/caf/ipv6_endpoint.hpp
 include/caf/ipv6_subnet.hpp
 include/caf/is_actor_handle.hpp
+include/caf/is_error_code_enum.hpp
 include/caf/is_message_sink.hpp
 include/caf/is_timeout_or_catch_all.hpp
 include/caf/is_typed_actor.hpp
+include/caf/json_reader.hpp
+include/caf/json_writer.hpp
+include/caf/load_inspector.hpp
+include/caf/load_inspector_base.hpp
 include/caf/local_actor.hpp
 include/caf/locks.hpp
 include/caf/logger.hpp
 include/caf/mailbox_element.hpp
 include/caf/make_actor.hpp
 include/caf/make_config_option.hpp
-include/caf/make_config_value_field.hpp
 include/caf/make_copy_on_write.hpp
 include/caf/make_counted.hpp
 include/caf/make_message.hpp
 include/caf/make_sink_result.hpp
-include/caf/make_source.hpp
 include/caf/make_source_result.hpp
 include/caf/make_stage_result.hpp
-include/caf/make_type_erased_tuple_view.hpp
-include/caf/make_type_erased_value.hpp
-include/caf/make_type_erased_view.hpp
-include/caf/match_case.hpp
 include/caf/may_have_timeout.hpp
 include/caf/memory_managed.hpp
 include/caf/message.hpp
@@ -345,7 +349,6 @@ include/caf/message_builder.hpp
 include/caf/message_handler.hpp
 include/caf/message_id.hpp
 include/caf/message_priority.hpp
-include/caf/message_view.hpp
 include/caf/meta/annotation.hpp
 include/caf/meta/hex_formatted.hpp
 include/caf/meta/load_callback.hpp
@@ -360,22 +363,10 @@ include/caf/mixin/requester.hpp
 include/caf/mixin/sender.hpp
 include/caf/mixin/subscriber.hpp
 include/caf/monitorable_actor.hpp
-include/caf/named_actor_config.hpp
+include/caf/mtl.hpp
 include/caf/no_stages.hpp
 include/caf/node_id.hpp
 include/caf/none.hpp
-include/caf/opencl/actor_facade.hpp
-include/caf/opencl/all.hpp
-include/caf/opencl/arguments.hpp
-include/caf/opencl/command.hpp
-include/caf/opencl/device.hpp
-include/caf/opencl/global.hpp
-include/caf/opencl/manager.hpp
-include/caf/opencl/mem_ref.hpp
-include/caf/opencl/nd_range.hpp
-include/caf/opencl/opencl_err.hpp
-include/caf/opencl/platform.hpp
-include/caf/opencl/program.hpp
 include/caf/openssl/all.hpp
 include/caf/openssl/manager.hpp
 include/caf/openssl/middleman_actor.hpp
@@ -386,15 +377,16 @@ include/caf/openssl/unpublish.hpp
 include/caf/optional.hpp
 include/caf/others.hpp
 include/caf/outbound_path.hpp
-include/caf/param.hpp
 include/caf/parser_state.hpp
 include/caf/pec.hpp
 include/caf/policy/arg.hpp
 include/caf/policy/categorized.hpp
 include/caf/policy/downstream_messages.hpp
 include/caf/policy/normal_messages.hpp
-include/caf/policy/profiled.hpp
 include/caf/policy/scheduler_policy.hpp
+include/caf/policy/select_all.hpp
+include/caf/policy/select_any.hpp
+include/caf/policy/single_response.hpp
 include/caf/policy/tcp.hpp
 include/caf/policy/udp.hpp
 include/caf/policy/unprofiled.hpp
@@ -402,11 +394,9 @@ include/caf/policy/upstream_messages.hpp
 include/caf/policy/urgent_messages.hpp
 include/caf/policy/work_sharing.hpp
 include/caf/policy/work_stealing.hpp
-include/caf/primitive_variant.hpp
 include/caf/prohibit_top_level_spawn_marker.hpp
 include/caf/proxy_registry.hpp
 include/caf/raise_error.hpp
-include/caf/raw_event_based_actor.hpp
 include/caf/ref_counted.hpp
 include/caf/replies_to.hpp
 include/caf/response_handle.hpp
@@ -414,8 +404,8 @@ include/caf/response_promise.hpp
 include/caf/response_type.hpp
 include/caf/result.hpp
 include/caf/resumable.hpp
-include/caf/rtti_pair.hpp
-include/caf/runtime_settings_map.hpp
+include/caf/save_inspector.hpp
+include/caf/save_inspector_base.hpp
 include/caf/scheduled_actor.hpp
 include/caf/scheduler.hpp
 include/caf/scheduler/abstract_coordinator.hpp
@@ -428,7 +418,6 @@ include/caf/scoped_execution_unit.hpp
 include/caf/sec.hpp
 include/caf/send.hpp
 include/caf/serializer.hpp
-include/caf/serializer_impl.hpp
 include/caf/settings.hpp
 include/caf/skip.hpp
 include/caf/span.hpp
@@ -437,11 +426,9 @@ include/caf/stateful_actor.hpp
 include/caf/static_visitor.hpp
 include/caf/stream.hpp
 include/caf/stream_aborter.hpp
-include/caf/stream_deserializer.hpp
 include/caf/stream_finalize_trait.hpp
 include/caf/stream_manager.hpp
 include/caf/stream_priority.hpp
-include/caf/stream_serializer.hpp
 include/caf/stream_sink.hpp
 include/caf/stream_sink_driver.hpp
 include/caf/stream_sink_trait.hpp
@@ -452,7 +439,6 @@ include/caf/stream_source_trait.hpp
 include/caf/stream_stage.hpp
 include/caf/stream_stage_driver.hpp
 include/caf/stream_stage_trait.hpp
-include/caf/streambuf.hpp
 include/caf/string_algorithms.hpp
 include/caf/string_view.hpp
 include/caf/sum_type.hpp
@@ -460,7 +446,24 @@ include/caf/sum_type_access.hpp
 include/caf/sum_type_token.hpp
 include/caf/system_messages.hpp
 include/caf/tag/boxing_type.hpp
+include/caf/telemetry/collector/prometheus.hpp
+include/caf/telemetry/counter.hpp
+include/caf/telemetry/dbl_gauge.hpp
+include/caf/telemetry/gauge.hpp
+include/caf/telemetry/histogram.hpp
+include/caf/telemetry/importer/process.hpp
+include/caf/telemetry/int_gauge.hpp
+include/caf/telemetry/label.hpp
+include/caf/telemetry/label_view.hpp
+include/caf/telemetry/metric.hpp
+include/caf/telemetry/metric_family.hpp
+include/caf/telemetry/metric_family_impl.hpp
+include/caf/telemetry/metric_impl.hpp
+include/caf/telemetry/metric_registry.hpp
+include/caf/telemetry/metric_type.hpp
+include/caf/telemetry/timer.hpp
 include/caf/term.hpp
+include/caf/test/bdd_dsl.hpp
 include/caf/test/dsl.hpp
 include/caf/test/io_dsl.hpp
 include/caf/test/unit_test.hpp
@@ -469,41 +472,45 @@ include/caf/thread_hook.hpp
 include/caf/timeout_definition.hpp
 include/caf/timespan.hpp
 include/caf/timestamp.hpp
-include/caf/to_string.hpp
-include/caf/type_erased_tuple.hpp
+include/caf/tracing_data.hpp
+include/caf/tracing_data_factory.hpp
 include/caf/type_erased_value.hpp
-include/caf/type_nr.hpp
+include/caf/type_id.hpp
+include/caf/type_id_list.hpp
 include/caf/typed_actor.hpp
 include/caf/typed_actor_pointer.hpp
 include/caf/typed_actor_view.hpp
 include/caf/typed_actor_view_base.hpp
 include/caf/typed_behavior.hpp
 include/caf/typed_event_based_actor.hpp
+include/caf/typed_message_view.hpp
 include/caf/typed_response_promise.hpp
-include/caf/uniform_type_info_map.hpp
 include/caf/unifyn.hpp
 include/caf/unit.hpp
+include/caf/unsafe_behavior_init.hpp
 include/caf/upstream_msg.hpp
 include/caf/uri.hpp
 include/caf/uri_builder.hpp
+include/caf/uuid.hpp
 include/caf/variant.hpp
 include/caf/weak_intrusive_ptr.hpp
-lib/libcaf_core.${PKGVERSION}.dylib
-lib/libcaf_core.dylib
-lib/libcaf_io.${PKGVERSION}.dylib
-lib/libcaf_io.dylib
-lib/libcaf_opencl.${PKGVERSION}.dylib
-lib/libcaf_opencl.dylib
-lib/libcaf_openssl.${PKGVERSION}.dylib
-lib/libcaf_openssl.dylib
+lib/cmake/CAF/CAFConfig.cmake
+lib/cmake/CAF/CAFConfigVersion.cmake
+lib/cmake/CAF/CAFTargets-noconfig.cmake
+lib/cmake/CAF/CAFTargets.cmake
+lib/libcaf_core.so
+lib/libcaf_core.so.${PKGVERSION}
+lib/libcaf_io.so
+lib/libcaf_io.so.${PKGVERSION}
+lib/libcaf_openssl.so
+lib/libcaf_openssl.so.${PKGVERSION}
 share/caf/examples/aout.cpp
 share/caf/examples/broker/simple_broker.cpp
 share/caf/examples/broker/simple_http_broker.cpp
-share/caf/examples/composition/calculator_behavior.cpp
-share/caf/examples/composition/dictionary_behavior.cpp
 share/caf/examples/custom_type/custom_types_1.cpp
 share/caf/examples/custom_type/custom_types_2.cpp
 share/caf/examples/custom_type/custom_types_3.cpp
+share/caf/examples/custom_type/custom_types_4.cpp
 share/caf/examples/dynamic_behavior/dining_philosophers.cpp
 share/caf/examples/dynamic_behavior/skip_messages.cpp
 share/caf/examples/hello_world.cpp
@@ -512,6 +519,7 @@ share/caf/examples/message_passing/cell.cpp
 share/caf/examples/message_passing/dancing_kirby.cpp
 share/caf/examples/message_passing/delegating.cpp
 share/caf/examples/message_passing/divider.cpp
+share/caf/examples/message_passing/fan_out_request.cpp
 share/caf/examples/message_passing/fixed_stack.cpp
 share/caf/examples/message_passing/promises.cpp
 share/caf/examples/message_passing/request.cpp
@@ -522,5 +530,5 @@ share/caf/examples/remoting/group_server.cpp
 share/caf/examples/remoting/remote_spawn.cpp
 share/caf/examples/streaming/integer_stream.cpp
 share/caf/examples/testing/ping_pong.cpp
-share/caf/tools/caf-run.cpp
-share/caf/tools/caf-vec.cpp
+share/caf/tools/caf-run
+share/caf/tools/caf-vec
diff --git a/actor-framework/buildlink3.mk b/actor-framework/buildlink3.mk
new file mode 100644
index 0000000000..f40b819394
--- /dev/null
+++ b/actor-framework/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	actor-framework
+
+.if !defined(ACTOR_FRAMEWORK_BUILDLINK3_MK)
+ACTOR_FRAMEWORK_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.actor-framework+=	actor-framework>=0.18.5
+BUILDLINK_PKGSRCDIR.actor-framework?=	../../wip/actor-framework
+
+.include "../../security/openssl/buildlink3.mk"
+.endif	# ACTOR_FRAMEWORK_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-actor-framework
diff --git a/actor-framework/distinfo b/actor-framework/distinfo
index 7445bf451f..99d0d9b5b0 100644
--- a/actor-framework/distinfo
+++ b/actor-framework/distinfo
@@ -1,5 +1,7 @@
 $NetBSD$
 
-RMD160 (actor-framework-0.17.4.tar.gz) = 5ff8580d05c832d7e4b86d8ef670936d2a5b3a3a
-SHA512 (actor-framework-0.17.4.tar.gz) = 05ccc6c8c6bd0458c72cc2e13b9079ee1dc38d10c66f491d60f0c064e1e301a3bf43c0305e10ef7459eae39d92a0950504781b182fd4d867f452cd04bd87ecbb
-Size (actor-framework-0.17.4.tar.gz) = 2683477 bytes
+BLAKE2s (actor-framework-0.18.5.tar.gz) = 8cd0bdd72cfa5a99edc5401f162193addd7c49a13bbe0e3d93a40a9036fde9b7
+SHA512 (actor-framework-0.18.5.tar.gz) = 5b85e127cacc6df4a20c97d1c1f4d08f19a3e37812a7d8347c6ac46fcc1264a35212619030456221b70fc311b8078c0362cf8b21470518050ece5de4a5de1774
+Size (actor-framework-0.18.5.tar.gz) = 2827181 bytes
+SHA1 (patch-libcaf__core_caf_config.hpp) = a46342be3f0e710b0f184cf4cbf352a6c3077909
+SHA1 (patch-libcaf__core_src_detail_set__thread__name.cpp) = eba1aeba28f9001bc1b9bf337153815dcbd57abc
diff --git a/actor-framework/patches/patch-libcaf__core_caf_config.hpp b/actor-framework/patches/patch-libcaf__core_caf_config.hpp
new file mode 100644
index 0000000000..45e8a3e7bf
--- /dev/null
+++ b/actor-framework/patches/patch-libcaf__core_caf_config.hpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* add NetBSD support
+
+--- libcaf_core/caf/config.hpp.orig	2021-07-16 09:33:16.000000000 +0000
++++ libcaf_core/caf/config.hpp
+@@ -191,6 +191,8 @@
+ #  endif
+ #elif defined(__FreeBSD__)
+ #  define CAF_BSD
++#elif defined(__NetBSD__)
++#  define CAF_BSD
+ #elif defined(__OpenBSD__)
+ #  define CAF_BSD
+ #elif defined(__CYGWIN__)
diff --git a/actor-framework/patches/patch-libcaf__core_src_detail_set__thread__name.cpp b/actor-framework/patches/patch-libcaf__core_src_detail_set__thread__name.cpp
new file mode 100644
index 0000000000..60139b4090
--- /dev/null
+++ b/actor-framework/patches/patch-libcaf__core_src_detail_set__thread__name.cpp
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* NetBSD does not have pthread_np.h, since this package requires c++17 use _has_include
+  so that pthread_np.h is only included on platforms that have it
+
+* add NetBSD support
+
+--- libcaf_core/src/detail/set_thread_name.cpp.orig	2021-07-16 09:33:16.000000000 +0000
++++ libcaf_core/src/detail/set_thread_name.cpp
+@@ -12,7 +12,7 @@
+ 
+ #if defined(CAF_LINUX)
+ #  include <sys/prctl.h>
+-#elif defined(CAF_BSD)
++#elif __has_include(<pthread_np.h>)
+ #  include <pthread_np.h>
+ #endif // defined(...)
+ 
+@@ -33,7 +33,11 @@ void set_thread_name(const char* name) {
+ #  elif defined(CAF_LINUX)
+   prctl(PR_SET_NAME, name, 0, 0, 0);
+ #  elif defined(CAF_BSD)
++#    if defined(__NetBSD__)
++  pthread_setname_np(pthread_self(), name , NULL); 
++#    else
+   pthread_set_name_np(pthread_self(), name);
++#    endif
+ #  endif // defined(...)
+ #endif   // CAF_WINDOWS
+ }



Home | Main Index | Thread Index | Old Index