mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
PCManFM: add recipe for version 0.13.0
* to start: eval 'dbus-launch —auto-syntax' ; /system/apps/PCManFM * crashes on exit * TODO: add icon for PCManFM
This commit is contained in:
18
x11-misc/pcmanfm-qt/additional-files/pcmanfm-qt.rdef.in
Normal file
18
x11-misc/pcmanfm-qt/additional-files/pcmanfm-qt.rdef.in
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
resource app_flags B_MULTIPLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "PCManFM",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
|
||||
157
x11-misc/pcmanfm-qt/patches/pcmanfm_qt-0.13.0.patchset
Normal file
157
x11-misc/pcmanfm-qt/patches/pcmanfm_qt-0.13.0.patchset
Normal file
@@ -0,0 +1,157 @@
|
||||
From 8cc806e9244b74c82c88c15b379d2188ea7872ec Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
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 <X11/Xlib.h>
|
||||
-
|
||||
+#ifndef Q_OS_HAIKU
|
||||
+ #include <X11/Xlib.h>
|
||||
+#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 <QX11Info>
|
||||
+#ifndef Q_OS_HAIKU
|
||||
+ #include <QX11Info>
|
||||
+ #include <X11/Xlib.h>
|
||||
+#endif
|
||||
+
|
||||
#include <QScreen>
|
||||
#include <xcb/xcb.h>
|
||||
-#include <X11/Xlib.h>
|
||||
|
||||
#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
|
||||
|
||||
105
x11-misc/pcmanfm-qt/pcmanfm_qt-0.13.0.recipe
Normal file
105
x11-misc/pcmanfm-qt/pcmanfm_qt-0.13.0.recipe
Normal file
@@ -0,0 +1,105 @@
|
||||
SUMMARY="File manager and desktop icon manager (Qt port of PCManFM and libfm)"
|
||||
DESCRIPTION="PCMan File Manager (PCManFM) is a file manager application \
|
||||
developed by Hong Jen Yee from Taiwan which is meant to be a replacement \
|
||||
for Nautilus, Konqueror and Thunar. Released under the GNU General Public \
|
||||
License, PCManFM is free software. PCManFM is the standard file manager in \
|
||||
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"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/lxqt/pcmanfm-qt/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="3fbb3814780b283d7e27c1858f7f7157ec5d829a09c8b859b21c87c496c16c1b"
|
||||
ADDITIONAL_FILES="pcmanfm-qt.rdef.in"
|
||||
SOURCE_DIR="pcmanfm-qt-$portVersion"
|
||||
PATCHES="pcmanfm_qt-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
pcmanfm_qt$secondaryArchSuffix = $portVersion
|
||||
cmd:pcmanfm_qt$secondaryArchSuffix = $portVersion
|
||||
app:PCManFM$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
dbus$secondaryArchSuffix
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libexif$secondaryArchSuffix
|
||||
lib:libfm$secondaryArchSuffix
|
||||
lib:libfm_qt$secondaryArchSuffix
|
||||
lib:libgio_2.0$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgobject_2.0$secondaryArchSuffix
|
||||
lib:libgthread_2.0$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libmenu_cache$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5Widgets$secondaryArchSuffix
|
||||
lib:libxcb$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
lxqt_build_tools$secondaryArchSuffix
|
||||
devel:libexif$secondaryArchSuffix
|
||||
devel:libfm$secondaryArchSuffix
|
||||
devel:libfm_extra$secondaryArchSuffix
|
||||
devel:libfm_qt$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libmenu_cache$secondaryArchSuffix
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libxcb$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. $cmakeDirArgs \
|
||||
-Dfm-qt_DIR=/system/data/cmake/fm-qt \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DPULL_TRANSLATIONS=no
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
|
||||
mkdir $appsDir
|
||||
mv $binDir/pcmanfm-qt $appsDir/PCManFM
|
||||
rm -rf $binDir $dataDir/applications
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.qt5-pcmanfm-qt"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/pcmanfm-qt.rdef.in > pcmanfm-qt.rdef
|
||||
|
||||
addResourcesToBinaries pcmanfm-qt.rdef $appsDir/PCManFM
|
||||
addAppDeskbarSymlink $appsDir/PCManFM
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
Reference in New Issue
Block a user