diff --git a/ports/discordcoreapi/portfile.cmake b/ports/discordcoreapi/portfile.cmake new file mode 100644 index 0000000000..d61b181437 --- /dev/null +++ b/ports/discordcoreapi/portfile.cmake @@ -0,0 +1,35 @@ +if(VCPKG_TARGET_IS_LINUX) + message(WARNING "Discordcoreapi only supports g++ 11 on linux.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO RealTimeChris/DiscordCoreAPI + REF 6d7c899f0690513855119aa225259dccf17b10f0 + SHA512 ff42ed8ae799b8f875158842c47fcb5612a5b8861dbfb442c97ab131d952ed59140b2d2431a0d389aefbecb122263f340ff9c8fb863466d0aa91875f8080616e + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(NO_PREFIX_CORRECTION) + +vcpkg_fixup_pkgconfig() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file( + INSTALL "${SOURCE_PATH}/License" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/ports/discordcoreapi/vcpkg.json b/ports/discordcoreapi/vcpkg.json new file mode 100644 index 0000000000..e9b175b3ea --- /dev/null +++ b/ports/discordcoreapi/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "discordcoreapi", + "version-date": "2022-03-30", + "description": "A Discord bot library written in C++ using custom asynchronous coroutines.", + "homepage": "https://discordcoreapi.com", + "license": "AGPL-3.0-or-later", + "supports": "(windows & x64 & !static) | (linux & x64)", + "dependencies": [ + "curl", + "ffmpeg", + "glib", + "libsodium", + "nlohmann-json", + "openssl", + "opus", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 96581b199b..7c50ecc6f9 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -222,6 +222,10 @@ discord-game-sdk:x64-windows-static=fail discord-game-sdk:x64-windows-static-md=fail discord-rpc:arm-uwp=fail discord-rpc:x64-uwp=fail + +# requires g++11 +discordcoreapi:x64-linux=fail + dmlc:arm-uwp=fail dmlc:x64-uwp=fail dpdk:arm-uwp=fail diff --git a/versions/baseline.json b/versions/baseline.json index a4355417cb..2c3143ceb6 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1884,6 +1884,10 @@ "baseline": "3.4.0", "port-version": 1 }, + "discordcoreapi": { + "baseline": "2022-03-30", + "port-version": 0 + }, "discount": { "baseline": "2.2.6", "port-version": 1 diff --git a/versions/d-/discordcoreapi.json b/versions/d-/discordcoreapi.json new file mode 100644 index 0000000000..b895d0164b --- /dev/null +++ b/versions/d-/discordcoreapi.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "d7e58144cce6a1eeda7ae8cac47726a9edddfbec", + "version-date": "2022-03-30", + "port-version": 0 + } + ] +}