diff options
author | Christoph Haag | 2018-07-30 19:17:45 +0200 |
---|---|---|
committer | Christoph Haag | 2018-07-30 19:17:45 +0200 |
commit | 3bb6c25bcc00887449f0d5e6435d19140bb7837f (patch) | |
tree | 6bb8080b096e13a841de6811d06e3967bafe31ef | |
parent | 131b556f62c739da91062977ddfab8c8776a9bb5 (diff) | |
download | aur-3bb6c25bcc00887449f0d5e6435d19140bb7837f.tar.gz |
add patch to fix C header
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch | 76 | ||||
-rw-r--r-- | PKGBUILD | 15 |
3 files changed, 89 insertions, 6 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Sat Jul 28 00:12:12 UTC 2018 +# Mon Jul 30 17:17:44 UTC 2018 pkgbase = openvr-git pkgdesc = API and runtime that allows access to VR hardware from multiple vendors. Contains API and samples. The runtime is under SteamVR in Tools on Steam. pkgver = 1.0.16.r0.g6aacebd @@ -22,9 +22,11 @@ pkgbase = openvr-git source = git+https://github.com/ValveSoftware/openvr.git source = https://github.com/ValveSoftware/openvr/commit/0fa21ba17748efcca1816536e27bdca70141b074.patch source = https://github.com/ValveSoftware/openvr/commit/4f9149928e29e9f92e6d8dc39f984d1a557a42b3.patch + source = 0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch md5sums = SKIP md5sums = 7350517830b1a0038d30c6ad33b4bb39 md5sums = dfb4306bb93633e467862cd8990e6e79 + md5sums = 910bc58898a88de7e81df32a1b2f19f4 pkgname = openvr-git diff --git a/0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch b/0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch new file mode 100644 index 000000000000..815545503a76 --- /dev/null +++ b/0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch @@ -0,0 +1,76 @@ +From 65b15ca1052bfb44fcede5c086eac97a3599482a Mon Sep 17 00:00:00 2001 +From: Christoph Haag <christoph.haag@collabora.com> +Date: Mon, 30 Jul 2018 17:18:44 +0200 +Subject: [PATCH] fix VREvent_Data_t union in c header and add pragma pack( + push, 4) + +--- + headers/openvr_capi.h | 51 ++++++++++++++++++++++++++++--------------- + 1 file changed, 34 insertions(+), 17 deletions(-) + +diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h +index 1ee5a36..8052a33 100644 +--- a/headers/openvr_capi.h ++++ b/headers/openvr_capi.h +@@ -1966,24 +1966,41 @@ typedef struct COpenVRContext + intptr_t m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors * + } COpenVRContext; + ++ typedef union ++ { ++ VREvent_Reserved_t reserved; ++ VREvent_Controller_t controller; ++ VREvent_Mouse_t mouse; ++ VREvent_Scroll_t scroll; ++ VREvent_Process_t process; ++ VREvent_Notification_t notification; ++ VREvent_Overlay_t overlay; ++ VREvent_Status_t status; ++ VREvent_Keyboard_t keyboard; ++ VREvent_Ipd_t ipd; ++ VREvent_Chaperone_t chaperone; ++ VREvent_PerformanceTest_t performanceTest; ++ VREvent_TouchPadMove_t touchPadMove; ++ VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; ++ VREvent_Screenshot_t screenshot; ++ VREvent_ScreenshotProgress_t screenshotProgress; ++ VREvent_ApplicationLaunch_t applicationLaunch; ++ VREvent_EditingCameraSurface_t cameraSurface; ++ VREvent_MessageOverlay_t messageOverlay; ++ VREvent_Property_t property; ++ VREvent_DualAnalog_t dualAnalog; ++ VREvent_HapticVibration_t hapticVibration; ++ VREvent_WebConsole_t webConsole; ++ VREvent_InputBindingLoad_t inputBinding; ++ VREvent_InputActionManifestLoad_t actionManifest; ++ VREvent_SpatialAnchor_t spatialAnchor; ++} VREvent_Data_t; + +-typedef union +-{ +- VREvent_Reserved_t reserved; +- VREvent_Controller_t controller; +- VREvent_Mouse_t mouse; +- VREvent_Scroll_t scroll; +- VREvent_Process_t process; +- VREvent_Notification_t notification; +- VREvent_Overlay_t overlay; +- VREvent_Status_t status; +- VREvent_Keyboard_t keyboard; +- VREvent_Ipd_t ipd; +- VREvent_Chaperone_t chaperone; +- VREvent_PerformanceTest_t performanceTest; +- VREvent_TouchPadMove_t touchPadMove; +- VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; +-} VREvent_Data_t; ++#if defined(__linux__) || defined(__APPLE__) ++// This structure was originally defined mis-packed on Linux, preserved for ++// compatibility. ++#pragma pack( push, 4 ) ++#endif + + /** An event posted by the server to all running applications */ + struct VREvent_t +-- +2.18.0 + @@ -6,17 +6,21 @@ arch=('x86_64') url="https://github.com/ValveSoftware/openvr" license=('custom') depends=('libgl' 'sdl2' 'glew') -optdepends=("oculus-udev: Udev rule to make the rift sensors usable to the \"plugdev\" group" - "steam: For SteamVR (Duh)" - "vive-udev: Udev rule to make the Vive sensors usable to the \"plugdev\" group") +optdepends=('oculus-udev: Udev rule to make the rift sensors usable to the "plugdev" group' + 'steam: For SteamVR (Duh)' + 'vive-udev: Udev rule to make the Vive sensors usable to the "plugdev" group') makedepends=('git' 'cmake' 'qt5-base') #qt5 for the overlayexample provides=("openvr") options=('!strip' 'staticlibs') -source=("git+https://github.com/ValveSoftware/openvr.git" 'https://github.com/ValveSoftware/openvr/commit/0fa21ba17748efcca1816536e27bdca70141b074.patch' 'https://github.com/ValveSoftware/openvr/commit/4f9149928e29e9f92e6d8dc39f984d1a557a42b3.patch') +source=("git+https://github.com/ValveSoftware/openvr.git" + 'https://github.com/ValveSoftware/openvr/commit/0fa21ba17748efcca1816536e27bdca70141b074.patch' + 'https://github.com/ValveSoftware/openvr/commit/4f9149928e29e9f92e6d8dc39f984d1a557a42b3.patch' + '0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch') md5sums=('SKIP' '7350517830b1a0038d30c6ad33b4bb39' - 'dfb4306bb93633e467862cd8990e6e79') + 'dfb4306bb93633e467862cd8990e6e79' + '910bc58898a88de7e81df32a1b2f19f4') pkgver() { cd "$srcdir/openvr" @@ -29,6 +33,7 @@ prepare() { cd "$srcdir/openvr" git apply ../0fa21ba17748efcca1816536e27bdca70141b074.patch #https://github.com/ValveSoftware/openvr/pull/594 git apply ../4f9149928e29e9f92e6d8dc39f984d1a557a42b3.patch #https://github.com/ValveSoftware/openvr/pull/805 + git apply ../0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch # autogenerated, so no pull request } build() { |