mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
vulkan: bump to 1.4.304 (#11651)
This commit is contained in:
@@ -1,135 +0,0 @@
|
||||
From 0a5bf8341bc6b925464df05d021aa097271c1929 Mon Sep 17 00:00:00 2001
|
||||
From: X512 <danger_mail@list.ru>
|
||||
Date: Sun, 9 Jan 2022 06:34:23 +0900
|
||||
Subject: basic fixes for haiku
|
||||
|
||||
|
||||
diff --git a/loader/loader.c b/loader/loader.c
|
||||
index e6bf8bd..8919447 100644
|
||||
--- a/loader/loader.c
|
||||
+++ b/loader/loader.c
|
||||
@@ -2852,6 +2852,17 @@ static VkResult read_data_files_in_search_paths(const struct loader_instance *in
|
||||
#if defined(_WIN32)
|
||||
char *package_path = NULL;
|
||||
#else
|
||||
+
|
||||
+#if defined(__HAIKU__)
|
||||
+ char *xdg_config_home = NULL;
|
||||
+ char *xdg_config_dirs = NULL;
|
||||
+ char *xdg_data_home = NULL;
|
||||
+ char *xdg_data_dirs =
|
||||
+ "/boot/home/config/non-packaged/add-ons:"
|
||||
+ "/boot/home/config/add-ons:"
|
||||
+ "/boot/system/non-packaged/add-ons:"
|
||||
+ "/boot/system/add-ons";
|
||||
+#else
|
||||
// Determine how much space is needed to generate the full search path
|
||||
// for the current manifest files.
|
||||
char *xdg_config_home = loader_secure_getenv("XDG_CONFIG_HOME", inst);
|
||||
@@ -2870,6 +2881,8 @@ static VkResult read_data_files_in_search_paths(const struct loader_instance *in
|
||||
if (NULL == xdg_data_dirs || '\0' == xdg_data_dirs[0]) {
|
||||
xdg_data_dirs = FALLBACK_DATA_DIRS;
|
||||
}
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
|
||||
char *home = NULL;
|
||||
diff --git a/loader/loader_environment.c b/loader/loader_environment.c
|
||||
index f4205f4..c8299f6 100644
|
||||
--- a/loader/loader_environment.c
|
||||
+++ b/loader/loader_environment.c
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
// Environment variables
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
|
||||
- defined(__OpenBSD__)
|
||||
+ defined(__OpenBSD__) || defined(__HAIKU__)
|
||||
|
||||
bool is_high_integrity() { return geteuid() != getuid() || getegid() != getgid(); }
|
||||
|
||||
@@ -48,7 +48,7 @@ char *loader_getenv(const char *name, const struct loader_instance *inst) {
|
||||
}
|
||||
|
||||
char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
|
||||
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
|
||||
// Apple does not appear to have a secure getenv implementation.
|
||||
// The main difference between secure getenv and getenv is that secure getenv
|
||||
// returns NULL if the process is being run with elevated privileges by a normal user.
|
||||
diff --git a/loader/loader_environment.h b/loader/loader_environment.h
|
||||
index 2eb61d5..eb03fa0 100644
|
||||
--- a/loader/loader_environment.h
|
||||
+++ b/loader/loader_environment.h
|
||||
@@ -36,7 +36,7 @@ char *loader_getenv(const char *name, const struct loader_instance *inst);
|
||||
void loader_free_getenv(char *val, const struct loader_instance *inst);
|
||||
|
||||
#if defined(WIN32) || defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || \
|
||||
- defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
+ defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
|
||||
|
||||
bool is_high_integrity();
|
||||
|
||||
@@ -54,4 +54,4 @@ VkResult loader_add_environment_layers(struct loader_instance *inst, const enum
|
||||
const struct loader_envvar_filter *enable_filter,
|
||||
const struct loader_envvar_disable_layers_filter *disable_filter,
|
||||
struct loader_layer_list *target_list, struct loader_layer_list *expanded_target_list,
|
||||
- const struct loader_layer_list *source_list);
|
||||
\ No newline at end of file
|
||||
+ const struct loader_layer_list *source_list);
|
||||
diff --git a/loader/stack_allocation.h b/loader/stack_allocation.h
|
||||
index d1958fb..693955c 100644
|
||||
--- a/loader/stack_allocation.h
|
||||
+++ b/loader/stack_allocation.h
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
-#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
+#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
|
||||
#define loader_stack_alloc(size) alloca(size)
|
||||
#elif defined(_WIN32)
|
||||
#define loader_stack_alloc(size) _alloca(size)
|
||||
diff --git a/loader/vk_loader_platform.h b/loader/vk_loader_platform.h
|
||||
index 44120f2..adc2359 100644
|
||||
--- a/loader/vk_loader_platform.h
|
||||
+++ b/loader/vk_loader_platform.h
|
||||
@@ -44,7 +44,7 @@
|
||||
#endif // defined(__Fuchsia__)
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
|
||||
- defined(__OpenBSD__)
|
||||
+ defined(__OpenBSD__) || defined(__HAIKU__)
|
||||
#include <unistd.h>
|
||||
// Note: The following file is for dynamic loading:
|
||||
#include <dlfcn.h>
|
||||
@@ -111,7 +111,7 @@
|
||||
#define ENABLED_LAYERS_ENV "VK_INSTANCE_LAYERS"
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
|
||||
- defined(__OpenBSD__)
|
||||
+ defined(__OpenBSD__) || defined(__HAIKU__)
|
||||
/* Linux-specific common code: */
|
||||
|
||||
// VK Library Filenames, Paths, etc.:
|
||||
@@ -233,7 +233,7 @@ static inline void loader_platform_thread_once_fn(pthread_once_t *ctl, void (*fu
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
|
||||
- defined(__OpenBSD__)
|
||||
+ defined(__OpenBSD__) || defined(__HAIKU__)
|
||||
|
||||
// File IO
|
||||
static inline bool loader_platform_file_exists(const char *path) {
|
||||
@@ -294,7 +294,7 @@ static inline char *loader_platform_executable_path(char *buffer, size_t size) {
|
||||
|
||||
return buffer;
|
||||
}
|
||||
-#elif defined(__Fuchsia__) || defined(__OpenBSD__)
|
||||
+#elif defined(__Fuchsia__) || defined(__OpenBSD__) || defined(__HAIKU__)
|
||||
static inline char *loader_platform_executable_path(char *buffer, size_t size) { return NULL; }
|
||||
#elif defined(__QNXNTO__)
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
||||
96
sys-libs/vulkan/patches/vulkan-1.4.304.patchset
Normal file
96
sys-libs/vulkan/patches/vulkan-1.4.304.patchset
Normal file
@@ -0,0 +1,96 @@
|
||||
From ee6ab38f765ca0eff1070152e5b0b9710e10b284 Mon Sep 17 00:00:00 2001
|
||||
From: X512 <danger_mail@list.ru>
|
||||
Date: Sun, 9 Jan 2022 06:34:23 +0900
|
||||
Subject: basic fixes for haiku
|
||||
|
||||
|
||||
diff --git a/loader/loader.c b/loader/loader.c
|
||||
index c35ecf2..988c81f 100644
|
||||
--- a/loader/loader.c
|
||||
+++ b/loader/loader.c
|
||||
@@ -88,6 +88,17 @@ struct activated_layer_info {
|
||||
char *enable_value_env;
|
||||
};
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+ char *xdg_config_home = NULL;
|
||||
+ char *xdg_config_dirs = NULL;
|
||||
+ char *xdg_data_home = NULL;
|
||||
+ char *xdg_data_dirs =
|
||||
+ "/boot/home/config/non-packaged/add-ons:"
|
||||
+ "/boot/home/config/add-ons:"
|
||||
+ "/boot/system/non-packaged/add-ons:"
|
||||
+ "/boot/system/add-ons";
|
||||
+#endif
|
||||
+
|
||||
// thread safety lock for accessing global data structures such as "loader"
|
||||
// all entrypoints on the instance chain need to be locked except GPA
|
||||
// additionally CreateDevice and DestroyDevice needs to be locked
|
||||
diff --git a/loader/loader_environment.c b/loader/loader_environment.c
|
||||
index 4f9133e..39e70bd 100644
|
||||
--- a/loader/loader_environment.c
|
||||
+++ b/loader/loader_environment.c
|
||||
@@ -49,7 +49,7 @@ char *loader_getenv(const char *name, const struct loader_instance *inst) {
|
||||
}
|
||||
|
||||
char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
|
||||
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
|
||||
// Apple does not appear to have a secure getenv implementation.
|
||||
// The main difference between secure getenv and getenv is that secure getenv
|
||||
// returns NULL if the process is being run with elevated privileges by a normal user.
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From c8cb3066686c6b496d000252f20b4ad1bbaf4c19 Mon Sep 17 00:00:00 2001
|
||||
From: Ken Mays <kmays2000@gmail.com>
|
||||
Date: Fri, 6 Sep 2024 05:26:34 +0000
|
||||
Subject: Improve port for Haiku
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c570367..1b8173f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -108,13 +108,14 @@ elseif(APPLE)
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
target_compile_definitions(platform_wsi INTERFACE VK_USE_PLATFORM_MACOS_MVK)
|
||||
endif()
|
||||
-elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|DragonFly|GNU")
|
||||
+elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|DragonFly|GNU|Haiku")
|
||||
option(BUILD_WSI_XCB_SUPPORT "Build XCB WSI support" ON)
|
||||
option(BUILD_WSI_XLIB_SUPPORT "Build Xlib WSI support" ON)
|
||||
option(BUILD_WSI_WAYLAND_SUPPORT "Build Wayland WSI support" ON)
|
||||
option(BUILD_WSI_DIRECTFB_SUPPORT "Build DirectFB WSI support" OFF)
|
||||
|
||||
find_package(PkgConfig REQUIRED QUIET) # Use PkgConfig to find Linux system libraries
|
||||
+ include_directories("/sources-2/Vulkan-Headers-1.4.304/include")
|
||||
|
||||
if(BUILD_WSI_XCB_SUPPORT)
|
||||
pkg_check_modules(XCB REQUIRED QUIET IMPORTED_TARGET xcb)
|
||||
diff --git a/loader/vk_loader_platform.h b/loader/vk_loader_platform.h
|
||||
index 23908ae..f6b8440 100644
|
||||
--- a/loader/vk_loader_platform.h
|
||||
+++ b/loader/vk_loader_platform.h
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
|
||||
#include <sys/types.h>
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
// Set of platforms with a common set of functionality which is queried throughout the program
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNX__) || defined(__FreeBSD__) || \
|
||||
- defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__GNU__)
|
||||
+ defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__GNU__) || defined(__HAIKU__)
|
||||
#define COMMON_UNIX_PLATFORMS 1
|
||||
#else
|
||||
#define COMMON_UNIX_PLATFORMS 0
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -9,16 +9,16 @@ instance-level functionality that works across these drivers. Additionally, \
|
||||
the loader manages inserting Vulkan layer libraries, such as validation \
|
||||
layers, between an application and the drivers."
|
||||
HOMEPAGE="https://www.vulkan.org/"
|
||||
COPYRIGHT="2014-2022 The Khronos Group Inc."
|
||||
COPYRIGHT="2014-2025 The Khronos Group Inc."
|
||||
LICENSE="Apache v2"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/v$portVersion.tar.gz"
|
||||
SOURCE_FILENAME="Vulkan-Loader-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="54efc088258e83304f105d6998adaa54340045f490884b2d136a8584d66cb861"
|
||||
CHECKSUM_SHA256="368d8281604a3f4dee038bfcc55c44e305031ec67f6e3fdd50cdeb83586c99f9"
|
||||
SOURCE_DIR="Vulkan-Loader-$portVersion"
|
||||
SOURCE_URI_2="https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v$portVersion.tar.gz"
|
||||
SOURCE_FILENAME_2="Vulkan-Headers-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256_2="c2b72c5e94bcabb5c276c0d55344f66d3486c9465beb74397aeb7d5bcf537143"
|
||||
CHECKSUM_SHA256_2="5e1a06b3f27e7581b55d1dea176fd97ee0a2f299406db2f437c1d2f297ceba5b"
|
||||
SOURCE_DIR_2="Vulkan-Headers-$portVersion"
|
||||
PATCHES="vulkan-$portVersion.patchset"
|
||||
|
||||
@@ -66,15 +66,14 @@ BUILD()
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=$prefix \
|
||||
-G Ninja
|
||||
|
||||
cd ../../$sourceDir
|
||||
cd ../../$sourceDir
|
||||
cmake -S . -B build $cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=$prefix \
|
||||
-DVULKAN_HEADERS_INSTALL_DIR=$sourceDir2 \
|
||||
-DVulkanHeaders_DIR=$sourceDir2/build \
|
||||
-DBUILD_WSI_XCB_SUPPORT=Off \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=Off \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=On \
|
||||
-DBUILD_WSI_XCB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=ON \
|
||||
-DVulkanHeaders_DIR=$sourceDir2/build/CMakeFiles/Export/2305fcc30b4aca20c8b0c09c18da2b50/ \
|
||||
-DFALLBACK_CONFIG_DIRS="/boot/home/config/non-packaged/add-ons:/boot/home/config/add-ons:/boot/system/non-packaged/add-ons:/boot/system/add-ons" \
|
||||
-G Ninja
|
||||
|
||||
Reference in New Issue
Block a user