From 29694390a7c317ead490f9b2573cf8a5ba39e6e9 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Tue, 18 Apr 2023 19:07:55 +0200 Subject: [PATCH] openvr: Update to 1.23.8 001-_WIN32-macros.patch: needs a refresh, but WIN32/WIN64 should work fine too, so why bother 005-remove-undeclared-identifier.patch, code no longer exists 1524: builds fine without it now --- mingw-w64-openvr/001-_WIN32-macros.patch | 147 ------------------ .../005-remove-undeclared-identifier.patch | 10 -- mingw-w64-openvr/PKGBUILD | 15 +- 3 files changed, 3 insertions(+), 169 deletions(-) delete mode 100644 mingw-w64-openvr/001-_WIN32-macros.patch delete mode 100644 mingw-w64-openvr/005-remove-undeclared-identifier.patch diff --git a/mingw-w64-openvr/001-_WIN32-macros.patch b/mingw-w64-openvr/001-_WIN32-macros.patch deleted file mode 100644 index 0ced2e9685d86..0000000000000 --- a/mingw-w64-openvr/001-_WIN32-macros.patch +++ /dev/null @@ -1,147 +0,0 @@ -diff -Naur openvr-1.0.15-orig/samples/driver_sample/driverlog.cpp openvr-1.0.15/samples/driver_sample/driverlog.cpp ---- openvr-1.0.15-orig/samples/driver_sample/driverlog.cpp 2018-05-11 21:56:31.000000000 +0300 -+++ openvr-1.0.15/samples/driver_sample/driverlog.cpp 2018-05-15 14:46:06.400751700 +0300 -@@ -7,7 +7,7 @@ - - static vr::IVRDriverLog * s_pLogFile = NULL; - --#if !defined( WIN32) -+#if !defined(_WIN32) - #define vsnprintf_s vsnprintf - #endif - -diff -Naur openvr-1.0.15-orig/samples/shared/pathtools.cpp openvr-1.0.15/samples/shared/pathtools.cpp ---- openvr-1.0.15-orig/samples/shared/pathtools.cpp 2018-05-11 21:56:31.000000000 +0300 -+++ openvr-1.0.15/samples/shared/pathtools.cpp 2018-05-15 14:47:17.742077200 +0300 -@@ -396,7 +396,7 @@ - std::string Path_GetThisModulePath() - { - // gets the path of vrclient.dll itself --#ifdef WIN32 -+#ifdef _WIN32 - HMODULE hmodule = NULL; - - ::GetModuleHandleEx( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, reinterpret_cast(Path_GetThisModulePath), &hmodule ); -@@ -735,7 +735,7 @@ - } - - --#if defined(WIN32) -+#if defined(_WIN32) - #define FILE_URL_PREFIX "file:///" - #else - #define FILE_URL_PREFIX "file://" -diff -Naur openvr-1.0.15-orig/src/openvr_api_public.cpp openvr-1.0.15/src/openvr_api_public.cpp ---- openvr-1.0.15-orig/src/openvr_api_public.cpp 2018-05-15 14:41:23.196253000 +0300 -+++ openvr-1.0.15/src/openvr_api_public.cpp 2018-05-15 14:41:25.863857600 +0300 -@@ -118,7 +118,7 @@ - return vr::VRInitError_Init_InstallationCorrupt; - } - --#if defined( WIN64 ) -+#if defined( _WIN64 ) - std::string sDLLPath = Path_Join( sTestPath, "vrclient_x64" DYNAMIC_LIB_EXT ); - #else - std::string sDLLPath = Path_Join( sTestPath, "vrclient" DYNAMIC_LIB_EXT ); -diff -Naur openvr-1.0.15-orig/src/vrcommon/dirtools_public.cpp openvr-1.0.15/src/vrcommon/dirtools_public.cpp ---- openvr-1.0.15-orig/src/vrcommon/dirtools_public.cpp 2018-05-11 21:56:31.000000000 +0300 -+++ openvr-1.0.15/src/vrcommon/dirtools_public.cpp 2018-05-15 14:48:20.174187100 +0300 -@@ -79,7 +79,7 @@ - //----------------------------------------------------------------------------- - bool BCreateDirectory( const char *pchPath ) - { --#ifdef WIN32 -+#ifdef _WIN32 - std::wstring wPath = UTF8to16( pchPath ); - if ( ::CreateDirectoryW( wPath.c_str(), NULL ) ) - return true; -diff -Naur openvr-1.0.15-orig/src/vrcommon/pathtools_public.cpp openvr-1.0.15/src/vrcommon/pathtools_public.cpp ---- openvr-1.0.15-orig/src/vrcommon/pathtools_public.cpp 2018-05-11 21:56:31.000000000 +0300 -+++ openvr-1.0.15/src/vrcommon/pathtools_public.cpp 2018-05-15 14:50:10.529780900 +0300 -@@ -167,7 +167,7 @@ - if( sPath.empty() ) - return false; - --#if defined( WIN32 ) -+#if defined( _WIN32 ) - if ( sPath.size() < 3 ) // must be c:\x or \\x at least - return false; - -@@ -395,7 +395,7 @@ - std::string Path_GetThisModulePath() - { - // gets the path of vrclient.dll itself --#ifdef WIN32 -+#ifdef _WIN32 - HMODULE hmodule = NULL; - - ::GetModuleHandleEx( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, reinterpret_cast(Path_GetThisModulePath), &hmodule ); -@@ -480,7 +480,7 @@ - if( sFixedPath.empty() ) - return false; - --#if defined( WIN32 ) -+#if defined( _WIN32 ) - struct _stat buf; - std::wstring wsFixedPath = UTF8to16( sFixedPath.c_str() ); - if ( _wstat( wsFixedPath.c_str(), &buf ) == -1 ) -@@ -735,7 +735,7 @@ - } - - --#if defined(WIN32) -+#if defined(_WIN32) - #define FILE_URL_PREFIX "file:///" - #else - #define FILE_URL_PREFIX "file://" -@@ -784,7 +784,7 @@ - // ----------------------------------------------------------------------------------------------------- - std::string GetUserDocumentsPath() - { --#if defined( WIN32 ) -+#if defined( _WIN32 ) - WCHAR rwchPath[MAX_PATH]; - - if ( !SUCCEEDED( SHGetFolderPathW( NULL, CSIDL_MYDOCUMENTS | CSIDL_FLAG_CREATE, NULL, 0, rwchPath ) ) ) -diff -Naur openvr-1.0.15-orig/src/vrcommon/pathtools_public.h openvr-1.0.15/src/vrcommon/pathtools_public.h ---- openvr-1.0.15-orig/src/vrcommon/pathtools_public.h 2018-05-15 14:44:25.779974300 +0300 -+++ openvr-1.0.15/src/vrcommon/pathtools_public.h 2018-05-15 14:41:50.480700900 +0300 -@@ -106,7 +106,7 @@ - #endif - - //----------------------------------------------------------------------------- --#if defined(WIN32) -+#if defined(_WIN32) - #define DYNAMIC_LIB_EXT ".dll" - #define PROGRAM_EXT ".exe" - #ifdef _WIN64 -diff -Naur openvr-1.0.15-orig/src/vrcommon/vrpathregistry_public.cpp openvr-1.0.15/src/vrcommon/vrpathregistry_public.cpp ---- openvr-1.0.15-orig/src/vrcommon/vrpathregistry_public.cpp 2018-05-11 21:56:31.000000000 +0300 -+++ openvr-1.0.15/src/vrcommon/vrpathregistry_public.cpp 2018-05-15 14:51:02.415472100 +0300 -@@ -7,7 +7,7 @@ - #include "strtools_public.h" - #include "dirtools_public.h" - --#if defined( WIN32 ) -+#if defined( _WIN32 ) - #include - #include - -@@ -25,7 +25,7 @@ - #ifndef VRLog - #if defined( __MINGW32__ ) - #define VRLog(args...) fprintf(stderr, args) -- #elif defined( WIN32 ) -+ #elif defined( _WIN32 ) - #define VRLog(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__) - #else - #define VRLog(args...) fprintf(stderr, args) -@@ -35,7 +35,7 @@ - /** Returns the root of the directory the system wants us to store user config data in */ - static std::string GetAppSettingsPath() - { --#if defined( WIN32 ) -+#if defined( _WIN32 ) - WCHAR rwchPath[MAX_PATH]; - - if( !SUCCEEDED( SHGetFolderPathW( NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, rwchPath ) ) ) diff --git a/mingw-w64-openvr/005-remove-undeclared-identifier.patch b/mingw-w64-openvr/005-remove-undeclared-identifier.patch deleted file mode 100644 index 572f0c06f0f13..0000000000000 --- a/mingw-w64-openvr/005-remove-undeclared-identifier.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/vrcommon/hmderrors_public.cpp -+++ b/src/vrcommon/hmderrors_public.cpp -@@ -104,7 +104,6 @@ - RETURN_ENUM_AS_STRING( VRInitError_Init_PrismNeedsNewDrivers ); - RETURN_ENUM_AS_STRING( VRInitError_Init_PrismStartupTimedOut ); - RETURN_ENUM_AS_STRING( VRInitError_Init_CouldNotStartPrism ); -- RETURN_ENUM_AS_STRING( VRInitError_Init_CreateDriverDirectDeviceFailed ); - RETURN_ENUM_AS_STRING( VRInitError_Init_PrismExitedUnexpectedly ); - - RETURN_ENUM_AS_STRING( VRInitError_Driver_Failed ); diff --git a/mingw-w64-openvr/PKGBUILD b/mingw-w64-openvr/PKGBUILD index a969424405332..6244e054600ba 100644 --- a/mingw-w64-openvr/PKGBUILD +++ b/mingw-w64-openvr/PKGBUILD @@ -3,7 +3,7 @@ _realname=openvr pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.23.7 +pkgver=1.23.8 pkgrel=1 pkgdesc="API and SDK that allows access to VR hardware from multiple vendors (mingw-w64)" arch=('any') @@ -16,20 +16,14 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-ninja" "${MINGW_PACKAGE_PREFIX}-python") source=(${_realname}-${pkgver}.tar.gz::https://github.com/ValveSoftware/openvr/archive/v${pkgver}.tar.gz - 001-_WIN32-macros.patch 002-install-headers.patch 003-mingw-library-name.patch 004-install-location.patch - 005-remove-undeclared-identifier.patch - https://patch-diff.githubusercontent.com/raw/ValveSoftware/openvr/pull/1524.patch cxx_header_generator.py) -sha256sums=('cbe2afbfc9ed9c6c5ed7df7929f9b1f5ecfd858b849b377005d4881b72b910b3' - '51c697a176847aaead97f185422f844091b4d4257b84074ec1c6c8a466c74283' +sha256sums=('4d3b5322777f130b70bcd92ce4cc865ee7066df48fe7407ff9e64e3cfb78c42a' '10ece7ce59e78747c24ac98bb891d65ab6e57a888094a1fad5e87b56dff5ae10' '103ec4394f2fef820276906397011a498396694999e492c14ce0fda19f6d1014' '3fe7b4420a52ecf4233558ef5dbcc56f2abf35e204c90fbcefd13e0127a3938f' - 'c8dee503620e97070f9a76eb3e489f010a07f3d9397cb8e724a2f5cbd31dff47' - '93a39df6a5d41f87b766cc7ec0fc3e49d6cc97f88b84a642fc26c9fe07cdf54c' '739d0f4eeb8d83d2236d2174fbfac209ea20009bcaabba455c9b31301c14acfe') noextract=(${_realname}-${pkgver}.tar.gz) @@ -48,12 +42,9 @@ prepare() { cd "${srcdir}"/${_realname}-${pkgver} apply_patch_with_msg \ - 001-_WIN32-macros.patch \ 002-install-headers.patch \ 003-mingw-library-name.patch \ - 004-install-location.patch \ - 005-remove-undeclared-identifier.patch \ - 1524.patch + 004-install-location.patch } build() {