From 05bbd5cbe95071db458290560b3d273a5041599c Mon Sep 17 00:00:00 2001 From: Andrew Simpson Date: Wed, 2 Sep 2020 16:47:38 +0100 Subject: [PATCH 1/7] Added GameNetworkingSockets port --- ports/gamenetworkingsockets/portfile.cmake | 35 ++++++++++++++++++++++ ports/gamenetworkingsockets/vcpkg.json | 29 ++++++++++++++++++ scripts/ci.baseline.txt | 9 ++++++ 3 files changed, 73 insertions(+) create mode 100644 ports/gamenetworkingsockets/portfile.cmake create mode 100644 ports/gamenetworkingsockets/vcpkg.json diff --git a/ports/gamenetworkingsockets/portfile.cmake b/ports/gamenetworkingsockets/portfile.cmake new file mode 100644 index 00000000000000..e930af146abec6 --- /dev/null +++ b/ports/gamenetworkingsockets/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ValveSoftware/GameNetworkingSockets + REF 78f45903de3df698f9ec94cdce2f34bd0088f145 + SHA512 1bf2fb2613eca28a787c741b2bac2bebd1c534edc81270b0b3585ef433b427ff799b2caeb00c28e5bd991ea3a0dd76267151b4aced648a0d3c39aa4817dc009d + HEAD_REF master +) + +if(openssl IN_LIST FEATURES) + set(CRYPTO_BACKEND OpenSSL) +endif() + +if(libsodium IN_LIST FEATURES) + set(CRYPTO_BACKEND libsodium) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGAMENETWORKINGSOCKETS_BUILD_TESTS=OFF + -DGAMENETWORKINGSOCKETS_BUILD_EXAMPLES=OFF + -DUSE_CRYPTO=${CRYPTO_BACKEND} + -DUSE_CRYPTO25519=${CRYPTO_BACKEND} +) + +vcpkg_install_cmake() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/GameNetworkingSockets" TARGET_PATH "share/GameNetworkingSockets") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/gamenetworkingsockets/vcpkg.json b/ports/gamenetworkingsockets/vcpkg.json new file mode 100644 index 00000000000000..97aad41af84096 --- /dev/null +++ b/ports/gamenetworkingsockets/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "gamenetworkingsockets", + "version-string": "2020-09-02", + "description": "GameNetworkingSockets is a basic transport layer for games.", + "homepage": "https://github.com/ValveSoftware/GameNetworkingSockets", + "supports": "!(static & windows)", + "dependencies": [ + "protobuf" + ], + "default-features": [ + "openssl" + ], + "features": [ + { + "name": "libsodium", + "description": "Use libsodium as the crypto backend", + "dependencies": [ + "libsodium" + ] + }, + { + "name": "openssl", + "description": "Use OpenSSL as the crypto backend", + "dependencies": [ + "openssl" + ] + } + ] +} diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index a44f6881eaff38..1b4af199439379 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -359,6 +359,15 @@ g3log:x64-uwp=fail gainput:arm-uwp=fail gainput:x64-linux=fail gainput:x64-uwp=fail +<<<<<<< HEAD +======= +gamenetworkingsockets:arm64-windows=fail +gamenetworkingsockets:arm-uwp=fail +gamenetworkingsockets:x64-uwp=fail +gamenetworkingsockets:x64-windows-static=fail +gamma:x64-linux=fail +gamma:x64-osx=fail +>>>>>>> 0a6f2c30a... Added GameNetworkingSockets port gasol:arm64-windows=fail gasol:arm-uwp=fail gasol:x64-uwp=fail From 2e89e2417217fd075c755990900e792062741a27 Mon Sep 17 00:00:00 2001 From: Francis Lemaire Date: Tue, 22 Sep 2020 01:51:58 -0400 Subject: [PATCH 2/7] Fixing requested changes in PR * added `vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)` * added missing trailing newline * removed all entries in ci.baseline.txt Adding license field in manifest Updated library version --- ports/gamenetworkingsockets/portfile.cmake | 8 +++++--- ports/gamenetworkingsockets/vcpkg.json | 1 + scripts/ci.baseline.txt | 9 --------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/ports/gamenetworkingsockets/portfile.cmake b/ports/gamenetworkingsockets/portfile.cmake index e930af146abec6..2cb7be04310159 100644 --- a/ports/gamenetworkingsockets/portfile.cmake +++ b/ports/gamenetworkingsockets/portfile.cmake @@ -1,8 +1,10 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ValveSoftware/GameNetworkingSockets - REF 78f45903de3df698f9ec94cdce2f34bd0088f145 - SHA512 1bf2fb2613eca28a787c741b2bac2bebd1c534edc81270b0b3585ef433b427ff799b2caeb00c28e5bd991ea3a0dd76267151b4aced648a0d3c39aa4817dc009d + REF v1.2.0 + SHA512 d179fd8f221236beb161723ca133c1f7c574f5d8d9364aaa0de27c64c8661b26b17e3395f42f5245276a05a1399146e56e462d3ec1bb23847955225a99f8d2e3 HEAD_REF master ) @@ -32,4 +34,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/GameNetworkingSockets" TARGET_P file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/gamenetworkingsockets/vcpkg.json b/ports/gamenetworkingsockets/vcpkg.json index 97aad41af84096..d5c0c18c2b7d58 100644 --- a/ports/gamenetworkingsockets/vcpkg.json +++ b/ports/gamenetworkingsockets/vcpkg.json @@ -3,6 +3,7 @@ "version-string": "2020-09-02", "description": "GameNetworkingSockets is a basic transport layer for games.", "homepage": "https://github.com/ValveSoftware/GameNetworkingSockets", + "license": "BSD-3-Clause", "supports": "!(static & windows)", "dependencies": [ "protobuf" diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 1b4af199439379..a44f6881eaff38 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -359,15 +359,6 @@ g3log:x64-uwp=fail gainput:arm-uwp=fail gainput:x64-linux=fail gainput:x64-uwp=fail -<<<<<<< HEAD -======= -gamenetworkingsockets:arm64-windows=fail -gamenetworkingsockets:arm-uwp=fail -gamenetworkingsockets:x64-uwp=fail -gamenetworkingsockets:x64-windows-static=fail -gamma:x64-linux=fail -gamma:x64-osx=fail ->>>>>>> 0a6f2c30a... Added GameNetworkingSockets port gasol:arm64-windows=fail gasol:arm-uwp=fail gasol:x64-uwp=fail From bc6f4ea23033cd368c748134d13fa26ea729207d Mon Sep 17 00:00:00 2001 From: Francis Lemaire Date: Fri, 4 Dec 2020 02:21:06 -0500 Subject: [PATCH 3/7] Formating manifest --- ports/gamenetworkingsockets/vcpkg.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ports/gamenetworkingsockets/vcpkg.json b/ports/gamenetworkingsockets/vcpkg.json index d5c0c18c2b7d58..aaeaf037674c61 100644 --- a/ports/gamenetworkingsockets/vcpkg.json +++ b/ports/gamenetworkingsockets/vcpkg.json @@ -11,20 +11,18 @@ "default-features": [ "openssl" ], - "features": [ - { - "name": "libsodium", + "features": { + "libsodium": { "description": "Use libsodium as the crypto backend", "dependencies": [ "libsodium" ] }, - { - "name": "openssl", + "openssl": { "description": "Use OpenSSL as the crypto backend", "dependencies": [ "openssl" ] } - ] + } } From 44d9b913aa9bcc05c59e39015337882237b8434b Mon Sep 17 00:00:00 2001 From: Francis Lemaire Date: Fri, 4 Dec 2020 02:31:32 -0500 Subject: [PATCH 4/7] Fixing platform supports in manifest --- ports/gamenetworkingsockets/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gamenetworkingsockets/vcpkg.json b/ports/gamenetworkingsockets/vcpkg.json index aaeaf037674c61..150a380aed5c2d 100644 --- a/ports/gamenetworkingsockets/vcpkg.json +++ b/ports/gamenetworkingsockets/vcpkg.json @@ -4,7 +4,7 @@ "description": "GameNetworkingSockets is a basic transport layer for games.", "homepage": "https://github.com/ValveSoftware/GameNetworkingSockets", "license": "BSD-3-Clause", - "supports": "!(static & windows)", + "supports": "!(static & windows) & !uwp & !(arm64 & windows)", "dependencies": [ "protobuf" ], From 5966f738bdaf1b68c1abd2d8509f20a938c2c0cf Mon Sep 17 00:00:00 2001 From: Francis Lemaire Date: Sat, 23 Jan 2021 14:02:03 -0500 Subject: [PATCH 5/7] Refactor to OpenSSL only crypto backend --- ports/gamenetworkingsockets/portfile.cmake | 8 +------- ports/gamenetworkingsockets/vcpkg.json | 20 ++------------------ 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/ports/gamenetworkingsockets/portfile.cmake b/ports/gamenetworkingsockets/portfile.cmake index 2cb7be04310159..a419c6e46e5519 100644 --- a/ports/gamenetworkingsockets/portfile.cmake +++ b/ports/gamenetworkingsockets/portfile.cmake @@ -8,13 +8,7 @@ vcpkg_from_github( HEAD_REF master ) -if(openssl IN_LIST FEATURES) - set(CRYPTO_BACKEND OpenSSL) -endif() - -if(libsodium IN_LIST FEATURES) - set(CRYPTO_BACKEND libsodium) -endif() +set(CRYPTO_BACKEND OpenSSL) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/gamenetworkingsockets/vcpkg.json b/ports/gamenetworkingsockets/vcpkg.json index 150a380aed5c2d..5c0038119f6039 100644 --- a/ports/gamenetworkingsockets/vcpkg.json +++ b/ports/gamenetworkingsockets/vcpkg.json @@ -6,23 +6,7 @@ "license": "BSD-3-Clause", "supports": "!(static & windows) & !uwp & !(arm64 & windows)", "dependencies": [ - "protobuf" - ], - "default-features": [ + "protobuf", "openssl" - ], - "features": { - "libsodium": { - "description": "Use libsodium as the crypto backend", - "dependencies": [ - "libsodium" - ] - }, - "openssl": { - "description": "Use OpenSSL as the crypto backend", - "dependencies": [ - "openssl" - ] - } - } + ] } From fccfd53b9a31d2015977a5d7606a268b18999ee1 Mon Sep 17 00:00:00 2001 From: Francis Lemaire Date: Sat, 23 Jan 2021 14:15:09 -0500 Subject: [PATCH 6/7] Fixing format --- ports/gamenetworkingsockets/vcpkg.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/gamenetworkingsockets/vcpkg.json b/ports/gamenetworkingsockets/vcpkg.json index 5c0038119f6039..8daf49b829445b 100644 --- a/ports/gamenetworkingsockets/vcpkg.json +++ b/ports/gamenetworkingsockets/vcpkg.json @@ -6,7 +6,7 @@ "license": "BSD-3-Clause", "supports": "!(static & windows) & !uwp & !(arm64 & windows)", "dependencies": [ - "protobuf", - "openssl" + "openssl", + "protobuf" ] } From 2ee801c69f56be9d5788c8a8459ff447b70a8d49 Mon Sep 17 00:00:00 2001 From: Francis Lemaire Date: Sat, 23 Jan 2021 15:45:50 -0500 Subject: [PATCH 7/7] Adding version --- versions/baseline.json | 4 ++++ versions/g-/gamenetworkingsockets.json | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 versions/g-/gamenetworkingsockets.json diff --git a/versions/baseline.json b/versions/baseline.json index db198be6f94268..2faf2ad2b139a7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2048,6 +2048,10 @@ "baseline": "0.18.1", "port-version": 0 }, + "gamenetworkingsockets": { + "baseline": "2020-09-02", + "port-version": 0 + }, "gamma": { "baseline": "gamma-2018-01-27", "port-version": 2 diff --git a/versions/g-/gamenetworkingsockets.json b/versions/g-/gamenetworkingsockets.json new file mode 100644 index 00000000000000..52d5c8685b2b5b --- /dev/null +++ b/versions/g-/gamenetworkingsockets.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "42d95ab20685b00bc64cad1500f559d5b185a3a5", + "version-string": "2020-09-02", + "port-version": 0 + } + ] +}