diff options
author | Christoph Haag | 2019-05-15 16:04:22 +0200 |
---|---|---|
committer | Christoph Haag | 2019-05-15 16:04:35 +0200 |
commit | 54e3cfcda6e30014e22e4f01e91e7bf2d9039ead (patch) | |
tree | ba5addb11fe7cc7951cd90f06d8b52433ef3f0f0 | |
parent | 90204a5c49da6370e632b6763dff9f2c1c831271 (diff) | |
download | aur-54e3cfcda6e30014e22e4f01e91e7bf2d9039ead.tar.gz |
update install patch
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | support_installing_the_loader.diff | 123 |
3 files changed, 39 insertions, 96 deletions
@@ -1,8 +1,6 @@ -# Generated by mksrcinfo v8 -# Tue Mar 19 10:43:34 UTC 2019 pkgbase = openxr-loader-git pkgdesc = OpenXR Loader and headers - pkgver = r16.9c637b3 + pkgver = r70.992061d pkgrel = 1 url = https://github.com/KhronosGroup/OpenXR-SDK arch = i686 @@ -12,7 +10,7 @@ pkgbase = openxr-loader-git source = openxr-loader::git+https://github.com/KhronosGroup/OpenXR-SDK.git source = support_installing_the_loader.diff md5sums = SKIP - md5sums = 59e37b1913142910839620626be16ec5 + md5sums = c996468fee9d384626e563e483fba51f pkgname = openxr-loader-git @@ -2,7 +2,7 @@ pkgname=("openxr-loader-git" "openxr-headers-git") _dirname="openxr-loader" -pkgver=r16.9c637b3 +pkgver=r70.992061d pkgrel=1 pkgdesc='OpenXR Loader and headers' arch=('i686' 'x86_64') @@ -14,7 +14,7 @@ license=('apache') source=("$_dirname::git+https://github.com/KhronosGroup/OpenXR-SDK.git" "support_installing_the_loader.diff") md5sums=('SKIP' - '59e37b1913142910839620626be16ec5') + 'c996468fee9d384626e563e483fba51f') #options=('debug' '!strip') @@ -45,6 +45,8 @@ build() { package_openxr-loader-git() { cd "$_dirname"-build make DESTDIR="$pkgdir" install openxr_loader + + rm -rf "$pkgdir"/usr/include/ } package_openxr-headers-git() { diff --git a/support_installing_the_loader.diff b/support_installing_the_loader.diff index a26684ee83e1..2a45ed57f128 100644 --- a/support_installing_the_loader.diff +++ b/support_installing_the_loader.diff @@ -1,8 +1,19 @@ +From cf5374bcb851796bcbccff813e921e3e60cae6de Mon Sep 17 00:00:00 2001 +From: Christoph Haag <christoph.haag@collabora.com> +Date: Wed, 15 May 2019 15:51:52 +0200 +Subject: [PATCH] Install layers and pkg-config file on Linux + +--- + CMakeLists.txt | 12 ++++++++++++ + src/api_layers/CMakeLists.txt | 13 +++++++++++-- + src/loader/CMakeLists.txt | 10 ++++++++++ + 3 files changed, 33 insertions(+), 2 deletions(-) + diff --git a/CMakeLists.txt b/CMakeLists.txt -index d0bd4a78..b3112e49 100644 +index 35ea536..42830f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -22,7 +22,9 @@ +@@ -22,12 +22,24 @@ cmake_minimum_required(VERSION 3.0) project(OPENXR) @@ -12,11 +23,8 @@ index d0bd4a78..b3112e49 100644 set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "") add_subdirectory(include) -@@ -40,3 +42,13 @@ if(BASH_COMMAND) - USES_TERMINAL) - endif() - endif() -+ + add_subdirectory(src) + +# uninstall target +if(NOT TARGET uninstall) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/cmake/cmake_uninstall.cmake.in" @@ -26,11 +34,15 @@ index d0bd4a78..b3112e49 100644 + add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + set_target_properties(uninstall PROPERTIES FOLDER ${LOADER_HELPER_FOLDER}) +endif() ++ + find_program(BASH_COMMAND NAMES bash) + if(BASH_COMMAND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/specification/Makefile") + option(BUILD_SPECIFICATION "Run './makeAllExts all' in the specification directory as part of the build - intended for one-step checking of spec changes" OFF) diff --git a/src/api_layers/CMakeLists.txt b/src/api_layers/CMakeLists.txt -index 143938fc..dfddd3fe 100644 +index 140c834..5ea2438 100644 --- a/src/api_layers/CMakeLists.txt +++ b/src/api_layers/CMakeLists.txt -@@ -170,7 +170,7 @@ else() +@@ -178,7 +178,7 @@ else() gen_xr_layer_json( ${CMAKE_CURRENT_BINARY_DIR}/XrApiLayer_api_dump.json api_dump @@ -39,7 +51,7 @@ index 143938fc..dfddd3fe 100644 1 "API Layer to record api calls as they occur" "" -@@ -182,7 +182,7 @@ else() +@@ -190,7 +190,7 @@ else() gen_xr_layer_json( ${CMAKE_CURRENT_BINARY_DIR}/XrApiLayer_core_validation.json core_validation @@ -48,7 +60,7 @@ index 143938fc..dfddd3fe 100644 1 "API Layer to record api calls as they occur" "" -@@ -213,3 +213,13 @@ add_custom_target(core_validation_json_file DEPENDS +@@ -221,3 +221,12 @@ add_custom_target(core_validation_json_file DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/XrApiLayer_core_validation.json ) @@ -56,83 +68,29 @@ index 143938fc..dfddd3fe 100644 +set(TARGET_NAMES + XrApiLayer_api_dump + XrApiLayer_core_validation) -+if(CMAKE_SYSTEM_NAME STREQUAL "Windows") -+else() ++if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + foreach(TARGET_NAME ${TARGET_NAMES}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}.json DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/openxr/${MAJOR}/api_layers/explicit.d) + endforeach() +endif() -diff --git a/src/common/platform_utils.hpp b/src/common/platform_utils.hpp -index 92621a85..d6c9fccb 100644 ---- a/src/common/platform_utils.hpp -+++ b/src/common/platform_utils.hpp -@@ -79,22 +79,23 @@ static inline void PlatformUtilsFreeEnv(char* val) { - } - - // Prefix for the Linux/Apple global runtime JSON file name --static const std::string rt_dir_prefix = "/usr/local/share/openxr/"; - static const std::string rt_filename = "/active_runtime.json"; - --static inline bool PlatformGetGlobalRuntimeFileName(uint16_t major_version, std::string& file_name) { -+static inline bool PlatformGetGlobalRuntimeFileName(uint16_t major_version, std::string rt_dir_prefix, std::string& file_name) { - file_name = rt_dir_prefix; -+ file_name += "/openxr/"; - file_name += std::to_string(major_version); - file_name += rt_filename; - return true; - } - --static inline bool PlatformLockGlobalRuntimeFile(uint16_t major_version, GlobalRuntimeFile& global_rt_file) { -+static inline bool PlatformLockGlobalRuntimeFile(uint16_t major_version, std::string rt_dir_prefix, -+ GlobalRuntimeFile& global_rt_file) { - bool success = false; - try { - global_rt_file = {}; - // Get the filename -- if (PlatformGetGlobalRuntimeFileName(major_version, global_rt_file.file_name)) { -+ if (PlatformGetGlobalRuntimeFileName(major_version, rt_dir_prefix, global_rt_file.file_name)) { - // Initialize the global runtime file info - // Open a file descriptor to the file. - global_rt_file.file_descriptor = open(global_rt_file.file_name.c_str(), O_RDWR); -@@ -245,11 +246,11 @@ static inline void PlatformUtilsFreeEnv(char *val) { - } - - // Prefix for the Linux/Apple global runtime JSON file name --static const std::string rt_dir_prefix = "/usr/local/share/openxr/"; - static const std::string rt_filename = "/active_runtime.json"; - --static inline bool PlatformGetGlobalRuntimeFileName(uint16_t major_version, std::string &file_name) { -+static inline bool PlatformGetGlobalRuntimeFileName(uint16_t major_version, std::string rt_dir_prefix, std::string &file_name) { - file_name = rt_dir_prefix; -+ file_name += "/openxr/"; - file_name += std::to_string(major_version); - file_name += rt_filename; - return true; diff --git a/src/loader/CMakeLists.txt b/src/loader/CMakeLists.txt -index 3c77e686..0de1c23e 100644 +index 92985a5..7a1c32f 100644 --- a/src/loader/CMakeLists.txt +++ b/src/loader/CMakeLists.txt -@@ -22,6 +22,8 @@ - include(GenerateExportHeader) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS false) +@@ -17,6 +17,8 @@ + + #set (CMAKE_VERBOSE_MAKEFILE 1) +include(GNUInstallDirs) + - find_package(PythonInterp 3 REQUIRED) - - set(LOADER_NAME openxr_loader) -@@ -98,6 +100,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - PRIVATE FALLBACK_CONFIG_DIRS="${FALLBACK_CONFIG_DIRS}" - PRIVATE FALLBACK_DATA_DIRS="${FALLBACK_DATA_DIRS}" - PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}" -+ PRIVATE DATADIR="${CMAKE_INSTALL_FULL_DATADIR}" - ) - if(NOT(CMAKE_INSTALL_FULL_SYSCONFDIR STREQUAL "/etc")) - target_compile_definitions(openxr_loader PRIVATE EXTRASYSCONFDIR="/etc") -@@ -108,6 +111,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Use this feature for Windows to automatically generate an exports file for the DLL. + # See https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/ + include(GenerateExportHeader) +@@ -114,6 +116,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") add_custom_target(lib${LOADER_NAME}.so.${MAJOR}.${MINOR} ALL COMMAND ${CMAKE_COMMAND} -E create_symlink lib${LOADER_NAME}.so.${MAJOR}.${MINOR}.${PATCH} lib${LOADER_NAME}.so.${MAJOR}.${MINOR}) ++ + install(TARGETS ${LOADER_NAME} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} @@ -143,18 +101,3 @@ index 3c77e686..0de1c23e 100644 elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") foreach(configuration in CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE -diff --git a/src/loader/manifest_file.cpp b/src/loader/manifest_file.cpp -index ebea76d2..6fb2114c 100644 ---- a/src/loader/manifest_file.cpp -+++ b/src/loader/manifest_file.cpp -@@ -652,8 +652,9 @@ XrResult RuntimeManifestFile::FindManifestFiles(ManifestFileType type, - "", "RuntimeManifestFile::findManifestFiles - found too many default runtime files in registry"); - } - #else -+ std::string global_rt_prefix = std::string(DATADIR); - std::string global_rt_filename; -- PlatformGetGlobalRuntimeFileName(XR_VERSION_MAJOR(XR_CURRENT_API_VERSION), global_rt_filename); -+ PlatformGetGlobalRuntimeFileName(XR_VERSION_MAJOR(XR_CURRENT_API_VERSION), global_rt_prefix, global_rt_filename); - filenames.push_back(global_rt_filename); - #endif - std::string info_message = "RuntimeManifestFile::FindManifestFiles - using global runtime file "; |