diff --git a/games-engines/openmw/openmw-0.45.0.recipe b/games-engines/openmw/openmw-0.47.0.recipe similarity index 90% rename from games-engines/openmw/openmw-0.45.0.recipe rename to games-engines/openmw/openmw-0.47.0.recipe index b1560f639..2e60f9915 100644 --- a/games-engines/openmw/openmw-0.45.0.recipe +++ b/games-engines/openmw/openmw-0.47.0.recipe @@ -5,20 +5,20 @@ DESCRIPTION="OpenMW is a new and modern engine based on the one that runs the \ and OpenMW are written from scratch and aren’t made to support any third party \ programs the original Morrowind engine uses to improve its functionality." HOMEPAGE="https://openmw.org/" -COPYRIGHT="2008-2019 OpenMW" +COPYRIGHT="2008-2021 OpenMW" LICENSE=" GNU GPL v3 MIT Zlib " -REVISION="7" +REVISION="1" SOURCE_URI="https://github.com/OpenMW/openmw/archive/openmw-$portVersion.tar.gz" SOURCE_FILENAME="openmw-$portVersion.tar.gz" -CHECKSUM_SHA256="b63cf971f406ef5f28019f65e9e2bd9641a227459ede45d147562917f67e1c64" +CHECKSUM_SHA256="bd7f77e1527c2180e9b0dfcbe401d6fb48f24dbb37701dac7747697873d6edb4" SOURCE_DIR="openmw-openmw-$portVersion" -osgVersion="3.6.4" +osgVersion="3.6.5" SOURCE_URI_2="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-$osgVersion.tar.gz" -CHECKSUM_SHA256_2="81394d1b484c631028b85d21c5535280c21bbd911cb058e8746c87e93e7b9d33" +CHECKSUM_SHA256_2="aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12" SOURCE_DIR_2="OpenSceneGraph-OpenSceneGraph-$osgVersion" PATCHES="openmw-$portVersion.patchset" PATCHES_2="osg-$osgVersion.patchset" @@ -55,6 +55,7 @@ REQUIRES=" lib:libintl$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:libLinearMath$secondaryArchSuffix + lib:liblz4$secondaryArchSuffix lib:libMyGUIEngine$secondaryArchSuffix lib:libopenal$secondaryArchSuffix lib:libpng$secondaryArchSuffix @@ -83,6 +84,7 @@ BUILD_REQUIRES=" devel:libintl$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix devel:libLinearMath$secondaryArchSuffix + devel:liblz4$secondaryArchSuffix devel:libMyGUIEngine$secondaryArchSuffix devel:libopenal$secondaryArchSuffix devel:libpng16$secondaryArchSuffix @@ -167,16 +169,6 @@ INSTALL() mv $appsDir/OpenMW/openmw-wizard $appsDir/OpenMW/OpenMW-Wizard mv $appsDir/OpenMW/openmw-cs $appsDir/OpenMW/OpenMW-CS - # tune default settings - sed -i "s|crosshair = .*|crosshair = false|" \ - $appsDir/OpenMW/config/openmw/settings-default.cfg - sed -i "s|viewing distance = .*|viewing distance = 4500.0|" \ - $appsDir/OpenMW/config/openmw/settings-default.cfg - sed -i "s|anisotropy = .*|anisotropy = 0|" \ - $appsDir/OpenMW/config/openmw/settings-default.cfg - sed -i "s|minimize on focus loss = .*|minimize on focus loss = false|" \ - $appsDir/OpenMW/config/openmw/settings-default.cfg - local APP_SIGNATURE="application/x-vnd.openmw" local MAJOR="`echo "$portVersion" | cut -d. -f1`" local MIDDLE="`echo "$portVersion" | cut -d. -f2`" diff --git a/games-engines/openmw/patches/openmw-0.45.0.patchset b/games-engines/openmw/patches/openmw-0.47.0.patchset similarity index 79% rename from games-engines/openmw/patches/openmw-0.45.0.patchset rename to games-engines/openmw/patches/openmw-0.47.0.patchset index f241d7646..89df57c1e 100644 --- a/games-engines/openmw/patches/openmw-0.45.0.patchset +++ b/games-engines/openmw/patches/openmw-0.47.0.patchset @@ -1,14 +1,14 @@ -From cb32f03f326ac562d3fdc1fb94daf2d7000eba44 Mon Sep 17 00:00:00 2001 +From 70eccd48cddc292d212cebfb0ad72811f01fc155 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sat, 6 Oct 2018 20:54:27 +1000 -Subject: Fix build for Haiku +Date: Thu, 11 Nov 2021 16:14:02 +1000 +Subject: Fixes for Haiku diff --git a/CMakeLists.txt b/CMakeLists.txt -index 34e1a8f..40610ba 100644 +index 705b95f..416f254 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -107,6 +107,19 @@ endif() +@@ -165,6 +165,19 @@ endif() if (APPLE) set(MORROWIND_DATA_FILES "./data" CACHE PATH "location of Morrowind data files") set(OPENMW_RESOURCE_FILES "../Resources/resources" CACHE PATH "location of OpenMW resources files") @@ -29,25 +29,22 @@ index 34e1a8f..40610ba 100644 # Paths SET(BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Where to install binaries") diff --git a/apps/launcher/CMakeLists.txt b/apps/launcher/CMakeLists.txt -index bfc08a7..a0a908a 100644 +index 3018237..af2aecb 100644 --- a/apps/launcher/CMakeLists.txt +++ b/apps/launcher/CMakeLists.txt -@@ -105,6 +105,10 @@ target_link_libraries(openmw-launcher +@@ -100,6 +100,7 @@ target_link_libraries(openmw-launcher + ${SDL2_LIBRARY_ONLY} + ${OPENAL_LIBRARY} components ++ be ) -+if (HAIKU) -+ target_link_libraries(openmw-launcher be) -+endif (HAIKU) -+ - if (DESIRED_QT_VERSION MATCHES 4) - target_link_libraries(openmw-launcher ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}) - if(WIN32) + target_link_libraries(openmw-launcher Qt5::Widgets Qt5::Core) diff --git a/apps/launcher/graphicspage.cpp b/apps/launcher/graphicspage.cpp -index 072f1f3..7ef82be 100644 +index ebb031e..abd4d1c 100644 --- a/apps/launcher/graphicspage.cpp +++ b/apps/launcher/graphicspage.cpp -@@ -12,7 +12,11 @@ +@@ -11,7 +11,11 @@ #define MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ #endif // MAC_OS_X_VERSION_MIN_REQUIRED @@ -57,11 +54,11 @@ index 072f1f3..7ef82be 100644 #include +#endif - #include + #include -@@ -57,6 +61,9 @@ bool Launcher::GraphicsPage::setupSDL() +@@ -59,6 +63,9 @@ bool Launcher::GraphicsPage::setupSDL() + return false; } - #endif +#ifdef __HAIKU__ + int displays = 1; @@ -69,17 +66,17 @@ index 072f1f3..7ef82be 100644 int displays = SDL_GetNumVideoDisplays(); if (displays < 0) -@@ -69,7 +76,7 @@ bool Launcher::GraphicsPage::setupSDL() +@@ -71,7 +78,7 @@ bool Launcher::GraphicsPage::setupSDL() msgBox.exec(); return false; } - +#endif screenComboBox->clear(); + mResolutionsPerScreen.clear(); for (int i = 0; i < displays; i++) - { -@@ -168,9 +175,30 @@ void Launcher::GraphicsPage::saveSettings() - mEngineSettings.setInt("screen", "Video", cScreen); +@@ -287,9 +294,30 @@ void Launcher::GraphicsPage::saveSettings() + Settings::Manager::setString("compute scene bounds", "Shadows", cComputeSceneBounds); } +#ifdef __HAIKU__ @@ -109,7 +106,7 @@ index 072f1f3..7ef82be 100644 SDL_DisplayMode mode; int modeIndex, modes = SDL_GetNumDisplayModes(screen); -@@ -210,7 +238,7 @@ QStringList Launcher::GraphicsPage::getAvailableResolutions(int screen) +@@ -329,7 +357,7 @@ QStringList Launcher::GraphicsPage::getAvailableResolutions(int screen) result.append(resolution); } @@ -119,34 +116,34 @@ index 072f1f3..7ef82be 100644 return result; } diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp -index 2982a30..358380c 100644 +index d41cd52..1af391e 100644 --- a/apps/launcher/maindialog.cpp +++ b/apps/launcher/maindialog.cpp -@@ -171,7 +171,11 @@ Launcher::FirstRunDialogResult Launcher::MainDialog::showFirstRunDialog() +@@ -175,7 +175,11 @@ Launcher::FirstRunDialogResult Launcher::MainDialog::showFirstRunDialog() if (msgBox.clickedButton() == wizardButton) { +#ifdef __HAIKU__ -+ if (!mWizardInvoker->startProcess(QLatin1String("OpenMW-Wizard"), false)) { ++ if (mWizardInvoker->startProcess(QLatin1String("OpenMW-Wizard"), false)) +#else - if (!mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false)) { + if (mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false)) +#endif - return FirstRunDialogResultFailure; - } else { return FirstRunDialogResultWizard; -@@ -390,7 +394,11 @@ bool Launcher::MainDialog::setupGameData() + } + else if (msgBox.clickedButton() == skipButton) +@@ -406,7 +410,11 @@ bool Launcher::MainDialog::setupGameData() if (msgBox.clickedButton() == wizardButton) { +#ifdef __HAIKU__ -+ if (!mWizardInvoker->startProcess(QLatin1String("OpenMW-Wizard"), false)) { ++ if (!mWizardInvoker->startProcess(QLatin1String("OpenMW-Wizard"), false)) +#else - if (!mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false)) { + if (!mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false)) +#endif return false; - } else { - return true; -@@ -599,6 +607,10 @@ void Launcher::MainDialog::play() + } + } +@@ -612,7 +620,11 @@ void Launcher::MainDialog::play() // Launch the game detached @@ -157,11 +154,12 @@ index 2982a30..358380c 100644 +#endif return qApp->quit(); } + diff --git a/apps/launcher/sdlinit.cpp b/apps/launcher/sdlinit.cpp -index 1fe1fd4..22e816f 100644 +index 4717fb2..9b74a8d 100644 --- a/apps/launcher/sdlinit.cpp +++ b/apps/launcher/sdlinit.cpp -@@ -5,6 +5,7 @@ +@@ -4,6 +4,7 @@ bool initSDL() { @@ -169,7 +167,7 @@ index 1fe1fd4..22e816f 100644 SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software"); SDL_SetMainReady(); // Required for determining screen resolution and such on the Graphics tab -@@ -14,12 +15,14 @@ bool initSDL() +@@ -13,12 +14,14 @@ bool initSDL() } signal(SIGINT, SIG_DFL); // We don't want to use the SDL event loop in the launcher, // so reset SIGINT which SDL wants to redirect to an SDL_Quit event. @@ -186,7 +184,7 @@ index 1fe1fd4..22e816f 100644 +#endif } diff --git a/apps/launcher/settingspage.cpp b/apps/launcher/settingspage.cpp -index 843b513..59afde7 100644 +index ca7fd02..5664f74 100644 --- a/apps/launcher/settingspage.cpp +++ b/apps/launcher/settingspage.cpp @@ -96,8 +96,11 @@ Launcher::SettingsPage::~SettingsPage() @@ -202,11 +200,27 @@ index 843b513..59afde7 100644 return; } +diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp +index a06faa4..131ab89 100644 +--- a/apps/openmw/engine.cpp ++++ b/apps/openmw/engine.cpp +@@ -516,7 +516,11 @@ void OMW::Engine::createWindow(Settings::Manager& settings) + pos_y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(screen); + } + ++#ifdef __HAIKU__ ++ Uint32 flags = SDL_WINDOW_OPENGL|SDL_WINDOW_SHOWN; ++#else + Uint32 flags = SDL_WINDOW_OPENGL|SDL_WINDOW_SHOWN|SDL_WINDOW_RESIZABLE; ++#endif + if(fullscreen) + flags |= SDL_WINDOW_FULLSCREEN; + diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp -index 176adfa..2c69d45 100644 +index 8f7e160..5c8c8d3 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp -@@ -243,6 +243,11 @@ int runApplication(int argc, char *argv[]) +@@ -298,6 +298,11 @@ int runApplication(int argc, char *argv[]) boost::filesystem::current_path(binary_path.parent_path()); setenv("OSG_GL_TEXTURE_STORAGE", "OFF", 0); #endif @@ -216,10 +230,10 @@ index 176adfa..2c69d45 100644 + setenv("OPENMW_DECOMPRESS_TEXTURES", "1", 1); +#endif + osg::setNotifyHandler(new OSGLogHandler()); Files::ConfigurationManager cfgMgr; - std::unique_ptr engine; diff --git a/components/crashcatcher/crashcatcher.cpp b/components/crashcatcher/crashcatcher.cpp -index 2e2ddd1..e9400cf 100644 +index 86571e1..7073151 100644 --- a/components/crashcatcher/crashcatcher.cpp +++ b/components/crashcatcher/crashcatcher.cpp @@ -12,7 +12,9 @@ @@ -232,8 +246,21 @@ index 2e2ddd1..e9400cf 100644 #include +@@ -561,6 +563,7 @@ static bool is_debugger_present() + #endif + } + ++#if USE_CRASH_CATCHER + void crashCatcherInstall(int argc, char **argv, const std::string &crashLogPath) + { + if (const auto env = std::getenv("OPENMW_DISABLE_CRASH_CATCHER")) +@@ -577,3 +580,4 @@ void crashCatcherInstall(int argc, char **argv, const std::string &crashLogPath) + Log(Debug::Info) << "Crash handler installed"; + } + } ++#endif diff --git a/components/crashcatcher/crashcatcher.hpp b/components/crashcatcher/crashcatcher.hpp -index fd8f0d1..5b1bc71 100644 +index b693cca..8d15ef1 100644 --- a/components/crashcatcher/crashcatcher.hpp +++ b/components/crashcatcher/crashcatcher.hpp @@ -3,7 +3,7 @@ @@ -246,21 +273,21 @@ index fd8f0d1..5b1bc71 100644 #else #define USE_CRASH_CATCHER 0 diff --git a/components/debug/debugging.cpp b/components/debug/debugging.cpp -index e89a659..04441dd 100644 +index 0e37294..e7733c8 100644 --- a/components/debug/debugging.cpp +++ b/components/debug/debugging.cpp -@@ -52,6 +52,9 @@ namespace Debug +@@ -145,6 +145,9 @@ std::ostream& getRawStdout() int wrapApplication(int (*innerApplication)(int argc, char *argv[]), int argc, char *argv[], const std::string& appName) { +#ifdef __HAIKU + return innerApplication(argc, argv); +#else - // Some objects used to redirect cout and cerr - // Scope must be here, so this still works inside the catch block for logging exceptions - std::streambuf* cout_rdbuf = std::cout.rdbuf (); -@@ -113,4 +116,5 @@ int wrapApplication(int (*innerApplication)(int argc, char *argv[]), int argc, c - std::cerr.rdbuf(cerr_rdbuf); + #if defined _WIN32 + (void)Debug::attachParentConsole(); + #endif +@@ -222,4 +225,5 @@ int wrapApplication(int (*innerApplication)(int argc, char *argv[]), int argc, c + Debug::CurrentDebugLevel = Debug::NoLevel; return ret; +#endif @@ -279,7 +306,7 @@ index 2e72b81..97c43f0 100644 #include namespace Files { typedef LinuxPath TargetPathType; } diff --git a/components/files/linuxpath.cpp b/components/files/linuxpath.cpp -index 3743eef..13c9451 100644 +index c3dead2..dc6d2b0 100644 --- a/components/files/linuxpath.cpp +++ b/components/files/linuxpath.cpp @@ -1,6 +1,6 @@ @@ -290,7 +317,7 @@ index 3743eef..13c9451 100644 #include #include -@@ -54,17 +54,32 @@ LinuxPath::LinuxPath(const std::string& application_name) +@@ -58,17 +58,32 @@ LinuxPath::LinuxPath(const std::string& application_name) boost::filesystem::path LinuxPath::getUserConfigPath() const { @@ -337,31 +364,5 @@ index 7950157..32ff3d8 100644 #include -- -2.19.1 - - -From e7155ea818a5f48ef927752e8d6f5d1db2e42652 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 7 Oct 2018 16:49:50 +1000 -Subject: Remove SDL_WINDOW_RESIZABLE flag for haiku - - -diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp -index f5b4171..897b3e1 100644 ---- a/apps/openmw/engine.cpp -+++ b/apps/openmw/engine.cpp -@@ -336,7 +336,11 @@ void OMW::Engine::createWindow(Settings::Manager& settings) - pos_y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(screen); - } - -+#ifdef __HAIKU__ -+ Uint32 flags = SDL_WINDOW_OPENGL|SDL_WINDOW_SHOWN; -+#else - Uint32 flags = SDL_WINDOW_OPENGL|SDL_WINDOW_SHOWN|SDL_WINDOW_RESIZABLE; -+#endif - if(fullscreen) - flags |= SDL_WINDOW_FULLSCREEN; - --- -2.19.1 +2.30.2 diff --git a/games-engines/openmw/patches/osg-3.6.4.patchset b/games-engines/openmw/patches/osg-3.6.5.patchset similarity index 90% rename from games-engines/openmw/patches/osg-3.6.4.patchset rename to games-engines/openmw/patches/osg-3.6.5.patchset index 15da87af6..45f923141 100644 --- a/games-engines/openmw/patches/osg-3.6.4.patchset +++ b/games-engines/openmw/patches/osg-3.6.5.patchset @@ -1,14 +1,14 @@ -From 17893daf3d0cc0bc57d3806e70cbbaf6c9468e94 Mon Sep 17 00:00:00 2001 +From f1e94b259b4bd4fec195e9ab125a3bed14b1519d Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Fri, 11 Oct 2019 20:55:30 +1000 Subject: Fix build for Haiku diff --git a/CMakeLists.txt b/CMakeLists.txt -index 81328ea..c686182 100644 +index 0ef2edd..5536b7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -888,7 +888,7 @@ IF(DEFINED LIB_POSTFIX) +@@ -889,7 +889,7 @@ IF(DEFINED LIB_POSTFIX) SET(OSG_INSTALL_LIBDIR lib${LIB_POSTFIX}) ELSE() IF(CMAKE_VERSION VERSION_LESS "2.8.5") @@ -31,10 +31,10 @@ index c0c8cec..5bf23b5 100644 #define stat64 stat #endif -- -2.23.0 +2.30.2 -From 9cfa48ea131559bb3bf114349d051714d6073169 Mon Sep 17 00:00:00 2001 +From 10aaa2c8fc959808770cbfbbd54995a9a4c545f4 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Fri, 11 Oct 2019 20:55:47 +1000 Subject: Disable gpu stats @@ -70,5 +70,5 @@ index ab6e184..b3a89da 100644 if (acquireGPUStats) { -- -2.23.0 +2.30.2