summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorTim Rakowski2018-01-10 22:35:02 +0100
committerTim Rakowski2018-01-10 22:35:02 +0100
commit2d071c1541e4149f8e4f70a65df3688f87f87df1 (patch)
treef5e345426096b3ff756e81bdd0528ca177b765f1 /PKGBUILD
parent86fde2b55b6bbfdffbd5eddb5effdbd22508f67e (diff)
downloadaur-2d071c1541e4149f8e4f70a65df3688f87f87df1.tar.gz
Use system's lz4 + Clean up
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD44
1 files changed, 16 insertions, 28 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 92548487cef..05bbe1cf487 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,34 +11,27 @@ pkgdesc="FLANN is a library for performing fast approximate nearest neighbor sea
arch=('i686' 'x86_64')
url='http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN'
license=('BSD')
-depends=('hdf5')
-makedepends=('cmake' 'python2')
+depends=('lz4' 'hdf5')
+makedepends=('cmake' 'python2' 'texlive-bin')
optdepends=('python2: python bindings'
'cuda: cuda support')
-source=("https://github.com/mariusmuja/flann/archive/${pkgver}.tar.gz")
-md5sums=('73adef1c7bf8e8b978987e7860926ea6')
+source=("https://github.com/mariusmuja/flann/archive/${pkgver}.tar.gz" "system_lz4.patch")
+md5sums=('73adef1c7bf8e8b978987e7860926ea6'
+ '67aef022b455bbbd5a08920f70eb589d')
-build() {
+prepare() {
cd "$srcdir/flann-${pkgver}"
- 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
+ patch -Np2 -i "${srcdir}/system_lz4.patch"
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
+build() {
+ cd "$srcdir/flann-${pkgver}"
+
+ #[[ -d build ]] && rm -r build
+ mkdir -p build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -48,6 +41,7 @@ build() {
-DBUILD_TESTS=OFF \
-DBUILD_EXAMPLES=OFF
make
+ make doc
}
package() {
@@ -59,13 +53,7 @@ package() {
#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"
-
+ # remove lz4 because we use the one supplied by the system
+ rm -r "${pkgdir}/usr/include/flann/ext"
}