mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 15:08:57 +02:00
152 lines
4.6 KiB
Plaintext
152 lines
4.6 KiB
Plaintext
From ec63bbd0c06815109eca06e02fce4bb35c76484d Mon Sep 17 00:00:00 2001
|
|
From: Sergei Reznikov <diver@gelios.net>
|
|
Date: Mon, 14 Dec 2020 22:14:06 +0300
|
|
Subject: Fix build on Haiku
|
|
|
|
|
|
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
|
|
index 7eeba0b..cfc5bcf 100644
|
|
--- a/src/core/CMakeLists.txt
|
|
+++ b/src/core/CMakeLists.txt
|
|
@@ -201,6 +201,10 @@ if (UNIX)
|
|
target_link_libraries(KF5KIOCore PRIVATE KF5::AuthCore) #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 0817176..adef718 100644
|
|
--- a/src/core/kmountpoint.cpp
|
|
+++ b/src/core/kmountpoint.cpp
|
|
@@ -115,7 +115,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
|
|
@@ -312,7 +312,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 24f4d90..6e699c1 100644
|
|
--- a/src/ioslaves/file/CMakeLists.txt
|
|
+++ b/src/ioslaves/file/CMakeLists.txt
|
|
@@ -37,6 +37,10 @@ if(UNIX)
|
|
target_link_libraries(kio_file Qt5::Network KF5::AuthCore)
|
|
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 822eb05..89f1327 100644
|
|
--- a/src/ioslaves/file/file_unix.cpp
|
|
+++ b/src/ioslaves/file/file_unix.cpp
|
|
@@ -57,6 +57,11 @@
|
|
#include <sys/extattr.h>
|
|
#endif
|
|
|
|
+#ifdef __HAIKU__
|
|
+#undef HAVE_DIRENT_D_TYPE
|
|
+#undef HAVE_SYS_XATTR_H
|
|
+#endif
|
|
+
|
|
using namespace KIO;
|
|
|
|
/* 512 kB */
|
|
@@ -887,7 +892,7 @@ void FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl,
|
|
|
|
// copy access and modification time
|
|
if (!wasKilled()) {
|
|
- #ifdef Q_OS_LINUX
|
|
+ #if defined(Q_OS_LINUX) || defined(Q_OS_HAIKU)
|
|
// with nano secs precision
|
|
struct timespec ut[2];
|
|
ut[0] = buff_src.st_atim;
|
|
diff --git a/src/ioslaves/file/kauth/CMakeLists.txt b/src/ioslaves/file/kauth/CMakeLists.txt
|
|
index 8b77a28..344c168 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::AuthCore 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 8cfbbc1..e09cdd7 100644
|
|
--- a/src/ioslaves/file/sharefd_p.h
|
|
+++ b/src/ioslaves/file/sharefd_p.h
|
|
@@ -8,6 +8,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 d46d895..32ebb9a 100644
|
|
--- a/src/kpac/CMakeLists.txt
|
|
+++ b/src/kpac/CMakeLists.txt
|
|
@@ -48,6 +48,9 @@ if (Qt5Qml_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(Qt5Qml PROPERTIES DESCRIPTION "QtQml, 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 e025eb7..3fe3749 100644
|
|
--- a/src/widgets/previewjob.cpp
|
|
+++ b/src/widgets/previewjob.cpp
|
|
@@ -11,7 +11,7 @@
|
|
#include "previewjob.h"
|
|
#include "kio_widgets_debug.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.28.0
|
|
|