Skip to content

Commit

Permalink
[discord-game-sdk] Won't compile with certain compilers (microsoft#11728
Browse files Browse the repository at this point in the history
)

* [discord-game-sdk] Added required flag for compiling

* [discord-game-sdk] Added patch for fixing cstdint issue

* [discord-game-sdk] Bumped version for patch

* [discord-game-sdk] Formatting

Co-authored-by: NancyLi1013 <[email protected]>

Co-authored-by: NancyLi1013 <[email protected]>
Co-authored-by: Billy Robert O'Neal III <[email protected]>
  • Loading branch information
3 people authored Jun 12, 2020
1 parent 8c0860c commit 0f161f9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ports/discord-game-sdk/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: discord-game-sdk
Version: 2.5.6
Version: 2.5.6-1
Homepage: https://discordapp.com/developers/docs/game-sdk/sdk-starter-guide
Description: The Discord GameSDK is an easy drop-in SDK to help you manage all the hard things that come with making a game.
Supports: ((x64 && (windows || osx || linux)) || (x86 && windows)) && !uwp && !static
25 changes: 25 additions & 0 deletions ports/discord-game-sdk/include-cstdint.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 91fab7c4b8f7da3182f07f5392ebe9388f979157 Mon Sep 17 00:00:00 2001
From: Maki <[email protected]>
Date: Wed, 3 Jun 2020 01:40:58 +0100
Subject: [PATCH] Include cstdint

---
cpp/types.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/cpp/types.h b/cpp/types.h
index 8c7cc2b..122dc71 100644
--- a/cpp/types.h
+++ b/cpp/types.h
@@ -3,6 +3,8 @@
#include "ffi.h"
#include "event.h"

+#include <cstdint>
+
namespace discord {

enum class Result {
--
2.26.2

4 changes: 3 additions & 1 deletion ports/discord-game-sdk/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
NO_REMOVE_ONE_LEVEL
PATCHES
include-cstdint.patch # allows compiling on newer versions of GCC
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION ${SOURCE_PATH})
Expand Down Expand Up @@ -48,4 +50,4 @@ vcpkg_install_cmake()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

0 comments on commit 0f161f9

Please sign in to comment.