aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/gamenetworkingsockets
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/gamenetworkingsockets
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/gamenetworkingsockets')
-rw-r--r--vcpkg/ports/gamenetworkingsockets/fix-depend-protobuf.patch12
-rw-r--r--vcpkg/ports/gamenetworkingsockets/portfile.cmake34
-rw-r--r--vcpkg/ports/gamenetworkingsockets/vcpkg.json21
3 files changed, 67 insertions, 0 deletions
diff --git a/vcpkg/ports/gamenetworkingsockets/fix-depend-protobuf.patch b/vcpkg/ports/gamenetworkingsockets/fix-depend-protobuf.patch
new file mode 100644
index 0000000..d596d39
--- /dev/null
+++ b/vcpkg/ports/gamenetworkingsockets/fix-depend-protobuf.patch
@@ -0,0 +1,12 @@
+diff --git a/cmake/GameNetworkingSocketsConfig.cmake.in b/cmake/GameNetworkingSocketsConfig.cmake.in
+index 1a27988..5076a6e 100644
+--- a/cmake/GameNetworkingSocketsConfig.cmake.in
++++ b/cmake/GameNetworkingSocketsConfig.cmake.in
+@@ -3,6 +3,7 @@
+ include(CMakeFindDependencyMacro)
+
+ find_dependency(Threads)
++find_dependency(Protobuf)
+
+ if(@USE_CRYPTO@ STREQUAL "OpenSSL")
+ find_dependency(OpenSSL)
diff --git a/vcpkg/ports/gamenetworkingsockets/portfile.cmake b/vcpkg/ports/gamenetworkingsockets/portfile.cmake
new file mode 100644
index 0000000..9c57f34
--- /dev/null
+++ b/vcpkg/ports/gamenetworkingsockets/portfile.cmake
@@ -0,0 +1,34 @@
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ValveSoftware/GameNetworkingSockets
+ REF 505c697d0abef5da2ff3be35aa4ea3687597c3e9 # v1.4.1
+ SHA512 3e4b4da138f2b356169e6504aa899c9eca4fba5b5fcaed2a0ae8a2f5828976dd00af9f3262c75bd6d820300da87ebe32da152fecddc278a651f3b33eb59142df
+ HEAD_REF master
+ PATCHES
+ fix-depend-protobuf.patch
+)
+
+set(CRYPTO_BACKEND OpenSSL)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_TESTS=OFF
+ -DBUILD_EXAMPLES=OFF
+ -DBUILD_TOOLS=OFF
+ -DUSE_CRYPTO=${CRYPTO_BACKEND}
+ -DUSE_CRYPTO25519=${CRYPTO_BACKEND}
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/GameNetworkingSockets")
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_copy_pdbs()
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/gamenetworkingsockets/vcpkg.json b/vcpkg/ports/gamenetworkingsockets/vcpkg.json
new file mode 100644
index 0000000..c291a05
--- /dev/null
+++ b/vcpkg/ports/gamenetworkingsockets/vcpkg.json
@@ -0,0 +1,21 @@
+{
+ "name": "gamenetworkingsockets",
+ "version": "1.4.1",
+ "port-version": 1,
+ "description": "GameNetworkingSockets is a basic transport layer for games.",
+ "homepage": "https://github.com/ValveSoftware/GameNetworkingSockets",
+ "license": "BSD-3-Clause",
+ "supports": "!(static & windows) & !uwp & !(arm64 & windows)",
+ "dependencies": [
+ "openssl",
+ "protobuf",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}