Files
haikuports/kde-frameworks/kio/patches/kio-5.55.0.patchset
2019-02-15 16:45:18 +03:00

143 lines
4.3 KiB
Plaintext

From ea4c3234f88099bc69b779f229373fad0af5d00d Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 15 Feb 2019 13:36:25 +0300
Subject: Fix build on Haiku
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 9eb7bc5..8511de0 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -157,6 +157,10 @@ if (UNIX)
target_link_libraries(KF5KIOCore PRIVATE KF5::Auth) #SlaveBase uses KAuth::Action
endif()
+if (HAIKU)
+ target_link_libraries(KF5KIOCore PRIVATE network)
+endif ()
+
if(ACL_FOUND)
target_link_libraries(KF5KIOCore PRIVATE ${ACL_LIBS})
endif()
diff --git a/src/core/kmountpoint.cpp b/src/core/kmountpoint.cpp
index 94de468..513a411 100644
--- a/src/core/kmountpoint.cpp
+++ b/src/core/kmountpoint.cpp
@@ -127,7 +127,7 @@ KMountPoint::~KMountPoint()
#define MOUNTTYPE(var) var->mnt_type
#define MOUNTOPTIONS(var) var->mnt_opts
#define FSNAME(var) var->mnt_fsname
-#else
+#elif !defined(__HAIKU__)
#define SETMNTENT fopen
#define ENDMNTENT fclose
#define STRUCT_MNTENT struct mnttab
@@ -314,7 +314,7 @@ KMountPoint::List KMountPoint::currentMountPoints(DetailsNeededFlags infoNeeded)
}
}
-#elif !defined(Q_OS_ANDROID)
+#elif !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU)
STRUCT_SETMNTENT mnttab;
if ((mnttab = SETMNTENT(MNTTAB, "r")) == nullptr) {
return result;
diff --git a/src/ioslaves/file/CMakeLists.txt b/src/ioslaves/file/CMakeLists.txt
index 9ab8ea3..d28b277 100644
--- a/src/ioslaves/file/CMakeLists.txt
+++ b/src/ioslaves/file/CMakeLists.txt
@@ -29,6 +29,10 @@ if(UNIX)
target_link_libraries(kio_file Qt5::Network KF5::Auth)
endif()
+if (HAIKU)
+ target_link_libraries(kio_file gnu network)
+endif ()
+
if (HAVE_VOLMGT AND CMAKE_SYSTEM_NAME MATCHES SunOS)
target_link_libraries(kio_file -lvolmgt)
endif ()
diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp
index 7ed0ae8..4854b6d 100644
--- a/src/ioslaves/file/file_unix.cpp
+++ b/src/ioslaves/file/file_unix.cpp
@@ -57,6 +57,11 @@
#include <sys/sendfile.h>
#endif
+#ifdef __HAIKU__
+#undef HAVE_DIRENT_D_TYPE
+#undef HAVE_SYS_XATTR_H
+#endif
+
using namespace KIO;
#define MAX_IPC_SIZE (1024*32)
diff --git a/src/ioslaves/file/kauth/CMakeLists.txt b/src/ioslaves/file/kauth/CMakeLists.txt
index 836bd21..7f523af 100644
--- a/src/ioslaves/file/kauth/CMakeLists.txt
+++ b/src/ioslaves/file/kauth/CMakeLists.txt
@@ -1,6 +1,10 @@
add_executable(file_helper filehelper.cpp fdsender.cpp)
target_link_libraries(file_helper Qt5::Network KF5::Auth KF5::I18n KF5::KIOCore)
+if (HAIKU)
+ target_link_libraries(file_helper network)
+endif ()
+
#install(TARGETS file_helper DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
#kauth_install_helper_files(file_helper org.kde.kio.file root)
#kauth_install_actions(org.kde.kio.file file.actions)
diff --git a/src/ioslaves/file/sharefd_p.h b/src/ioslaves/file/sharefd_p.h
index 728ca4c..ea7c95b 100644
--- a/src/ioslaves/file/sharefd_p.h
+++ b/src/ioslaves/file/sharefd_p.h
@@ -22,6 +22,7 @@
#define SHAREFD_P_H
#include <sys/un.h>
+#include <cstring>
#include <iostream>
#include <unistd.h>
#include <sys/socket.h>
diff --git a/src/kpac/CMakeLists.txt b/src/kpac/CMakeLists.txt
index aebe1eb..e7755f3 100644
--- a/src/kpac/CMakeLists.txt
+++ b/src/kpac/CMakeLists.txt
@@ -48,6 +48,9 @@ if (Qt5Script_FOUND)
if (HAVE_RESOLV_LIBRARY)
target_link_libraries(kded_proxyscout resolv)
endif ()
+ if (HAIKU)
+ target_link_libraries(kded_proxyscout network)
+ endif ()
endif()
set_package_properties(Qt5Script PROPERTIES DESCRIPTION "QtScript, one of the Qt5 modules"
@@ -69,6 +72,10 @@ if (HAVE_SOCKET_LIBRARY)
target_link_libraries(kpac_dhcp_helper socket)
endif ()
+if (HAIKU)
+ target_link_libraries(kpac_dhcp_helper network)
+endif ()
+
install(TARGETS kpac_dhcp_helper DESTINATION ${KDE_INSTALL_LIBEXECDIR_KF5} )
########### install files ###############
diff --git a/src/widgets/previewjob.cpp b/src/widgets/previewjob.cpp
index ecf0f13..d62ea92 100644
--- a/src/widgets/previewjob.cpp
+++ b/src/widgets/previewjob.cpp
@@ -22,7 +22,7 @@
#include "previewjob.h"
-#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU)
#define WITH_SHM 1
#else
#define WITH_SHM 0
--
2.19.1