summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHermann Mayer2017-03-20 18:43:25 +0100
committerHermann Mayer2017-03-20 18:43:25 +0100
commitb07570dadb53f1f2791aed9fba7f022278af9799 (patch)
tree45eae845f11a220300d59688ed97ebdf0680d9d5
parent902967534d9363f06865c171f5c3eea0e4463c31 (diff)
downloadaur-b07570dadb53f1f2791aed9fba7f022278af9799.tar.gz
Update
-rw-r--r--PKGBUILD26
-rw-r--r--add-libv4l2-module.patch24
-rw-r--r--fix-opencv-headers.patch36
3 files changed, 79 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1d3f8a43973..e9179e4a810 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,16 +2,21 @@
_pkgname=psmoveapi
pkgname=${_pkgname}-git
-pkgver=3.9.1.r97.gf08c337
-pkgrel=2
+pkgver=4.0.1.r14.g1eb4525
+pkgrel=1
pkgdesc="Playstation Move Motion Controller API"
arch=(i686 x86_64)
url="http://thp.io/2010/psmove/"
-license=('custom')
-depends=('bluez-libs' 'libsystemd')
+license=('BSD')
+depends=('udev' 'bluez-libs' 'v4l-utils' 'opencv' 'jdk7-openjdk'
+ 'python2' 'mono' 'swig' 'freeglut' 'libusb')
makedepends=('cmake')
-source=(${_pkgname}::git+git://github.com/thp/${_pkgname}.git)
-sha1sums=('SKIP')
+source=("${_pkgname}::git+https://github.com/thp/psmoveapi.git"
+ 'fix-opencv-headers.patch'
+ 'add-libv4l2-module.patch')
+sha1sums=('SKIP'
+ '4544da4ae2f0220350b9d59f05d1e6c8b5e71b36'
+ 'f81b484bced325b076ea550b47f2bb145f709a45')
pkgver() {
cd "${srcdir}/${_pkgname}"
@@ -22,7 +27,14 @@ prepare() {
cd "${srcdir}/${_pkgname}"
git submodule init
git submodule update
- cmake . \
+
+ # Add the missing OpenCV includes
+ patch -p1 -i "${srcdir}/fix-opencv-headers.patch"
+
+ # Add the missing cmake libv4l2 linkage
+ patch -p1 -i "${srcdir}/add-libv4l2-module.patch"
+
+ JAVA_HOME=/usr/lib/jvm/default cmake . \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DPSMOVEAPI_LIB_DEST=lib \
-DPSMOVE_BUILD_EXAMPLES=OFF \
diff --git a/add-libv4l2-module.patch b/add-libv4l2-module.patch
new file mode 100644
index 00000000000..7112c704bff
--- /dev/null
+++ b/add-libv4l2-module.patch
@@ -0,0 +1,24 @@
+diff --git a/examples/c/distance_calibration.c b/examples/c/distance_calibration.c
+index 14f8189..3c209c5 100644
+--- a/examples/c/distance_calibration.c
++++ b/examples/c/distance_calibration.c
+@@ -34,6 +34,7 @@
+
+ #include "opencv2/core/core_c.h"
+ #include "opencv2/highgui/highgui_c.h"
++#include "opencv2/imgcodecs/imgcodecs_c.h"
+
+ #include "psmove.h"
+ #include "psmove_tracker.h"
+diff --git a/src/tracker/camera_control_private.h b/src/tracker/camera_control_private.h
+index a4842b1..86aa8b7 100644
+--- a/src/tracker/camera_control_private.h
++++ b/src/tracker/camera_control_private.h
+@@ -33,6 +33,7 @@
+ #include "opencv2/core/core_c.h"
+ #include "opencv2/highgui/highgui_c.h"
+ #include "opencv2/imgproc/imgproc_c.h"
++#include "opencv2/videoio/videoio_c.h"
+
+ #if defined(WIN32)
+ # include <windows.h>
diff --git a/fix-opencv-headers.patch b/fix-opencv-headers.patch
new file mode 100644
index 00000000000..de84a68cdca
--- /dev/null
+++ b/fix-opencv-headers.patch
@@ -0,0 +1,36 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 6e45cae..081c00a 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -74,7 +74,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libc++")
+ set(CMAKE_STATIC_LIBRARY_FLAGS "${CMAKE_STATIC_LIBRARY_FLAGS} -stdlib=libc++")
+-
++
+ ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+ list(APPEND PSMOVEAPI_REQUIRED_LIBS setupapi bthprops kernel32 ws2_32 winmm version imm32)
+
+@@ -101,8 +101,12 @@ ELSE()
+ include_directories(${UDEV_INCLUDE_DIRS})
+ list(APPEND PSMOVEAPI_REQUIRED_LIBS ${UDEV_LIBRARIES})
+
++ pkg_check_modules(V4L2 REQUIRED libv4l2)
++ include_directories(${V4L2_INCLUDE_DIRS})
++ list(APPEND PSMOVEAPI_REQUIRED_LIBS ${V4L2_LIBRARIES})
++
+ pkg_check_modules(BLUEZ REQUIRED bluez)
+-
++
+ # auto-detect BlueZ version >= 5
+ if(${BLUEZ_VERSION} VERSION_LESS "5.0")
+ set(INFO_BLUEZ5_SUPPORT "No")
+@@ -147,7 +151,7 @@ file(GLOB PSMOVEAPI_HEADERS
+
+ file (GLOB PSMOVEAPI_MATH_HEADERS
+ "${CMAKE_CURRENT_LIST_DIR}/math/*.h"
+- "${CMAKE_CURRENT_LIST_DIR}/math/*.hpp"
++ "${CMAKE_CURRENT_LIST_DIR}/math/*.hpp"
+ )
+
+ file (GLOB PSMOVEAPI_MATH_SRC