pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
add vulkan-headers and vulkan-loader to pkgsrc-wip
Module Name: pkgsrc-wip
Committed By: Niclas Rosenvik <nros%NetBSD.org@localhost>
Pushed By: nros
Date: Mon Dec 2 19:14:47 2019 +0000
Changeset: f8b1b405481f6da1a6926944da50881d71e1bcba
Modified Files:
Makefile
Added Files:
vulkan-headers/DESCR
vulkan-headers/Makefile
vulkan-headers/PLIST
vulkan-headers/buildlink3.mk
vulkan-headers/distinfo
vulkan-headers/patches/patch-CMakeLists.txt
vulkan-headers/patches/patch-include_vulkan_vulkan.hpp
vulkan-loader/DESCR
vulkan-loader/Makefile
vulkan-loader/PLIST
vulkan-loader/buildlink3.mk
vulkan-loader/distinfo
vulkan-loader/patches/patch-CMakeLists.txt
vulkan-loader/patches/patch-loader_CMakeLists.txt
vulkan-loader/patches/patch-loader_loader.c
vulkan-loader/patches/patch-loader_vk__loader__platform.h
vulkan-loader/patches/patch-tests_test__common.h
Log Message:
add vulkan-headers and vulkan-loader to pkgsrc-wip
vulkan is a 3d graphics api from the khronos group.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f8b1b405481f6da1a6926944da50881d71e1bcba
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 2 +
vulkan-headers/DESCR | 1 +
vulkan-headers/Makefile | 22 ++++++++
vulkan-headers/PLIST | 29 +++++++++++
vulkan-headers/buildlink3.mk | 17 +++++++
vulkan-headers/distinfo | 8 +++
vulkan-headers/patches/patch-CMakeLists.txt | 15 ++++++
.../patches/patch-include_vulkan_vulkan.hpp | 13 +++++
vulkan-loader/DESCR | 1 +
vulkan-loader/Makefile | 36 ++++++++++++++
vulkan-loader/PLIST | 5 ++
vulkan-loader/buildlink3.mk | 23 +++++++++
vulkan-loader/distinfo | 11 ++++
vulkan-loader/patches/patch-CMakeLists.txt | 37 ++++++++++++++
vulkan-loader/patches/patch-loader_CMakeLists.txt | 58 ++++++++++++++++++++++
vulkan-loader/patches/patch-loader_loader.c | 31 ++++++++++++
.../patches/patch-loader_vk__loader__platform.h | 13 +++++
vulkan-loader/patches/patch-tests_test__common.h | 13 +++++
18 files changed, 335 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 01030f0786..1b810ceed7 100644
--- a/Makefile
+++ b/Makefile
@@ -4889,6 +4889,8 @@ SUBDIR+= vpr
SUBDIR+= vreng
SUBDIR+= vsearch
SUBDIR+= vte
+SUBDIR+= vulkan-headers
+SUBDIR+= vulkan-loader
SUBDIR+= wackamole
SUBDIR+= waffle
SUBDIR+= wanderer
diff --git a/vulkan-headers/DESCR b/vulkan-headers/DESCR
new file mode 100644
index 0000000000..f63aa02396
--- /dev/null
+++ b/vulkan-headers/DESCR
@@ -0,0 +1 @@
+Headers for the Vulkan graphics API.
diff --git a/vulkan-headers/Makefile b/vulkan-headers/Makefile
new file mode 100644
index 0000000000..069932f3d0
--- /dev/null
+++ b/vulkan-headers/Makefile
@@ -0,0 +1,22 @@
+# $NetBSD$
+
+GITHUB_PROJECT= Vulkan-Headers
+DISTNAME= sdk-1.1.126.0
+PKGNAME= ${GITHUB_PROJECT:tl}-${DISTNAME:S/sdk-//}
+CATEGORIES= graphics
+MASTER_SITES= ${MASTER_SITE_GITHUB:=KhronosGroup/}
+DIST_SUBDIR= ${GITHUB_PROJECT}
+GITHUB_TAG= ${DISTNAME}
+EXTRACT_USING= bsdtar
+
+MAINTAINER= nros%NetBSD.org@localhost
+HOMEPAGE= https://github.com/KhronosGroup/Vulkan-Headers/
+COMMENT= Headers for Vulkan Graphics API
+LICENSE= apache-2.0
+
+USE_CMAKE= yes
+
+REPLACE_PYTHON= registry/*.py
+
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/vulkan-headers/PLIST b/vulkan-headers/PLIST
new file mode 100644
index 0000000000..dc24d90656
--- /dev/null
+++ b/vulkan-headers/PLIST
@@ -0,0 +1,29 @@
+@comment $NetBSD$
+include/vulkan/vk_icd.h
+include/vulkan/vk_layer.h
+include/vulkan/vk_platform.h
+include/vulkan/vk_sdk_platform.h
+include/vulkan/vulkan.h
+include/vulkan/vulkan.hpp
+include/vulkan/vulkan_android.h
+include/vulkan/vulkan_core.h
+include/vulkan/vulkan_fuchsia.h
+include/vulkan/vulkan_ggp.h
+include/vulkan/vulkan_ios.h
+include/vulkan/vulkan_macos.h
+include/vulkan/vulkan_metal.h
+include/vulkan/vulkan_vi.h
+include/vulkan/vulkan_wayland.h
+include/vulkan/vulkan_win32.h
+include/vulkan/vulkan_xcb.h
+include/vulkan/vulkan_xlib.h
+include/vulkan/vulkan_xlib_xrandr.h
+share/vulkan/registry/cgenerator.py
+share/vulkan/registry/conventions.py
+share/vulkan/registry/generator.py
+share/vulkan/registry/genvk.py
+share/vulkan/registry/reg.py
+share/vulkan/registry/spec_tools/util.py
+share/vulkan/registry/validusage.json
+share/vulkan/registry/vk.xml
+share/vulkan/registry/vkconventions.py
diff --git a/vulkan-headers/buildlink3.mk b/vulkan-headers/buildlink3.mk
new file mode 100644
index 0000000000..d17f1dd3c2
--- /dev/null
+++ b/vulkan-headers/buildlink3.mk
@@ -0,0 +1,17 @@
+# $NetBSD$
+
+BUILDLINK_TREE+= vulkan-headers
+
+.if !defined(VULKAN_HEADERS_BUILDLINK3_MK)
+VULKAN_HEADERS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.vulkan-headers+= vulkan-headers>=1.1.126.0
+BUILDLINK_PKGSRCDIR.vulkan-headers= ../../wip/vulkan-headers
+BUILDLINK_DEPMETHOD.vulkan-headers?= build
+.endif # VULKAN_HEADERS_BUILDLINK3_MK
+
+.include "../../x11/liboldXrandr/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libxcb/buildlink3.mk"
+
+BUILDLINK_TREE+= -vulkan-headers
diff --git a/vulkan-headers/distinfo b/vulkan-headers/distinfo
new file mode 100644
index 0000000000..65ef4e2e2f
--- /dev/null
+++ b/vulkan-headers/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (Vulkan-Headers/sdk-1.1.126.0.tar.gz) = a68e99a5eb1f6c4de97877718dba0fbeeccb07ff
+RMD160 (Vulkan-Headers/sdk-1.1.126.0.tar.gz) = 9656c621304750488da54a1dd8ebc4953d35023c
+SHA512 (Vulkan-Headers/sdk-1.1.126.0.tar.gz) = b050e0d17ad7b143c59a401a4a75ef97afdbc94f1cbfd4571ce1b83380927879cb05b7b62b81c7da8b501ebe0fbe70dc3acacaab3656da465b4bc06559266d3f
+Size (Vulkan-Headers/sdk-1.1.126.0.tar.gz) = 665900 bytes
+SHA1 (patch-CMakeLists.txt) = b5b2b302c55bd1998a15ee7416da2037bf04a52f
+SHA1 (patch-include_vulkan_vulkan.hpp) = 70ba7f6bde7793be8dbe4fb1a9b0dbe738498c8d
diff --git a/vulkan-headers/patches/patch-CMakeLists.txt b/vulkan-headers/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..79110495cc
--- /dev/null
+++ b/vulkan-headers/patches/patch-CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+* don't install pkgsrc generated files
+--- CMakeLists.txt.orig 2019-12-02 18:11:46.793667657 +0000
++++ CMakeLists.txt
+@@ -45,8 +45,8 @@ add_library(Vulkan-Registry INTERFACE)
+ target_include_directories(Vulkan-Registry INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/registry")
+ add_library(Vulkan::Registry ALIAS Vulkan-Registry)
+
+-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION ${CMAKE_INSTALL_DATADIR}/vulkan)
++install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN "*.orig" EXCLUDE)
++install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION ${CMAKE_INSTALL_DATADIR}/vulkan PATTERN "*.orig" EXCLUDE)
+
+ # uninstall target
+ if(NOT TARGET uninstall)
diff --git a/vulkan-headers/patches/patch-include_vulkan_vulkan.hpp b/vulkan-headers/patches/patch-include_vulkan_vulkan.hpp
new file mode 100644
index 0000000000..10a2fc004d
--- /dev/null
+++ b/vulkan-headers/patches/patch-include_vulkan_vulkan.hpp
@@ -0,0 +1,13 @@
+$NetBSD$
+* add NetBSD support
+--- include/vulkan/vulkan.hpp.orig 2019-12-02 17:52:14.520273368 +0000
++++ include/vulkan/vulkan.hpp
+@@ -56,7 +56,7 @@
+ # define VULKAN_HPP_ASSERT assert
+ #endif
+
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined(__linux__) || defined(__APPLE__) || defined(__NetBSD__)
+ # include <dlfcn.h>
+ #endif
+
diff --git a/vulkan-loader/DESCR b/vulkan-loader/DESCR
new file mode 100644
index 0000000000..3565a0e51c
--- /dev/null
+++ b/vulkan-loader/DESCR
@@ -0,0 +1 @@
+Loader for Vulkan graphics api.
diff --git a/vulkan-loader/Makefile b/vulkan-loader/Makefile
new file mode 100644
index 0000000000..c229548208
--- /dev/null
+++ b/vulkan-loader/Makefile
@@ -0,0 +1,36 @@
+# $NetBSD$
+
+GITHUB_PROJECT= Vulkan-Loader
+DISTNAME= sdk-1.1.126.0
+PKGNAME= ${GITHUB_PROJECT:tl}-${DISTNAME:S/sdk-//}
+CATEGORIES= graphics
+MASTER_SITES= ${MASTER_SITE_GITHUB:=KhronosGroup/}
+DIST_SUBDIR= ${GITHUB_PROJECT}
+GITHUB_TAG= ${DISTNAME}
+EXTRACT_USING= bsdtar
+
+MAINTAINER= nros%NetBSD.org@localhost
+HOMEPAGE= https://github.com/KhronosGroup/Vulkan-Loader/
+COMMENT= Loader for Vulkan Graphics API
+LICENSE= apache-2.0
+
+USE_TOOLS+= pkg-config
+USE_CMAKE= yes
+USE_LANGUAGES= c c++
+
+# wayland support missing in pkgsrc
+CMAKE_ARGS+= -DBUILD_WSI_WAYLAND_SUPPORT=OFF
+CMAKE_ARGS+= -DBUILD_TESTS=ON
+
+PKGCONFIG_OVERRIDE+=loader/vulkan.pc.in
+
+.include "../../devel/googletest/buildlink3.mk"
+.include "../../lang/python/tool.mk"
+.include "../../sysutils/libpciaccess/buildlink3.mk"
+.include "../../wip/vulkan-headers/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libxcb/buildlink3.mk"
+.include "../../x11/libXext/buildlink3.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/vulkan-loader/PLIST b/vulkan-loader/PLIST
new file mode 100644
index 0000000000..043ff15388
--- /dev/null
+++ b/vulkan-loader/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD$
+lib/libvulkan.so
+lib/libvulkan.so.1
+lib/libvulkan.so.1.1.126
+lib/pkgconfig/vulkan.pc
diff --git a/vulkan-loader/buildlink3.mk b/vulkan-loader/buildlink3.mk
new file mode 100644
index 0000000000..97b80b0747
--- /dev/null
+++ b/vulkan-loader/buildlink3.mk
@@ -0,0 +1,23 @@
+# $NetBSD$
+#
+
+BUILDLINK_TREE+= vulkan-loader
+
+.if !defined(VULKAN_LOADER_BUILDLINK3_MK)
+VULKAN_LOADER_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.vulkan-loader+= vulkan-loader>=1.1.126.0
+BUILDLINK_PKGSRCDIR.vulkan-loader?= ../../wip/vulkan-loader
+
+# XXX
+# XXX Uncomment and keep only the buildlink3 lines below which are directly
+# XXX needed for dependencies to compile, link, and run. If this package
+# XXX provides a wrappered API or otherwise does not expose the APIs of the
+# XXX buildlink3 lines below to dependencies, remove them.
+# XXX
+.include "../../wip/vulkan-headers/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libxcb/buildlink3.mk"
+.endif # VULKAN_LOADER_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -vulkan-loader
diff --git a/vulkan-loader/distinfo b/vulkan-loader/distinfo
new file mode 100644
index 0000000000..0783d9cc71
--- /dev/null
+++ b/vulkan-loader/distinfo
@@ -0,0 +1,11 @@
+$NetBSD$
+
+SHA1 (Vulkan-Loader/sdk-1.1.126.0.tar.gz) = 899a419aa4330f2093366e8a10ddba4ae325afa9
+RMD160 (Vulkan-Loader/sdk-1.1.126.0.tar.gz) = 7e6f4aa16996f7f4c4901101888c3f3fccbe591d
+SHA512 (Vulkan-Loader/sdk-1.1.126.0.tar.gz) = 8712542b722f786e818f0bf7ded45a1a5153f31d64e8481816032a332b654b29fc198dd3c2a4845b0b51c9e5dccb99fdf2d9e4d068972277109f007174f72c3d
+Size (Vulkan-Loader/sdk-1.1.126.0.tar.gz) = 1399019 bytes
+SHA1 (patch-CMakeLists.txt) = b7d2ca7074327dbebe99d6b6d1fad4805c564858
+SHA1 (patch-loader_CMakeLists.txt) = f61a39ee9b97858931474f20ec1b05d33ef0d231
+SHA1 (patch-loader_loader.c) = 1b5a4d1c9591690944b0e23076c06dba92d36773
+SHA1 (patch-loader_vk__loader__platform.h) = 4f71c25fc8b9b1a5ce622a402549874907f58fe3
+SHA1 (patch-tests_test__common.h) = 8a1a730027929791b7bbc9ffc0172f0fc8aafb73
diff --git a/vulkan-loader/patches/patch-CMakeLists.txt b/vulkan-loader/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..6654ae696d
--- /dev/null
+++ b/vulkan-loader/patches/patch-CMakeLists.txt
@@ -0,0 +1,37 @@
+$NetBSD$
+* Use cmakes way of setting language standards.
+--- CMakeLists.txt.orig 2019-10-28 17:29:17.000000000 +0000
++++ CMakeLists.txt
+@@ -132,6 +132,12 @@ else()
+ option(BUILD_TESTS "Build Tests" OFF)
+ endif()
+
++set(CMAKE_C_STANDARD 99)
++set(CMAKE_C_STANDARD_REQUIRED ON)
++
++set(CMAKE_CXX_STANDARD 11)
++set(CMAKE_CXX_STANDARD_REQUIRED ON)
++
+ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
+ set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
+ set(COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -fno-strict-aliasing -fno-builtin-memcmp")
+@@ -153,8 +159,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_CO
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -std=c++11 -fno-rtti")
+ # clang (not clang-cl) or gcc
+ else()
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ${COMMON_COMPILE_FLAGS}")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti")
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_COMPILE_FLAGS}")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
+ endif()
+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILE_FLAGS}")
+@@ -216,7 +222,7 @@ if(BUILD_LOADER)
+ add_subdirectory(loader)
+ endif()
+
+-add_subdirectory(external)
++#add_subdirectory(external)
+ if(BUILD_TESTS)
+ add_subdirectory(tests)
+ endif()
diff --git a/vulkan-loader/patches/patch-loader_CMakeLists.txt b/vulkan-loader/patches/patch-loader_CMakeLists.txt
new file mode 100644
index 0000000000..65f318f81a
--- /dev/null
+++ b/vulkan-loader/patches/patch-loader_CMakeLists.txt
@@ -0,0 +1,58 @@
+$NetBSD$
+* use CMake findthreads instead of hardcoding -lpthread
+* install pkg-config file on mac
+* set the right libs in Libs.private
+--- loader/CMakeLists.txt.orig 2019-10-28 17:29:17.000000000 +0000
++++ loader/CMakeLists.txt
+@@ -21,6 +21,10 @@ include_directories(${CMAKE_CURRENT_SOUR
+ include(CheckFunctionExists)
+ include(CheckIncludeFile)
+
++set(CMAKE_THREAD_PREFER_PTHREAD ON)
++set(THREADS_PREFER_PTHREAD_FLAG ON)
++find_package(Threads REQUIRED)
++
+ check_function_exists(secure_getenv HAVE_SECURE_GETENV)
+ check_function_exists(__secure_getenv HAVE___SECURE_GETENV)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/loader_cmake_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/loader_cmake_config.h)
+@@ -236,7 +240,7 @@ else()
+ "1"
+ VERSION
+ "${VulkanHeaders_VERSION_MAJOR}.${VulkanHeaders_VERSION_MINOR}.${VulkanHeaders_VERSION_PATCH}")
+- target_link_libraries(vulkan ${CMAKE_DL_LIBS} pthread m)
++ target_link_libraries(vulkan ${CMAKE_DL_LIBS} Threads::Threads m)
+ target_link_libraries(vulkan Vulkan::Headers)
+
+ if(APPLE)
+@@ -264,7 +268,7 @@ else()
+ add_library(vulkan-framework SHARED ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS} ${FRAMEWORK_HEADERS})
+ add_dependencies(vulkan-framework loader_asm_gen_files)
+ target_compile_definitions(vulkan-framework PUBLIC LOADER_DYNAMIC_LIB)
+- target_link_libraries(vulkan-framework -ldl -lpthread -lm "-framework CoreFoundation")
++ target_link_libraries(vulkan-framework -ldl Threads::Threads -lm "-framework CoreFoundation")
+ target_link_libraries(vulkan-framework Vulkan::Headers)
+
+ # The FRAMEWORK_VERSION needs to be "A" here so that Xcode code-signing works when a user adds their framework to an Xcode
+@@ -289,17 +293,18 @@ else()
+ # cmake-format: on
+ endif()
+
+- if(NOT APPLE)
+ # Generate pkg-config file.
+ include(FindPkgConfig QUIET)
+ if(PKG_CONFIG_FOUND)
+ set(VK_API_VERSION "${VulkanHeaders_VERSION_MAJOR}.${VulkanHeaders_VERSION_MINOR}.${VulkanHeaders_VERSION_PATCH}")
+- foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES} ${PLATFORM_LIBS})
+- set(PRIVATE_LIBS "${PRIVATE_LIBS} -l${LIB}")
++ foreach(LIB ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${PLATFORM_LIBS} ${CMAKE_DL_LIBS} m)
++ list(APPEND PRIVATE_LIBS_LIST "-l${LIB}")
+ endforeach()
++ list(APPEND PRIVATE_LIBS_LIST "${CMAKE_THREAD_LIBS_INIT}")
++ list(REMOVE_DUPLICATES PRIVATE_LIBS_LIST)
++ list(JOIN PRIVATE_LIBS_LIST " " PRIVATE_LIBS)
+ configure_file("vulkan.pc.in" "vulkan.pc" @ONLY)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/vulkan.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+- endif()
+ endif()
+ endif()
+
diff --git a/vulkan-loader/patches/patch-loader_loader.c b/vulkan-loader/patches/patch-loader_loader.c
new file mode 100644
index 0000000000..aba4e8519a
--- /dev/null
+++ b/vulkan-loader/patches/patch-loader_loader.c
@@ -0,0 +1,31 @@
+$NetBSD$
+* add netbsd support
+--- loader/loader.c.orig 2019-09-11 17:39:09.000000000 +0000
++++ loader/loader.c
+@@ -44,6 +44,8 @@
+
+ #if defined(__APPLE__)
+ #include <CoreFoundation/CoreFoundation.h>
++#endif
++#if defined(__APPLE__) || defined(__NetBSD__)
+ #include <sys/param.h>
+ #endif
+
+@@ -241,7 +243,7 @@ void *loader_device_heap_realloc(const s
+ }
+
+ // Environment variables
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined(__linux__) || defined(__APPLE__) || defined(__NetBSD__)
+
+ static inline bool IsHighIntegrity() {
+ return geteuid() != getuid() || getegid() != getgid();
+@@ -255,7 +257,7 @@ static inline char *loader_getenv(const
+ }
+
+ static inline char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
+-#if defined(__APPLE__)
++#if defined(__APPLE__) || defined(__NetBSD__)
+ // 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/vulkan-loader/patches/patch-loader_vk__loader__platform.h b/vulkan-loader/patches/patch-loader_vk__loader__platform.h
new file mode 100644
index 0000000000..a94e867d7b
--- /dev/null
+++ b/vulkan-loader/patches/patch-loader_vk__loader__platform.h
@@ -0,0 +1,13 @@
+$NetBSD$
+* add netbsd support
+--- loader/vk_loader_platform.h.orig 2019-09-18 15:49:42.194132122 +0000
++++ loader/vk_loader_platform.h
+@@ -31,7 +31,7 @@
+ #include "vulkan/vk_platform.h"
+ #include "vulkan/vk_sdk_platform.h"
+
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined(__linux__) || defined(__APPLE__) || defined(__NetBSD__)
+ /* Linux-specific common code: */
+
+ // Headers:
diff --git a/vulkan-loader/patches/patch-tests_test__common.h b/vulkan-loader/patches/patch-tests_test__common.h
new file mode 100644
index 0000000000..711840acd2
--- /dev/null
+++ b/vulkan-loader/patches/patch-tests_test__common.h
@@ -0,0 +1,13 @@
+$NetBSD$
+* add netbsd support
+--- tests/test_common.h.orig 2019-09-18 21:32:16.041186928 +0000
++++ tests/test_common.h
+@@ -105,7 +105,7 @@ static inline void test_error_callback(c
+ ADD_FAILURE_AT(file, line) << "Assertion: `" << expr << "'";
+ }
+
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined(__linux__) || defined(__APPLE__) || defined(__NetBSD__)
+ /* Linux-specific common code: */
+
+ #include <pthread.h>
Home |
Main Index |
Thread Index |
Old Index