From b8e5cbbda90d3863ea838b51bf368de09775a691 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 14 May 2021 09:58:17 +0000
Subject: We don't use /usr/share


diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 6c95ca0..c2ff933 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.0)
 install (DIRECTORY bash fish vim hooks
          DESTINATION ${TASK_DOCDIR}/scripts)
 install (FILES zsh/_task
-         DESTINATION share/zsh/site-functions)
+         DESTINATION ${TASK_DOCDIR}/zsh/site-functions)
 install (DIRECTORY add-ons
          DESTINATION ${TASK_DOCDIR}/scripts
          FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
-- 
2.30.2


From 3d6a538a7e848322447d50f04ffa783a6491f72a Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 14 May 2021 11:55:32 +0000
Subject: Fix search for libnetwork on Haiku


diff --git a/CMakeLists.txt b/CMakeLists.txt
index df4a3f8..31958bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -132,6 +132,17 @@ if (SOLARIS)
   endif (NSL_LIBRARY)
 endif (SOLARIS)
 
+if (HAIKU)
+  # search for socket() in libnetwork on Haiku
+  message("-- Looking for libnetwork")
+  find_library (NETWORK_LIBRARY NAMES network)
+  if (NETWORK_LIBRARY)
+    set (TASK_LIBRARIES    ${TASK_LIBRARIES} ${NETWORK_LIBRARY})
+  else (NETWORK_LIBRARY)
+    message(FATAL_ERROR "-- libnetwork not found.")
+  endif (NETWORK_LIBRARY)
+endif (HAIKU)
+
 message ("-- Configuring cmake.h")
 configure_file (
   ${CMAKE_SOURCE_DIR}/cmake.h.in
-- 
2.30.2

