academic/flann: Updated for version 1.9.1 + new maintainer.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Nikolay Nikolov 2017-01-14 01:21:17 +07:00 committed by Willy Sudiarto Raharjo
parent 06619e92b9
commit d3789a7d2b
3 changed files with 44 additions and 69 deletions

View File

@ -1,10 +1,7 @@
FLANN is a library for performing fast approximate nearest neighbor searches
in high dimensional spaces. It contains a collection of algorithms we found
to work best for nearest neighbor search and a system for automatically
choosing the best algorithm and optimum parameters depending on the dataset.
FLANN is a library for performing fast approximate nearest neighbor searches
in high dimensional spaces. It contains a collection of algorithms we found
to work best for nearest neighbor search and a system for automatically
choosing the best algorithm and optimum parameters depending on the dataset.
FLANN is written in C++ and contains bindings for the following languages:
C, MATLAB and Python. The Python bindings will need numpy, and the MATLAB
bindings will need MATLAB installed and with its binaries directory set into
the PATH. If you want to build the MATLAB bindings, set the environment
variable WITH_MATLAB to 1.
FLANN is written in C++ and contains bindings for the following languages:
C, MATLAB and Python.

View File

@ -5,33 +5,34 @@
# Written by João Felipe Santos <joao.eel@gmail.com>
# Copyright (c) 2010 João Felipe Santos
# Copyright 2016 Nikolay Nikolov <nikobnikolov[at]gmail[dot]com>
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=flann
VERSION=${VERSION:-1.2}
VERSION=${VERSION:-1.9.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@ -42,8 +43,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@ -56,60 +57,37 @@ else
LIBDIRSUFFIX=""
fi
set -e
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION-src
unzip $CWD/$PRGNAM-$VERSION-src.zip
cd $PRGNAM-$VERSION-src
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Hack to deactivate MATLAB bindings
if [ -z $WITH_MATLAB ]; then
sed -i '/matlab/d' src/CMakeLists.txt
fi
sed -i '/CMAKE_INSTALL_PREFIX/d' src/CMakeLists.txt
mkdir -p tmp
cd tmp
mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DMAN_INSTALL_DIR=/usr/man \
-DCMAKE_BUILD_TYPE=Release ../src
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
cd ..
# Install Python bindings, then remove the source files from the package
cd $PKG/usr/python
python setup.py install --root=$PKG
cd $TMP/$PRGNAM-$VERSION-src
rm -rf $PKG/usr/python/
# LIB_SUFFIX seems ignored and $prefix/lib is hardcoded
if [ "$LIBDIRSUFFIX" = "64" ]; then
mv $PKG/usr/lib/* $PKG/usr/lib64/
rmdir $PKG/usr/lib
fi
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
doc/manual.pdf README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install

View File

@ -1,10 +1,10 @@
PRGNAM="flann"
VERSION="1.2"
HOMEPAGE="http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN"
DOWNLOAD="http://www.cs.ubc.ca/~mariusm/uploads/FLANN/flann-1.2-src.zip"
MD5SUM="29ab1f3926d8cf95c37f30c56055c23e"
VERSION="1.9.1"
HOMEPAGE="http://www.cs.ubc.ca/research/flann/"
DOWNLOAD="https://github.com/mariusmuja/flann/archive/1.9.1/flann-1.9.1.tar.gz"
MD5SUM="73adef1c7bf8e8b978987e7860926ea6"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="João Felipe Santos"
EMAIL="joao.eel@gmail.com"
MAINTAINER="Nikolay Nikolov"
EMAIL="nikobnikolov[at]gmail[dot]com"