summaryrefslogtreecommitdiff
path: root/games/openmw
diff options
context:
space:
mode:
Diffstat (limited to 'games/openmw')
-rw-r--r--games/openmw/Makefile19
-rw-r--r--games/openmw/files/patch-components_crashcatcher_crashcatcher.cpp37
-rw-r--r--games/openmw/files/patch-components_esm_formid.hpp17
-rw-r--r--games/openmw/files/patch-components_misc_strings_algorithm.hpp28
4 files changed, 82 insertions, 19 deletions
diff --git a/games/openmw/Makefile b/games/openmw/Makefile
index fbd17c143ac4..e0654383dacc 100644
--- a/games/openmw/Makefile
+++ b/games/openmw/Makefile
@@ -1,7 +1,7 @@
PORTNAME= openmw
DISTVERSIONPREFIX= openmw-
DISTVERSION= 0.49.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= games
MAINTAINER= fluffy@FreeBSD.org
@@ -15,6 +15,7 @@ LIB_DEPENDS= libavcodec.so.60:multimedia/ffmpeg \
libboost_thread.so:devel/boost-libs \
libMyGUIEngine.so:x11-toolkits/mygui \
libBulletCollision.so:devel/bullet@double \
+ libcollada-dom2.5-dp.so:devel/collada-dom \
libosg.so:graphics/osg \
libRecast.so:graphics/recastnavigation \
libunshield.so:archivers/unshield \
@@ -23,18 +24,15 @@ LIB_DEPENDS= libavcodec.so.60:multimedia/ffmpeg \
libyaml-cpp.so:devel/yaml-cpp
USES= cmake compiler:c++20-lang desktop-file-utils gl luajit openal \
- pkgconfig qt:5 sdl sqlite xorg
+ pkgconfig qt:6 sdl sqlite xorg
USE_GITHUB= yes
GH_ACCOUNT= OpenMW
USE_GL= gl
-USE_QT= core gui linguisttools network opengl printsupport svg widgets \
- buildtools:build qmake:build
-#USE_QT= base imageformats multimedia svg tools:build
+USE_QT= base imageformats multimedia svg tools:build
USE_SDL= sdl2
USE_CXXSTD= c++20
-#USE_GCC= yes
-CMAKE_ARGS= -DDESIRED_QT_VERSION=5 \
+CMAKE_ARGS= -DDESIRED_QT_VERSION=${_QT_VER} \
-DOPENMW_USE_SYSTEM_BULLET=ON \
-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON \
-DGLOBAL_DATA_PATH="${PREFIX}/share" \
@@ -65,6 +63,13 @@ PORTDOCS= *
LDFLAGS_i386+= -Wl,--no-check-dynamic-relocations
.endif
+post-patch:
+ ${REINPLACE_CMD} -e 's/Qt6 Qt5/Qt6/' \
+ -e 's/program_options system/program_options/' \
+ ${WRKSRC}/CMakeLists.txt
+ ${REINPLACE_CMD} -e '/Boost::system/d' \
+ ${WRKSRC}/components/CMakeLists.txt
+
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
diff --git a/games/openmw/files/patch-components_crashcatcher_crashcatcher.cpp b/games/openmw/files/patch-components_crashcatcher_crashcatcher.cpp
index 7d1fc2f20462..9a6941316d2b 100644
--- a/games/openmw/files/patch-components_crashcatcher_crashcatcher.cpp
+++ b/games/openmw/files/patch-components_crashcatcher_crashcatcher.cpp
@@ -1,29 +1,42 @@
--- components/crashcatcher/crashcatcher.cpp.orig 2025-07-01 11:41:15 UTC
+++ components/crashcatcher/crashcatcher.cpp
-@@ -95,6 +95,8 @@ namespace
- { ILL_PRVREG, "Privileged register" },
+@@ -83,6 +83,7 @@ namespace
+ { SIGFPE, "FPU exception", "SIGFPE" },
+ { SIGBUS, "System BUS error", "SIGBUS" },
+ { SIGABRT, "Abnormal termination condition", "SIGABRT" },
++ { 0, nullptr },
+ };
+
+ constexpr SignalInfo sigIllCodes[] = {
+@@ -96,6 +97,7 @@ namespace
{ ILL_COPROC, "Coprocessor error" },
{ ILL_BADSTK, "Internal stack error" },
-+#else
-+ { 0, nullptr },
#endif
++ { 0, nullptr },
+ };
+
+ constexpr SignalInfo sigFpeCodes[] = {
+@@ -107,6 +109,7 @@ namespace
+ { FPE_FLTRES, "Floating point inexact result" },
+ { FPE_FLTINV, "Floating point invalid operation" },
+ { FPE_FLTSUB, "Subscript out of range" },
++ { 0, nullptr },
};
-@@ -113,6 +115,8 @@ namespace
- #ifndef __FreeBSD__
+ constexpr SignalInfo sigSegvCodes[] = {
+@@ -114,6 +117,7 @@ namespace
{ SEGV_MAPERR, "Address not mapped to object" },
{ SEGV_ACCERR, "Invalid permissions for mapped object" },
-+#else
-+ { 0, nullptr },
#endif
++ { 0, nullptr },
};
-@@ -121,6 +125,8 @@ namespace
- { BUS_ADRALN, "Invalid address alignment" },
+ constexpr SignalInfo sigBusCodes[] = {
+@@ -122,6 +126,7 @@ namespace
{ BUS_ADRERR, "Non-existent physical address" },
{ BUS_OBJERR, "Object specific hardware error" },
-+#else
-+ { 0, nullptr },
#endif
++ { 0, nullptr },
};
+ const char* findSignalDescription(std::span<const SignalInfo> info, int code)
diff --git a/games/openmw/files/patch-components_esm_formid.hpp b/games/openmw/files/patch-components_esm_formid.hpp
new file mode 100644
index 000000000000..44f943fea077
--- /dev/null
+++ b/games/openmw/files/patch-components_esm_formid.hpp
@@ -0,0 +1,17 @@
+--- components/esm/formid.hpp.orig 2025-07-01 11:41:15 UTC
++++ components/esm/formid.hpp
+@@ -51,10 +51,10 @@ namespace std
+ {
+ size_t operator()(const ESM::FormId& formId) const
+ {
+- static_assert(sizeof(ESM::FormId) == sizeof(size_t));
+- size_t s;
+- memcpy(&s, &formId, sizeof(size_t));
+- return hash<size_t>()(s);
++ static_assert(sizeof(ESM::FormId) == sizeof(uint64_t));
++ uint64_t s;
++ memcpy(&s, &formId, sizeof(ESM::FormId));
++ return hash<uint64_t>()(s);
+ }
+ };
+
diff --git a/games/openmw/files/patch-components_misc_strings_algorithm.hpp b/games/openmw/files/patch-components_misc_strings_algorithm.hpp
new file mode 100644
index 000000000000..c7aa3b1ecfeb
--- /dev/null
+++ b/games/openmw/files/patch-components_misc_strings_algorithm.hpp
@@ -0,0 +1,28 @@
+--- components/misc/strings/algorithm.hpp.orig 2025-07-01 11:41:15 UTC
++++ components/misc/strings/algorithm.hpp
+@@ -4,6 +4,7 @@
+ #include "lower.hpp"
+
+ #include <algorithm>
++#include <cstdint>
+ #include <functional>
+ #include <string>
+ #include <string_view>
+@@ -88,14 +89,14 @@ namespace Misc::StringUtils
+ constexpr std::size_t operator()(std::string_view str) const
+ {
+ // FNV-1a
+- std::size_t hash{ 0xcbf29ce484222325ull };
+- constexpr std::size_t prime{ 0x00000100000001B3ull };
++ std::uint64_t hash{ 0xcbf29ce484222325ull };
++ constexpr std::uint64_t prime{ 0x00000100000001B3ull };
+ for (char c : str)
+ {
+- hash ^= static_cast<std::size_t>(toLower(c));
++ hash ^= static_cast<std::uint64_t>(toLower(c));
+ hash *= prime;
+ }
+- return hash;
++ return static_cast<std::size_t>(hash);
+ }
+ };