diff --git a/www-client/otter-browser/additional-files/otter.rdef.in b/www-client/otter-browser/additional-files/otter.rdef.in index ec31f5d94..4a0e2d44c 100644 --- a/www-client/otter-browser/additional-files/otter.rdef.in +++ b/www-client/otter-browser/additional-files/otter.rdef.in @@ -13,6 +13,8 @@ resource app_version { resource app_signature "@APP_SIGNATURE@"; +resource("QT:QPA_FLAGS") "Q_KILL_ON_EXIT|Q_REF_TO_ARGV|Q_REF_TO_FORK"; + resource file_types message { "types" = "text/html", "types" = "multipart/related", @@ -33,18 +35,19 @@ resource vector_icon { $"46BCC14C1D30401942E76D97C3FFD6032288FF203BAC020006033BDF263BDF26" $"BBDF263BDF2646EBB44A1F4F0097C3FF3FE3ECFFFF3369FF020006023C65143C" $"F9DBBF55163EAE7E4B1CAB461C2F3A33A2FFD43369FF050005FF070604EB5E51" - $"65555E51C68BC3FA3B605160516058600209514B514F514B5140514051354024" - $"4A293A212F2433222B26262B262B242D2235223122352245224522482752B4AA" - $"C5A3B8C5CA543C5E365EC48C5E0613FFFFFFEA3F22352231223522C1D922C1D9" - $"22C320B5EDC6F6B4CEC5ADB8E8CA5E3C5E365EC28B5E4848484F48C27B3E453E" - $"453E483E50BF36C57A3C5536543955BB60C7962C4BB874C57A2A472B34B632BC" - $"F1B7E6BA1B36342E31BC2DBB1F3A38BC8CBB7ABE2BBDA53D3F3E464848484848" - $"48483C352A3F2F352A352A352A2F27262B2829242D0208514B514F514B514051" - $"40513540244A293A212F2433222B26262B262B292737283125412D4848483C48" - $"483C5E495E4C5E02044848483C483C3728412D3125262B29272829352A2F273F" - $"2F0608F6F62A41383333292FBBF8BB213B3ABC88BB97BEFBBF203E424F38543D" - $"5434542C4C2E50B6BEC274060DBAD3DB0233323237334631403449374B3B4DBC" - $"C9C4CA424E3E503A54BEF8C76535552B4A2E51B6E2C2932A42362C332ABB5D2E" - $"312E32080A010100000A0001011001178400040A020103000A040104000A0001" - $"061001158400040A030106000A050102000A000105100117820004" + $"65555E51C68AC3F93D5F515F515F585F0209514B514F514B5140514051354225" + $"4C2A3C22302434222C26262B262B242D2235223122352245224522482752B4AA" + $"C5A2B8C5CA533C5E365EC48B5E021122352231223522C1D822C1D822C320B5ED" + $"C6F5B4CEC5ACB8E7CA5E3C5E365E475E4848484F48C27A3E453E453E483E50BF" + $"35C5793C5536543955BB5FC7962C4BB874C5792A472B34B631BCF1B7E6BA1B36" + $"342E31BC2CBB1E3A38BC8CBB79BE2ABDA53D3F3D3F3D3F3E463E463E46484848" + $"48483C352A3F2F2F27262B2829242D0208514B514F514B51405140513541254B" + $"2A3B2231243623B806B4F1262B262B292737283125412D4848483C48483C5E49" + $"5E4C5E02044848483C483C3728412D3125262B29272829352A2F273F2F0608F6" + $"F62A41383333292FBBF7BB203B3ABC87BB96BEFBBF1F3E424F38543D5434542C" + $"4C2E50B6BDC273060DBAD3DB0233323237334631403449374B3B4DBCC8C4CA42" + $"4E3E503A54BEF7C76535552B4A2E51B6E2C2922A42362C332ABB5D2E312E3208" + $"0A010100000A00010130262001178400040A0201032026200A0401042026200A" + $"00010630262001158400040A0301062026200A0501022026200A000105302620" + $"0117820004" }; diff --git a/www-client/otter-browser/otter_browser-1.0.01.recipe b/www-client/otter-browser/otter_browser-1.0.81.333.recipe similarity index 88% rename from www-client/otter-browser/otter_browser-1.0.01.recipe rename to www-client/otter-browser/otter_browser-1.0.81.333.recipe index f6d03f7aa..9461d117e 100644 --- a/www-client/otter-browser/otter_browser-1.0.01.recipe +++ b/www-client/otter-browser/otter_browser-1.0.81.333.recipe @@ -2,13 +2,13 @@ SUMMARY="A lightweight QtWebKit browser" DESCRIPTION="Project aiming to recreate the best aspects of the \ classic Opera (12.x) UI using Qt5." HOMEPAGE="https://otter-browser.org/" -COPYRIGHT="2013-2019 Otter Browser Team" +COPYRIGHT="2013-2020 Otter Browser Team" LICENSE="GNU GPL v3" -REVISION="9" -SOURCE_URI="https://github.com/OtterBrowser/otter-browser/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="85aef7c74277cf94de237e516c3c2d507b3d19b9ad16853de938540b8bf2f16b" -SOURCE_FILENAME="otter-browser-$portVersion.tar.gz" -SOURCE_DIR="otter-browser-$portVersion" +REVISION="1" +SOURCE_URI="https://sourceforge.net/projects/otter-browser/files/otter-browser-weekly333/otter-browser-${portVersion%.*}-dev${portVersion##*.}.tar.bz2" +CHECKSUM_SHA256="4b8a39c1b9a39134ea8364d3be92ede9092d8153d58ea954ba4993036bfb2d12" +SOURCE_FILENAME="otter-browser-$portVersion.tar.bz2" +SOURCE_DIR="otter-browser-${portVersion%.*}-dev${portVersion##*.}" PATCHES="otter_browser-$portVersion.patchset" ADDITIONAL_FILES=" otter.rdef.in diff --git a/www-client/otter-browser/patches/otter_browser-1.0.01.patchset b/www-client/otter-browser/patches/otter_browser-1.0.81.333.patchset similarity index 87% rename from www-client/otter-browser/patches/otter_browser-1.0.01.patchset rename to www-client/otter-browser/patches/otter_browser-1.0.81.333.patchset index 9ae0fe25c..543022b9d 100644 --- a/www-client/otter-browser/patches/otter_browser-1.0.01.patchset +++ b/www-client/otter-browser/patches/otter_browser-1.0.81.333.patchset @@ -1,14 +1,68 @@ -From 5c52f0ab82e4ba06391e67f4f3e359f181fc5863 Mon Sep 17 00:00:00 2001 +From d6af1f344eb937ccb82f5bd13b4789a763c77f9e Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Thu, 3 Jan 2019 17:08:40 +1000 +Date: Mon, 28 Sep 2020 20:27:45 +1000 Subject: Fix for Haiku +diff --git a/3rdparty/sonnet/src/plugins/hunspell/hunspellclient.cpp b/3rdparty/sonnet/src/plugins/hunspell/hunspellclient.cpp +index e9767a9..78694a9 100644 +--- a/3rdparty/sonnet/src/plugins/hunspell/hunspellclient.cpp ++++ b/3rdparty/sonnet/src/plugins/hunspell/hunspellclient.cpp +@@ -56,6 +56,8 @@ HunspellClient::HunspellClient(QObject *parent) + + #ifdef Q_OS_MAC + directories << QLatin1String("/System/Library/Spelling/"); ++#elif defined(Q_OS_HAIKU) ++ directories << QLatin1String("/system/data/hunspell/") << QLatin1String("/system/non-packaged/data/hunspell/") << QLatin1String("/boot/home/config/non-packaged/data/hunspell/"); + #else + directories << QLatin1String("/usr/share/hunspell/") << QLatin1String("/usr/local/share/hunspell/") << QLatin1String("/usr/share/myspell/") << QLatin1String("/usr/share/myspell/dicts/") << QLatin1String("/usr/local/share/mozilla-dicts/"); + #endif +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ce1247b..5a7e896 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -517,6 +517,16 @@ elseif (APPLE) + ) + + set_source_files_properties(resources/icons/otter-browser.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) ++elseif (HAIKU) ++ set(otter_src ++ ${otter_src} ++ src/modules/platforms/haiku/HaikuPlatformIntegration.cpp ++ src/modules/platforms/haiku/HaikuPlatformStyle.cpp ++ 3rdparty/libmimeapps/ConfigReader.cpp ++ 3rdparty/libmimeapps/DesktopEntry.cpp ++ 3rdparty/libmimeapps/Index.cpp ++ 3rdparty/libmimeapps/Tools.cpp ++ ) + elseif (UNIX) + find_package(Qt5DBus 5.6.0 QUIET) + +@@ -567,6 +577,10 @@ elseif (UNIX) + target_link_libraries(otter-browser Qt5::DBus) + endif () + ++ if (HAIKU) ++ target_link_libraries(otter-browser -lbe) ++ endif () ++ + if (ENABLE_CRASHREPORTS) + target_link_libraries(otter-browser -lpthread) + endif () diff --git a/src/core/Application.cpp b/src/core/Application.cpp -index 13f34bc..64b6cc6 100644 +index d56f579..9a72c18 100644 --- a/src/core/Application.cpp +++ b/src/core/Application.cpp -@@ -318,7 +318,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv), Act +@@ -47,6 +47,8 @@ + #include "../modules/platforms/windows/WindowsPlatformIntegration.h" + #elif defined(Q_OS_MAC) + #include "../modules/platforms/mac/MacPlatformIntegration.h" ++#elif defined(Q_OS_HAIKU) ++#include "../modules/platforms/haiku/HaikuPlatformIntegration.h" + #elif defined(Q_OS_UNIX) + #include "../modules/platforms/freedesktoporg/FreeDesktopOrgPlatformIntegration.h" + #endif +@@ -320,7 +322,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv), Console::createInstance(); SettingsManager::createInstance(profilePath); @@ -17,7 +71,7 @@ index 13f34bc..64b6cc6 100644 if (!isReadOnly && !m_isFirstRun && !QFileInfo(profilePath).isWritable()) { QMessageBox::warning(nullptr, tr("Warning"), tr("Profile directory (%1) is not writable, application will be running in read-only mode.").arg(profilePath), QMessageBox::Close); -@@ -386,7 +386,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv), Act +@@ -388,7 +390,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv), } } } @@ -26,11 +80,20 @@ index 13f34bc..64b6cc6 100644 SessionsManager::createInstance(profilePath, cachePath, isPrivate, isReadOnly); if (!isReadOnly && !Migrator::run()) +@@ -458,6 +460,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv), + m_platformIntegration = new WindowsPlatformIntegration(this); + #elif defined(Q_OS_MAC) + m_platformIntegration = new MacPlatformIntegration(this); ++#elif defined(Q_OS_HAIKU) ++ m_platformIntegration = new HaikuPlatformIntegration(this); + #elif defined(Q_OS_UNIX) + m_platformIntegration = new FreeDesktopOrgPlatformIntegration(this); + #endif diff --git a/src/core/SettingsManager.cpp b/src/core/SettingsManager.cpp -index 43aa107..490a905 100644 +index e4bba41..f328f16 100644 --- a/src/core/SettingsManager.cpp +++ b/src/core/SettingsManager.cpp -@@ -80,7 +80,7 @@ void SettingsManager::createInstance(const QString &path) +@@ -81,7 +81,7 @@ void SettingsManager::createInstance(const QString &path) registerOption(Browser_EnableSingleKeyShortcutsOption, BooleanType, true); registerOption(Browser_EnableSpellCheckOption, BooleanType, true); registerOption(Browser_EnableTrayIconOption, BooleanType, true); @@ -39,7 +102,7 @@ index 43aa107..490a905 100644 registerOption(Browser_InactiveTabTimeUntilSuspendOption, IntegerType, -1); registerOption(Browser_KeyboardShortcutsProfilesOrderOption, ListType, QStringList(QLatin1String("default"))); registerOption(Browser_LocaleOption, StringType, QLatin1String("system")); -@@ -108,19 +108,19 @@ void SettingsManager::createInstance(const QString &path) +@@ -110,19 +110,19 @@ void SettingsManager::createInstance(const QString &path) registerOption(Choices_WarnQuitOption, EnumerationType, QLatin1String("noWarn"), {QLatin1String("alwaysWarn"), QLatin1String("warnOpenTabs"), QLatin1String("noWarn")}); registerOption(Choices_WarnQuitTransfersOption, BooleanType, true); registerOption(Content_BackgroundColorOption, ColorType, QColor(0xFF, 0xFF, 0xFF)); @@ -65,7 +128,7 @@ index 43aa107..490a905 100644 registerOption(Content_TextColorOption, ColorType, QColor(0, 0, 0)); registerOption(Content_UserStyleSheetOption, PathType, QString()); registerOption(Content_VisitedLinkColorOption, ColorType, QColor(0x55, 0x1A, 0x8B)); -@@ -156,7 +156,7 @@ void SettingsManager::createInstance(const QString &path) +@@ -157,7 +157,7 @@ void SettingsManager::createInstance(const QString &path) registerOption(Interface_TabCrashingActionOption, EnumerationType, QLatin1String("ask"), {QLatin1String("ask"), QLatin1String("close"), QLatin1String("reload")}); registerOption(Interface_UseFancyDateTimeFormatOption, BooleanType, true); registerOption(Interface_UseNativeNotificationsOption, BooleanType, true); @@ -75,7 +138,7 @@ index 43aa107..490a905 100644 registerOption(Network_AcceptLanguageOption, StringType, QLatin1String("system,*;q=0.9")); registerOption(Network_CookiesKeepModeOption, EnumerationType, QLatin1String("keepUntilExpires"), {QLatin1String("keepUntilExpires"), QLatin1String("keepUntilExit"), QLatin1String("ask")}); diff --git a/src/main.cpp b/src/main.cpp -index bec0f9c..d2d6581 100644 +index 888e6cf..663eea4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,10 @@ @@ -89,109 +152,12 @@ index bec0f9c..d2d6581 100644 using namespace Otter; #if !defined(Q_OS_WIN32) -@@ -214,5 +218,8 @@ int main(int argc, char *argv[]) - Application::createWindow(parameters); - } - -- return application.exec(); -+ application.exec(); -+ kill(::getpid(), SIGKILL); -+ -+ return 0; - } --- -2.19.1 - - -From 3e92b28544aa663f84d8e0707ecca12068ddbe91 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sat, 2 Mar 2019 23:13:15 +1000 -Subject: Add haiku hunspell paths - - -diff --git a/3rdparty/sonnet/src/plugins/hunspell/hunspellclient.cpp b/3rdparty/sonnet/src/plugins/hunspell/hunspellclient.cpp -index e9767a9..78694a9 100644 ---- a/3rdparty/sonnet/src/plugins/hunspell/hunspellclient.cpp -+++ b/3rdparty/sonnet/src/plugins/hunspell/hunspellclient.cpp -@@ -56,6 +56,8 @@ HunspellClient::HunspellClient(QObject *parent) - - #ifdef Q_OS_MAC - directories << QLatin1String("/System/Library/Spelling/"); -+#elif defined(Q_OS_HAIKU) -+ directories << QLatin1String("/system/data/hunspell/") << QLatin1String("/system/non-packaged/data/hunspell/") << QLatin1String("/boot/home/config/non-packaged/data/hunspell/"); - #else - directories << QLatin1String("/usr/share/hunspell/") << QLatin1String("/usr/local/share/hunspell/") << QLatin1String("/usr/share/myspell/") << QLatin1String("/usr/share/myspell/dicts/") << QLatin1String("/usr/local/share/mozilla-dicts/"); - #endif --- -2.19.1 - - -From f62530291720990392c793a93273f39835951ce4 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 10 Mar 2019 14:18:43 +1000 -Subject: Add platform integration module for Haiku - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6bd212f..38873bc 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -504,6 +504,16 @@ elseif (APPLE) - ) - - set_source_files_properties(resources/icons/otter-browser.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) -+elseif (HAIKU) -+ set(otter_src -+ ${otter_src} -+ src/modules/platforms/haiku/HaikuPlatformIntegration.cpp -+ src/modules/platforms/haiku/HaikuPlatformStyle.cpp -+ 3rdparty/libmimeapps/ConfigReader.cpp -+ 3rdparty/libmimeapps/DesktopEntry.cpp -+ 3rdparty/libmimeapps/Index.cpp -+ 3rdparty/libmimeapps/Tools.cpp -+ ) - elseif (UNIX) - find_package(Qt5DBus 5.6.0 QUIET) - -@@ -554,6 +564,10 @@ elseif (UNIX) - target_link_libraries(otter-browser Qt5::DBus) - endif () - -+ if (HAIKU) -+ target_link_libraries(otter-browser -lbe) -+ endif () -+ - if (ENABLE_CRASHREPORTS) - target_link_libraries(otter-browser -lpthread) - endif () -diff --git a/src/core/Application.cpp b/src/core/Application.cpp -index 64b6cc6..1b041e2 100644 ---- a/src/core/Application.cpp -+++ b/src/core/Application.cpp -@@ -46,6 +46,8 @@ - #include "../modules/platforms/windows/WindowsPlatformIntegration.h" - #elif defined(Q_OS_MAC) - #include "../modules/platforms/mac/MacPlatformIntegration.h" -+#elif defined(Q_OS_HAIKU) -+#include "../modules/platforms/haiku/HaikuPlatformIntegration.h" - #elif defined(Q_OS_UNIX) - #include "../modules/platforms/freedesktoporg/FreeDesktopOrgPlatformIntegration.h" - #endif -@@ -454,6 +456,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv), Act - m_platformIntegration = new WindowsPlatformIntegration(this); - #elif defined(Q_OS_MAC) - m_platformIntegration = new MacPlatformIntegration(this); -+#elif defined(Q_OS_HAIKU) -+ m_platformIntegration = new HaikuPlatformIntegration(this); - #elif defined(Q_OS_UNIX) - m_platformIntegration = new FreeDesktopOrgPlatformIntegration(this); - #endif diff --git a/src/modules/platforms/haiku/HaikuPlatformIntegration.cpp b/src/modules/platforms/haiku/HaikuPlatformIntegration.cpp new file mode 100644 -index 0000000..8e0d6d7 +index 0000000..40e0c3b --- /dev/null +++ b/src/modules/platforms/haiku/HaikuPlatformIntegration.cpp -@@ -0,0 +1,191 @@ +@@ -0,0 +1,174 @@ +/************************************************************************** +* Otter Browser: Web browser controlled by the user, not vice-versa. +* Copyright (C) 2019 Gerasim Troeglazov <3dEyes@gmail.com> @@ -271,28 +237,11 @@ index 0000000..8e0d6d7 + +void HaikuPlatformIntegration::showNotification(Notification *notification) +{ -+ notification_type ntype = B_INFORMATION_NOTIFICATION; -+ -+ QString title; -+ switch (notification->getLevel()) -+ { -+ case Notification::ErrorLevel: -+ title = tr("Error"); -+ ntype = B_ERROR_NOTIFICATION; -+ break; -+ case Notification::WarningLevel: -+ title = tr("Warning"); -+ ntype = B_IMPORTANT_NOTIFICATION; -+ break; -+ default: -+ title = tr("Information"); -+ notification_type ntype = B_INFORMATION_NOTIFICATION; -+ break; -+ } -+ ++ const Notification::Message message(notification->getMessage()); ++ + QFileInfo appFileInfo(QCoreApplication::applicationFilePath()); -+ BString stitle((const char *)(title.toUtf8())); -+ BString smessage((const char *)(notification->getMessage().toUtf8())); ++ BString stitle((const char *)(message.getTitle().toUtf8())); ++ BString smessage((const char *)(message.message.toUtf8())); + BString smessageId((const char *)(appFileInfo.fileName().toUtf8())); + BString group((const char*)(appFileInfo.baseName().toUtf8())); + @@ -301,18 +250,18 @@ index 0000000..8e0d6d7 + BRect rect(0, 0, B_LARGE_ICON - 1, B_LARGE_ICON -1); + BBitmap bitmap(rect, B_RGBA32); + -+ BNotification notification(ntype); -+ notification.SetGroup(group); -+ notification.SetTitle(stitle); -+ notification.SetMessageID(smessageId); -+ notification.SetContent(smessage); ++ BNotification haikuNotification(B_INFORMATION_NOTIFICATION); ++ haikuNotification.SetGroup(group); ++ haikuNotification.SetTitle(stitle); ++ haikuNotification.SetMessageID(smessageId); ++ haikuNotification.SetContent(smessage); + + if (nodeInfo.GetTrackerIcon(&bitmap, B_LARGE_ICON) == B_NO_ERROR) -+ notification.SetIcon(&bitmap); ++ haikuNotification.SetIcon(&bitmap); + + const int visibilityDuration(SettingsManager::getOption(SettingsManager::Interface_NotificationVisibilityDurationOption).toInt()); + -+ notification.Send((visibilityDuration <= 0) ? 3000000 : visibilityDuration * 1000000); ++ haikuNotification.Send((visibilityDuration <= 0) ? 3000000 : visibilityDuration * 1000000); +} + +void HaikuPlatformIntegration::updateTransfersProgress() @@ -540,5 +489,5 @@ index 0000000..8b50d01 + +#endif -- -2.19.1 +2.28.0