diff options
Diffstat (limited to 'graphics/mesa/patches')
22 files changed, 0 insertions, 584 deletions
diff --git a/graphics/mesa/patches/patch-_gitignore b/graphics/mesa/patches/patch-_gitignore deleted file mode 100644 index 8b49dba..0000000 --- a/graphics/mesa/patches/patch-_gitignore +++ /dev/null @@ -1,9 +0,0 @@ -Index: .gitignore ---- .gitignore.orig -+++ .gitignore -@@ -1,4 +1,5 @@ - *.pyc - *.pyo - *.out -+**/obj - /build diff --git a/graphics/mesa/patches/patch-meson_build b/graphics/mesa/patches/patch-meson_build deleted file mode 100644 index cf6b5a0..0000000 --- a/graphics/mesa/patches/patch-meson_build +++ /dev/null @@ -1,29 +0,0 @@ -Index: meson.build ---- meson.build.orig -+++ meson.build -@@ -1151,7 +1151,6 @@ else - '-Werror=empty-body', - '-Werror=incompatible-pointer-types', - '-Werror=int-conversion', -- '-Wimplicit-fallthrough', - '-Wno-missing-field-initializers', - '-Wno-format-truncation', - '-fno-math-errno', -@@ -1418,6 +1417,7 @@ functions_to_detect = { - 'timespec_get': '#include <time.h>', - 'memfd_create': '', - 'random_r': '', -+ 'arc4random_buf': '', - 'flock': '', - 'strtok_r': '', - 'getrandom': '', -@@ -1549,6 +1549,9 @@ if cc.links('int main() { return 0; }', - endif - - ld_args_build_id = cc.get_supported_link_arguments('-Wl,--build-id=sha1') -+if ld_args_build_id.length() != 0 -+ pre_args += '-DHAVE_LD_BUILD_ID' -+endif - - # check for dl support - dep_dl = null_dep diff --git a/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_gfx10_gfx10_gb_reg_h b/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_gfx10_gfx10_gb_reg_h deleted file mode 100644 index bb79d84..0000000 --- a/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_gfx10_gfx10_gb_reg_h +++ /dev/null @@ -1,20 +0,0 @@ -Index: src/amd/addrlib/src/chip/gfx10/gfx10_gb_reg.h ---- src/amd/addrlib/src/chip/gfx10/gfx10_gb_reg.h.orig -+++ src/amd/addrlib/src/chip/gfx10/gfx10_gb_reg.h -@@ -36,10 +36,12 @@ - // - // Make sure the necessary endian defines are there. - // --#if defined(LITTLEENDIAN_CPU) --#elif defined(BIGENDIAN_CPU) --#else --#error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined" -+#include "util/u_endian.h" -+ -+#if UTIL_ARCH_LITTLE_ENDIAN -+#define LITTLEENDIAN_CPU -+#elif UTIL_ARCH_BIG_ENDIAN -+#define BIGENDIAN_CPU - #endif - - union GB_ADDR_CONFIG_GFX10 diff --git a/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_gfx11_gfx11_gb_reg_h b/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_gfx11_gfx11_gb_reg_h deleted file mode 100644 index 3e9d794..0000000 --- a/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_gfx11_gfx11_gb_reg_h +++ /dev/null @@ -1,20 +0,0 @@ -Index: src/amd/addrlib/src/chip/gfx11/gfx11_gb_reg.h ---- src/amd/addrlib/src/chip/gfx11/gfx11_gb_reg.h.orig -+++ src/amd/addrlib/src/chip/gfx11/gfx11_gb_reg.h -@@ -36,10 +36,12 @@ - // - // Make sure the necessary endian defines are there. - // --#if defined(LITTLEENDIAN_CPU) --#elif defined(BIGENDIAN_CPU) --#else --#error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined" -+#include "util/u_endian.h" -+ -+#if UTIL_ARCH_LITTLE_ENDIAN -+#define LITTLEENDIAN_CPU -+#elif UTIL_ARCH_BIG_ENDIAN -+#define BIGENDIAN_CPU - #endif - - union GB_ADDR_CONFIG_GFX11 diff --git a/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_gfx9_gfx9_gb_reg_h b/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_gfx9_gfx9_gb_reg_h deleted file mode 100644 index e63d4d1..0000000 --- a/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_gfx9_gfx9_gb_reg_h +++ /dev/null @@ -1,20 +0,0 @@ -Index: src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h ---- src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h.orig -+++ src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h -@@ -36,10 +36,12 @@ - // - // Make sure the necessary endian defines are there. - // --#if defined(LITTLEENDIAN_CPU) --#elif defined(BIGENDIAN_CPU) --#else --#error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined" -+#include "util/u_endian.h" -+ -+#if UTIL_ARCH_LITTLE_ENDIAN -+#define LITTLEENDIAN_CPU -+#elif UTIL_ARCH_BIG_ENDIAN -+#define BIGENDIAN_CPU - #endif - - union GB_ADDR_CONFIG_GFX9 { diff --git a/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_r800_si_gb_reg_h b/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_r800_si_gb_reg_h deleted file mode 100644 index 1634f6e..0000000 --- a/graphics/mesa/patches/patch-src_amd_addrlib_src_chip_r800_si_gb_reg_h +++ /dev/null @@ -1,20 +0,0 @@ -Index: src/amd/addrlib/src/chip/r800/si_gb_reg.h ---- src/amd/addrlib/src/chip/r800/si_gb_reg.h.orig -+++ src/amd/addrlib/src/chip/r800/si_gb_reg.h -@@ -37,10 +37,12 @@ - // - // Make sure the necessary endian defines are there. - // --#if defined(LITTLEENDIAN_CPU) --#elif defined(BIGENDIAN_CPU) --#else --#error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined" -+#include "util/u_endian.h" -+ -+#if UTIL_ARCH_LITTLE_ENDIAN -+#define LITTLEENDIAN_CPU -+#elif UTIL_ARCH_BIG_ENDIAN -+#define BIGENDIAN_CPU - #endif - - /* diff --git a/graphics/mesa/patches/patch-src_gallium_auxiliary_rtasm_rtasm_execmem_c b/graphics/mesa/patches/patch-src_gallium_auxiliary_rtasm_rtasm_execmem_c deleted file mode 100644 index db2f222..0000000 --- a/graphics/mesa/patches/patch-src_gallium_auxiliary_rtasm_rtasm_execmem_c +++ /dev/null @@ -1,32 +0,0 @@ -Index: src/gallium/auxiliary/rtasm/rtasm_execmem.c ---- src/gallium/auxiliary/rtasm/rtasm_execmem.c.orig -+++ src/gallium/auxiliary/rtasm/rtasm_execmem.c -@@ -66,9 +66,19 @@ static struct mem_block *exec_heap = NULL; - static unsigned char *exec_mem = NULL; - - -+#ifdef __OpenBSD__ -+ - static int - init_heap(void) - { -+ return 0; -+} -+ -+#else -+ -+static int -+init_heap(void) -+{ - if (!exec_heap) - exec_heap = u_mmInit( 0, EXEC_HEAP_SIZE ); - -@@ -79,6 +89,8 @@ init_heap(void) - - return (exec_mem != MAP_FAILED); - } -+ -+#endif - - - void * diff --git a/graphics/mesa/patches/patch-src_gbm_backends_dri_gbm_dri_c b/graphics/mesa/patches/patch-src_gbm_backends_dri_gbm_dri_c deleted file mode 100644 index afb0edf..0000000 --- a/graphics/mesa/patches/patch-src_gbm_backends_dri_gbm_dri_c +++ /dev/null @@ -1,15 +0,0 @@ -Index: src/gbm/backends/dri/gbm_dri.c ---- src/gbm/backends/dri/gbm_dri.c.orig -+++ src/gbm/backends/dri/gbm_dri.c -@@ -349,7 +349,11 @@ dri_open_driver(struct gbm_dri_device *dri) - /* XXX: Library name differs on per platforms basis. Update this as - * osx/cygwin/windows/bsd gets support for GBM.. - */ -+#ifdef __OpenBSD__ -+ dlopen("libglapi.so", RTLD_LAZY | RTLD_GLOBAL); -+#else - dlopen("libglapi.so.0", RTLD_LAZY | RTLD_GLOBAL); -+#endif - - static const char *search_path_vars[] = { - /* Read GBM_DRIVERS_PATH first for compatibility, but LIBGL_DRIVERS_PATH diff --git a/graphics/mesa/patches/patch-src_glx_dri_common_c b/graphics/mesa/patches/patch-src_glx_dri_common_c deleted file mode 100644 index ab08f47..0000000 --- a/graphics/mesa/patches/patch-src_glx_dri_common_c +++ /dev/null @@ -1,15 +0,0 @@ -Index: src/glx/dri_common.c ---- src/glx/dri_common.c.orig -+++ src/glx/dri_common.c -@@ -52,7 +52,11 @@ - #endif - - #ifndef GL_LIB_NAME -+#ifdef __OpenBSD__ -+#define GL_LIB_NAME "libGL.so" -+#else - #define GL_LIB_NAME "libGL.so.1" -+#endif - #endif - - /** diff --git a/graphics/mesa/patches/patch-src_glx_meson_build b/graphics/mesa/patches/patch-src_glx_meson_build deleted file mode 100644 index 437f498..0000000 --- a/graphics/mesa/patches/patch-src_glx_meson_build +++ /dev/null @@ -1,27 +0,0 @@ -Index: src/glx/meson.build ---- src/glx/meson.build.orig -+++ src/glx/meson.build -@@ -122,12 +122,22 @@ else - ) - endif - -+if host_machine.system() != 'openbsd' -+ gl_lib_define = [ -+ '-DGL_LIB_NAME="lib@0@.so.@1@"'.format(gl_lib_name, gl_lib_version.split('.')[0]), -+ ] -+else -+ gl_lib_define = [ -+ '-DGL_LIB_NAME="lib@0@.so"'.format(gl_lib_name ) -+ ] -+endif -+ - libglx = static_library( - 'glx', - [files_libglx, glx_generated], - include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glapi, inc_loader], - c_args : [ -- '-DGL_LIB_NAME="lib@0@.so.@1@"'.format(gl_lib_name, gl_lib_version.split('.')[0]), -+ gl_lib_define, - ], - gnu_symbol_visibility : 'hidden', - link_with : [ diff --git a/graphics/mesa/patches/patch-src_loader_loader_c b/graphics/mesa/patches/patch-src_loader_loader_c deleted file mode 100644 index c917f92..0000000 --- a/graphics/mesa/patches/patch-src_loader_loader_c +++ /dev/null @@ -1,21 +0,0 @@ -Index: src/loader/loader.c ---- src/loader/loader.c.orig -+++ src/loader/loader.c -@@ -561,7 +561,7 @@ loader_get_driver_for_fd(int fd) - * user's problem, but this allows vc4 simulator to run on an i965 host, - * and may be useful for some touch testing of i915 on an i965 host. - */ -- if (geteuid() == getuid()) { -+ if (issetugid() == 0 && geteuid() == getuid()) { - const char *override = os_get_option("MESA_LOADER_DRIVER_OVERRIDE"); - if (override) - return strdup(override); -@@ -625,7 +625,7 @@ loader_open_driver_lib(const char *driver_name, - const char *search_paths, *next, *end; - - search_paths = NULL; -- if (geteuid() == getuid() && search_path_vars) { -+ if (issetugid() == 0 && geteuid() == getuid() && search_path_vars) { - for (int i = 0; search_path_vars[i] != NULL; i++) { - search_paths = getenv(search_path_vars[i]); - if (search_paths) diff --git a/graphics/mesa/patches/patch-src_mapi_u_execmem_c b/graphics/mesa/patches/patch-src_mapi_u_execmem_c deleted file mode 100644 index c2466f0..0000000 --- a/graphics/mesa/patches/patch-src_mapi_u_execmem_c +++ /dev/null @@ -1,20 +0,0 @@ -Index: src/mapi/u_execmem.c ---- src/mapi/u_execmem.c.orig -+++ src/mapi/u_execmem.c -@@ -45,8 +45,15 @@ static unsigned int head = 0; - - static unsigned char *exec_mem = (unsigned char *)0; - -+#if defined(__OpenBSD__) - --#if defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__sun) || defined(__HAIKU__) -+static int -+init_map(void) -+{ -+ return 0; -+} -+ -+#elif defined(__linux__) || defined(__NetBSD__) || defined(__sun) || defined(__HAIKU__) - - #include <unistd.h> - #include <sys/mman.h> diff --git a/graphics/mesa/patches/patch-src_mesa_main_execmem_c b/graphics/mesa/patches/patch-src_mesa_main_execmem_c deleted file mode 100644 index d5f8f17..0000000 --- a/graphics/mesa/patches/patch-src_mesa_main_execmem_c +++ /dev/null @@ -1,172 +0,0 @@ -Index: src/mesa/main/execmem.c ---- src/mesa/main/execmem.c.orig -+++ src/mesa/main/execmem.c -@@ -0,0 +1,168 @@ -+/* -+ * Mesa 3-D graphics library -+ * -+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included -+ * in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+ -+/** -+ * \file execmem.c -+ * Functions for allocating executable memory. -+ * -+ * \author Keith Whitwell -+ */ -+ -+ -+#include <stdio.h> -+#include "main/glheader.h" -+#include "execmem.h" -+#include "c11/threads.h" -+ -+ -+#if defined(__OpenBSD__) -+ -+void * -+_mesa_exec_malloc(GLuint size) -+{ -+ return NULL; -+} -+ -+void -+_mesa_exec_free(void *addr) -+{ -+} -+ -+#elif defined(__linux__) || defined(__NetBSD__) || defined(__sun) || defined(__HAIKU__) -+ -+/* -+ * Allocate a large block of memory which can hold code then dole it out -+ * in pieces by means of the generic memory manager code. -+*/ -+ -+#include <unistd.h> -+#include <sys/mman.h> -+#include "util/u_mm.h" -+ -+#ifdef MESA_SELINUX -+#include <selinux/selinux.h> -+#endif -+ -+ -+#ifndef MAP_ANONYMOUS -+#define MAP_ANONYMOUS MAP_ANON -+#endif -+ -+ -+#define EXEC_HEAP_SIZE (10*1024*1024) -+ -+static mtx_t exec_mutex = _MTX_INITIALIZER_NP; -+ -+static struct mem_block *exec_heap = NULL; -+static unsigned char *exec_mem = NULL; -+ -+ -+static int -+init_heap(void) -+{ -+#ifdef MESA_SELINUX -+ if (is_selinux_enabled()) { -+ if (!security_get_boolean_active("allow_execmem") || -+ !security_get_boolean_pending("allow_execmem")) -+ return 0; -+ } -+#endif -+ -+ if (!exec_heap) -+ exec_heap = u_mmInit( 0, EXEC_HEAP_SIZE ); -+ -+ if (!exec_mem) -+ exec_mem = mmap(NULL, EXEC_HEAP_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE, -+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); -+ -+ return (exec_mem != MAP_FAILED); -+} -+ -+ -+void * -+_mesa_exec_malloc(unsigned size) -+{ -+ struct mem_block *block = NULL; -+ void *addr = NULL; -+ -+ mtx_lock(&exec_mutex); -+ -+ if (!init_heap()) -+ goto bail; -+ -+ if (exec_heap) { -+ size = (size + 31) & ~31; -+ block = u_mmAllocMem(exec_heap, size, 5, 0); -+ } -+ -+ if (block) -+ addr = exec_mem + block->ofs; -+ else -+ printf("_mesa_exec_malloc failed\n"); -+ -+bail: -+ mtx_unlock(&exec_mutex); -+ -+ return addr; -+} -+ -+ -+void -+_mesa_exec_free(void *addr) -+{ -+ mtx_lock(&exec_mutex); -+ -+ if (exec_heap) { -+ struct mem_block *block = u_mmFindBlock(exec_heap, (unsigned char *)addr - exec_mem); -+ -+ if (block) -+ u_mmFreeMem(block); -+ } -+ -+ mtx_unlock(&exec_mutex); -+} -+ -+ -+#else -+ -+/* -+ * Just use regular memory. -+ */ -+ -+void * -+_mesa_exec_malloc(unsigned size) -+{ -+ return malloc( size ); -+} -+ -+ -+void -+_mesa_exec_free(void *addr) -+{ -+ free(addr); -+} -+ -+ -+#endif diff --git a/graphics/mesa/patches/patch-src_util_build_id_c b/graphics/mesa/patches/patch-src_util_build_id_c deleted file mode 100644 index 3c778b9..0000000 --- a/graphics/mesa/patches/patch-src_util_build_id_c +++ /dev/null @@ -1,12 +0,0 @@ -Index: src/util/build_id.c ---- src/util/build_id.c.orig -+++ src/util/build_id.c -@@ -21,7 +21,7 @@ - * IN THE SOFTWARE. - */ - --#ifdef HAVE_DL_ITERATE_PHDR -+#if defined(HAVE_DL_ITERATE_PHDR) && defined(HAVE_LD_BUILD_ID) - #include <dlfcn.h> - #include <link.h> - #include <stddef.h> diff --git a/graphics/mesa/patches/patch-src_util_build_id_h b/graphics/mesa/patches/patch-src_util_build_id_h deleted file mode 100644 index 582ca9b..0000000 --- a/graphics/mesa/patches/patch-src_util_build_id_h +++ /dev/null @@ -1,12 +0,0 @@ -Index: src/util/build_id.h ---- src/util/build_id.h.orig -+++ src/util/build_id.h -@@ -28,7 +28,7 @@ - extern "C" { - #endif - --#ifdef HAVE_DL_ITERATE_PHDR -+#if defined(HAVE_DL_ITERATE_PHDR) && defined(HAVE_LD_BUILD_ID) - - #include <stdint.h> - diff --git a/graphics/mesa/patches/patch-src_util_compiler_h b/graphics/mesa/patches/patch-src_util_compiler_h deleted file mode 100644 index 17385bc..0000000 --- a/graphics/mesa/patches/patch-src_util_compiler_h +++ /dev/null @@ -1,37 +0,0 @@ -Index: src/util/compiler.h ---- src/util/compiler.h.orig -+++ src/util/compiler.h -@@ -45,28 +45,16 @@ - * Try to use a runtime test instead. - * For now, only used by some DRI hardware drivers for color/texel packing. - */ --#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN --#if defined(__linux__) --#include <byteswap.h> --#define CPU_TO_LE32( x ) bswap_32( x ) --#elif defined(__APPLE__) --#include <CoreFoundation/CFByteOrder.h> --#define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x ) --#elif defined(__OpenBSD__) --#include <sys/types.h> -+#ifdef __OpenBSD__ -+#include <endian.h> - #define CPU_TO_LE32( x ) htole32( x ) --#else /*__linux__ */ --#include <sys/endian.h> --#define CPU_TO_LE32( x ) bswap32( x ) --#endif /*__linux__*/ -+#define LE32_TO_CPU( x ) letoh32( x ) -+#if BYTE_ORDER == BIG_ENDIAN - #define MESA_BIG_ENDIAN 1 - #else --#define CPU_TO_LE32( x ) ( x ) - #define MESA_LITTLE_ENDIAN 1 - #endif --#define LE32_TO_CPU( x ) CPU_TO_LE32( x ) -- -- -+#endif /* __OpenBSD__ */ - - #define IEEE_ONE 0x3f800000 - diff --git a/graphics/mesa/patches/patch-src_util_disk_cache_c b/graphics/mesa/patches/patch-src_util_disk_cache_c deleted file mode 100644 index 785798e..0000000 --- a/graphics/mesa/patches/patch-src_util_disk_cache_c +++ /dev/null @@ -1,15 +0,0 @@ -Index: src/util/disk_cache.c ---- src/util/disk_cache.c.orig -+++ src/util/disk_cache.c -@@ -80,6 +80,11 @@ disk_cache_create(const char *gpu_name, const char *dr - uint8_t cache_version = CACHE_VERSION; - size_t cv_size = sizeof(cache_version); - -+#ifdef __OpenBSD__ -+ /* default to no disk shader cache to avoid pledge violations in chromium */ -+ return NULL; -+#endif -+ - if (!disk_cache_enabled()) - return NULL; - diff --git a/graphics/mesa/patches/patch-src_util_disk_cache_h b/graphics/mesa/patches/patch-src_util_disk_cache_h deleted file mode 100644 index b4c437a..0000000 --- a/graphics/mesa/patches/patch-src_util_disk_cache_h +++ /dev/null @@ -1,12 +0,0 @@ -Index: src/util/disk_cache.h ---- src/util/disk_cache.h.orig -+++ src/util/disk_cache.h -@@ -123,7 +123,7 @@ disk_cache_get_function_identifier(void *ptr, struct m - { - uint32_t timestamp; - --#ifdef HAVE_DL_ITERATE_PHDR -+#if defined(HAVE_DL_ITERATE_PHDR) && defined(HAVE_LD_BUILD_ID) - const struct build_id_note *note = NULL; - if ((note = build_id_find_nhdr_for_addr(ptr))) { - _mesa_sha1_update(ctx, build_id_data(note), build_id_length(note)); diff --git a/graphics/mesa/patches/patch-src_util_rand_xor_c b/graphics/mesa/patches/patch-src_util_rand_xor_c deleted file mode 100644 index 97480e8..0000000 --- a/graphics/mesa/patches/patch-src_util_rand_xor_c +++ /dev/null @@ -1,23 +0,0 @@ -Index: src/util/rand_xor.c ---- src/util/rand_xor.c.orig -+++ src/util/rand_xor.c -@@ -33,6 +33,7 @@ - #endif - - #include <time.h> -+#include <stdlib.h> - - #include "rand_xor.h" - -@@ -68,7 +69,10 @@ s_rand_xorshift128plus(uint64_t seed[2], bool randomis - #if !DETECT_OS_WINDOWS - size_t seed_size = sizeof(uint64_t) * 2; - --#if defined(HAVE_GETRANDOM) -+#ifdef HAVE_ARC4RANDOM_BUF -+ arc4random_buf(seed, seed_size); -+ return; -+#elif defined(HAVE_GETRANDOM) - ssize_t ret = getrandom(seed, seed_size, GRND_NONBLOCK); - if (ret == seed_size) - return; diff --git a/graphics/mesa/patches/patch-src_util_u_cpu_detect_c b/graphics/mesa/patches/patch-src_util_u_cpu_detect_c deleted file mode 100644 index 4eedf07..0000000 --- a/graphics/mesa/patches/patch-src_util_u_cpu_detect_c +++ /dev/null @@ -1,17 +0,0 @@ -Index: src/util/u_cpu_detect.c ---- src/util/u_cpu_detect.c.orig -+++ src/util/u_cpu_detect.c -@@ -224,10 +224,13 @@ check_os_altivec_support(void) - - util_cpu_caps.has_altivec = 1; - -+/* no support for POWER7 VSX instructions in binutils 2.17 */ -+#ifndef __OpenBSD__ - if (enable_vsx) { - __asm __volatile("xxland %vs0, %vs0, %vs0"); - util_cpu_caps.has_vsx = 1; - } -+#endif - signal(SIGILL, SIG_DFL); - } else { - util_cpu_caps.has_altivec = 0; diff --git a/graphics/mesa/patches/patch-src_util_xmlconfig_h b/graphics/mesa/patches/patch-src_util_xmlconfig_h deleted file mode 100644 index c67594b..0000000 --- a/graphics/mesa/patches/patch-src_util_xmlconfig_h +++ /dev/null @@ -1,17 +0,0 @@ -Index: src/util/xmlconfig.h ---- src/util/xmlconfig.h.orig -+++ src/util/xmlconfig.h -@@ -39,7 +39,12 @@ - extern "C" { - #endif - --#if defined(ANDROID) || defined(_WIN32) -+/* -+ * Opening drirc files is disabled by default so sandboxed -+ * browser processes with OpenGL contexts can drop the ability -+ * to read files. -+ */ -+#if defined(ANDROID) || defined(_WIN32) || defined(__OpenBSD__) - #define WITH_XMLCONFIG 0 - #else - #define WITH_XMLCONFIG 1 diff --git a/graphics/mesa/patches/patch-src_vulkan_wsi_wsi_common_drm_c b/graphics/mesa/patches/patch-src_vulkan_wsi_wsi_common_drm_c deleted file mode 100644 index 21f1b3c..0000000 --- a/graphics/mesa/patches/patch-src_vulkan_wsi_wsi_common_drm_c +++ /dev/null @@ -1,19 +0,0 @@ -Index: src/vulkan/wsi/wsi_common_drm.c ---- src/vulkan/wsi/wsi_common_drm.c.orig -+++ src/vulkan/wsi/wsi_common_drm.c -@@ -32,8 +32,15 @@ - #include "drm-uapi/drm_fourcc.h" - - #include <errno.h> -+ -+#ifdef __linux__ - #include <linux/dma-buf.h> - #include <linux/sync_file.h> -+#else -+#define DMA_BUF_SYNC_RW 1 -+#define DMA_BUF_BASE 'b' -+#endif -+ - #include <time.h> - #include <unistd.h> - #include <stdlib.h> |