diff options
author | Steve Wills <swills@FreeBSD.org> | 2019-03-18 17:53:39 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2019-03-18 17:53:39 +0000 |
commit | 63bab8f70465940b841c3a24aeed2db14ad5fb3a (patch) | |
tree | 846e0cab2d6d95a550c27ac3a743fcbe6963f298 | |
parent | sysutils/fusefs-s3fs: Update to 1.85 (diff) |
games/multimc: update to 0.6.5
PR: 236488
Submitted by: tsundoku <me@tsundoku.ne.jp> (maintainer)
18 files changed, 212 insertions, 394 deletions
diff --git a/games/multimc/Makefile b/games/multimc/Makefile index 910bd1f32961..0dcb0209e844 100644 --- a/games/multimc/Makefile +++ b/games/multimc/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= multimc -DISTVERSION= 0.6.2 -PORTREVISION= 3 +DISTVERSION= 0.6.5 CATEGORIES= games java MAINTAINER= me@tsundoku.ne.jp diff --git a/games/multimc/distinfo b/games/multimc/distinfo index 2da065dbb638..de03616e457d 100644 --- a/games/multimc/distinfo +++ b/games/multimc/distinfo @@ -1,6 +1,6 @@ -TIMESTAMP = 1528391891 -SHA256 (MultiMC-MultiMC5-0.6.2_GH0.tar.gz) = d5e5fdc3234ac423e4abf8ea3b46d851c2df54713eae61f2171cb6f85de78fee -SIZE (MultiMC-MultiMC5-0.6.2_GH0.tar.gz) = 2257365 +TIMESTAMP = 1551977164 +SHA256 (MultiMC-MultiMC5-0.6.5_GH0.tar.gz) = 98e8db7c0fda5e5a1917dc3f7cdbfd4b337c45aa47d1e7dbd45c380576bd7716 +SIZE (MultiMC-MultiMC5-0.6.5_GH0.tar.gz) = 2379589 SHA256 (MultiMC-libnbtplusplus-508eda8_GH0.tar.gz) = 14f16c8e6dc264017684774cdd9c6f149855e464895b28c29f9f55ea76d34f1a SIZE (MultiMC-libnbtplusplus-508eda8_GH0.tar.gz) = 47406 SHA256 (MultiMC-quazip-3691d57_GH0.tar.gz) = 17a9457360053fa2c6c849c75fa760383036bd14d7d8f7bd0d958bfc2a584009 diff --git a/games/multimc/files/patch-api_gui_DesktopServices.cpp b/games/multimc/files/patch-api_gui_DesktopServices.cpp index 40db6824a165..eb4fd1561b29 100644 --- a/games/multimc/files/patch-api_gui_DesktopServices.cpp +++ b/games/multimc/files/patch-api_gui_DesktopServices.cpp @@ -1,4 +1,4 @@ ---- api/gui/DesktopServices.cpp.orig 2017-12-18 00:19:43 UTC +--- api/gui/DesktopServices.cpp.orig 2019-02-20 23:45:36 UTC +++ api/gui/DesktopServices.cpp @@ -7,7 +7,7 @@ /** @@ -9,48 +9,48 @@ #include <unistd.h> #include <errno.h> -@@ -83,7 +83,7 @@ bool openDirectory(const QString &path, - { - return QDesktopServices::openUrl(QUrl::fromLocalFile(dir.absolutePath())); - }; +@@ -83,7 +83,7 @@ bool openDirectory(const QString &path, bool ensureExi + { + return QDesktopServices::openUrl(QUrl::fromLocalFile(dir.absolutePath())); + }; -#if defined(Q_OS_LINUX) -+#if defined(Q_OS_LINUX) || defined (Q_OS_FREEBSD) - return IndirectOpen(f); ++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) + return IndirectOpen(f); #else - return f(); + return f(); @@ -97,7 +97,7 @@ bool openFile(const QString &path) - { - return QDesktopServices::openUrl(QUrl::fromLocalFile(path)); - }; + { + return QDesktopServices::openUrl(QUrl::fromLocalFile(path)); + }; -#if defined(Q_OS_LINUX) -+#if defined(Q_OS_LINUX) || defined (Q_OS_FREEBSD) - return IndirectOpen(f); ++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) + return IndirectOpen(f); #else - return f(); + return f(); @@ -107,7 +107,7 @@ bool openFile(const QString &path) bool openFile(const QString &application, const QString &path, const QString &workingDirectory, qint64 *pid) { - qDebug() << "Opening file" << path << "using" << application; + qDebug() << "Opening file" << path << "using" << application; -#if defined(Q_OS_LINUX) -+#if defined(Q_OS_LINUX) || defined (Q_OS_FREEBSD) - // FIXME: the pid here is fake. So if something depends on it, it will likely misbehave - return IndirectOpen([&]() - { -@@ -121,7 +121,7 @@ bool openFile(const QString &application ++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) + // FIXME: the pid here is fake. So if something depends on it, it will likely misbehave + return IndirectOpen([&]() + { +@@ -121,7 +121,7 @@ bool openFile(const QString &application, const QStrin bool run(const QString &application, const QStringList &args, const QString &workingDirectory, qint64 *pid) { - qDebug() << "Running" << application << "with args" << args.join(' '); + qDebug() << "Running" << application << "with args" << args.join(' '); -#if defined(Q_OS_LINUX) -+#if defined(Q_OS_LINUX) || defined (Q_OS_FREEBSD) - // FIXME: the pid here is fake. So if something depends on it, it will likely misbehave - return IndirectOpen([&]() - { ++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) + // FIXME: the pid here is fake. So if something depends on it, it will likely misbehave + return IndirectOpen([&]() + { @@ -139,7 +139,7 @@ bool openUrl(const QUrl &url) - { - return QDesktopServices::openUrl(url); - }; + { + return QDesktopServices::openUrl(url); + }; -#if defined(Q_OS_LINUX) +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - return IndirectOpen(f); + return IndirectOpen(f); #else - return f(); + return f(); diff --git a/games/multimc/files/patch-api_logic_FileSystem.cpp b/games/multimc/files/patch-api_logic_FileSystem.cpp index 730d31fb09cd..22c10d8fe260 100644 --- a/games/multimc/files/patch-api_logic_FileSystem.cpp +++ b/games/multimc/files/patch-api_logic_FileSystem.cpp @@ -1,11 +1,11 @@ ---- api/logic/FileSystem.cpp.orig 2017-12-18 00:19:43 UTC +--- api/logic/FileSystem.cpp.orig 2019-03-07 17:30:10 UTC +++ api/logic/FileSystem.cpp -@@ -407,7 +407,7 @@ QString getDesktopDir() +@@ -398,7 +398,7 @@ QString getDesktopDir() bool createShortCut(QString location, QString dest, QStringList args, QString name, - QString icon) + QString icon) { -#if defined Q_OS_LINUX -+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - location = PathCombine(location, name + ".desktop"); ++#if defined Q_OS_LINUX || defined(Q_OS_FREEBSD) + location = PathCombine(location, name + ".desktop"); - QFile f(location); + QFile f(location); diff --git a/games/multimc/files/patch-api_logic_FileSystem__test.cpp b/games/multimc/files/patch-api_logic_FileSystem__test.cpp index 8f9c5e77e018..ad6a41b22b57 100644 --- a/games/multimc/files/patch-api_logic_FileSystem__test.cpp +++ b/games/multimc/files/patch-api_logic_FileSystem__test.cpp @@ -1,4 +1,4 @@ ---- api/logic/FileSystem_test.cpp.orig 2017-12-18 00:19:43 UTC +--- api/logic/FileSystem_test.cpp.orig 2019-03-07 17:32:17 UTC +++ api/logic/FileSystem_test.cpp @@ -119,7 +119,7 @@ slots: @@ -6,15 +6,6 @@ // FIXME: implement on windows, OSX, then test. -#if defined(Q_OS_LINUX) +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - void test_createShortcut_data() - { - QTest::addColumn<QString>("location"); -@@ -134,7 +134,7 @@ slots: - << (QStringList() << "arg1" << "arg2") - << "asdf" - << QString() -- #if defined(Q_OS_LINUX) -+ #if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - << MULTIMC_GET_TEST_FILE("data/FileSystem-test_createShortcut-unix") - #elif defined(Q_OS_WIN) - << QByteArray() + void test_createShortcut_data() + { + QTest::addColumn<QString>("location"); diff --git a/games/multimc/files/patch-api_logic_java_JavaUtils.cpp b/games/multimc/files/patch-api_logic_java_JavaUtils.cpp index 72acd31781f3..885551b20678 100644 --- a/games/multimc/files/patch-api_logic_java_JavaUtils.cpp +++ b/games/multimc/files/patch-api_logic_java_JavaUtils.cpp @@ -1,29 +1,29 @@ ---- api/logic/java/JavaUtils.cpp.orig 2017-12-18 00:19:43 UTC +--- api/logic/java/JavaUtils.cpp.orig 2019-02-20 23:45:36 UTC +++ api/logic/java/JavaUtils.cpp -@@ -81,7 +81,7 @@ QProcessEnvironment CleanEnviroment() - qDebug() << "Env: ignoring" << key << value; - continue; - } +@@ -31,7 +31,7 @@ JavaUtils::JavaUtils() + { + } + -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - // Do not pass LD_* variables to java. They were intended for MultiMC - if(key.startsWith("LD_")) - { -@@ -110,7 +110,7 @@ QProcessEnvironment CleanEnviroment() - qDebug() << "Env: " << key << value; - env.insert(key, value); - } + static QString processLD_LIBRARY_PATH(const QString & LD_LIBRARY_PATH) + { + QDir mmcBin(QCoreApplication::applicationDirPath()); +@@ -83,7 +83,7 @@ QProcessEnvironment CleanEnviroment() + qDebug() << "Env: ignoring" << key << value; + continue; + } -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - // HACK: Workaround for QTBUG42500 - if(!env.contains("LD_LIBRARY_PATH")) - { -@@ -291,7 +291,7 @@ QList<QString> JavaUtils::FindJavaPaths( - return javas; - } - --#elif defined(Q_OS_LINUX) -+#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - QList<QString> JavaUtils::FindJavaPaths() - { - qDebug() << "Linux Java detection incomplete - defaulting to \"java\""; + // Do not pass LD_* variables to java. They were intended for MultiMC + if(key.startsWith("LD_")) + { +@@ -112,7 +112,7 @@ QProcessEnvironment CleanEnviroment() + // qDebug() << "Env: " << key << value; + env.insert(key, value); + } +-#ifdef Q_OS_LINUX ++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) + // HACK: Workaround for QTBUG42500 + if(!env.contains("LD_LIBRARY_PATH")) + { diff --git a/games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp b/games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp index 294b2c329305..f781b52cd18f 100644 --- a/games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp +++ b/games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp @@ -1,14 +1,14 @@ ---- api/logic/minecraft/MinecraftInstance.cpp.orig 2017-12-18 00:19:43 UTC +--- api/logic/minecraft/MinecraftInstance.cpp.orig 2019-03-08 14:41:15 UTC +++ api/logic/minecraft/MinecraftInstance.cpp -@@ -163,7 +163,11 @@ QString MinecraftInstance::binRoot() con +@@ -161,7 +161,11 @@ QString MinecraftInstance::binRoot() const QString MinecraftInstance::getNativePath() const { +#if defined(Q_OS_FREEBSD) + QDir natives_dir(LWJGL_DIR "/"); +#else - QDir natives_dir(FS::PathCombine(instanceRoot(), "natives/")); + QDir natives_dir(FS::PathCombine(instanceRoot(), "natives/")); +#endif - return natives_dir.absolutePath(); + return natives_dir.absolutePath(); } diff --git a/games/multimc/files/patch-api_logic_minecraft_OpSys.cpp b/games/multimc/files/patch-api_logic_minecraft_OpSys.cpp index 923ba7be914b..d144d4efff78 100644 --- a/games/multimc/files/patch-api_logic_minecraft_OpSys.cpp +++ b/games/multimc/files/patch-api_logic_minecraft_OpSys.cpp @@ -1,4 +1,4 @@ ---- api/logic/minecraft/OpSys.cpp.orig 2017-12-18 00:19:43 UTC +--- api/logic/minecraft/OpSys.cpp.orig 2019-03-09 16:23:18 UTC +++ api/logic/minecraft/OpSys.cpp @@ -17,6 +17,8 @@ @@ -6,22 +6,22 @@ { + if (name == "freebsd") + return Os_FreeBSD; - if (name == "linux") - return Os_Linux; - if (name == "windows") + if (name == "linux") + return Os_Linux; + if (name == "windows") @@ -30,6 +32,8 @@ QString OpSys_toString(OpSys name) { - switch (name) - { + switch (name) + { + case Os_FreeBSD: + return "freebsd"; - case Os_Linux: - return "linux"; - case Os_OSX: + case Os_Linux: + return "linux"; + case Os_OSX: @@ -39,4 +43,4 @@ QString OpSys_toString(OpSys name) - default: - return "other"; - } + default: + return "other"; + } -} \ No newline at end of file +} diff --git a/games/multimc/files/patch-api_logic_minecraft_OpSys.h b/games/multimc/files/patch-api_logic_minecraft_OpSys.h index 2a0818fafd49..547bb5b25bf0 100644 --- a/games/multimc/files/patch-api_logic_minecraft_OpSys.h +++ b/games/multimc/files/patch-api_logic_minecraft_OpSys.h @@ -1,25 +1,26 @@ ---- api/logic/minecraft/OpSys.h.orig 2017-12-18 00:19:43 UTC +--- api/logic/minecraft/OpSys.h.orig 2019-03-09 16:25:37 UTC +++ api/logic/minecraft/OpSys.h -@@ -20,6 +20,7 @@ enum OpSys - Os_Windows, - Os_Linux, - Os_OSX, +@@ -18,6 +18,7 @@ + enum OpSys + { + Os_Windows, + Os_FreeBSD, - Os_Other - }; - + Os_Linux, + Os_OSX, + Os_Other @@ -28,10 +29,10 @@ QString OpSys_toString(OpSys); #ifdef Q_OS_WIN32 #define currentSystem Os_Windows -#else -#ifdef Q_OS_MAC -+#elif defined Q_OS_MAC ++#elif Q_OS_MAC #define currentSystem Os_OSX +#elif defined Q_OS_FREEBSD +#define currentSystem Os_FreeBSD #else #define currentSystem Os_Linux - #endif +-#endif -#endif \ No newline at end of file ++#endif diff --git a/games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp b/games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp index 409aa64c3c5f..be5c158fa55a 100644 --- a/games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp +++ b/games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp @@ -1,62 +1,74 @@ ---- api/logic/minecraft/launch/PrintInstanceInfo.cpp.orig 2017-12-18 00:19:43 UTC +--- api/logic/minecraft/launch/PrintInstanceInfo.cpp.orig 2019-03-07 21:42:07 UTC +++ api/logic/minecraft/launch/PrintInstanceInfo.cpp -@@ -24,6 +24,10 @@ void PrintInstanceInfo::executeTask() - auto instance = m_parent->instance(); - auto lines = instance->verboseDescription(m_session); - +@@ -19,8 +19,9 @@ + #include "PrintInstanceInfo.h" + #include <launch/LaunchTask.h> + +-#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) -+ -+ char buff[512]; -+ - #ifdef Q_OS_LINUX + namespace { ++#if defined(Q_OS_LINUX) + void probeProcCpuinfo(QStringList &log) + { std::ifstream cpuin("/proc/cpuinfo"); - for (std::string line; std::getline(cpuin, line);) -@@ -36,7 +40,6 @@ void PrintInstanceInfo::executeTask() - } - } - -- char buff[512]; - int gpuline = -1; - int cline = 0; - FILE *fp = popen("lspci -k", "r"); -@@ -64,6 +67,40 @@ void PrintInstanceInfo::executeTask() - cline++; - } +@@ -66,7 +67,44 @@ void runLspci(QStringList &log) } + pclose(lspci); + } +#elif defined(Q_OS_FREEBSD) -+ -+ std::string strcard; -+ -+ FILE *fp3 = popen("sysctl hw.model", "r"); -+ if (fp3 != NULL) ++void runSysctlHwModel(QStringList &log) ++{ ++ char buff[512]; ++ FILE *hwmodel = popen("sysctl hw.model", "r"); ++ while (fgets(buff, 512, hwmodel) != NULL) + { -+ fgets(buff, 512, fp3); -+ std::string str(buff); -+ QStringList clines = (QStringList() << QString::fromStdString(str.substr(10, std::string::npos))); -+ logLines(clines, MessageLevel::MultiMC); ++ log << QString::fromUtf8(buff); ++ break; + } -+ -+ FILE *fp4 = popen("pciconf -lv -a vgapci0", "r"); -+ if (fp4 != NULL) ++ pclose(hwmodel); ++} + ++void runPciconf(QStringList &log) ++{ ++ char buff[512]; ++ std::string strcard; ++ FILE *pciconf = popen("pciconf -lv -a vgapci0", "r"); ++ while (fgets(buff, 512, pciconf) != NULL) + { -+ while (fgets(buff, 512, fp4) != NULL) ++ if (strncmp(buff, " vendor", 10) == 0) ++ { ++ std::string str(buff); ++ strcard.append(str.substr(str.find_first_of("'") + 1, str.find_last_not_of("'") - (str.find_first_of("'") + 2))); ++ strcard.append(" "); ++ } ++ else if (strncmp(buff, " device", 10) == 0) + { -+ if (strncmp(buff, " vendor", 10) == 0) -+ { -+ std::string str(buff); -+ strcard.append(str.substr(str.find_first_of("'") + 1, str.find_last_not_of("'") - (str.find_first_of("'") + 2))); -+ strcard.append(" "); -+ } -+ else if (strncmp(buff, " device", 10) == 0) -+ { -+ std::string str2(buff); -+ strcard.append(str2.substr(str2.find_first_of("'") + 1, str2.find_last_not_of("'") - (str2.find_first_of("'") + 2))); -+ QStringList glines = (QStringList() << QString::fromStdString(strcard)); -+ logLines(glines, MessageLevel::MultiMC); -+ } ++ std::string str2(buff); ++ strcard.append(str2.substr(str2.find_first_of("'") + 1, str2.find_last_not_of("'") - (str2.find_first_of("'") + 2))); + } ++ log << QString::fromStdString(strcard); ++ break; + } ++ pclose(pciconf); ++} +#endif - - FILE *fp2 = popen("glxinfo", "r"); - if (fp2 != NULL) ++ + void runGlxinfo(QStringList & log) + { + // FIXME: fixed size buffers... +@@ -94,10 +132,14 @@ void PrintInstanceInfo::executeTask() + auto instance = m_parent->instance(); + QStringList log; + +-#ifdef Q_OS_LINUX ++#if defined(Q_OS_LINUX) + ::probeProcCpuinfo(log); + ::runLspci(log); + ::runGlxinfo(log); ++#elif defined(Q_OS_FREEBSD) ++ ::runSysctlHwModel(log); ++ ::runPciconf(log); ++ ::runGlxinfo(log); + #endif + + logLines(log, MessageLevel::MultiMC); diff --git a/games/multimc/files/patch-api_logic_tools_MCEditTool.cpp b/games/multimc/files/patch-api_logic_tools_MCEditTool.cpp new file mode 100644 index 000000000000..81d3825a4878 --- /dev/null +++ b/games/multimc/files/patch-api_logic_tools_MCEditTool.cpp @@ -0,0 +1,11 @@ +--- api/logic/tools/MCEditTool.cpp.orig 2019-03-09 18:30:20 UTC ++++ api/logic/tools/MCEditTool.cpp +@@ -52,7 +52,7 @@ QString MCEditTool::getProgramPath() + #else + const QString mceditPath = path(); + QDir mceditDir(mceditPath); +-#ifdef Q_OS_LINUX ++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) + if (mceditDir.exists("mcedit.sh")) + { + return mceditDir.absoluteFilePath("mcedit.sh"); diff --git a/games/multimc/files/patch-application_MultiMC.cpp b/games/multimc/files/patch-application_MultiMC.cpp index e32533502b33..e2691e4e901d 100644 --- a/games/multimc/files/patch-application_MultiMC.cpp +++ b/games/multimc/files/patch-application_MultiMC.cpp @@ -1,11 +1,11 @@ ---- application/MultiMC.cpp.orig 2017-12-18 00:19:43 UTC +--- application/MultiMC.cpp.orig 2019-03-08 00:50:32 UTC +++ application/MultiMC.cpp -@@ -322,7 +322,7 @@ MultiMC::MultiMC(int &argc, char **argv) - // Set up paths - { - // Root path is used for updates. +@@ -324,7 +324,7 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplicatio + // Set up paths + { + // Root path is used for updates. -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - QDir foo(FS::PathCombine(binPath, "..")); - m_rootPath = foo.absolutePath(); + QDir foo(FS::PathCombine(binPath, "..")); + m_rootPath = foo.absolutePath(); #elif defined(Q_OS_WIN32) diff --git a/games/multimc/files/patch-application_UpdateController.cpp b/games/multimc/files/patch-application_UpdateController.cpp index 23ab48050a8a..ab49773af6c2 100644 --- a/games/multimc/files/patch-application_UpdateController.cpp +++ b/games/multimc/files/patch-application_UpdateController.cpp @@ -1,11 +1,11 @@ ---- application/UpdateController.cpp.orig 2017-12-18 00:19:43 UTC +--- application/UpdateController.cpp.orig 2019-03-08 00:52:03 UTC +++ application/UpdateController.cpp @@ -90,7 +90,7 @@ void UpdateController::installUpdates() - qDebug() << "Installing updates."; + qDebug() << "Installing updates."; #ifdef Q_OS_WIN - QString finishCmd = QApplication::applicationFilePath(); + QString finishCmd = QApplication::applicationFilePath(); -#elif defined Q_OS_LINUX +#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - QString finishCmd = FS::PathCombine(m_root, "MultiMC"); + QString finishCmd = FS::PathCombine(m_root, "MultiMC"); #elif defined Q_OS_MAC - QString finishCmd = QApplication::applicationFilePath(); + QString finishCmd = QApplication::applicationFilePath(); diff --git a/games/multimc/files/patch-application_install__prereqs.cmake.in b/games/multimc/files/patch-application_install__prereqs.cmake.in index 7090e58efbb7..8ca7a4475048 100644 --- a/games/multimc/files/patch-application_install__prereqs.cmake.in +++ b/games/multimc/files/patch-application_install__prereqs.cmake.in @@ -1,4 +1,4 @@ ---- application/install_prereqs.cmake.in.orig 2017-12-18 00:19:43 UTC +--- application/install_prereqs.cmake.in.orig 2019-03-08 00:54:15 UTC +++ application/install_prereqs.cmake.in @@ -23,5 +23,4 @@ set(gp_cmd_paths ${gp_cmd_paths} ) diff --git a/games/multimc/files/patch-git_4d68c1b b/games/multimc/files/patch-git_4d68c1b deleted file mode 100644 index c645082eb288..000000000000 --- a/games/multimc/files/patch-git_4d68c1b +++ /dev/null @@ -1,199 +0,0 @@ -From 4d68c1b509cd289e9f02cbf258e69f2539349029 Mon Sep 17 00:00:00 2001 -From: Sergey Shatunov <me@prok.pw> -Date: Fri, 1 Jun 2018 21:20:33 +0700 -Subject: [PATCH] GH-2291 Fix build with Qt 5.11+ - ---- api/gui/CMakeLists.txt.orig 2018-04-08 21:43:03 UTC -+++ api/gui/CMakeLists.txt -@@ -21,8 +21,7 @@ set_target_properties(MultiMC_gui PROPERTIES CXX_VISIB - generate_export_header(MultiMC_gui) - - # Link --target_link_libraries(MultiMC_gui MultiMC_iconfix MultiMC_logic) --qt5_use_modules(MultiMC_gui Gui) -+target_link_libraries(MultiMC_gui MultiMC_iconfix MultiMC_logic Qt5::Gui) - - # Mark and export headers - target_include_directories(MultiMC_gui PUBLIC "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}") ---- api/logic/CMakeLists.txt.orig 2018-04-08 21:43:03 UTC -+++ api/logic/CMakeLists.txt -@@ -476,7 +476,7 @@ generate_export_header(MultiMC_logic) - - # Link - target_link_libraries(MultiMC_logic xz-embedded MultiMC_unpack200 systeminfo MultiMC_quazip MultiMC_classparser ${NBT_NAME} ${ZLIB_LIBRARIES}) --qt5_use_modules(MultiMC_logic Core Xml Network Concurrent) -+target_link_libraries(MultiMC_logic Qt5::Core Qt5::Xml Qt5::Network Qt5::Concurrent) - - # Mark and export headers - target_include_directories(MultiMC_logic PUBLIC "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" PRIVATE "${ZLIB_INCLUDE_DIRS}") ---- application/dialogs/NotificationDialog.cpp.orig 2018-04-08 21:43:03 UTC -+++ application/dialogs/NotificationDialog.cpp -@@ -2,6 +2,7 @@ - #include "ui_NotificationDialog.h" - - #include <QTimerEvent> -+#include <QStyle> - - NotificationDialog::NotificationDialog(const NotificationChecker::NotificationEntry &entry, QWidget *parent) : - QDialog(parent, Qt::MSWindowsFixedSizeDialogHint | Qt::WindowTitleHint | Qt::CustomizeWindowHint), ---- application/pages/global/ExternalToolsPage.cpp.orig 2018-04-08 21:43:03 UTC -+++ application/pages/global/ExternalToolsPage.cpp -@@ -19,6 +19,7 @@ - #include <QMessageBox> - #include <QFileDialog> - #include <QStandardPaths> -+#include <QTabBar> - - #include "settings/SettingsObject.h" - #include "tools/BaseProfiler.h" ---- application/pages/global/JavaPage.cpp.orig 2018-04-08 21:43:03 UTC -+++ application/pages/global/JavaPage.cpp -@@ -20,6 +20,7 @@ - #include <QFileDialog> - #include <QMessageBox> - #include <QDir> -+#include <QTabBar> - - #include "dialogs/VersionSelectDialog.h" - ---- application/pages/global/MinecraftPage.cpp.orig 2018-04-08 21:43:03 UTC -+++ application/pages/global/MinecraftPage.cpp -@@ -18,6 +18,7 @@ - - #include <QMessageBox> - #include <QDir> -+#include <QTabBar> - - #include "settings/SettingsObject.h" - #include "MultiMC.h" ---- application/pages/global/PasteEEPage.cpp.orig 2018-04-08 21:43:03 UTC -+++ application/pages/global/PasteEEPage.cpp -@@ -19,6 +19,7 @@ - #include <QMessageBox> - #include <QFileDialog> - #include <QStandardPaths> -+#include <QTabBar> - - #include "settings/SettingsObject.h" - #include "tools/BaseProfiler.h" ---- application/pages/global/ProxyPage.cpp.orig 2018-04-08 21:43:03 UTC -+++ application/pages/global/ProxyPage.cpp -@@ -16,6 +16,8 @@ - #include "ProxyPage.h" - #include "ui_ProxyPage.h" - -+#include <QTabBar> -+ - #include "settings/SettingsObject.h" - #include "MultiMC.h" - ---- application/pages/instance/NotesPage.cpp.orig 2018-04-08 21:43:03 UTC -+++ application/pages/instance/NotesPage.cpp -@@ -1,5 +1,6 @@ - #include "NotesPage.h" - #include "ui_NotesPage.h" -+#include <QTabBar> - - NotesPage::NotesPage(BaseInstance *inst, QWidget *parent) - : QWidget(parent), ui(new Ui::NotesPage), m_inst(inst) ---- application/pages/modplatform/ImportPage.cpp.orig 2018-04-08 21:43:03 UTC -+++ application/pages/modplatform/ImportPage.cpp -@@ -7,6 +7,7 @@ - #include "dialogs/ProgressDialog.h" - #include "dialogs/NewInstanceDialog.h" - #include <QFileDialog> -+#include <QValidator> - #include <InstanceImportTask.h> - - class UrlValidator : public QValidator ---- application/pages/modplatform/VanillaPage.cpp.orig 2018-04-08 21:43:03 UTC -+++ application/pages/modplatform/VanillaPage.cpp -@@ -12,6 +12,7 @@ - #include <Filter.h> - #include <Env.h> - #include <InstanceCreationTask.h> -+#include <QTabBar> - - VanillaPage::VanillaPage(NewInstanceDialog *dialog, QWidget *parent) - : QWidget(parent), dialog(dialog), ui(new Ui::VanillaPage) ---- cmake/UnitTest.cmake.orig 2018-04-08 21:43:03 UTC -+++ cmake/UnitTest.cmake -@@ -7,7 +7,7 @@ message(${TEST_RESOURCE_PATH}) - function(add_unit_test name) - set(options "") - set(oneValueArgs DATA) -- set(multiValueArgs SOURCES LIBS QT) -+ set(multiValueArgs SOURCES LIBS) - - cmake_parse_arguments(OPT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) - -@@ -40,8 +40,7 @@ function(add_unit_test name) - endif() - endif() - -- target_link_libraries(${name}_test ${OPT_LIBS}) -- qt5_use_modules(${name}_test Test ${OPT_QT}) -+ target_link_libraries(${name}_test Qt5::Test ${OPT_LIBS}) - - target_include_directories(${name}_test PRIVATE "${TEST_RESOURCE_PATH}/UnitTest/") - ---- libraries/LocalPeer/CMakeLists.txt.orig 2018-04-08 21:43:03 UTC -+++ libraries/LocalPeer/CMakeLists.txt -@@ -26,4 +26,4 @@ endif() - add_library(LocalPeer STATIC ${SINGLE_SOURCES}) - target_include_directories(LocalPeer PUBLIC include) - --qt5_use_modules(LocalPeer Core Network) -+target_link_libraries(LocalPeer Qt5::Core Qt5::Network) ---- libraries/classparser/CMakeLists.txt.orig 2018-04-08 21:43:03 UTC -+++ libraries/classparser/CMakeLists.txt -@@ -38,5 +38,4 @@ add_definitions(-DCLASSPARSER_LIBRARY) - - add_library(MultiMC_classparser STATIC ${CLASSPARSER_SOURCES} ${CLASSPARSER_HEADERS}) - target_include_directories(MultiMC_classparser PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") --target_link_libraries(MultiMC_classparser MultiMC_quazip) --qt5_use_modules(MultiMC_classparser Core) -+target_link_libraries(MultiMC_classparser MultiMC_quazip Qt5::Core) ---- libraries/ganalytics/CMakeLists.txt.orig 2018-04-08 21:43:03 UTC -+++ libraries/ganalytics/CMakeLists.txt -@@ -12,6 +12,6 @@ include/ganalytics.h - ) - - add_library(ganalytics STATIC ${ganalytics_SOURCES}) --qt5_use_modules(ganalytics Core Gui Network) -+target_link_libraries(ganalytics Qt5::Core Qt5::Gui Qt5::Network) - target_include_directories(ganalytics PUBLIC include) - target_link_libraries(ganalytics systeminfo) ---- libraries/iconfix/CMakeLists.txt.orig 2018-04-08 21:43:03 UTC -+++ libraries/iconfix/CMakeLists.txt -@@ -15,7 +15,7 @@ internal/qiconloader_p.h - add_library(MultiMC_iconfix SHARED ${ICONFIX_SOURCES}) - target_include_directories(MultiMC_iconfix PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_BINARY_DIR}" ) - --qt5_use_modules(MultiMC_iconfix Core Widgets) -+target_link_libraries(MultiMC_iconfix Qt5::Core Qt5::Widgets) - - set_target_properties(MultiMC_iconfix PROPERTIES CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN 1) - generate_export_header(MultiMC_iconfix) ---- libraries/rainbow/CMakeLists.txt.orig 2018-04-08 21:43:03 UTC -+++ libraries/rainbow/CMakeLists.txt -@@ -12,7 +12,7 @@ add_definitions(-DRAINBOW_LIBRARY) - add_library(MultiMC_rainbow SHARED ${RAINBOW_SOURCES}) - target_include_directories(MultiMC_rainbow PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") - --qt5_use_modules(MultiMC_rainbow Core Gui) -+target_link_libraries(MultiMC_rainbow Qt5::Core Qt5::Gui) - - # Install it - install( ---- libraries/systeminfo/CMakeLists.txt.orig 2018-04-08 21:43:03 UTC -+++ libraries/systeminfo/CMakeLists.txt -@@ -19,7 +19,7 @@ elseif (UNIX) - endif() - - add_library(systeminfo STATIC ${systeminfo_SOURCES}) --qt5_use_modules(systeminfo Core Gui Network) -+target_link_libraries(systeminfo Qt5::Core Qt5::Gui Qt5::Network) - target_include_directories(systeminfo PUBLIC include) - - include (UnitTest) diff --git a/games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp b/games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp index 28bd762a59f8..859c7647bd35 100644 --- a/games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp +++ b/games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp @@ -1,11 +1,11 @@ ---- libraries/iconfix/internal/qiconloader.cpp.orig 2017-12-18 00:19:43 UTC +--- libraries/iconfix/internal/qiconloader.cpp.orig 2019-03-09 17:22:58 UTC +++ libraries/iconfix/internal/qiconloader.cpp -@@ -320,7 +320,7 @@ Description: Make it so that the QIcon l - icon theme specification. +@@ -320,7 +320,7 @@ Description: Make it so that the QIcon loader honors / + icon theme specification. Bug: https://bugreports.qt.nokia.com/browse/QTBUG-12874 *********************************************************************/ -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - /* Freedesktop standard says to look in /usr/share/pixmaps last */ - if (entries.isEmpty()) - { + /* Freedesktop standard says to look in /usr/share/pixmaps last */ + if (entries.isEmpty()) + { diff --git a/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp b/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp index 81f6d8107d58..d3d6d0bc58f8 100644 --- a/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp +++ b/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp @@ -1,17 +1,17 @@ ---- libraries/systeminfo/src/sys_unix.cpp.orig 2017-12-18 00:19:43 UTC +--- libraries/systeminfo/src/sys_unix.cpp.orig 2019-03-09 17:25:33 UTC +++ libraries/systeminfo/src/sys_unix.cpp -@@ -16,6 +16,7 @@ Sys::KernelInfo Sys::getKernelInfo() +@@ -18,6 +18,7 @@ Sys::KernelInfo Sys::getKernelInfo() uint64_t Sys::getSystemRam() { - std::string token; + std::string token; + #ifdef Q_OS_LINUX - std::ifstream file("/proc/meminfo"); - while(file >> token) - { -@@ -34,6 +35,19 @@ uint64_t Sys::getSystemRam() - // ignore rest of the line - file.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); - } + std::ifstream file("/proc/meminfo"); + while(file >> token) + { +@@ -36,6 +37,19 @@ uint64_t Sys::getSystemRam() + // ignore rest of the line + file.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); + } + #elif defined Q_OS_FREEBSD + char buff[512]; + FILE *fp = popen("sysctl hw.physmem", "r"); @@ -25,17 +25,6 @@ + } + } + #endif - return 0; // nothing found + return 0; // nothing found } -@@ -43,7 +57,9 @@ bool Sys::isCPU64bit() - } - - bool Sys::isSystem64bit() --{ -+{ -+ #if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - // kernel build arch on linux - return QSysInfo::currentCpuArchitecture() == "x86_64"; -+ #endif - } diff --git a/games/multimc/pkg-message b/games/multimc/pkg-message new file mode 100644 index 000000000000..d90b0ac6ac0e --- /dev/null +++ b/games/multimc/pkg-message @@ -0,0 +1,14 @@ +Important note about LWJGL: + +Minecraft requires LWJGL (the Lightweight Java Game Library) to run. +Mojang hosts prebuilt LWJGL shared objects for Windows, macOS, and Linux, +which MultiMC is written to download and add to a new instance. The FreeBSD +port of MultiMC is patched to use the system LWJGL instead, to work around the +lack of a Mojang-provided binary for FreeBSD. + +From version 1.13, Minecraft requires LWJGL 3 to run, but presently the latest +version in the Ports Collection is 2.9.3. In order to run Minecraft 1.13 +instances in MultiMC, LWJGL 3 will have to be ported, and ideally MultiMC should +be patched to use version 2 or 3 depending on the Minecraft version of a given instance. +This is planned for the future, but as of now it is only possible to play versions +up to 1.12.x with this port. |