Created
April 23, 2026 17:35
-
-
Save basith374/11438925d1f721acf81524a568e40be6 to your computer and use it in GitHub Desktop.
Fix for engine-sim-git build failure (ld: cannot find -ldiscord-rpc)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Run this inside src/engine-sim/ | |
| sed -i '/add_subdirectory(dependencies\/discord)/d' CMakeLists.txt | |
| sed -i 's/discord-rpc//g' CMakeLists.txt | |
| # This creates the file right where it needs to be | |
| cat <<EOF > src/discord.cpp | |
| #include "../include/discord.h" | |
| CDiscord* CDiscord::m_pInstance = nullptr; | |
| CDiscord::CDiscord() { m_bEnableDiscord = false; m_bConnected = false; } | |
| CDiscord::~CDiscord() {} | |
| bool CDiscord::CreateInstance() { if (m_pInstance == nullptr) m_pInstance = new CDiscord(); return true; } | |
| void CDiscord::DestroyInstance() { delete m_pInstance; m_pInstance = nullptr; } | |
| void CDiscord::handleDiscordReady(const DiscordUser* u) {} | |
| void CDiscord::handleDiscordDisconnected(int e, const char* m) {} | |
| void CDiscord::handleDiscordError(int e, const char* m) {} | |
| void CDiscord::InitDiscord() {} | |
| void CDiscord::UpdatePresence() {} | |
| void CDiscord::ClearPresence() {} | |
| void CDiscord::UpdateDiscordConnection() {} | |
| void CDiscord::SetUseDiscord(bool b) {} | |
| void CDiscord::SetConnected(bool b) {} | |
| void CDiscord::SetStatus(DiscordRichPresence p, std::string n, std::string v) {} | |
| EOF | |
| rm -rf build | |
| echo "Patch applied. Now run 'makepkg -sie' again." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment