From fa045ed22d1276b0c7deae6f5ca5cf71a58dbe3d Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 5 Apr 2014 18:04:49 +0200
Subject: Add missing include.


diff --git a/claw/socket_traits_unix.hpp b/claw/socket_traits_unix.hpp
index 16761ab..bc471b0 100644
--- a/claw/socket_traits_unix.hpp
+++ b/claw/socket_traits_unix.hpp
@@ -31,6 +31,7 @@
 #define __CLAW_SOCKET_TRAITS_UNIX_HPP__
 
 #include <sys/types.h>
+#include <sys/select.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <netinet/in.h>
-- 
1.8.3.4


From f8da4cf7165d68763faa5f3955c79b2f1fff7e32 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 5 Apr 2014 18:09:50 +0200
Subject: Fix installation paths for Haiku.


diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0716825..66607b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,12 +27,20 @@ if(SVN_ENTRIES)
   endif(Subversion_FOUND)
 endif(SVN_ENTRIES)
 
-set( CLAW_CODE_DIR claw/code/ )
+if (HAIKU)
+set( CLAW_INCLUDE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/develop/headers/" )
+set( CLAW_INSTALLDIR_DOC data/doc/libclaw${CLAW_VERSION_MAJOR}/ )
+set( CLAW_TRANSLATIONS_INSTALL_DIR "data/locale" )
+set( CLAW_INSTALLDIR_SOURCE develop/headers/claw/ )
+else()
 set( CLAW_INCLUDE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/include/" )
-set( CLAW_INSTALLDIR_SOURCE include/claw/ )
-set( CLAW_INSTALLDIR_LIB lib/ )
 set( CLAW_INSTALLDIR_DOC share/doc/libclaw${CLAW_VERSION_MAJOR}/ )
 set( CLAW_TRANSLATIONS_INSTALL_DIR "share/locale" )
+set( CLAW_INSTALLDIR_SOURCE include/claw/ )
+endif()
+
+set( CLAW_CODE_DIR claw/code/ )
+set( CLAW_INSTALLDIR_LIB lib/ )
 set( CLAW_EXECUTABLE_DIR bin/ )
 
 set( CLAW_LIBRARIES
diff --git a/cmake-module/CMakeLists.txt b/cmake-module/CMakeLists.txt
index a08a799..c486c5c 100644
--- a/cmake-module/CMakeLists.txt
+++ b/cmake-module/CMakeLists.txt
@@ -3,7 +3,11 @@ cmake_minimum_required(VERSION 2.6)
 project(claw:cmake-modules)
 
 if( NOT CLAW_CMAKE_MODULES_INSTALL_PATH )
-  set( CLAW_CMAKE_MODULES_INSTALL_PATH "share/cmake/libclaw" )
+  if(HAIKU)
+	  set( CLAW_CMAKE_MODULES_INSTALL_PATH "lib/${CMAKE_HAIKU_SECONDARY_ARCH}/libclaw/cmake/" )
+  else()
+    set( CLAW_CMAKE_MODULES_INSTALL_PATH "share/cmake/libclaw" )
+  endif()
 endif( NOT CLAW_CMAKE_MODULES_INSTALL_PATH )
 
 set( CLAW_CMAKE_MODULES
diff --git a/desktop/locale/libclaw/CMakeLists.txt b/desktop/locale/libclaw/CMakeLists.txt
index f0973ac..8de90bd 100644
--- a/desktop/locale/libclaw/CMakeLists.txt
+++ b/desktop/locale/libclaw/CMakeLists.txt
@@ -22,7 +22,7 @@ macro(GETTEXT_CREATE_TRANSLATIONS_CUSTOM _targetName _potFile _firstPoFile)
 
       install(
         FILES ${_gmoFile}
-        DESTINATION share/locale/${_lang}/LC_MESSAGES
+		DESTINATION ${CLAW_TRANSLATIONS_INSTALL_DIR}/${_lang}/LC_MESSAGES
         RENAME ${_potBasename}.mo
         )
       
-- 
1.8.3.4


From 5850bb81673005cf0101b5470749792989a380eb Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 6 Apr 2014 14:34:30 +0200
Subject: Fix claw-config to do the right thing.


diff --git a/CMakeLists.txt b/CMakeLists.txt
index 66607b0..89f0d4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,19 +28,20 @@ if(SVN_ENTRIES)
 endif(SVN_ENTRIES)
 
 if (HAIKU)
-set( CLAW_INCLUDE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/develop/headers/" )
-set( CLAW_INSTALLDIR_DOC data/doc/libclaw${CLAW_VERSION_MAJOR}/ )
-set( CLAW_TRANSLATIONS_INSTALL_DIR "data/locale" )
-set( CLAW_INSTALLDIR_SOURCE develop/headers/claw/ )
+  set( CLAW_INCLUDE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/develop/headers/${CMAKE_HAIKU_SECONDARY_ARCH}" )
+  set( CLAW_INSTALLDIR_DOC data/doc/libclaw${CLAW_VERSION_MAJOR}/ )
+  set( CLAW_TRANSLATIONS_INSTALL_DIR "data/locale" )
+  set( CLAW_INSTALLDIR_SOURCE develop/headers/${CMAKE_HAIKU_SECONDARY_ARCH}/claw/ )
+  set( CLAW_INSTALLDIR_LIB lib/${CMAKE_HAIKU_SECONDARY_ARCH}/ )
 else()
-set( CLAW_INCLUDE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/include/" )
-set( CLAW_INSTALLDIR_DOC share/doc/libclaw${CLAW_VERSION_MAJOR}/ )
-set( CLAW_TRANSLATIONS_INSTALL_DIR "share/locale" )
-set( CLAW_INSTALLDIR_SOURCE include/claw/ )
+  set( CLAW_INCLUDE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/include/" )
+  set( CLAW_INSTALLDIR_DOC share/doc/libclaw${CLAW_VERSION_MAJOR}/ )
+  set( CLAW_TRANSLATIONS_INSTALL_DIR "share/locale" )
+  set( CLAW_INSTALLDIR_SOURCE include/claw/ )
+  set( CLAW_INSTALLDIR_LIB lib/ )
 endif()
 
 set( CLAW_CODE_DIR claw/code/ )
-set( CLAW_INSTALLDIR_LIB lib/ )
 set( CLAW_EXECUTABLE_DIR bin/ )
 
 set( CLAW_LIBRARIES
diff --git a/claw-config.in b/claw-config.in
index 73b2b10..c0a8fa5 100755
--- a/claw-config.in
+++ b/claw-config.in
@@ -140,7 +140,7 @@ while test $# -gt 0; do
       echo -I$CLAW_INCLUDE_DIRECTORY
       ;;
      --libs)
-      libdirs="-L${exec_prefix}/lib "
+      libdirs="-L${exec_prefix}/@CLAW_INSTALLDIR_LIB@ "
 
       echo -n "$libdirs"
       echo $(print_libraries)
-- 
1.8.3.4

