summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Schneider2015-10-05 11:18:35 +0200
committerSven Schneider2015-10-05 11:18:35 +0200
commitdceb349dfbd6e4d0fca73e2982f5b94b224b5c1d (patch)
treea9c0c103ea53a692fb0083c8bb34d370b7b13a65
parent0add43fe30cac56337a227186b34cafdbb63cee4 (diff)
downloadaur-dceb349dfbd6e4d0fca73e2982f5b94b224b5c1d.tar.gz
workaround for python path and adapt vcs guideline
cyrozap (https://aur.archlinux.org/account/cyrozap/): "This is the error I got: CMake Error at /usr/share/cmake-3.3/Modules/FindPythonLibs.cmake:63 (get_filename_component): get_filename_component called with incorrect number of arguments Call Stack (most recent call first): wrappers/python/CMakeLists.txt:6 (include) The root cause of the issue is in CMake's FindPythonLibs on line 63. When PYTHON_EXECUTABLE is set to "python2" by CMakeLists.txt and FindPythonLibs tries to get its path a second time, it fails because the original path returned was empty/NOTFOUND. I'm not sure at what point it stopped accepting just the executable name and not its full path, but it must have been some time before CMake 3.3.2 was released since that's what I'm using. In any case, the CMake script in the source should be modified to honor the PYTHON_EXECUTABLE definition if it's set somewhere else-- this patch is just a quick hack to get it to build."
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD31
2 files changed, 17 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e5d5c111d4eb..871af451b4c5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = libfreenect-git
pkgdesc = Drivers and libraries for the Xbox Kinect device on Linux
- pkgver = 20140215
+ pkgver = v0.5.2.r8.gdcb2929
pkgrel = 1
url = http://openkinect.org
arch = i686
@@ -19,6 +19,8 @@ pkgbase = libfreenect-git
optdepends = python2-matplotlib: support for python demos
provides = libfreenect
conflicts = libfreenect
+ source = libfreenect-git::git+https://github.com/OpenKinect/libfreenect.git#branch=master
+ md5sums = SKIP
pkgname = libfreenect-git
diff --git a/PKGBUILD b/PKGBUILD
index acfa8778998f..d61755019446 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Sven Schneider <archlinux.sandmann@googlemail.com>
pkgname=libfreenect-git
-pkgver=20140215
+pkgver=v0.5.2.r8.gdcb2929
pkgrel=1
pkgdesc="Drivers and libraries for the Xbox Kinect device on Linux"
arch=('i686' 'x86_64')
@@ -13,26 +13,23 @@ optdepends=('opencv: support for python demos'
'python2-matplotlib: support for python demos')
provides=('libfreenect')
conflicts=('libfreenect')
-source=()
-md5sums=()
+source=('libfreenect-git::git+https://github.com/OpenKinect/libfreenect.git#branch=master')
+md5sums=('SKIP')
-_gitroot="https://github.com/OpenKinect/libfreenect.git"
-_gitname=libfreenect
+pkgver() {
+ cd "${pkgname}"
-build() {
- cd "${srcdir}"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
- if [ ! -d "${srcdir}/${_gitname}" ]; then
- git clone ${_gitroot}
- else
- cd ${_gitname} && git pull origin
- fi
+prepare() {
+ cd "${srcdir}/${pkgname}"
- msg "GIT checkout done."
+ sed '/set(PYTHON_EXECUTABLE "python2")/d' -i CMakeLists.txt
+}
- cd "${srcdir}"
- cp -rf "${_gitname}" "${_gitname}-build"
- cd "${_gitname}-build"
+build() {
+ cd "${srcdir}/${pkgname}"
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DPROJECT_INCLUDE_INSTALL_DIR=/usr/include -DLIB_SUFFIX="" \
@@ -46,7 +43,7 @@ build() {
}
package() {
- cd "${srcdir}/${_gitname}-build"
+ cd "${srcdir}/${pkgname}"
make DESTDIR="${pkgdir}" install
install -Dm644 platform/linux/udev/51-kinect.rules "${pkgdir}/etc/udev/rules.d/51-kinect.rules"