Please update. Thanks @hanno : Working PKGBUILD below
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Maintainer: Javier Fuentes <0xffaa.rm@gmail.com>
# Contributor: Figo.zhang <figo1802@gmail.com>
# Contributor: hauptmech
pkgname=flann
pkgver=1.8.4
pkgrel=2
pkgdesc="FLANN is a library for performing fast approximate nearest neighbor searches in high dimensional spaces"
arch=('i686' 'x86_64')
url='http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN'
license=('BSD')
depends=('hdf5')
makedepends=('cmake' 'python2')
optdepends=('python2: python bindings'
'cuda: cuda support')
source=("http://people.cs.ubc.ca/~mariusm/uploads/FLANN/flann-${pkgver}-src.zip" "http://pkgs.fedoraproject.org/cgit/rpms/flann.git/plain/flann-1.8.4-gcc6.patch")
md5sums=('a0ecd46be2ee11a68d2a7d9c6b4ce701'
'21ec2d7009fb09307ab74909f3b1d04e')
build() {
cd $srcdir/flann-${pkgver}-src
patch -p0 < ../flann-1.8.4-gcc6.patch
sed -i 's/lib64/lib/g' cmake/flann_utils.cmake
sed -i '1 i #undef _GLIBCXX_ATOMIC_BUILTINS' src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu
sed -i '1 i #undef _GLIBCXX_USE_INT128' src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu
sed -i 's|#!/usr/bin/env python|#!/usr/bin/python2|' \
bin/download_checkmd5.py \
bin/run_test.py \
src/python/setup.py.tpl \
test/test_clustering.py \
test/test_index_save.py \
test/test_nn_autotune.py \
test/test_nn_index.py \
test/test_nn.py
sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' \
test/memusage_clustering.py \
test/memusage_nn.py
sed -i "s|setup\.py install|setup.py install --root=$pkgdir --optimize=1|" src/python/CMakeLists.txt
[[ -d build ]] && rm -r build
mkdir build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_MATLAB_BINDINGS=OFF \
-DBUILD_PYTHON_BINDINGS=ON \
-DPYTHON_EXECUTABLE=/usr/bin/python2 \
-DNVCC_COMPILER_BINDIR=/usr/bin
make
}
package() {
cd $srcdir/flann-${pkgver}-src
cd build
make DESTDIR=$pkgdir install
#install license file
install -D -m644 ../COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# FIXME: awful hack, but I got this error without the fix:
# running install_lib
# copying build/lib/pyflann/exceptions.py -> /usr/lib/python2.7/site-packages/pyflann
# error: /usr/lib/python2.7/site-packages/pyflann/exceptions.py: Permission denied
_python2libpath="`python2 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" | tr -d '\n'`"
mkdir -p "${pkgdir}${_python2libpath}"
cp -pr "${pkgdir}/usr/share/flann/python/pyflann" "${pkgdir}${_python2libpath}/pyflann"
}
Search Criteria
Package Details: flann 1.9.1-7
Git Clone URL: | https://aur.archlinux.org/flann.git (read-only, click to copy) |
---|---|
Package Base: | flann |
Description: | FLANN is a library for performing fast approximate nearest neighbor searches in high dimensional spaces |
Upstream URL: | https://github.com/mariusmuja/flann |
Licenses: | |
Submitter: | None |
Maintainer: | acxz |
Last Packager: | acxz |
Votes: | 42 |
Popularity: | 0.021665 |
First Submitted: | 2011-04-05 02:06 |
Last Updated: | 2020-04-19 05:05 |
Dependencies (7)
- hdf5 (hdf5-git, hdf5-openmpi-java, hdf5-java, hdf5-openmpi)
- lz4 (lz4-git, lz4-static-musl, lz4-static)
- cmake (cmake-git) (make)
- python (python-dbg) (make)
- texlive-core (texlive-installer, texlive-full) (make)
- cuda (cuda-11.0, cuda11.1) (optional) – cuda support
- python (python-dbg) (optional) – python bindings
Required by (14)
- aleph-git (optional)
- alice-vision
- alice-vision-git
- fcl (optional)
- fcl-git (optional)
- libdart
- ompl (optional)
- ompl-git (optional)
- omplapp (optional)
- openmvg-git
- pcl
- pcl-git
- robwork (make)
- robwork
Sources (1)
kikislater commented on 2016-05-17 19:25
hanno commented on 2016-05-11 09:34
Not working anymore with gcc6 - this patch helps: http://pkgs.fedoraproject.org/cgit/rpms/flann.git/plain/flann-1.8.4-gcc6.patch
poinu commented on 2016-05-09 14:29
Should update to handle new C++ ABI default. https://www.archlinux.org/news/c-abi-change/
0xffaa commented on 2014-02-05 17:07
cuda opt-depend only
a_user commented on 2014-02-02 13:32
+1 for CUDA as an opt-depend only
bchretien commented on 2014-01-21 23:57
Indeed, cuda should be an optional dependency. If users install AUR packages recursively (e.g. PCL), they will end up installing CUDA automatically even if they cannot use it. And that is quite a lot of wasted storage space...
costashatz commented on 2014-01-20 18:22
+1 for CUDA as an opt-depend only
Svenstaro commented on 2013-10-28 17:36
Feel free to take over maintainership. I disowned the package.
hauptmech commented on 2013-10-28 17:32
+1 for CUDA as an opt-depend
progtologist commented on 2013-09-25 10:45
CUDA should be listed as an opt-depend instead of a makedepend.
Users without nvidia graphics cards can install flann without CUDA and nvidia drivers.
Pinned Comments
acxz commented on 2020-02-03 02:07
Development is on Github: https://github.com/acxz/pkgbuilds Please open issues and PRs there instead of commenting.