summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-07-16 10:16:01 -0400
committerCameron Katri <me@cameronkatri.com>2021-07-16 10:16:01 -0400
commit8a1b679969245ed7944ca397b5a9df4370166b68 (patch)
tree355641dbc9d8e351929a54a31a17d605ff6b8d56
parent1dbd8d488ab44da4daea2a36d251d04f0bb7db70 (diff)
downloadfreebsd-ports-8a1b679969245ed7944ca397b5a9df4370166b68.tar.gz
freebsd-ports-8a1b679969245ed7944ca397b5a9df4370166b68.tar.zst
freebsd-ports-8a1b679969245ed7944ca397b5a9df4370166b68.zip
Add multimc with patch to autodetect minecraft-runtime
-rw-r--r--games/Makefile1
-rw-r--r--games/multimc/Makefile36
-rw-r--r--games/multimc/distinfo7
-rw-r--r--games/multimc/files/patch-CMakeLists.txt12
-rw-r--r--games/multimc/files/patch-api_gui_DesktopServices.cpp56
-rw-r--r--games/multimc/files/patch-api_logic_FileSystem.cpp11
-rw-r--r--games/multimc/files/patch-api_logic_FileSystem__test.cpp11
-rw-r--r--games/multimc/files/patch-api_logic_java_JavaUtils.cpp38
-rw-r--r--games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp14
-rw-r--r--games/multimc/files/patch-api_logic_minecraft_OpSys.cpp27
-rw-r--r--games/multimc/files/patch-api_logic_minecraft_OpSys.h26
-rw-r--r--games/multimc/files/patch-api_logic_minecraft_launch_ExtractNatives.cpp17
-rw-r--r--games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp74
-rw-r--r--games/multimc/files/patch-api_logic_tools_MCEditTool.cpp11
-rw-r--r--games/multimc/files/patch-application_MultiMC.cpp11
-rw-r--r--games/multimc/files/patch-application_UpdateController.cpp11
-rw-r--r--games/multimc/files/patch-application_install__prereqs.cmake.in8
-rw-r--r--games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp11
-rw-r--r--games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp30
-rw-r--r--games/multimc/pkg-descr5
-rw-r--r--games/multimc/pkg-plist9
21 files changed, 426 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index 16f095a..7803350 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -1,3 +1,4 @@
SUBDIR += lwjgl3
+SUBDIR += multimc
.include <bsd.port.subdir.mk>
diff --git a/games/multimc/Makefile b/games/multimc/Makefile
new file mode 100644
index 0000000..5245a7c
--- /dev/null
+++ b/games/multimc/Makefile
@@ -0,0 +1,36 @@
+PORTNAME= multimc
+DISTVERSION= 0.6.12
+CATEGORIES= games java
+
+MAINTAINER= me@cameronkatri.com
+COMMENT= Minecraft launcher with the ability to manage multiple instances
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/COPYING.md
+
+RUN_DEPENDS= lwjgl>=2.9.3:games/lwjgl \
+ ${JAVAJARDIR}/lwjgl3/lwjgl.jar:games/lwjgl3
+
+USES= cmake compiler:c++14-lang qt:5
+USE_GITHUB= yes
+GH_ACCOUNT= MultiMC
+GH_PROJECT= MultiMC5
+GH_TUPLE= MultiMC:libnbtplusplus:508eda8:libnbtplusplus/libraries/libnbtplusplus \
+ MultiMC:quazip:3691d57:quazip/libraries/quazip
+USE_LDCONFIG= yes
+USE_JAVA= 1.8+
+USE_QT= core concurrent gui network testlib_build widgets xml \
+ buildtools_build qmake_build
+
+CMAKE_ARGS= -DMultiMC_LAYOUT="lin-system"
+CXXFLAGS+= -Wno-inconsistent-missing-override \
+ -Wno-delete-non-virtual-dtor \
+ -DLWJGL_DIR='\"${LOCALBASE}/lib/lwjgl\"'
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libMultiMC_*.so
+ ${INSTALL_DATA} ${WRKSRC}/application/package/linux/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/share/applications/
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${PORTNAME}.svg
+ ${INSTALL_DATA} ${WRKSRC}/application/resources/multimc/scalable/multimc.svg ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${PORTNAME}.svg
+
+.include <bsd.port.mk>
diff --git a/games/multimc/distinfo b/games/multimc/distinfo
new file mode 100644
index 0000000..a3c83dc
--- /dev/null
+++ b/games/multimc/distinfo
@@ -0,0 +1,7 @@
+TIMESTAMP = 1626036200
+SHA256 (MultiMC-MultiMC5-0.6.12_GH0.tar.gz) = c251744b77d93db4ead56940b7b81d30dc5390fb86a1676d3f0364cc4e570185
+SIZE (MultiMC-MultiMC5-0.6.12_GH0.tar.gz) = 2389805
+SHA256 (MultiMC-libnbtplusplus-508eda8_GH0.tar.gz) = 14f16c8e6dc264017684774cdd9c6f149855e464895b28c29f9f55ea76d34f1a
+SIZE (MultiMC-libnbtplusplus-508eda8_GH0.tar.gz) = 47406
+SHA256 (MultiMC-quazip-3691d57_GH0.tar.gz) = 17a9457360053fa2c6c849c75fa760383036bd14d7d8f7bd0d958bfc2a584009
+SIZE (MultiMC-quazip-3691d57_GH0.tar.gz) = 103508
diff --git a/games/multimc/files/patch-CMakeLists.txt b/games/multimc/files/patch-CMakeLists.txt
new file mode 100644
index 0000000..4769c4d
--- /dev/null
+++ b/games/multimc/files/patch-CMakeLists.txt
@@ -0,0 +1,12 @@
+--- CMakeLists.txt.orig 2019-07-13 18:18:48 UTC
++++ CMakeLists.txt
+@@ -38,6 +38,9 @@ if(UNIX AND APPLE)
+ endif()
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type")
+
++# Fix build with Qt 5.13
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
++
+ ##################################### Set Application options #####################################
+
+ ######## Set URLs ########
diff --git a/games/multimc/files/patch-api_gui_DesktopServices.cpp b/games/multimc/files/patch-api_gui_DesktopServices.cpp
new file mode 100644
index 0000000..eb4fd15
--- /dev/null
+++ b/games/multimc/files/patch-api_gui_DesktopServices.cpp
@@ -0,0 +1,56 @@
+--- api/gui/DesktopServices.cpp.orig 2019-02-20 23:45:36 UTC
++++ api/gui/DesktopServices.cpp
+@@ -7,7 +7,7 @@
+ /**
+ * This shouldn't exist, but until QTBUG-9328 and other unreported bugs are fixed, it needs to be a thing.
+ */
+-#if defined(Q_OS_LINUX)
++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
+
+ #include <unistd.h>
+ #include <errno.h>
+@@ -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);
+ #else
+ return f();
+@@ -97,7 +97,7 @@ bool openFile(const QString &path)
+ {
+ return QDesktopServices::openUrl(QUrl::fromLocalFile(path));
+ };
+-#if defined(Q_OS_LINUX)
++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
+ return IndirectOpen(f);
+ #else
+ 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;
+-#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, const QStrin
+ bool run(const QString &application, const QStringList &args, const QString &workingDirectory, qint64 *pid)
+ {
+ 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([&]()
+ {
+@@ -139,7 +139,7 @@ bool openUrl(const QUrl &url)
+ {
+ return QDesktopServices::openUrl(url);
+ };
+-#if defined(Q_OS_LINUX)
++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
+ return IndirectOpen(f);
+ #else
+ return f();
diff --git a/games/multimc/files/patch-api_logic_FileSystem.cpp b/games/multimc/files/patch-api_logic_FileSystem.cpp
new file mode 100644
index 0000000..22c10d8
--- /dev/null
+++ b/games/multimc/files/patch-api_logic_FileSystem.cpp
@@ -0,0 +1,11 @@
+--- api/logic/FileSystem.cpp.orig 2019-03-07 17:30:10 UTC
++++ api/logic/FileSystem.cpp
+@@ -398,7 +398,7 @@ QString getDesktopDir()
+ bool createShortCut(QString location, QString dest, QStringList args, QString name,
+ QString icon)
+ {
+-#if defined Q_OS_LINUX
++#if defined Q_OS_LINUX || defined(Q_OS_FREEBSD)
+ location = PathCombine(location, name + ".desktop");
+
+ 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
new file mode 100644
index 0000000..ad6a41b
--- /dev/null
+++ b/games/multimc/files/patch-api_logic_FileSystem__test.cpp
@@ -0,0 +1,11 @@
+--- api/logic/FileSystem_test.cpp.orig 2019-03-07 17:32:17 UTC
++++ api/logic/FileSystem_test.cpp
+@@ -119,7 +119,7 @@ slots:
+
+ // this is only valid on linux
+ // 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");
diff --git a/games/multimc/files/patch-api_logic_java_JavaUtils.cpp b/games/multimc/files/patch-api_logic_java_JavaUtils.cpp
new file mode 100644
index 0000000..56adb9c
--- /dev/null
+++ b/games/multimc/files/patch-api_logic_java_JavaUtils.cpp
@@ -0,0 +1,38 @@
+--- api/logic/java/JavaUtils.cpp.orig 2021-07-16 14:03:58 UTC
++++ api/logic/java/JavaUtils.cpp
+@@ -31,7 +31,7 @@ JavaUtils::JavaUtils()
+ {
+ }
+
+-#ifdef Q_OS_LINUX
++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
+ 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)
+ // 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"))
+ {
+@@ -142,6 +142,8 @@ JavaInstallPtr JavaUtils::GetDefaultJava()
+ javaVersion->arch = "unknown";
+ #if defined(Q_OS_WIN32)
+ javaVersion->path = "javaw";
++#elif defined(Q_OS_FREEBSD)
++ javaVersion->path = "minecraft-runtime";
+ #else
+ javaVersion->path = "java";
+ #endif
diff --git a/games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp b/games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp
new file mode 100644
index 0000000..67276a6
--- /dev/null
+++ b/games/multimc/files/patch-api_logic_minecraft_MinecraftInstance.cpp
@@ -0,0 +1,14 @@
+--- api/logic/minecraft/MinecraftInstance.cpp.orig 2019-03-08 14:41:15 UTC
++++ api/logic/minecraft/MinecraftInstance.cpp
+@@ -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/"));
++#endif
+ 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
new file mode 100644
index 0000000..3879286
--- /dev/null
+++ b/games/multimc/files/patch-api_logic_minecraft_OpSys.cpp
@@ -0,0 +1,27 @@
+--- api/logic/minecraft/OpSys.cpp.orig 2019-03-09 16:23:18 UTC
++++ api/logic/minecraft/OpSys.cpp
+@@ -17,6 +17,8 @@
+
+ OpSys OpSys_fromString(QString name)
+ {
++ if (name == "freebsd")
++ return Os_FreeBSD;
+ if (name == "linux")
+ return Os_Linux;
+ if (name == "windows")
+@@ -30,6 +32,8 @@ QString OpSys_toString(OpSys name)
+ {
+ switch (name)
+ {
++ case Os_FreeBSD:
++ return "freebsd";
+ case Os_Linux:
+ return "linux";
+ case Os_OSX:
+@@ -39,4 +43,4 @@ QString OpSys_toString(OpSys name)
+ 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
new file mode 100644
index 0000000..5286946
--- /dev/null
+++ b/games/multimc/files/patch-api_logic_minecraft_OpSys.h
@@ -0,0 +1,26 @@
+--- api/logic/minecraft/OpSys.h.orig 2019-03-09 16:25:37 UTC
++++ api/logic/minecraft/OpSys.h
+@@ -18,6 +18,7 @@
+ enum OpSys
+ {
+ Os_Windows,
++ Os_FreeBSD,
+ 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 Q_OS_MAC
+ #define currentSystem Os_OSX
++#elif defined Q_OS_FREEBSD
++#define currentSystem Os_FreeBSD
+ #else
+ #define currentSystem Os_Linux
+-#endif
+-#endif
+\ No newline at end of file
++#endif
diff --git a/games/multimc/files/patch-api_logic_minecraft_launch_ExtractNatives.cpp b/games/multimc/files/patch-api_logic_minecraft_launch_ExtractNatives.cpp
new file mode 100644
index 0000000..e981539
--- /dev/null
+++ b/games/multimc/files/patch-api_logic_minecraft_launch_ExtractNatives.cpp
@@ -0,0 +1,17 @@
+--- api/logic/minecraft/launch/ExtractNatives.cpp.orig 2017-12-18 00:19:43 UTC
++++ api/logic/minecraft/launch/ExtractNatives.cpp
+@@ -23,6 +23,14 @@
+ #include "FileSystem.h"
+ #include <QDir>
+
++//C library defines interfere with Java version check
++#ifdef major
++ #undef major
++#endif
++#ifdef minor
++ #undef minor
++#endif
++
+ static QString replaceSuffix (QString target, const QString &suffix, const QString &replacement)
+ {
+ if (!target.endsWith(suffix))
diff --git a/games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp b/games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp
new file mode 100644
index 0000000..be5c158
--- /dev/null
+++ b/games/multimc/files/patch-api_logic_minecraft_launch_PrintInstanceInfo.cpp
@@ -0,0 +1,74 @@
+--- api/logic/minecraft/launch/PrintInstanceInfo.cpp.orig 2019-03-07 21:42:07 UTC
++++ api/logic/minecraft/launch/PrintInstanceInfo.cpp
+@@ -19,8 +19,9 @@
+ #include "PrintInstanceInfo.h"
+ #include <launch/LaunchTask.h>
+
+-#ifdef Q_OS_LINUX
++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
+ namespace {
++#if defined(Q_OS_LINUX)
+ void probeProcCpuinfo(QStringList &log)
+ {
+ std::ifstream cpuin("/proc/cpuinfo");
+@@ -66,7 +67,44 @@ void runLspci(QStringList &log)
+ }
+ pclose(lspci);
+ }
++#elif defined(Q_OS_FREEBSD)
++void runSysctlHwModel(QStringList &log)
++{
++ char buff[512];
++ FILE *hwmodel = popen("sysctl hw.model", "r");
++ while (fgets(buff, 512, hwmodel) != NULL)
++ {
++ log << QString::fromUtf8(buff);
++ break;
++ }
++ 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)
++ {
++ 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)));
++ }
++ log << QString::fromStdString(strcard);
++ break;
++ }
++ pclose(pciconf);
++}
++#endif
++
+ 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 0000000..81d3825
--- /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
new file mode 100644
index 0000000..e2691e4
--- /dev/null
+++ b/games/multimc/files/patch-application_MultiMC.cpp
@@ -0,0 +1,11 @@
+--- application/MultiMC.cpp.orig 2019-03-08 00:50:32 UTC
++++ application/MultiMC.cpp
+@@ -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();
+ #elif defined(Q_OS_WIN32)
diff --git a/games/multimc/files/patch-application_UpdateController.cpp b/games/multimc/files/patch-application_UpdateController.cpp
new file mode 100644
index 0000000..ab49773
--- /dev/null
+++ b/games/multimc/files/patch-application_UpdateController.cpp
@@ -0,0 +1,11 @@
+--- application/UpdateController.cpp.orig 2019-03-08 00:52:03 UTC
++++ application/UpdateController.cpp
+@@ -90,7 +90,7 @@ void UpdateController::installUpdates()
+ qDebug() << "Installing updates.";
+ #ifdef Q_OS_WIN
+ 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");
+ #elif defined Q_OS_MAC
+ 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
new file mode 100644
index 0000000..8ca7a44
--- /dev/null
+++ b/games/multimc/files/patch-application_install__prereqs.cmake.in
@@ -0,0 +1,8 @@
+--- 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}
+ )
+
+ include(BundleUtilities)
+-fixup_bundle("@APPS@" "${QTPLUGINS}" "@DIRS@")
+
diff --git a/games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp b/games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp
new file mode 100644
index 0000000..859c764
--- /dev/null
+++ b/games/multimc/files/patch-libraries_iconfix_internal_qiconloader.cpp
@@ -0,0 +1,11 @@
+--- 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 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())
+ {
diff --git a/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp b/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp
new file mode 100644
index 0000000..d3d6d0b
--- /dev/null
+++ b/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp
@@ -0,0 +1,30 @@
+--- libraries/systeminfo/src/sys_unix.cpp.orig 2019-03-09 17:25:33 UTC
++++ libraries/systeminfo/src/sys_unix.cpp
+@@ -18,6 +18,7 @@ Sys::KernelInfo Sys::getKernelInfo()
+ uint64_t Sys::getSystemRam()
+ {
+ std::string token;
++ #ifdef Q_OS_LINUX
+ 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");
++ if (fp != NULL)
++ {
++ while(fgets(buff, 512, fp) != NULL)
++ {
++ std::string str(buff);
++ uint64_t mem = std::stoull(str.substr(12, std::string::npos));
++ return mem * 1024ull;
++ }
++ }
++ #endif
+ return 0; // nothing found
+ }
+
diff --git a/games/multimc/pkg-descr b/games/multimc/pkg-descr
new file mode 100644
index 0000000..1142e14
--- /dev/null
+++ b/games/multimc/pkg-descr
@@ -0,0 +1,5 @@
+MultiMC is a custom launcher for Minecraft that allows you to easily
+manage multiple installations of Minecraft at once. It also allows
+you to easily install and remove mods by simply dragging and dropping.
+
+WWW: https://multimc.org
diff --git a/games/multimc/pkg-plist b/games/multimc/pkg-plist
new file mode 100644
index 0000000..b3a7126
--- /dev/null
+++ b/games/multimc/pkg-plist
@@ -0,0 +1,9 @@
+bin/multimc
+lib/libMultiMC_gui.so
+lib/libMultiMC_iconfix.so
+lib/libMultiMC_logic.so
+lib/libMultiMC_nbt++.so
+lib/libMultiMC_quazip.so
+lib/libMultiMC_rainbow.so
+%%DATADIR%%/jars/JavaCheck.jar
+%%DATADIR%%/jars/NewLaunch.jar