Skip to content

Commit

Permalink
net/libsockpp: C++ socket library
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter2121 authored and arrowd committed Dec 4, 2023
1 parent 4994c45 commit ee394fe
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/Makefile
Expand Up @@ -425,6 +425,7 @@
SUBDIR += librsync
SUBDIR += libsignal-protocol-c
SUBDIR += libslirp
SUBDIR += libsockpp
SUBDIR += libsrtp2
SUBDIR += libtnl
SUBDIR += libtrace
Expand Down
34 changes: 34 additions & 0 deletions net/libsockpp/Makefile
@@ -0,0 +1,34 @@
PORTNAME= libsockpp
DISTVERSIONPREFIX= v
DISTVERSION= 0.8.1
CATEGORIES= net devel

MAINTAINER= peter@flytrace.com
COMMENT= Simple, modern, C++ socket library
WWW= https://github.com/fpagliughi/sockpp

LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE

USES= cmake compiler:c++14-lang

USE_LDCONFIG= yes

USE_GITHUB= yes
GH_ACCOUNT= fpagliughi
GH_PROJECT= sockpp

OPTIONS_DEFINE= TEST

TEST_DESC= Build unit tests (requires Catch2)

TEST_BUILD_DEPENDS= catch2>0:devel/catch2
TEST_CMAKE_BOOL= SOCKPP_BUILD_TESTS

CMAKE_ARGS= -DSOCKPP_BUILD_STATIC=FALSE -DSOCKPP_BUILD_DOCUMENTATION=FALSE

post-patch:
${REINPLACE_CMD} -e 's|#include "catch2/catch.hpp"|#include "catch2/catch_all.hpp"|' \
${WRKSRC}/tests/unit/*.cpp

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions net/libsockpp/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1701641346
SHA256 (fpagliughi-sockpp-v0.8.1_GH0.tar.gz) = a8aedff8bd8c1da530b91be650352008fddabc9f1df0d19701d76cbc359c8651
SIZE (fpagliughi-sockpp-v0.8.1_GH0.tar.gz) = 114112
4 changes: 4 additions & 0 deletions net/libsockpp/pkg-descr
@@ -0,0 +1,4 @@
Sockpp is a fairly low-level C++ wrapper around the Berkeley sockets library
using socket, acceptor, and connector classes that are familiar concepts from
other languages. The base socket class wraps a system socket handle, and
maintains its lifetime.
35 changes: 35 additions & 0 deletions net/libsockpp/pkg-plist
@@ -0,0 +1,35 @@
include/sockpp/acceptor.h
include/sockpp/can_address.h
include/sockpp/can_frame.h
include/sockpp/can_socket.h
include/sockpp/connector.h
include/sockpp/datagram_socket.h
include/sockpp/exception.h
include/sockpp/inet6_address.h
include/sockpp/inet_address.h
include/sockpp/platform.h
include/sockpp/result.h
include/sockpp/sock_address.h
include/sockpp/socket.h
include/sockpp/stream_socket.h
include/sockpp/tcp6_acceptor.h
include/sockpp/tcp6_connector.h
include/sockpp/tcp6_socket.h
include/sockpp/tcp_acceptor.h
include/sockpp/tcp_connector.h
include/sockpp/tcp_socket.h
include/sockpp/udp6_socket.h
include/sockpp/udp_socket.h
include/sockpp/unix_acceptor.h
include/sockpp/unix_address.h
include/sockpp/unix_connector.h
include/sockpp/unix_dgram_socket.h
include/sockpp/unix_stream_socket.h
include/sockpp/version.h
lib/cmake/sockpp/sockppConfig.cmake
lib/cmake/sockpp/sockppConfigVersion.cmake
lib/cmake/sockpp/sockppTargets-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/sockpp/sockppTargets.cmake
lib/libsockpp.so
lib/libsockpp.so.0
lib/libsockpp.so.0.8.1

0 comments on commit ee394fe

Please sign in to comment.