summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Haag2016-11-17 02:03:40 +0100
committerChristoph Haag2016-11-17 02:04:09 +0100
commitb12057d6172beed5a9920155634895bc9f8db5cb (patch)
tree2bd8f4d5bb853ac15076248efad8e445030bc0ca
parente5c33c28cee3399927ed61b87a651b98b8b096c6 (diff)
downloadaur-b12057d6172beed5a9920155634895bc9f8db5cb.tar.gz
finally build from valve repo
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD37
-rw-r--r--countof.patch17
3 files changed, 40 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cd998ba1fac0..d6e6d3caecd7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
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. Note: There's no compositor for linux, so try with hellovr -nocompositor
- pkgver = 42.9a30d15
+ pkgver = 39.84e877f
pkgrel = 1
url = https://github.com/ValveSoftware/openvr
arch = x86_64
@@ -17,8 +17,10 @@ pkgbase = openvr-git
provides = openvr
options = !strip
options = staticlibs
- source = git+https://github.com/ChristophHaag/openvr.git
+ source = git+https://github.com/ValveSoftware/openvr.git
+ source = countof.patch
md5sums = SKIP
+ md5sums = f488b62d4a88e9295adc8762cd82f551
pkgname = openvr-git
diff --git a/PKGBUILD b/PKGBUILD
index 68b044208707..8b52e37f3c76 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,5 @@
pkgname=openvr-git
-pkgver=42.9a30d15
+pkgver=39.84e877f
pkgrel=1
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. Note: There's no compositor for linux, so try with hellovr -nocompositor"
arch=('x86_64')
@@ -13,31 +13,32 @@ makedepends=('git' 'cmake' 'qt5-base') #qt5 for the overlayexample
provides=("openvr")
options=('!strip' 'staticlibs')
-#TODO: use my fork with cmake until Valve implements proper linux support for the samples
-source=("git+https://github.com/ChristophHaag/openvr.git")
-md5sums=("SKIP")
+source=("git+https://github.com/ValveSoftware/openvr.git" "countof.patch")
+md5sums=('SKIP'
+ 'f488b62d4a88e9295adc8762cd82f551')
pkgver() {
cd "$srcdir/openvr"
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
+prepare() {
+ cd "$srcdir/openvr"
+ # Patch for https://github.com/ValveSoftware/openvr/issues/315
+ git apply -vvv "$srcdir"/countof.patch
+}
+
build() {
#export CXX=clang++
#export CC=clang
+ cd "$srcdir/openvr"
+ cd samples
mkdir -p build
- #rm -rf build/*
cd build
- #TODO: rpath will be set to build tree
- # it would be cleared by make install, but I have no install target yet. But it's not a problem, so I leave it be
- # http://www.cmake.org/Wiki/CMake_RPATH_handling#Always_full_RPATH
- cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_BUILD_TYPE=Release ../openvr
- make
+ cmake .. -DCMAKE_BUILD_TYPE=Release
- cd "$srcdir/openvr/samples/helloworldoverlay"
- qmake-qt5 helloworldoverlay.pro
make
}
@@ -48,14 +49,14 @@ package() {
install -d "$pkgdir/usr/bin"
install -d "$pkgdir/usr/include/"
- #cp -ra "$srcdir/openvr/headers"/* "$pkgdir/usr/include/"
+ cp -ra "$srcdir/openvr/headers"/* "$pkgdir/usr/include/"
install "$srcdir/openvr/headers"/* "$pkgdir/usr/include/"
install -m 555 "$srcdir/openvr/lib/linux64/libopenvr_api.so" "$pkgdir/usr/lib"
- install -m 755 "$srcdir/build/samples/hellovr_opengl/hellovr" "$pkgdir/usr/bin"
- install -m 755 "$srcdir/build/samples/hellovr_opengl/run_hellovr.sh" "$pkgdir/usr/bin/run_hellovr.sh"
- install -m 755 "$srcdir/build/samples/cube_texture.png" "$pkgdir/usr/" #TODO: fix source code to look in proper place
-
- install -m 755 "$srcdir/openvr/samples/bin/win32/HelloWorldOverlay" "$pkgdir/usr/bin/openvr-HelloWorldOverlay"
+ install -m 755 "$srcdir/openvr/samples/bin/linux64/hellovr_opengl" "$pkgdir/usr/bin"
+ install -m 755 "$srcdir/openvr/samples/bin/linux64/helloworldoverlay" "$pkgdir/usr/bin"
+ #install -m 755 "$srcdir/build/samples/hellovr_opengl/run_hellovr.sh" "$pkgdir/usr/bin/run_hellovr.sh"
+ install -m 755 "$srcdir/openvr/samples/bin/cube_texture.png" "$pkgdir/usr/" #TODO: fix source code to look in proper place
+
}
# vim:set ts=2 sw=2 et:
diff --git a/countof.patch b/countof.patch
new file mode 100644
index 000000000000..17635681af13
--- /dev/null
+++ b/countof.patch
@@ -0,0 +1,17 @@
+diff --git a/samples/hellovr_opengl/hellovr_opengl_main.cpp b/samples/hellovr_opengl/hellovr_opengl_main.cpp
+index 64d1d47..dac2e9f 100644
+--- a/samples/hellovr_opengl/hellovr_opengl_main.cpp
++++ b/samples/hellovr_opengl/hellovr_opengl_main.cpp
+@@ -1276,6 +1276,12 @@ bool CMainApplication::SetupStereoRenderTargets()
+ return true;
+ }
+
++//http://www.g-truc.net/post-0708.html
++template <typename T, std::size_t N>
++constexpr std::size_t _countof(T const (&)[N]) noexcept
++{
++return N;
++}
+
+ //-----------------------------------------------------------------------------
+ // Purpose: