From 476757ef4923fc1cab36d65e3373b2383ad90a5f Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 13 Dec 2020 20:50:16 +0000
Subject: Use variable to install headers


diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 62c0f62..3288afd 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -6,11 +6,11 @@ if(INSTALL_MBEDTLS_HEADERS)
     file(GLOB psa_headers "psa/*.h")
 
     install(FILES ${headers}
-        DESTINATION include/mbedtls
+        DESTINATION ${INCLUDE_INSTALL_DIR}/mbedtls
         PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
 
     install(FILES ${psa_headers}
-        DESTINATION include/psa
+        DESTINATION ${INCLUDE_INSTALL_DIR}/psa
         PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
 
 endif(INSTALL_MBEDTLS_HEADERS)
-- 
2.28.0


From ca2707ac6d600e690678bb813ea5145d39facb88 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Mon, 14 Dec 2020 22:38:15 +0000
Subject: Fix reference to python3


diff --git a/tests/Makefile b/tests/Makefile
index 511db9d..8957262 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -42,6 +42,10 @@ ifdef WINDOWS
 WINDOWS_BUILD=1
 endif
 
+ifdef HAIKU
+HAIKU_BUILD=1
+endif
+
 ifdef WINDOWS_BUILD
 DLEXT=dll
 EXEXT=.exe
@@ -55,7 +59,11 @@ DLEXT ?= so
 EXEXT=
 SHARED_SUFFIX=
 # python2 for POSIX since FreeBSD has only python2 as default.
+ifdef !HAIKU_BUILD #we use python3 on Haiku
 PYTHON ?= python2
+else
+PYTHON ?= python3
+endif
 endif
 
 # Zlib shared library extensions:
-- 
2.28.0

