mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
kdelibs4: make it compile and work.
I know, the INSTALL section is a mess. Anyone care to fix CMake so that it won't be a mess? Or fix KDElibs so that it can use "data" not "share"?
This commit is contained in:
@@ -1,25 +1,56 @@
|
||||
From 29ddb0a1bf13d1f4599d2dc71c876f7fe5c595d8 Mon Sep 17 00:00:00 2001
|
||||
From 17719dd9ab2b830b8c25a513931b28b5f1482721 Mon Sep 17 00:00:00 2001
|
||||
From: Augustin Cavalier <waddlesplash@gmail.com>
|
||||
Date: Thu, 17 Jul 2014 11:55:15 -0400
|
||||
Subject: [PATCH] Fix compile on Haiku.
|
||||
Date: Wed, 30 Jul 2014 14:19:29 -0400
|
||||
Subject: [PATCH] Fix build on Haiku.
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 ++--
|
||||
kdecore/io/kfilesystemtype_p.cpp | 2 +-
|
||||
kdecore/io/kmountpoint.cpp | 4 ++--
|
||||
kdecore/util/kshareddatacache_p.h | 2 +-
|
||||
kinit/CMakeLists.txt | 2 ++
|
||||
kinit/kinit.cpp | 3 +++
|
||||
kio/misc/kpac/CMakeLists.txt | 1 +
|
||||
kio/misc/kpac/kpac_dhcp_helper.c | 5 +++++
|
||||
solid/solid/CMakeLists.txt | 3 ++-
|
||||
9 files changed, 19 insertions(+), 7 deletions(-)
|
||||
CMakeLists.txt | 24 ++++++++++++------------
|
||||
kdecore/CMakeLists.txt | 4 ++--
|
||||
kdecore/io/kfilesystemtype_p.cpp | 2 +-
|
||||
kdecore/io/kmountpoint.cpp | 4 ++--
|
||||
kdecore/util/kshareddatacache_p.h | 2 +-
|
||||
kdewidgets/CMakeLists.txt | 4 ++--
|
||||
kinit/CMakeLists.txt | 2 ++
|
||||
kinit/kinit.cpp | 3 +++
|
||||
kio/kio/kprotocolmanager.cpp | 2 ++
|
||||
kio/kio/previewjob.cpp | 4 ++++
|
||||
kio/kio/slaveinterface_p.h | 2 ++
|
||||
kio/misc/kpac/CMakeLists.txt | 1 +
|
||||
kio/misc/kpac/kpac_dhcp_helper.c | 5 +++++
|
||||
kioslave/http/CMakeLists.txt | 6 ++++--
|
||||
kross/CMakeLists.txt | 4 ++--
|
||||
solid/solid/CMakeLists.txt | 3 ++-
|
||||
16 files changed, 47 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a2620f6..ccd0916 100644
|
||||
index a2620f6..5c48ce8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -316,10 +316,10 @@ check_library_exists(socket connect "" HAVE_SOCKET_LIBRARY)
|
||||
@@ -188,9 +188,9 @@ endif(QCA2_FOUND)
|
||||
set(KDE4_KJS_INCLUDES ${CMAKE_SOURCE_DIR}/kjs
|
||||
${CMAKE_BINARY_DIR}/kjs)
|
||||
|
||||
-if(NOT WINCE)
|
||||
+if(NOT WINCE AND NOT HAIKU)
|
||||
set(KDE4_KDECORE_INCLUDES ${KDE4_KJS_INCLUDES} )
|
||||
-endif(NOT WINCE)
|
||||
+endif(NOT WINCE AND NOT HAIKU)
|
||||
|
||||
# kdecore depends on Qt (need only headers from kjs)
|
||||
set(KDE4_KDECORE_INCLUDES ${KDE4_KDECORE_INCLUDES}
|
||||
@@ -256,9 +256,9 @@ set(KDE4_KDE3SUPPORT_INCLUDES ${CMAKE_SOURCE_DIR}/kde3support
|
||||
${CMAKE_SOURCE_DIR}/kde3support/kio
|
||||
${KDE4_KPARTS_INCLUDES})
|
||||
|
||||
-if(NOT WINCE)
|
||||
+if(NOT WINCE AND NOT HAIKU)
|
||||
set(KDE4_KHTML_INCLUDES ${CMAKE_SOURCE_DIR}/khtml)
|
||||
-endif(NOT WINCE)
|
||||
+endif(NOT WINCE AND NOT HAIKU)
|
||||
|
||||
|
||||
################# configure checks and create the configured files #################
|
||||
@@ -316,20 +316,20 @@ check_library_exists(socket connect "" HAVE_SOCKET_LIBRARY)
|
||||
add_subdirectory( cmake )
|
||||
add_subdirectory( kdecore )
|
||||
add_subdirectory( kdeui )
|
||||
@@ -28,10 +59,58 @@ index a2620f6..ccd0916 100644
|
||||
add_subdirectory( kpty )
|
||||
add_subdirectory( kdesu )
|
||||
-endif (UNIX)
|
||||
-if(NOT WINCE)
|
||||
+endif (UNIX AND NOT HAIKU)
|
||||
if(NOT WINCE)
|
||||
+if(NOT WINCE AND NOT HAIKU)
|
||||
add_subdirectory( kjs )
|
||||
add_subdirectory( kjsembed )
|
||||
-endif(NOT WINCE)
|
||||
+endif(NOT WINCE AND NOT HAIKU)
|
||||
add_subdirectory( kio )
|
||||
add_subdirectory( solid )
|
||||
add_subdirectory( kded )
|
||||
-if (QT_QT3SUPPORT_FOUND)
|
||||
+if (QT_QT3SUPPORT_FOUND AND NOT HAIKU) # Uses POSIX stuff Haiku doesn't have
|
||||
add_subdirectory( kde3support )
|
||||
-endif (QT_QT3SUPPORT_FOUND)
|
||||
+endif (QT_QT3SUPPORT_FOUND AND NOT HAIKU)
|
||||
add_subdirectory( kfile )
|
||||
add_subdirectory( kconf_update )
|
||||
if(NOT WINCE)
|
||||
@@ -344,9 +344,9 @@ add_subdirectory( mimetypes )
|
||||
add_subdirectory( kinit )
|
||||
add_subdirectory( threadweaver )
|
||||
add_subdirectory( sonnet )
|
||||
-if(NOT WINCE)
|
||||
+if(NOT WINCE AND NOT HAIKU)
|
||||
add_subdirectory( khtml )
|
||||
-endif(NOT WINCE)
|
||||
+endif(NOT WINCE AND NOT HAIKU)
|
||||
add_subdirectory( interfaces )
|
||||
#if ( NOT CMAKE_CROSSCOMPILING AND QT_QTDESIGNER_FOUND )
|
||||
add_subdirectory( kdewidgets )
|
||||
diff --git a/kdecore/CMakeLists.txt b/kdecore/CMakeLists.txt
|
||||
index 082e252..a731b0a 100644
|
||||
--- a/kdecore/CMakeLists.txt
|
||||
+++ b/kdecore/CMakeLists.txt
|
||||
@@ -517,7 +517,7 @@ install(TARGETS kde4-config ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
||||
|
||||
########### next target ###############
|
||||
|
||||
-if(NOT WINCE)
|
||||
+if(NOT WINCE AND NOT HAIKU)
|
||||
# kjs hash stuff for transcript plugin
|
||||
set( CREATE_HASH_TABLE ${CMAKE_SOURCE_DIR}/kjs/create_hash_table )
|
||||
|
||||
@@ -548,7 +548,7 @@ if(NOT WINCE)
|
||||
|
||||
install( TARGETS ktranscript DESTINATION ${PLUGIN_INSTALL_DIR} )
|
||||
|
||||
-endif(NOT WINCE)
|
||||
+endif(NOT WINCE AND NOT HAIKU)
|
||||
|
||||
########### install files ###############
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/all_languages DESTINATION ${LOCALE_INSTALL_DIR} )
|
||||
diff --git a/kdecore/io/kfilesystemtype_p.cpp b/kdecore/io/kfilesystemtype_p.cpp
|
||||
index 158f51d..ba0604c 100644
|
||||
--- a/kdecore/io/kfilesystemtype_p.cpp
|
||||
@@ -84,6 +163,28 @@ index 931de4d..af10807 100644
|
||||
#include <semaphore.h>
|
||||
#define KSDC_SEMAPHORES_SUPPORTED 1
|
||||
#endif
|
||||
diff --git a/kdewidgets/CMakeLists.txt b/kdewidgets/CMakeLists.txt
|
||||
index 5153601..9aa1b5a 100644
|
||||
--- a/kdewidgets/CMakeLists.txt
|
||||
+++ b/kdewidgets/CMakeLists.txt
|
||||
@@ -123,7 +123,7 @@ if(QT_QTDESIGNER_FOUND)
|
||||
install(TARGETS kdewebkitwidgets DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer )
|
||||
|
||||
|
||||
- if (QT_QT3SUPPORT_FOUND)
|
||||
+ if (QT_QT3SUPPORT_FOUND AND NOT HAIKU)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/kde3support
|
||||
@@ -157,7 +157,7 @@ if(QT_QTDESIGNER_FOUND)
|
||||
endif(NOT WIN32)
|
||||
|
||||
install(TARGETS kde3supportwidgets DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer )
|
||||
- endif (QT_QT3SUPPORT_FOUND)
|
||||
+ endif (QT_QT3SUPPORT_FOUND AND NOT HAIKU)
|
||||
endif (QT_QTDESIGNER_FOUND)
|
||||
|
||||
########### install files ###############
|
||||
diff --git a/kinit/CMakeLists.txt b/kinit/CMakeLists.txt
|
||||
index dcde429..1eda927 100644
|
||||
--- a/kinit/CMakeLists.txt
|
||||
@@ -111,6 +212,47 @@ index e41845a..c688356 100644
|
||||
#else
|
||||
#error Use QT/X11 or QT/Embedded
|
||||
#endif
|
||||
diff --git a/kio/kio/kprotocolmanager.cpp b/kio/kio/kprotocolmanager.cpp
|
||||
index f1f356e..4e29021 100644
|
||||
--- a/kio/kio/kprotocolmanager.cpp
|
||||
+++ b/kio/kio/kprotocolmanager.cpp
|
||||
@@ -657,6 +657,8 @@ static QString platform()
|
||||
return QL1S("Windows");
|
||||
#elif defined(Q_WS_S60)
|
||||
return QL1S("Symbian");
|
||||
+#elif defined(Q_OS_HAIKU)
|
||||
+ return QL1S("Haiku");
|
||||
#endif
|
||||
}
|
||||
|
||||
diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp
|
||||
index 01b674d..0a159d0 100644
|
||||
--- a/kio/kio/previewjob.cpp
|
||||
+++ b/kio/kio/previewjob.cpp
|
||||
@@ -27,6 +27,10 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#undef Q_OS_UNIX // We don't have sys/shm.h
|
||||
+#endif
|
||||
+
|
||||
#ifdef Q_OS_UNIX
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
diff --git a/kio/kio/slaveinterface_p.h b/kio/kio/slaveinterface_p.h
|
||||
index eb95a09..20355f5 100644
|
||||
--- a/kio/kio/slaveinterface_p.h
|
||||
+++ b/kio/kio/slaveinterface_p.h
|
||||
@@ -19,6 +19,8 @@
|
||||
#ifndef KIO_SLAVEINTERFACEPRIVATE_H
|
||||
#define KIO_SLAVEINTERFACEPRIVATE_H
|
||||
|
||||
+#include <sys/time.h>
|
||||
+
|
||||
#include "global.h"
|
||||
#include "connection.h"
|
||||
#include <QtCore/QTimer>
|
||||
diff --git a/kio/misc/kpac/CMakeLists.txt b/kio/misc/kpac/CMakeLists.txt
|
||||
index 81fa79a..2e36926 100644
|
||||
--- a/kio/misc/kpac/CMakeLists.txt
|
||||
@@ -154,6 +296,39 @@ index c5c38eb..419b022 100644
|
||||
}
|
||||
|
||||
/* Reads the reply from the socket, checks it and outputs the URL to STDOUT */
|
||||
diff --git a/kioslave/http/CMakeLists.txt b/kioslave/http/CMakeLists.txt
|
||||
index cea76f5..6f6dd86 100644
|
||||
--- a/kioslave/http/CMakeLists.txt
|
||||
+++ b/kioslave/http/CMakeLists.txt
|
||||
@@ -31,8 +31,10 @@ include_directories( ${KDE4_KIO_INCLUDES} ${ZLIB_INCLUDE_DIR} ${CMAKE_SOURCE_DIR
|
||||
${CMAKE_BINARY_DIR}/solid )
|
||||
include_directories( ${CMAKE_SOURCE_DIR}/interfaces ${CMAKE_SOURCE_DIR}/kio/httpfilter )
|
||||
|
||||
-add_subdirectory( kcookiejar )
|
||||
-add_subdirectory( tests )
|
||||
+if(NOT HAIKU)
|
||||
+ add_subdirectory( kcookiejar )
|
||||
+ add_subdirectory( tests )
|
||||
+endif()
|
||||
|
||||
########### next target ###############
|
||||
|
||||
diff --git a/kross/CMakeLists.txt b/kross/CMakeLists.txt
|
||||
index dc559f0..c6fcb1e 100644
|
||||
--- a/kross/CMakeLists.txt
|
||||
+++ b/kross/CMakeLists.txt
|
||||
@@ -12,9 +12,9 @@ add_subdirectory( test )
|
||||
|
||||
# KDE Javascript using kjs and kjsembed
|
||||
# test kjsembed I think
|
||||
-if (NOT WINCE)
|
||||
+if (NOT WINCE AND NOT HAIKU)
|
||||
add_subdirectory( kjs )
|
||||
-endif(NOT WINCE)
|
||||
+endif(NOT WINCE AND NOT HAIKU)
|
||||
|
||||
# QtScript backend
|
||||
add_subdirectory( qts )
|
||||
diff --git a/solid/solid/CMakeLists.txt b/solid/solid/CMakeLists.txt
|
||||
index a7f1f07..5372c75 100644
|
||||
--- a/solid/solid/CMakeLists.txt
|
||||
|
||||
Reference in New Issue
Block a user