diff --git a/x11-misc/pcmanfm-qt/patches/pcmanfm_qt-0.13.0.patchset b/x11-misc/pcmanfm-qt/patches/pcmanfm_qt-0.13.0.patchset deleted file mode 100644 index 6fb5ba5ad..000000000 --- a/x11-misc/pcmanfm-qt/patches/pcmanfm_qt-0.13.0.patchset +++ /dev/null @@ -1,157 +0,0 @@ -From 8cc806e9244b74c82c88c15b379d2188ea7872ec Mon Sep 17 00:00:00 2001 -From: Sergei Reznikov -Date: Tue, 22 May 2018 18:33:27 +0300 -Subject: Fix build on Haiku - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5110cb1..24dfb04 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -17,7 +17,9 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") - find_package(Qt5Widgets ${QT_MINIMUM_VERSION} REQUIRED) - find_package(Qt5DBus ${QT_MINIMUM_VERSION} REQUIRED) - find_package(Qt5LinguistTools ${QT_MINIMUM_VERSION} REQUIRED) --find_package(Qt5X11Extras ${QT_MINIMUM_VERSION} REQUIRED) -+if (UNIX AND NOT HAIKU) -+ find_package(Qt5X11Extras "${REQUIRED_QT_VERSION}" REQUIRED) -+endif() - find_package(fm-qt ${LIBFMQT_MINIMUM_VERSION} REQUIRED) - find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED) - -diff --git a/pcmanfm/CMakeLists.txt b/pcmanfm/CMakeLists.txt -index 09a9eea..21e8c0c 100644 ---- a/pcmanfm/CMakeLists.txt -+++ b/pcmanfm/CMakeLists.txt -@@ -80,13 +80,20 @@ target_include_directories(pcmanfm-qt - "${Qt5Gui_PRIVATE_INCLUDE_DIRS}" - ) - -+if(UNIX AND NOT HAIKU) -+target_link_libraries(pcmanfm-qt Qt5::X11Extras) -+endif() -+ - target_link_libraries(pcmanfm-qt -- Qt5::X11Extras - Qt5::Widgets - Qt5::DBus - fm-qt - ) - -+if(HAIKU) -+ target_link_libraries(pcmanfm-qt network) -+endif () -+ - install(TARGETS pcmanfm-qt RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - - # install a desktop entry file for pcmanfm-qt and desktop preferences -diff --git a/pcmanfm/application.cpp b/pcmanfm/application.cpp -index 41acbf5..872d252 100644 ---- a/pcmanfm/application.cpp -+++ b/pcmanfm/application.cpp -@@ -51,9 +51,9 @@ - #include "launcher.h" - #include "xdgdir.h" - #include "connectserverdialog.h" -- --#include -- -+#ifndef Q_OS_HAIKU -+ #include -+#endif - - namespace PCManFM { - -@@ -364,6 +364,9 @@ void Application::onAboutToQuit() { - } - - bool Application::eventFilter(QObject* watched, QEvent* event) { -+#ifdef Q_OS_HAIKU -+ return 0; -+#elif - if(watched == desktop()) { - if(event->type() == QEvent::StyleChange || - event->type() == QEvent::ThemeChange) { -@@ -371,6 +374,7 @@ bool Application::eventFilter(QObject* watched, QEvent* event) { - } - } - return QObject::eventFilter(watched, event); -+#endif - } - - void Application::onLastWindowClosed() { -diff --git a/pcmanfm/desktopwindow.cpp b/pcmanfm/desktopwindow.cpp -index abe9061..24ab729 100644 ---- a/pcmanfm/desktopwindow.cpp -+++ b/pcmanfm/desktopwindow.cpp -@@ -54,10 +54,13 @@ - #include "xdgdir.h" - #include "bulkrename.h" - --#include -+#ifndef Q_OS_HAIKU -+ #include -+ #include -+#endif -+ - #include - #include --#include - - #define MIN_SLIDE_INTERVAL 5*60000 // 5 min - #define MAX_SLIDE_INTERVAL (24*60+55)*60000 // 24 h and 55 min -@@ -1119,6 +1122,7 @@ void DesktopWindow::onFilePropertiesActivated() { - } - } - -+#ifndef Q_OS_HAIKU - static void forwardMouseEventToRoot(QMouseEvent* event) { - xcb_ungrab_pointer(QX11Info::connection(), event->timestamp()); - // forward the event to the root window -@@ -1184,8 +1188,12 @@ static void forwardMouseEventToRoot(QMouseEvent* event) { - xcb_send_event(QX11Info::connection(), 0, root, mask, (char*)&xcb_event); - xcb_flush(QX11Info::connection()); - } -+#endif - - bool DesktopWindow::event(QEvent* event) { -+#ifdef Q_OS_HAIKU -+ return 0; -+#elif - switch(event->type()) { - case QEvent::WinIdChange: { - //qDebug() << "winid change:" << effectiveWinId(); -@@ -1203,7 +1211,9 @@ bool DesktopWindow::event(QEvent* event) { - xcb_change_property(con, XCB_PROP_MODE_REPLACE, effectiveWinId(), prop_atom, XA_ATOM, 32, 1, &atom); - } - break; -+#endif - } -+#ifndef Q_OS_HAIKU - #undef FontChange // FontChange is defined in the headers of XLib and clashes with Qt, let's undefine it. - case QEvent::StyleChange: - case QEvent::FontChange: -@@ -1218,8 +1228,12 @@ bool DesktopWindow::event(QEvent* event) { - } - - #undef FontChange // this seems to be defined in Xlib headers as a macro, undef it! -+#endif - - bool DesktopWindow::eventFilter(QObject* watched, QEvent* event) { -+#ifdef Q_OS_HAIKU -+ return 0; -+#elif - if(watched == listView_) { - switch(event->type()) { - case QEvent::StyleChange: -@@ -1252,6 +1266,7 @@ bool DesktopWindow::eventFilter(QObject* watched, QEvent* event) { - } - } - return Fm::FolderView::eventFilter(watched, event); -+#endif - } - - void DesktopWindow::childDropEvent(QDropEvent* e) { --- -2.16.2 - diff --git a/x11-misc/pcmanfm-qt/patches/pcmanfm_qt-0.14.0.patchset b/x11-misc/pcmanfm-qt/patches/pcmanfm_qt-0.14.0.patchset new file mode 100644 index 000000000..11cc555db --- /dev/null +++ b/x11-misc/pcmanfm-qt/patches/pcmanfm_qt-0.14.0.patchset @@ -0,0 +1,273 @@ +From b14b3a3026ee97824cebd42c83945d0cf9ac6f74 Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Wed, 30 Jan 2019 23:53:23 +0300 +Subject: Fix build on Haiku + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1ca95be..1bd66fc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,7 +23,9 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") + find_package(Qt5DBus ${QT_MINIMUM_VERSION} REQUIRED) + find_package(Qt5LinguistTools ${QT_MINIMUM_VERSION} REQUIRED) + find_package(Qt5Widgets ${QT_MINIMUM_VERSION} REQUIRED) +-find_package(Qt5X11Extras ${QT_MINIMUM_VERSION} REQUIRED) ++if (UNIX AND NOT HAIKU) ++ find_package(Qt5X11Extras "${REQUIRED_QT_VERSION}" REQUIRED) ++endif() + find_package(fm-qt ${LIBFMQT_MINIMUM_VERSION} REQUIRED) + find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED) + +diff --git a/pcmanfm/CMakeLists.txt b/pcmanfm/CMakeLists.txt +index 66a56c6..90dc024 100644 +--- a/pcmanfm/CMakeLists.txt ++++ b/pcmanfm/CMakeLists.txt +@@ -75,13 +75,20 @@ target_include_directories(pcmanfm-qt + "${Qt5Gui_PRIVATE_INCLUDE_DIRS}" + ) + ++if(UNIX AND NOT HAIKU) ++target_link_libraries(pcmanfm-qt Qt5::X11Extras) ++endif() ++ + target_link_libraries(pcmanfm-qt +- Qt5::X11Extras + Qt5::Widgets + Qt5::DBus + fm-qt + ) + ++if(HAIKU) ++ target_link_libraries(pcmanfm-qt network) ++endif () ++ + install(TARGETS pcmanfm-qt RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + # install a desktop entry file for pcmanfm-qt and desktop preferences +diff --git a/pcmanfm/application.cpp b/pcmanfm/application.cpp +index 0e7950d..b8fa8c0 100644 +--- a/pcmanfm/application.cpp ++++ b/pcmanfm/application.cpp +@@ -52,9 +52,9 @@ + #include "launcher.h" + #include "xdgdir.h" + #include "connectserverdialog.h" +- +-#include +- ++#ifndef Q_OS_HAIKU ++ #include ++#endif + + namespace PCManFM { + +diff --git a/pcmanfm/desktopwindow.cpp b/pcmanfm/desktopwindow.cpp +index 583b680..e5844dd 100644 +--- a/pcmanfm/desktopwindow.cpp ++++ b/pcmanfm/desktopwindow.cpp +@@ -55,10 +55,13 @@ + #include "xdgdir.h" + #include "bulkrename.h" + +-#include ++#ifndef Q_OS_HAIKU ++ #include ++ #include ++#endif ++ + #include + #include +-#include + + #define WORK_AREA_MARGIN 12 // margin of the work area + #define MIN_SLIDE_INTERVAL 5*60000 // 5 min +@@ -1388,6 +1391,7 @@ void DesktopWindow::onFilePropertiesActivated() { + } + } + ++#ifndef Q_OS_HAIKU + static void forwardMouseEventToRoot(QMouseEvent* event) { + xcb_ungrab_pointer(QX11Info::connection(), event->timestamp()); + // forward the event to the root window +@@ -1453,8 +1457,12 @@ static void forwardMouseEventToRoot(QMouseEvent* event) { + xcb_send_event(QX11Info::connection(), 0, root, mask, (char*)&xcb_event); + xcb_flush(QX11Info::connection()); + } ++#endif + + bool DesktopWindow::event(QEvent* event) { ++#ifdef Q_OS_HAIKU ++ return 0; ++#elif + switch(event->type()) { + case QEvent::WinIdChange: { + //qDebug() << "winid change:" << effectiveWinId(); +@@ -1472,7 +1480,9 @@ bool DesktopWindow::event(QEvent* event) { + xcb_change_property(con, XCB_PROP_MODE_REPLACE, effectiveWinId(), prop_atom, XA_ATOM, 32, 1, &atom); + } + break; ++#endif + } ++#ifndef Q_OS_HAIKU + #undef FontChange // FontChange is defined in the headers of XLib and clashes with Qt, let's undefine it. + case QEvent::StyleChange: + case QEvent::FontChange: +@@ -1487,8 +1497,12 @@ bool DesktopWindow::event(QEvent* event) { + } + + #undef FontChange // this seems to be defined in Xlib headers as a macro, undef it! ++#endif + + bool DesktopWindow::eventFilter(QObject* watched, QEvent* event) { ++#ifdef Q_OS_HAIKU ++ return 0; ++#elif + if(watched == listView_) { + switch(event->type()) { + case QEvent::StyleChange: +@@ -1529,6 +1543,7 @@ bool DesktopWindow::eventFilter(QObject* watched, QEvent* event) { + } + } + return Fm::FolderView::eventFilter(watched, event); ++#endif + } + + void DesktopWindow::childDragMoveEvent(QDragMoveEvent* e) { +-- +2.19.1 + + +From 6104d9e86bf0eb467734bd1cc178712480b3bee0 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Thu, 31 Jan 2019 18:33:50 +1000 +Subject: Disable DBUS for Haiku + + +diff --git a/pcmanfm/application.cpp b/pcmanfm/application.cpp +index b8fa8c0..dc745c9 100644 +--- a/pcmanfm/application.cpp ++++ b/pcmanfm/application.cpp +@@ -21,8 +21,10 @@ + #include "application.h" + #include "mainwindow.h" + #include "desktopwindow.h" ++#ifndef __HAIKU__ + #include + #include ++#endif + #include + #include + #include +@@ -87,7 +89,7 @@ Application::Application(int& argc, char** argv): + argv_ = argv; + + setApplicationVersion(PCMANFM_QT_VERSION); +- ++#ifndef __HAIKU__ + // QDBusConnection::sessionBus().registerObject("/org/pcmanfm/Application", this); + QDBusConnection dbus = QDBusConnection::sessionBus(); + if(dbus.registerService(serviceName)) { +@@ -123,6 +125,12 @@ Application::Application(int& argc, char** argv): + // we're not the first instance + isPrimaryInstance = false; + } ++#else ++ isPrimaryInstance = true; ++ setStyle(new ProxyStyle()); ++ connect(this, &Application::aboutToQuit, this, &Application::onAboutToQuit); ++ installSigtermHandler(); ++#endif + } + + Application::~Application() { +@@ -260,6 +268,7 @@ bool Application::parseCommandLineArgs() { + } + } + } ++#ifndef __HAIKU__ + else { + QDBusConnection dbus = QDBusConnection::sessionBus(); + QDBusInterface iface(serviceName, "/Application", ifaceName, dbus, this); +@@ -297,6 +306,7 @@ bool Application::parseCommandLineArgs() { + } + } + } ++#endif + return keepRunning; + } + +-- +2.19.1 + + +From f641b107d39168c5c2e1a644c6486bd8a2e45d51 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Thu, 31 Jan 2019 18:34:26 +1000 +Subject: Dirty hack for fix crash on exit + + +diff --git a/pcmanfm/pcmanfm.cpp b/pcmanfm/pcmanfm.cpp +index fa57d3e..7da5641 100644 +--- a/pcmanfm/pcmanfm.cpp ++++ b/pcmanfm/pcmanfm.cpp +@@ -1,6 +1,12 @@ + #include "application.h" + #include + ++#ifdef __HAIKU__ ++#include ++#include ++#include ++#endif ++ + int main(int argc, char** argv) { + // ensure that glib integration of Qt is not turned off + // This fixes #168: https://github.com/lxqt/pcmanfm-qt/issues/168 +@@ -10,5 +16,11 @@ int main(int argc, char** argv) { + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + + app.init(); ++#ifdef __HAIKU__ ++ app.exec(); ++ kill(::getpid(), SIGKILL); ++ return 0; ++#else + return app.exec(); ++#endif + } +-- +2.19.1 + + +From 3793befe2075cec3d0143324bf0413caade57117 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Thu, 31 Jan 2019 18:35:04 +1000 +Subject: Remove Root Instance warning + + +diff --git a/pcmanfm/mainwindow.cpp b/pcmanfm/mainwindow.cpp +index 9914451..1850ea1 100644 +--- a/pcmanfm/mainwindow.cpp ++++ b/pcmanfm/mainwindow.cpp +@@ -135,7 +135,7 @@ MainWindow::MainWindow(Fm::FilePath path): + setAttribute(Qt::WA_DeleteOnClose); + // setup user interface + ui.setupUi(this); +- ++#ifndef __HAIKU__ + // add a warning label to the root instance + if(geteuid() == 0) { + QLabel *warningLabel = new QLabel(tr("Root Instance")); +@@ -145,7 +145,7 @@ MainWindow::MainWindow(Fm::FilePath path): + ui.verticalLayout->addWidget(warningLabel); + ui.verticalLayout->setStretch(0, 1); + } +- ++#endif + splitView_ = settings.splitView(); + + // hide menu items that are not usable +-- +2.19.1 + diff --git a/x11-misc/pcmanfm-qt/pcmanfm_qt-0.13.0.recipe b/x11-misc/pcmanfm-qt/pcmanfm_qt-0.14.0.recipe similarity index 93% rename from x11-misc/pcmanfm-qt/pcmanfm_qt-0.13.0.recipe rename to x11-misc/pcmanfm-qt/pcmanfm_qt-0.14.0.recipe index 245ad00d6..53ad1cde8 100644 --- a/x11-misc/pcmanfm-qt/pcmanfm_qt-0.13.0.recipe +++ b/x11-misc/pcmanfm-qt/pcmanfm_qt-0.14.0.recipe @@ -7,11 +7,11 @@ LXDE, which is also developed by the same author in conjunction with other \ developers. Since 2010, PCManFM has undergone a complete rewrite from \ scratch. So the new PCManFM is totally different from the old 0.5.x series." HOMEPAGE="https://wiki.lxde.org/en/PCManFM" -COPYRIGHT="2013-2018 LXQt team" +COPYRIGHT="2013-2019 LXQt team" LICENSE="GNU GPL v2" -REVISION="3" +REVISION="1" SOURCE_URI="https://github.com/lxqt/pcmanfm-qt/archive/$portVersion.tar.gz" -CHECKSUM_SHA256="3fbb3814780b283d7e27c1858f7f7157ec5d829a09c8b859b21c87c496c16c1b" +CHECKSUM_SHA256="54b325919c0e767a0109119e7d63898d5292d9b25959b4e7a2b1ff1eac942747" SOURCE_DIR="pcmanfm-qt-$portVersion" PATCHES="pcmanfm_qt-$portVersion.patchset" ADDITIONAL_FILES="pcmanfm-qt.rdef.in" @@ -26,7 +26,6 @@ PROVIDES=" " REQUIRES=" haiku$secondaryArchSuffix - dbus$secondaryArchSuffix lib:libexif$secondaryArchSuffix lib:libfm$secondaryArchSuffix lib:libfm_qt$secondaryArchSuffix @@ -58,7 +57,7 @@ BUILD_PREREQUIRES=" cmd:cmake cmd:gcc$secondaryArchSuffix cmd:ld$secondaryArchSuffix - cmd:lrelease$secondaryArchSuffix + cmd:lrelease$secondaryArchSuffix >= 5 cmd:make cmd:pkg_config$secondaryArchSuffix " @@ -71,7 +70,7 @@ BUILD() -Dfm-qt_DIR=/system/data/cmake/fm-qt \ -DCMAKE_BUILD_TYPE=Release \ -DPULL_TRANSLATIONS=no - make + make $jobArgs } INSTALL()