Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Mar 2019 17:53:40 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r496157 - in head/games/multimc: . files
Message-ID:  <201903181753.x2IHreGk099876@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Mon Mar 18 17:53:39 2019
New Revision: 496157
URL: https://svnweb.freebsd.org/changeset/ports/496157

Log:
  games/multimc: update to 0.6.5
  
  PR:		236488
  Submitted by:	tsundoku <me@tsundoku.ne.jp> (maintainer)

Added:
  head/games/multimc/files/patch-api_logic_tools_MCEditTool.cpp   (contents, props changed)
  head/games/multimc/pkg-message   (contents, props changed)
Deleted:
  head/games/multimc/files/patch-git_4d68c1b
Modified:
  head/games/multimc/Makefile   (contents, props changed)
  head/games/multimc/distinfo   (contents, props changed)
  head/games/multimc/files/patch-api_gui_DesktopServices.cpp   (contents, props changed)
  head/games/multimc/files/patch-api_logic_FileSystem.cpp   (contents, props changed)
  head/games/multimc/files/patch-api_logic_FileSystem__test.cpp   (contents, props changed)
  head/games/multimc/files/patch-api_logic_java_JavaUtils.cpp   (contents, props changed)
  head/games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp   (contents, props changed)
  head/games/multimc/files/patch-api_logic_minecraft_OpSys.cpp   (contents, props changed)
  head/games/multimc/files/patch-api_logic_minecraft_OpSys.h   (contents, props changed)
  head/games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp   (contents, props changed)
  head/games/multimc/files/patch-application_MultiMC.cpp   (contents, props changed)
  head/games/multimc/files/patch-application_UpdateController.cpp   (contents, props changed)
  head/games/multimc/files/patch-application_install__prereqs.cmake.in   (contents, props changed)
  head/games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp   (contents, props changed)
  head/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp   (contents, props changed)

Modified: head/games/multimc/Makefile
==============================================================================
--- head/games/multimc/Makefile	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/Makefile	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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

Modified: head/games/multimc/distinfo
==============================================================================
--- head/games/multimc/distinfo	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/distinfo	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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

Modified: head/games/multimc/files/patch-api_gui_DesktopServices.cpp
==============================================================================
--- head/games/multimc/files/patch-api_gui_DesktopServices.cpp	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-api_gui_DesktopServices.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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();

Modified: head/games/multimc/files/patch-api_logic_FileSystem.cpp
==============================================================================
--- head/games/multimc/files/patch-api_logic_FileSystem.cpp	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-api_logic_FileSystem.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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);

Modified: head/games/multimc/files/patch-api_logic_FileSystem__test.cpp
==============================================================================
--- head/games/multimc/files/patch-api_logic_FileSystem__test.cpp	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-api_logic_FileSystem__test.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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");

Modified: head/games/multimc/files/patch-api_logic_java_JavaUtils.cpp
==============================================================================
--- head/games/multimc/files/patch-api_logic_java_JavaUtils.cpp	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-api_logic_java_JavaUtils.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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"))
+     {

Modified: head/games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp
==============================================================================
--- head/games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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();
  }
  

Modified: head/games/multimc/files/patch-api_logic_minecraft_OpSys.cpp
==============================================================================
--- head/games/multimc/files/patch-api_logic_minecraft_OpSys.cpp	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-api_logic_minecraft_OpSys.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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
 +}

Modified: head/games/multimc/files/patch-api_logic_minecraft_OpSys.h
==============================================================================
--- head/games/multimc/files/patch-api_logic_minecraft_OpSys.h	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-api_logic_minecraft_OpSys.h	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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

Modified: head/games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp
==============================================================================
--- head/games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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()
-         }
+@@ -66,7 +67,44 @@ void runLspci(QStringList &log)
      }
- 
--    char buff[512];
-     int gpuline = -1;
-     int cline = 0;
-     FILE *fp = popen("lspci -k", "r");
-@@ -64,6 +67,40 @@ void PrintInstanceInfo::executeTask()
-             cline++;
-         }
-     }
+     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)
 +		{
-+			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 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)));
++		}
++		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);

Added: head/games/multimc/files/patch-api_logic_tools_MCEditTool.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/multimc/files/patch-api_logic_tools_MCEditTool.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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");

Modified: head/games/multimc/files/patch-application_MultiMC.cpp
==============================================================================
--- head/games/multimc/files/patch-application_MultiMC.cpp	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-application_MultiMC.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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)

Modified: head/games/multimc/files/patch-application_UpdateController.cpp
==============================================================================
--- head/games/multimc/files/patch-application_UpdateController.cpp	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-application_UpdateController.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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();

Modified: head/games/multimc/files/patch-application_install__prereqs.cmake.in
==============================================================================
--- head/games/multimc/files/patch-application_install__prereqs.cmake.in	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-application_install__prereqs.cmake.in	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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}
  )

Modified: head/games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp
==============================================================================
--- head/games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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())
+     {

Modified: head/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp
==============================================================================
--- head/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp	Mon Mar 18 17:33:23 2019	(r496156)
+++ head/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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
- }

Added: head/games/multimc/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/multimc/pkg-message	Mon Mar 18 17:53:39 2019	(r496157)
@@ -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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903181753.x2IHreGk099876>