mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-20 18:50:08 +02:00
160 lines
4.2 KiB
Plaintext
160 lines
4.2 KiB
Plaintext
From 0bbd9a38b11050f32cf2fca8af4f8341344ca63e Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Sat, 21 Nov 2015 22:02:38 +0000
|
|
Subject: Haiku provides elf.h now.
|
|
|
|
|
|
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
|
|
index 5976b2f..1dd659a 100644
|
|
--- a/Source/cmELF.cxx
|
|
+++ b/Source/cmELF.cxx
|
|
@@ -21,28 +21,20 @@
|
|
#if defined(__OpenBSD__)
|
|
# include <elf_abi.h>
|
|
# include <stdint.h>
|
|
-#elif defined(__HAIKU__)
|
|
-# include <elf32.h>
|
|
-# include <elf64.h>
|
|
-using Elf32_Ehdr = struct Elf32_Ehdr;
|
|
-using Elf32_Shdr = struct Elf32_Shdr;
|
|
-using Elf32_Sym = struct Elf32_Sym;
|
|
-using Elf32_Rel = struct Elf32_Rel;
|
|
-using Elf32_Rela = struct Elf32_Rela;
|
|
+#else
|
|
+# include <elf.h>
|
|
+# ifndef ELFMAG0
|
|
# define ELFMAG0 0x7F
|
|
+# endif
|
|
+# ifndef ELFMAG1
|
|
# define ELFMAG1 'E'
|
|
+# endif
|
|
+# ifndef ELFMAG2
|
|
# define ELFMAG2 'L'
|
|
+# endif
|
|
+# ifndef ELFMAG3
|
|
# define ELFMAG3 'F'
|
|
-# define ET_NONE 0
|
|
-# define ET_REL 1
|
|
-# define ET_EXEC 2
|
|
-# define ET_DYN 3
|
|
-# define ET_CORE 4
|
|
-# define EM_386 3
|
|
-# define EM_SPARC 2
|
|
-# define EM_PPC 20
|
|
-#else
|
|
-# include <elf.h>
|
|
+# endif
|
|
#endif
|
|
#if defined(__sun)
|
|
# include <sys/link.h> // For dynamic section information
|
|
--
|
|
2.24.0
|
|
|
|
|
|
From 572ea587e8c345177ca6804bf73148278a8a3735 Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
|
Date: Sat, 24 Mar 2018 14:19:43 +0100
|
|
Subject: Fix search path for Lua headers.
|
|
|
|
|
|
diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake
|
|
index 283a3eb..8fd73f2 100644
|
|
--- a/Modules/FindLua51.cmake
|
|
+++ b/Modules/FindLua51.cmake
|
|
@@ -38,7 +38,7 @@ locations other than lua/
|
|
find_path(LUA_INCLUDE_DIR lua.h
|
|
HINTS
|
|
ENV LUA_DIR
|
|
- PATH_SUFFIXES include/lua51 include/lua5.1 include/lua-5.1 include/lua include
|
|
+ PATH_SUFFIXES include/lua51 include/lua5.1 include/lua-5.1 include/lua include lua5.1
|
|
PATHS
|
|
~/Library/Frameworks
|
|
/Library/Frameworks
|
|
--
|
|
2.24.0
|
|
|
|
|
|
From 382e246c35e29e60d3caa7583515f5e57bf65095 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Sat, 7 Sep 2019 17:29:56 +0200
|
|
Subject: links against libnetwork
|
|
|
|
|
|
diff --git a/bootstrap b/bootstrap
|
|
index 883b165..e6d5dfc 100755
|
|
--- a/bootstrap
|
|
+++ b/bootstrap
|
|
@@ -1478,6 +1478,9 @@ else
|
|
uv_c_flags="${uv_c_flags} -D__EXTENSIONS__ -D_XOPEN_SOURCE=600"
|
|
libs="${libs} -lkstat -lnsl -lsendfile -lsocket -lrt"
|
|
;;
|
|
+ *Haiku*)
|
|
+ libs="${libs} -lnetwork"
|
|
+ ;;
|
|
esac
|
|
fi
|
|
uv_c_flags="${uv_c_flags} `cmake_escape "-I${cmake_source_dir}/Utilities/cmlibuv/include"`"
|
|
--
|
|
2.24.0
|
|
|
|
|
|
From adb7f8b33e9ae223b0643239fb5134cccb2b85ef Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Sat, 7 Sep 2019 23:46:47 +0200
|
|
Subject: bootstrap uses cmlibuv
|
|
|
|
|
|
diff --git a/Utilities/cmlibuv/src/unix/core.c b/Utilities/cmlibuv/src/unix/core.c
|
|
index cf7dea0..5d23bf2 100644
|
|
--- a/Utilities/cmlibuv/src/unix/core.c
|
|
+++ b/Utilities/cmlibuv/src/unix/core.c
|
|
@@ -1377,7 +1377,9 @@ int uv_os_getpriority(uv_pid_t pid, int* priority) {
|
|
return UV_EINVAL;
|
|
|
|
errno = 0;
|
|
+#ifndef __HAIKU__
|
|
r = getpriority(PRIO_PROCESS, (int) pid);
|
|
+#endif
|
|
|
|
if (r == -1 && errno != 0)
|
|
return UV__ERR(errno);
|
|
@@ -1391,8 +1393,10 @@ int uv_os_setpriority(uv_pid_t pid, int priority) {
|
|
if (priority < UV_PRIORITY_HIGHEST || priority > UV_PRIORITY_LOW)
|
|
return UV_EINVAL;
|
|
|
|
+#ifndef __HAIKU__
|
|
if (setpriority(PRIO_PROCESS, (int) pid, priority) != 0)
|
|
return UV__ERR(errno);
|
|
+#endif
|
|
|
|
return 0;
|
|
}
|
|
--
|
|
2.24.0
|
|
|
|
|
|
From b48761aa83b8f815f54647a99d3eb11a0b64f4ac Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Sat, 21 Sep 2019 15:30:44 +0200
|
|
Subject: also detect secondary arch with clang.
|
|
|
|
|
|
diff --git a/Modules/Platform/Haiku.cmake b/Modules/Platform/Haiku.cmake
|
|
index 7e0af61..4129c00 100644
|
|
--- a/Modules/Platform/Haiku.cmake
|
|
+++ b/Modules/Platform/Haiku.cmake
|
|
@@ -43,6 +43,10 @@ execute_process(
|
|
|
|
string(REGEX MATCH "libraries: =?([^\n]*:)?/boot/system/develop/lib/([^/]*)/?(:?\n+)" _dummy "${_HAIKU_SEARCH_DIRS}\n")
|
|
set(CMAKE_HAIKU_SECONDARY_ARCH "${CMAKE_MATCH_2}")
|
|
+if(NOT CMAKE_HAIKU_SECONDARY_ARCH)
|
|
+ string(REGEX MATCH "libraries: =?([^\n]*:)?/system/lib/([^/]*)/?(:?\n+)" _dummy "${_HAIKU_SEARCH_DIRS}\n")
|
|
+ set(CMAKE_HAIKU_SECONDARY_ARCH "${CMAKE_MATCH_2}")
|
|
+endif()
|
|
|
|
if(NOT CMAKE_HAIKU_SECONDARY_ARCH)
|
|
set(CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR "")
|
|
--
|
|
2.24.0
|
|
|