diff --git a/net/gamenetworkingsockets/Makefile b/net/gamenetworkingsockets/Makefile new file mode 100644 index 000000000..69b578036 --- /dev/null +++ b/net/gamenetworkingsockets/Makefile @@ -0,0 +1,23 @@ +# Created by: Karsten Pedersen + +PORTNAME= gamenetworkingsockets +PORTVERSION= 1.3.0 +CATEGORIES= net + +USE_GITHUB= yes +GH_ACCOUNT= ValveSoftware +GH_PROJECT= GameNetworkingSockets +GH_TAGNAME= v${PORTVERSION} + +MAINTAINER= kpedersen@disroot.org +COMMENT= GameNetworkingSockets is a basic transport layer for games + +LICENSE= BSD3CLAUSE + +LIB_DEPENDS= libprotobuf.so:devel/protobuf +USES= cmake + +CMAKE_ARGS= -DGAMENETWORKINGSOCKETS_BUILD_EXAMPLES=OFF \ + -DGAMENETWORKINGSOCKETS_BUILD_TESTS=OFF + +.include diff --git a/net/gamenetworkingsockets/distinfo b/net/gamenetworkingsockets/distinfo new file mode 100644 index 000000000..ec248e8bc --- /dev/null +++ b/net/gamenetworkingsockets/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1622467923 +SHA256 (ValveSoftware-GameNetworkingSockets-1.3.0-v1.3.0_GH0.tar.gz) = f473789ae8a8415dd1f5473793775e68a919d27eba18b9ba7d0a14f254afddf9 +SIZE (ValveSoftware-GameNetworkingSockets-1.3.0-v1.3.0_GH0.tar.gz) = 10921035 diff --git a/net/gamenetworkingsockets/files/patch-include_steam_steamclientpublic.h b/net/gamenetworkingsockets/files/patch-include_steam_steamclientpublic.h new file mode 100644 index 000000000..2034a2143 --- /dev/null +++ b/net/gamenetworkingsockets/files/patch-include_steam_steamclientpublic.h @@ -0,0 +1,11 @@ +--- include/steam/steamclientpublic.h.orig 2021-05-31 13:43:13 UTC ++++ include/steam/steamclientpublic.h +@@ -1257,7 +1257,7 @@ typedef void *BREAKPAD_HANDLE; + #define VALVE_CALLBACK_PACK_LARGE + #else + +- #if defined(__linux__) || defined(__APPLE__) ++ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to diff --git a/net/gamenetworkingsockets/pkg-descr b/net/gamenetworkingsockets/pkg-descr new file mode 100644 index 000000000..9c0487cd1 --- /dev/null +++ b/net/gamenetworkingsockets/pkg-descr @@ -0,0 +1,27 @@ +GameNetworkingSockets is a basic transport layer for games. The features are: + +- Connection-oriented API (like TCP) + +- ... but message-oriented (like UDP), not stream-oriented. + +- Supports both reliable and unreliable message types + +- Messages can be larger than underlying MTU. The protocol performs + fragmentation, reassembly, and retransmission for reliable messages. + +- A reliability layer significantly more sophisticated than a basic + TCP-style sliding window. It is based on the "ack vector" model + from DCCP (RFC 4340, section 11.4) and Google QUIC and discussed + in the context of games by Glenn Fiedler. The basic idea is for the + receiver to efficiently communicate to the sender the status of + every packet number (whether or not a packet was received with that + number). By remembering which segments were sent in each packet, + the sender can deduce which segments need to be retransmitted. + +- Encryption. AES-GCM-256 per packet, Curve25519 for key exchange + and cert signatures. The details for shared key derivation and + per-packet IV are based on the design used by Google's QUIC + protocol. Tools for simulating packet latency/loss, and detailed + stats measurement IPv6 support Peer-to-peer networking: + +WWW: https://github.com/ValveSoftware/GameNetworkingSockets diff --git a/net/gamenetworkingsockets/pkg-plist b/net/gamenetworkingsockets/pkg-plist new file mode 100644 index 000000000..a9b6c2d35 --- /dev/null +++ b/net/gamenetworkingsockets/pkg-plist @@ -0,0 +1,17 @@ +include/GameNetworkingSockets/steam/isteamnetworkingmessages.h +include/GameNetworkingSockets/steam/isteamnetworkingsockets.h +include/GameNetworkingSockets/steam/isteamnetworkingutils.h +include/GameNetworkingSockets/steam/steam_api_common.h +include/GameNetworkingSockets/steam/steamclientpublic.h +include/GameNetworkingSockets/steam/steamclientpublic.h.orig +include/GameNetworkingSockets/steam/steamnetworkingcustomsignaling.h +include/GameNetworkingSockets/steam/steamnetworkingsockets.h +include/GameNetworkingSockets/steam/steamnetworkingsockets_flat.h +include/GameNetworkingSockets/steam/steamnetworkingtypes.h +include/GameNetworkingSockets/steam/steamtypes.h +include/GameNetworkingSockets/steam/steamuniverse.h +lib/cmake/GameNetworkingSockets/GameNetworkingSockets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/GameNetworkingSockets/GameNetworkingSockets.cmake +lib/cmake/GameNetworkingSockets/GameNetworkingSocketsConfig.cmake +lib/libGameNetworkingSockets.so +lib/libGameNetworkingSockets_s.a