diff options
Diffstat (limited to 'games/pokerth')
-rw-r--r-- | games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch | 75 | ||||
-rw-r--r-- | games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch | 52 | ||||
-rw-r--r-- | games/pokerth/patches/pokerth-1.1.2-boost-1.85.patch | 374 | ||||
-rw-r--r-- | games/pokerth/patches/pokerth-1.1.2-newer-protobuf.patch | 40 | ||||
-rw-r--r-- | games/pokerth/pokerth.SlackBuild | 56 | ||||
-rw-r--r-- | games/pokerth/pokerth.info | 12 |
6 files changed, 583 insertions, 26 deletions
diff --git a/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch new file mode 100644 index 0000000000..cfdcf9b7da --- /dev/null +++ b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch @@ -0,0 +1,75 @@ +From c769c9238ad62178f506038178714a1c35aa2769 Mon Sep 17 00:00:00 2001 +From: Stefan Floeren <42731906+stefan-floeren@users.noreply.github.com> +Date: Tue, 16 Apr 2019 08:38:01 +0200 +Subject: [PATCH] Replace make_shared with new in some cases + +Replace make_shared for asio types that take a lib::ref as a parameter. +This should fix the ASIO change (boostorg/asio@59066d8) for 1.70, +while keeping it backwards compatible to older boost versions. +--- + websocketpp/transport/asio/connection.hpp | 7 ++++--- + websocketpp/transport/asio/endpoint.hpp | 3 +-- + websocketpp/transport/asio/security/none.hpp | 3 +-- + websocketpp/transport/asio/security/tls.hpp | 3 +-- + 4 files changed, 7 insertions(+), 9 deletions(-) + +diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp +index 60f88a79..1ccda8f3 100644 +--- a/websocketpp/transport/asio/connection.hpp ++++ b/websocketpp/transport/asio/connection.hpp +@@ -311,9 +311,10 @@ class connection : public config::socket_type::socket_con_type { + * needed. + */ + timer_ptr set_timer(long duration, timer_handler callback) { +- timer_ptr new_timer = lib::make_shared<lib::asio::steady_timer>( +- lib::ref(*m_io_service), +- lib::asio::milliseconds(duration) ++ timer_ptr new_timer( ++ new lib::asio::steady_timer( ++ *m_io_service, ++ lib::asio::milliseconds(duration)) + ); + + if (config::enable_multithreading) { +diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp +index ddab2c74..4b719a97 100644 +--- a/websocketpp/transport/asio/endpoint.hpp ++++ b/websocketpp/transport/asio/endpoint.hpp +@@ -195,8 +195,7 @@ class endpoint : public config::socket_type { + + m_io_service = ptr; + m_external_io_service = true; +- m_acceptor = lib::make_shared<lib::asio::ip::tcp::acceptor>( +- lib::ref(*m_io_service)); ++ m_acceptor.reset(new lib::asio::ip::tcp::acceptor(*m_io_service)); + + m_state = READY; + ec = lib::error_code(); +diff --git a/websocketpp/transport/asio/security/none.hpp b/websocketpp/transport/asio/security/none.hpp +index 5c8293db..6c7d3524 100644 +--- a/websocketpp/transport/asio/security/none.hpp ++++ b/websocketpp/transport/asio/security/none.hpp +@@ -168,8 +168,7 @@ class connection : public lib::enable_shared_from_this<connection> { + return socket::make_error_code(socket::error::invalid_state); + } + +- m_socket = lib::make_shared<lib::asio::ip::tcp::socket>( +- lib::ref(*service)); ++ m_socket.reset(new lib::asio::ip::tcp::socket(*service)); + + if (m_socket_init_handler) { + m_socket_init_handler(m_hdl, *m_socket); +diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp +index c76fd9aa..04ac3790 100644 +--- a/websocketpp/transport/asio/security/tls.hpp ++++ b/websocketpp/transport/asio/security/tls.hpp +@@ -193,8 +193,7 @@ class connection : public lib::enable_shared_from_this<connection> { + if (!m_context) { + return socket::make_error_code(socket::error::invalid_tls_context); + } +- m_socket = lib::make_shared<socket_type>( +- _WEBSOCKETPP_REF(*service),lib::ref(*m_context)); ++ m_socket.reset(new socket_type(*service, *m_context)); + + if (m_socket_init_handler) { + m_socket_init_handler(m_hdl, get_socket()); diff --git a/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch new file mode 100644 index 0000000000..64faab9d37 --- /dev/null +++ b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch @@ -0,0 +1,52 @@ +From f810ca2e800e9b55be41c5911cf1d1185fcd516b Mon Sep 17 00:00:00 2001 +From: Stefan Floeren <42731906+stefan-floeren@users.noreply.github.com> +Date: Wed, 17 Apr 2019 10:06:18 +0000 +Subject: [PATCH] Fix missed entries; fix testing + +(Note: the CmakeLists.txt patch is cut off because we don't have it) + +--- + CMakeLists.txt | 2 +- + websocketpp/transport/asio/connection.hpp | 3 +-- + websocketpp/transport/asio/endpoint.hpp | 7 ++----- + 3 files changed, 4 insertions(+), 8 deletions(-) + +diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp +index 1ccda8f3..57dda74a 100644 +--- a/websocketpp/transport/asio/connection.hpp ++++ b/websocketpp/transport/asio/connection.hpp +@@ -462,8 +462,7 @@ class connection : public config::socket_type::socket_con_type { + m_io_service = io_service; + + if (config::enable_multithreading) { +- m_strand = lib::make_shared<lib::asio::io_service::strand>( +- lib::ref(*io_service)); ++ m_strand.reset(new lib::asio::io_service::strand(*io_service)); + } + + lib::error_code ec = socket_con_type::init_asio(io_service, m_strand, +diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp +index 4b719a97..94509adb 100644 +--- a/websocketpp/transport/asio/endpoint.hpp ++++ b/websocketpp/transport/asio/endpoint.hpp +@@ -687,9 +687,7 @@ class endpoint : public config::socket_type { + * @since 0.3.0 + */ + void start_perpetual() { +- m_work = lib::make_shared<lib::asio::io_service::work>( +- lib::ref(*m_io_service) +- ); ++ m_work.reset(new lib::asio::io_service::work(*m_io_service)); + } + + /// Clears the endpoint's perpetual flag, allowing it to exit when empty +@@ -853,8 +851,7 @@ class endpoint : public config::socket_type { + + // Create a resolver + if (!m_resolver) { +- m_resolver = lib::make_shared<lib::asio::ip::tcp::resolver>( +- lib::ref(*m_io_service)); ++ m_resolver.reset(new lib::asio::ip::tcp::resolver(*m_io_service)); + } + + tcon->set_uri(u); diff --git a/games/pokerth/patches/pokerth-1.1.2-boost-1.85.patch b/games/pokerth/patches/pokerth-1.1.2-boost-1.85.patch new file mode 100644 index 0000000000..9f8a1111e4 --- /dev/null +++ b/games/pokerth/patches/pokerth-1.1.2-boost-1.85.patch @@ -0,0 +1,374 @@ +From f42fa9a604f9f4faa1addd1b02c491cd0fe59736 Mon Sep 17 00:00:00 2001 +From: "grover92000@gmail.com" <grover92000@gmail.com> +Date: Sat, 20 Apr 2024 13:29:24 -0400 +Subject: [PATCH] Changes for boost-1.85 + +--- + src/core/common/avatarmanager.cpp | 49 +++++++++++++++++++ + src/core/common/loghelper_server.cpp | 4 ++ + src/engine/log.cpp | 4 ++ + src/engine/log.h | 4 ++ + .../qt/qttools/nonqthelper/nonqthelper.cpp | 8 +++ + src/net/common/clientstate.cpp | 19 +++++++ + src/net/common/clientthread.cpp | 4 ++ + src/net/common/downloaderthread.cpp | 8 +++ + src/net/common/serverlobbythread.cpp | 8 +++ + src/net/common/uploaderthread.cpp | 4 ++ + src/pokerth_server.cpp | 4 ++ + 11 files changed, 116 insertions(+) + +diff --git a/src/core/common/avatarmanager.cpp b/src/core/common/avatarmanager.cpp +index d137a5c44..9b2f4abaa 100644 +--- a/src/core/common/avatarmanager.cpp ++++ b/src/core/common/avatarmanager.cpp +@@ -87,20 +87,36 @@ AvatarManager::Init(const string &dataDir, const string &cacheDir) + path tmpDataPath(dataDir); + { + boost::mutex::scoped_lock lock(m_cacheDirMutex); ++#if BOOST_VERSION < 108500 + m_cacheDir = tmpCachePath.directory_string(); ++#else ++ m_cacheDir = tmpCachePath.string(); ++#endif + } + { + boost::mutex::scoped_lock lock(m_avatarsMutex); ++#if BOOST_VERSION < 108500 + tmpRet = InternalReadDirectory((tmpDataPath / "gfx/avatars/default/people/").directory_string(), m_avatars); ++#else ++ tmpRet = InternalReadDirectory((tmpDataPath / "gfx/avatars/default/people/").string(), m_avatars); ++#endif + retVal = retVal && tmpRet; ++#if BOOST_VERSION < 108500 + tmpRet = InternalReadDirectory((tmpDataPath / "gfx/avatars/default/misc/").directory_string(), m_avatars); ++#else ++ tmpRet = InternalReadDirectory((tmpDataPath / "gfx/avatars/default/misc/").string(), m_avatars); ++#endif + retVal = retVal && tmpRet; + } + if (cacheDir.empty() || tmpCachePath.empty()) + LOG_ERROR("Cache directory was not set!"); + else { + boost::mutex::scoped_lock lock(m_cachedAvatarsMutex); ++#if BOOST_VERSION < 108500 + tmpRet = InternalReadDirectory(tmpCachePath.directory_string(), m_cachedAvatars); ++#else ++ tmpRet = InternalReadDirectory(tmpCachePath.string(), m_cachedAvatars); ++#endif + retVal = retVal && tmpRet; + } + +@@ -113,7 +129,11 @@ AvatarManager::AddSingleAvatar(const std::string &fileName) + { + bool retVal = false; + path filePath(fileName); ++#if BOOST_VERSION < 108500 + string tmpFileName(filePath.file_string()); ++#else ++ string tmpFileName(filePath.string()); ++#endif + + if (!fileName.empty() && !tmpFileName.empty()) { + unsigned outFileSize = 0; +@@ -240,7 +260,11 @@ AvatarManager::GetAvatarFileType(const string &fileName) + AvatarFileType fileType; + + path filePath(fileName); ++#if BOOST_VERSION < 108500 + string ext(extension(filePath)); ++#else ++ string ext(filePath.extension().string()); ++#endif + if (boost::algorithm::iequals(ext, ".png")) + fileType = AVATAR_FILE_TYPE_PNG; + else if (boost::algorithm::iequals(ext, ".jpg") || boost::algorithm::iequals(ext, ".jpeg")) +@@ -362,7 +386,11 @@ AvatarManager::StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFil + if (IsValidAvatarFileType(avatarFileType, data, size)) { + path tmpPath(cacheDir); + tmpPath /= (md5buf.ToString() + ext); ++#if BOOST_VERSION < 108500 + string fileName(tmpPath.file_string()); ++#else ++ string fileName(tmpPath.string()); ++#endif + std::ofstream o(fileName.c_str(), ios_base::out | ios_base::binary | ios_base::trunc); + if (!o.fail()) { + o.write((const char *)data, size); +@@ -426,7 +454,11 @@ AvatarManager::RemoveOldAvatarCacheEntries() + } + try { + path cachePath(cacheDir); ++#if BOOST_VERSION < 108500 + cacheDir = cachePath.directory_string(); ++#else ++ cacheDir = cachePath.string(); ++#endif + // Never delete anything if we do not have a special cache dir set. + if (!cacheDir.empty()) { + boost::mutex::scoped_lock lock(m_cachedAvatarsMutex); +@@ -441,12 +473,20 @@ AvatarManager::RemoveOldAvatarCacheEntries() + while (i != end) { + bool keepFile = false; + path filePath(i->second); ++#if BOOST_VERSION < 108500 + string fileString(filePath.file_string()); ++#else ++ string fileString(filePath.string()); ++#endif + // Only consider files which are definitely in the cache dir. + if (fileString.size() > cacheDir.size() && fileString.substr(0, cacheDir.size()) == cacheDir) { + // Only consider files with MD5 as file name. + MD5Buf tmpBuf; ++#if BOOST_VERSION < 108500 + if (exists(filePath) && tmpBuf.FromString(basename(filePath))) { ++#else ++ if (exists(filePath) && tmpBuf.FromString(filePath.stem().string())) { ++#endif + timeMap.insert(TimeAvatarMap::value_type(last_write_time(filePath), i->first)); + keepFile = true; + } +@@ -520,10 +560,19 @@ AvatarManager::InternalReadDirectory(const std::string &dir, AvatarMap &avatars) + directory_iterator end; + + while (i != end) { ++#if BOOST_VERSION < 108500 + if (is_regular(i->status())) { + string md5sum(basename(i->path())); ++#else ++ if (is_regular_file(i->status())) { ++ string md5sum(i->path().stem().string()); ++#endif + MD5Buf md5buf; ++#if BOOST_VERSION < 108500 + string fileName(i->path().file_string()); ++#else ++ string fileName(i->path().string()); ++#endif + if (md5buf.FromString(md5sum)) { + // Only consider files with md5sum as name. + avatars.insert(AvatarMap::value_type(md5buf, fileName)); +diff --git a/src/core/common/loghelper_server.cpp b/src/core/common/loghelper_server.cpp +index a0d0350ed..f3e8366b2 100644 +--- a/src/core/common/loghelper_server.cpp ++++ b/src/core/common/loghelper_server.cpp +@@ -59,7 +59,11 @@ loghelper_init(const string &logDir, int logLevel) + path tmpLogFile(logDir); + tmpLogFile /= SERVER_MSG_LOG_FILE_NAME; + ++#if BOOST_VERSION < 108500 + g_logFile = tmpLogFile.directory_string(); ++#else ++ g_logFile = tmpLogFile.string(); ++#endif + g_logLevel = logLevel; + } + +diff --git a/src/engine/log.cpp b/src/engine/log.cpp +index 1f50fde2e..c6fe7f8e1 100644 +--- a/src/engine/log.cpp ++++ b/src/engine/log.cpp +@@ -84,7 +84,11 @@ Log::init() + mySqliteLogFileName /= string("pokerth-log-") + curDateTime + ".pdb"; + + // open sqlite-db ++#if BOOST_VERSION < 108500 + sqlite3_open(mySqliteLogFileName.directory_string().c_str(), &mySqliteLogDb); ++#else ++ sqlite3_open(mySqliteLogFileName.string().c_str(), &mySqliteLogDb); ++#endif + if( mySqliteLogDb != 0 ) { + + int i; +diff --git a/src/engine/log.h b/src/engine/log.h +index 7dbf2514d..0a79c5377 100644 +--- a/src/engine/log.h ++++ b/src/engine/log.h +@@ -73,7 +73,11 @@ class Log + + std::string getMySqliteLogFileName() + { ++#if BOOST_VERSION < 108500 + return mySqliteLogFileName.directory_string(); ++#else ++ return mySqliteLogFileName.string(); ++#endif + } + + private: +diff --git a/src/gui/qt/qttools/nonqthelper/nonqthelper.cpp b/src/gui/qt/qttools/nonqthelper/nonqthelper.cpp +index 2acfeeb45..bdc625b4a 100644 +--- a/src/gui/qt/qttools/nonqthelper/nonqthelper.cpp ++++ b/src/gui/qt/qttools/nonqthelper/nonqthelper.cpp +@@ -65,7 +65,15 @@ std::string + NonQtHelper::getDataPathStdString(const char *argv0) + { + boost::filesystem::path startPath(argv0); ++#if BOOST_VERSION < 108500 + startPath = startPath.remove_leaf(); ++#else ++ startPath = startPath.remove_filename(); ++#endif + startPath /= "data"; ++#if BOOST_VERSION < 108500 + return stringToUtf8(startPath.directory_string()); ++#else ++ return stringToUtf8(startPath.string()); ++#endif + } +diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp +index d7fc7285a..9d35e99ff 100644 +--- a/src/net/common/clientstate.cpp ++++ b/src/net/common/clientstate.cpp +@@ -211,7 +211,11 @@ ClientStateStartServerListDownload::Enter(boost::shared_ptr<ClientThread> client + } else { + // Download the server list. + boost::shared_ptr<DownloadHelper> downloader(new DownloadHelper); ++#if BOOST_VERSION < 108500 + downloader->Init(client->GetContext().GetServerListUrl(), tmpServerListPath.directory_string()); ++#else ++ downloader->Init(client->GetContext().GetServerListUrl(), tmpServerListPath.string()); ++#endif + ClientStateDownloadingServerList::Instance().SetDownloadHelper(downloader); + client->SetState(ClientStateDownloadingServerList::Instance()); + } +@@ -303,13 +307,24 @@ ClientStateReadingServerList::Enter(boost::shared_ptr<ClientThread> client) + path zippedServerListPath(context.GetCacheDir()); + zippedServerListPath /= context.GetServerListUrl().substr(context.GetServerListUrl().find_last_of('/') + 1); + path xmlServerListPath; ++#if BOOST_VERSION < 108500 + if (extension(zippedServerListPath) == ".z") { + xmlServerListPath = change_extension(zippedServerListPath, ""); ++#else ++ if (zippedServerListPath.extension().string() == ".z") { ++ xmlServerListPath = zippedServerListPath; ++ xmlServerListPath.replace_extension(""); ++#endif + + // Unzip the file using zlib. + try { ++#if BOOST_VERSION < 108500 + std::ifstream inFile(zippedServerListPath.directory_string().c_str(), ios_base::in | ios_base::binary); + std::ofstream outFile(xmlServerListPath.directory_string().c_str(), ios_base::out | ios_base::trunc); ++#else ++ std::ifstream inFile(zippedServerListPath.string().c_str(), ios_base::in | ios_base::binary); ++ std::ofstream outFile(xmlServerListPath.string().c_str(), ios_base::out | ios_base::trunc); ++#endif + boost::iostreams::filtering_streambuf<boost::iostreams::input> in; + in.push(boost::iostreams::zlib_decompressor()); + in.push(inFile); +@@ -321,7 +336,11 @@ ClientStateReadingServerList::Enter(boost::shared_ptr<ClientThread> client) + xmlServerListPath = zippedServerListPath; + + // Parse the server address. ++#if BOOST_VERSION < 108500 + TiXmlDocument doc(xmlServerListPath.directory_string()); ++#else ++ TiXmlDocument doc(xmlServerListPath.string()); ++#endif + + if (doc.LoadFile()) { + client->ClearServerInfoMap(); +diff --git a/src/net/common/clientthread.cpp b/src/net/common/clientthread.cpp +index dee5daf68..e24413d14 100644 +--- a/src/net/common/clientthread.cpp ++++ b/src/net/common/clientthread.cpp +@@ -977,7 +977,11 @@ ClientThread::GetCacheServerListFileName() + size_t pos = serverListUrl.find_last_of('/'); + if (!GetContext().GetCacheDir().empty() && !serverListUrl.empty() && pos != string::npos && ++pos < serverListUrl.length()) { + tmpServerListPath /= serverListUrl.substr(pos); ++#if BOOST_VERSION < 108500 + fileName = tmpServerListPath.directory_string(); ++#else ++ fileName = tmpServerListPath.string(); ++#endif + } + return fileName; + } +diff --git a/src/net/common/downloaderthread.cpp b/src/net/common/downloaderthread.cpp +index 56a9526ec..7984cb410 100644 +--- a/src/net/common/downloaderthread.cpp ++++ b/src/net/common/downloaderthread.cpp +@@ -96,7 +96,11 @@ DownloaderThread::Main() + // Previous download was finished. + if (m_curDownloadData) { + path filepath(m_curDownloadData->filename); ++#if BOOST_VERSION < 108500 + std::ifstream instream(filepath.file_string().c_str(), ios_base::in | ios_base::binary); ++#else ++ std::ifstream instream(filepath.string().c_str(), ios_base::in | ios_base::binary); ++#endif + // Find out file size. + // Not fully portable, but works on win/linux/mac. + instream.seekg(0, ios_base::beg); +@@ -132,7 +136,11 @@ DownloaderThread::Main() + } + if (m_curDownloadData && !m_curDownloadData->filename.empty()) { + path filepath(m_curDownloadData->filename); ++#if BOOST_VERSION < 108500 + m_downloadHelper->Init(m_curDownloadData->address, filepath.file_string()); ++#else ++ m_downloadHelper->Init(m_curDownloadData->address, filepath.string()); ++#endif + m_downloadInProgress = true; + } + } +diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp +index 1cb341eaa..d3964895d 100644 +--- a/src/net/common/serverlobbythread.cpp ++++ b/src/net/common/serverlobbythread.cpp +@@ -277,7 +277,11 @@ ServerLobbyThread::Init(const string &logDir) + boost::filesystem::path logPath(logDir); + if (!logDir.empty()) { + logPath /= SERVER_STATISTICS_FILE_NAME; ++#if BOOST_VERSION < 108500 + m_statisticsFileName = logPath.directory_string(); ++#else ++ m_statisticsFileName = logPath.string(); ++#endif + ReadStatisticsFile(); + } + } +@@ -1264,7 +1268,11 @@ ServerLobbyThread::HandleNetPacketAvatarEnd(boost::shared_ptr<SessionData> sessi + // Init finished - start session. + EstablishSession(session); + LOG_MSG("Client \"" << session->GetClientAddr() << "\" uploaded avatar \"" ++#if BOOST_VERSION < 108500 + << boost::filesystem::path(avatarFileName).file_string() << "\"."); ++#else ++ << boost::filesystem::path(avatarFileName).string() << "\"."); ++#endif + } else + SessionError(session, ERR_NET_WRONG_AVATAR_SIZE); + } +diff --git a/src/net/common/uploaderthread.cpp b/src/net/common/uploaderthread.cpp +index f1eefea6c..ecf1436d9 100644 +--- a/src/net/common/uploaderthread.cpp ++++ b/src/net/common/uploaderthread.cpp +@@ -94,7 +94,11 @@ UploaderThread::Main() + url += filepath.filename().string(); + #endif + } ++#if BOOST_VERSION < 108500 + m_uploadHelper->Init(url, filepath.file_string(), data.user, data.pwd, data.filesize, data.httpPost); ++#else ++ m_uploadHelper->Init(url, filepath.string(), data.user, data.pwd, data.filesize, data.httpPost); ++#endif + m_uploadInProgress = true; + } + } +diff --git a/src/pokerth_server.cpp b/src/pokerth_server.cpp +index 450a47e9d..1ee0db80e 100644 +--- a/src/pokerth_server.cpp ++++ b/src/pokerth_server.cpp +@@ -158,7 +158,11 @@ main(int argc, char *argv[]) + if (pidFile.empty()) { + path tmpPidPath(myConfig->readConfigString("LogDir")); + tmpPidPath /= "pokerth.pid"; ++#if BOOST_VERSION < 108500 + pidFile = tmpPidPath.directory_string(); ++#else ++ pidFile = tmpPidPath.string(); ++#endif + } + { + std::ofstream pidStream(pidFile.c_str(), ios_base::out | ios_base::trunc); diff --git a/games/pokerth/patches/pokerth-1.1.2-newer-protobuf.patch b/games/pokerth/patches/pokerth-1.1.2-newer-protobuf.patch new file mode 100644 index 0000000000..81e0faf2ba --- /dev/null +++ b/games/pokerth/patches/pokerth-1.1.2-newer-protobuf.patch @@ -0,0 +1,40 @@ +diff -Naur pokerth-20230930_ecf031e.orig/chatcleaner.pro pokerth-20230930_ecf031e/chatcleaner.pro +--- pokerth-20230930_ecf031e.orig/chatcleaner.pro 2023-09-30 09:15:23.000000000 +0200 ++++ pokerth-20230930_ecf031e/chatcleaner.pro 2024-03-03 16:38:51.640781000 +0100 +@@ -38,6 +38,8 @@ + LIBS += -lpokerth_lib \ + -lpokerth_protocol \ + -lprotobuf \ ++ -labsl_log_internal_check_op \ ++ -labsl_log_internal_message \ + -ltinyxml + + win32 { +diff -Naur pokerth-20230930_ecf031e.orig/pokerth_game.pro pokerth-20230930_ecf031e/pokerth_game.pro +--- pokerth-20230930_ecf031e.orig/pokerth_game.pro 2023-09-30 09:15:23.000000000 +0200 ++++ pokerth-20230930_ecf031e/pokerth_game.pro 2024-03-03 15:33:13.587781000 +0100 +@@ -524,7 +524,9 @@ + kFreeBSD = $$find(UNAME, "kFreeBSD") + LIBS += -lsqlite3 \ + -ltinyxml \ +- -lprotobuf ++ -lprotobuf \ ++ -labsl_log_internal_check_op \ ++ -labsl_log_internal_message + LIBS += $$BOOST_LIBS + LIBS += -lSDL \ + -lSDL_mixer \ +diff -Naur pokerth-20230930_ecf031e.orig/pokerth_server.pro pokerth-20230930_ecf031e/pokerth_server.pro +--- pokerth-20230930_ecf031e.orig/pokerth_server.pro 2023-09-30 09:15:23.000000000 +0200 ++++ pokerth-20230930_ecf031e/pokerth_server.pro 2024-03-03 15:43:03.651781000 +0100 +@@ -285,7 +285,9 @@ + LIBS += $$BOOST_LIBS + LIBS += -lsqlite3 \ + -ltinyxml \ +- -lprotobuf ++ -lprotobuf \ ++ -labsl_log_internal_check_op \ ++ -labsl_log_internal_message + LIBS += -lgsasl + !isEmpty( BSD ): isEmpty( kFreeBSD ){ + LIBS += -lcrypto -liconv diff --git a/games/pokerth/pokerth.SlackBuild b/games/pokerth/pokerth.SlackBuild index 5412cb9fbe..456fff3fc5 100644 --- a/games/pokerth/pokerth.SlackBuild +++ b/games/pokerth/pokerth.SlackBuild @@ -1,7 +1,8 @@ -#!/bin/sh +#!/bin/bash -# Slackware build script for "pokerth". +# Slackware build script for pokerth. +# Copyright 20202024 Matteo Bernardini <ponce@slackbuilds.org> # Copyright 2009-2015 Marcel Saegebarth <marc@mos6581.de> # Copyright 2012 Laurent Nardou <l.nardou@wanadoo.fr> # All rights reserved. @@ -25,27 +26,36 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=pokerth -SRCNAM=PokerTH -VERSION=${VERSION:-1.1.1} +VERSION=${VERSION:-20230930_ecf031e} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -61,11 +71,11 @@ fi set -e rm -rf $PKG -rm -rf $TMP/$SRCNAM-$VERSION-src mkdir -p $TMP $PKG $OUTPUT cd $TMP -tar xvf $CWD/$SRCNAM-$VERSION-src.tar.bz2 -cd $SRCNAM-$VERSION-src +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -73,17 +83,23 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# The headers to which this file points have moved in the newer libircclient... -# Thanks ponce. -sed -i "s|libircclient/||" src/net/common/ircthread.cpp +( cd src/third_party/websocketpp + patch -p1 < $CWD/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch + patch -p1 < $CWD/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch ) -qmake pokerth.pro - -make #CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" -make install DESTDIR=$PKG INSTALL_ROOT=$PKG +patch -p1 < $CWD/patches/pokerth-1.1.2-newer-protobuf.patch +patch -p1 < $CWD/patches/pokerth-1.1.2-boost-1.85.patch +qmake-qt5 QMAKE_CFLAGS_ISYSTEM= -spec linux-g++ pokerth.pro +make mkdir -p $PKG/usr/bin -install -s -D -m 0755 $TMP/$SRCNAM-$VERSION-src/bin/pokerth_server $PKG/usr/bin +install -s -D -m 0755 bin/pokerth_server $PKG/usr/bin +install -s -D -m 0755 chatcleaner $PKG/usr/bin +make clean + +qmake-qt5 CONFIG+="client" QMAKE_CFLAGS_ISYSTEM= -spec linux-g++ pokerth.pro +make +make install DESTDIR=$PKG INSTALL_ROOT=$PKG mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a COPYING INSTALL TODO ChangeLog \ @@ -95,4 +111,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/games/pokerth/pokerth.info b/games/pokerth/pokerth.info index 24588c1909..fe6981d55a 100644 --- a/games/pokerth/pokerth.info +++ b/games/pokerth/pokerth.info @@ -1,10 +1,10 @@ PRGNAM="pokerth" -VERSION="1.1.1" +VERSION="20230930_ecf031e" HOMEPAGE="https://www.pokerth.net" -DOWNLOAD="https://downloads.sourceforge.net/pokerth/PokerTH-1.1.1-src.tar.bz2" -MD5SUM="a7f76f95782099f966e5f2b6809f502a" +DOWNLOAD="https://ponce.cc/slackware/sources/repo/pokerth-20230930_ecf031e.tar.xz" +MD5SUM="e6cf4a9441832f6657afe89186dff7a2" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="libgsasl libircclient tinyxml protobuf" -MAINTAINER="Marcel Saegebarth" -EMAIL="marc@mos6581.de" +REQUIRES="libgsasl libircclient tinyxml protobuf3" +MAINTAINER="Matteo Bernardini" +EMAIL="ponce@slackbuilds.org" |