From 47c483d895550dbef23d8a99423a56ebcfdbe00a Mon Sep 17 00:00:00 2001
From: Builder kitt <hpkg-builder@haiku-os.org>
Date: Mon, 8 Aug 2016 04:39:06 +0200
Subject: applying patch strigi-0.7.5.patch


diff --git a/libstreamanalyzer/lib/saxeventanalyzer.cpp b/libstreamanalyzer/lib/saxeventanalyzer.cpp
index 1e5b386..d37857c 100644
--- a/libstreamanalyzer/lib/saxeventanalyzer.cpp
+++ b/libstreamanalyzer/lib/saxeventanalyzer.cpp
@@ -27,7 +27,7 @@
 #include <cstring>
 
 #ifndef LIBXML_THREAD_ENABLED
-#error Strigi needs a thread safe version of libxml2
+#warning Strigi needs a thread safe version of libxml2
 #endif
 
 using namespace Strigi;
diff --git a/strigiclient/CMakeLists.txt b/strigiclient/CMakeLists.txt
index 7b7d6c7..859e083 100644
--- a/strigiclient/CMakeLists.txt
+++ b/strigiclient/CMakeLists.txt
@@ -12,9 +12,10 @@ enable_testing()
 option(ENABLE_QT4 "enable Qt4 GUI" ON)
 set(QT_MIN_VERSION "4.3.0")
 
-# definition of LIB_DESTINATION which is the path where the lib is installed
+# Set the installation paths
 include(GNUInstallDirs)
-set(LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
+set(LIB_DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}")
+set(INCLUDE_DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
 
 # Set up RPATH handling, so the libs are found if they are installed to a non-standard location.
 # By default cmake builds the targets with full RPATH to everything in the build directory,
diff --git a/strigiclient/lib/htmlgui/CMakeLists.txt b/strigiclient/lib/htmlgui/CMakeLists.txt
index 983708d..604ab56 100644
--- a/strigiclient/lib/htmlgui/CMakeLists.txt
+++ b/strigiclient/lib/htmlgui/CMakeLists.txt
@@ -7,6 +7,12 @@ set_target_properties(strigihtmlgui PROPERTIES
 
 target_link_libraries(strigihtmlgui searchclient streamanalyzer)
 
-install(TARGETS strigihtmlgui DESTINATION ${LIB_DESTINATION})
+install(TARGETS strigihtmlgui
+	LIBRARY DESTINATION ${LIB_DESTINATION}
+	RUNTIME DESTINATION bin
+	ARCHIVE DESTINATION ${LIB_DESTINATION}
+)
+
 install(FILES strigihtmlgui.h
-	DESTINATION include/strigi)
+	DESTINATION ${INCLUDE_DESTINATION}/strigi
+)
diff --git a/strigiclient/lib/searchclient/CMakeLists.txt b/strigiclient/lib/searchclient/CMakeLists.txt
index 9ddce18..061f481 100644
--- a/strigiclient/lib/searchclient/CMakeLists.txt
+++ b/strigiclient/lib/searchclient/CMakeLists.txt
@@ -1,4 +1,6 @@
-add_subdirectory(qtdbus)
+if(ENABLE_DBUS)
+	add_subdirectory(qtdbus)
+endif(ENABLE_DBUS)
 # disable searchclient for now
 if(NOT WIN32)
 add_subdirectory(filterwidget)
diff --git a/strigiclient/lib/searchclient/qtdbus/CMakeLists.txt b/strigiclient/lib/searchclient/qtdbus/CMakeLists.txt
index 1f34fc4..604d727 100644
--- a/strigiclient/lib/searchclient/qtdbus/CMakeLists.txt
+++ b/strigiclient/lib/searchclient/qtdbus/CMakeLists.txt
@@ -24,11 +24,11 @@ set_target_properties(strigiqtdbusclient
                  DEFINE_SYMBOL MAKE_STRIGI_QTDBUSCLIENT_LIB
 )
 
-install(TARGETS strigiqtdbusclient RUNTIME DESTINATION bin 
-                                   LIBRARY DESTINATION ${LIB_DESTINATION} 
+install(TARGETS strigiqtdbusclient RUNTIME DESTINATION bin
+                                   LIBRARY DESTINATION ${LIB_DESTINATION}
                                    ARCHIVE DESTINATION ${LIB_DESTINATION})
 install(FILES strigiasyncclient.h strigiclient.h strigidbus.h strigitypes.h
-  DESTINATION include/strigi/qtdbus)
+  DESTINATION ${INCLUDE_DESTINATION}/strigi/qtdbus)
 
 add_executable(strigiqtdbustest strigiqtdbustest.cpp)
 target_link_libraries(strigiqtdbustest strigiqtdbusclient)
diff --git a/strigidaemon/CMakeLists.txt b/strigidaemon/CMakeLists.txt
index 6eb4ead..0bd1a6f 100644
--- a/strigidaemon/CMakeLists.txt
+++ b/strigidaemon/CMakeLists.txt
@@ -120,12 +120,12 @@ endif(CppUnit_FOUND)
 file(GLOB STRIGI_HEADERS include/strigi/*.h)
 install(FILES
     ${STRIGI_HEADERS}
-    DESTINATION include/strigi
+    DESTINATION ${INCLUDE_DESTINATION}/strigi
 )
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LibSearchClientConfig.cmake
         DESTINATION ${LIB_DESTINATION}/cmake/LibSearchClient)
 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "")
 add_executable(strigidaemon dummy.cpp)
-target_link_libraries(strigidaemon libstrigidaemon)
+target_link_libraries(strigidaemon libstrigidaemon network)
 install(TARGETS strigidaemon
         RUNTIME DESTINATION bin)
diff --git a/strigidaemon/bin/daemon/strigithread.cpp b/strigidaemon/bin/daemon/strigithread.cpp
index 6368db1..529eea8 100644
--- a/strigidaemon/bin/daemon/strigithread.cpp
+++ b/strigidaemon/bin/daemon/strigithread.cpp
@@ -30,7 +30,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/resource.h>
-#include <sys/syscall.h>
 
 // define two enums and a constant for use of ioprio
 enum {
@@ -107,6 +106,7 @@ threadstarter(void *d) {
     param.sched_priority = 0;
     StrigiThread* thread = static_cast<StrigiThread*>(d);
 
+#ifndef __HAIKU__
 #ifndef __APPLE__
     if (thread->getPriority() > 0) {
         // renice the thread
@@ -139,6 +139,7 @@ threadstarter(void *d) {
 #endif
     }
 #endif
+#endif
 
     // start the actual work
     thread->run(0);
-- 
2.13.1

