mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 15:20:07 +02:00
205 lines
6.0 KiB
Plaintext
205 lines
6.0 KiB
Plaintext
From 065f7397e802e639551a974a7576fe4fefe0861f 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 deffdb6..bf3c845 100644
|
|
--- a/Source/cmELF.cxx
|
|
+++ b/Source/cmELF.cxx
|
|
@@ -20,17 +20,18 @@
|
|
// Include the ELF format information system header.
|
|
#if defined(__OpenBSD__)
|
|
# include <elf_abi.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
|
|
@@ -42,6 +43,7 @@ using Elf32_Rela = struct Elf32_Rela;
|
|
# define EM_PPC 20
|
|
#else
|
|
# include <elf.h>
|
|
+# endif
|
|
#endif
|
|
#if defined(__sun)
|
|
# include <sys/link.h> // For dynamic section information
|
|
--
|
|
2.30.0
|
|
|
|
|
|
From ac93635fbf4e5dd95538b3420aec501d1661e015 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.30.0
|
|
|
|
|
|
From c2d6948471337514cfc5877b02ce351716dd38a3 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 f85d57e..bb4b99f 100755
|
|
--- a/bootstrap
|
|
+++ b/bootstrap
|
|
@@ -1683,6 +1683,9 @@ else
|
|
uv_c_flags="${uv_c_flags} -D_XOPEN_SOURCE=700"
|
|
libs="${libs} -lsocket"
|
|
;;
|
|
+ *Haiku*)
|
|
+ libs="${libs} -lnetwork"
|
|
+ ;;
|
|
esac
|
|
fi
|
|
if test "x${bootstrap_system_libuv}" = "x"; then
|
|
--
|
|
2.30.0
|
|
|
|
|
|
From 7b029f0da3fc0ec034ebc7b635587933207d7332 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 e6d61ee..9d9bba9 100644
|
|
--- a/Utilities/cmlibuv/src/unix/core.c
|
|
+++ b/Utilities/cmlibuv/src/unix/core.c
|
|
@@ -1423,7 +1423,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);
|
|
@@ -1437,8 +1439,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.30.0
|
|
|
|
|
|
From f4218e7fc09bac128ff841993745d8481fbd0d77 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.30.0
|
|
|
|
|
|
From 5cdf1abdb86497ed9786713588fa742403df134f Mon Sep 17 00:00:00 2001
|
|
From: Augustin Cavalier <waddlesplash@gmail.com>
|
|
Date: Fri, 21 Feb 2020 15:38:39 -0500
|
|
Subject: Modules/Haiku: Set CMAKE_SYSTEM_FRAMEWORK_PATH.
|
|
|
|
|
|
diff --git a/Modules/Platform/Haiku.cmake b/Modules/Platform/Haiku.cmake
|
|
index 4129c00..90afe19 100644
|
|
--- a/Modules/Platform/Haiku.cmake
|
|
+++ b/Modules/Platform/Haiku.cmake
|
|
@@ -129,6 +129,9 @@ LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
|
|
|
|
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_HAIKU_DEVELOP_LIB_DIRECTORIES})
|
|
|
|
+# This is needed for find_package to search develop/lib/cmake/.
|
|
+list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH /boot/system/develop /boot/system/non-packaged/develop)
|
|
+
|
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
set(CMAKE_INSTALL_PREFIX "/boot/system" CACHE PATH
|
|
"Install path prefix, prepended onto install directories." FORCE)
|
|
--
|
|
2.30.0
|
|
|
|
|
|
From c777003f3369498099d47471753f3bbfdbfce603 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Thu, 15 Apr 2021 21:09:12 +0200
|
|
Subject: disable dependency tracking for older GNU compilers
|
|
|
|
|
|
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
|
|
index 928e726..87d0167 100644
|
|
--- a/Modules/Compiler/GNU.cmake
|
|
+++ b/Modules/Compiler/GNU.cmake
|
|
@@ -48,7 +48,9 @@ macro(__compiler_gnu lang)
|
|
# distcc does not transform -o to -MT when invoking the preprocessor
|
|
# internally, as it ought to. Work around this bug by setting -MT here
|
|
# even though it isn't strictly necessary.
|
|
- set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <DEP_TARGET> -MF <DEP_FILE>")
|
|
+ if(NOT CMAKE_${lang}_COMPILER_ID STREQUAL "GNU" OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.0)
|
|
+ set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <DEP_TARGET> -MF <DEP_FILE>")
|
|
+ endif()
|
|
endif()
|
|
|
|
# Initial configuration flags.
|
|
--
|
|
2.30.0
|
|
|