aboutsummaryrefslogtreecommitdiff
path: root/academic/flann/flann.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/flann/flann.SlackBuild')
-rw-r--r--academic/flann/flann.SlackBuild14
1 files changed, 14 insertions, 0 deletions
diff --git a/academic/flann/flann.SlackBuild b/academic/flann/flann.SlackBuild
index c9be97ef6e193..eadcc1568c5cf 100644
--- a/academic/flann/flann.SlackBuild
+++ b/academic/flann/flann.SlackBuild
@@ -82,6 +82,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+sed -i "s|setup\.py install|setup.py install --root=$PKG --optimize=1|" src/python/CMakeLists.txt
+
+touch src/cpp/empty.cpp
+sed -i -e 's/flann_cpp SHARED \"\"/flann_cpp SHARED \"empty\.cpp\"/g' src/cpp/CMakeLists.txt
+sed -i -e 's/flann SHARED \"\"/flann SHARED \"empty\.cpp\"/g' src/cpp/CMakeLists.txt
+
mkdir -p build
cd build
cmake \
@@ -89,15 +95,23 @@ cd build
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DBUILD_MATLAB_BINDINGS=OFF \
+ -DBUILD_PYTHON_BINDINGS=ON \
+ -DPYTHON_EXECUTABLE=/usr/bin/python3 \
+ -DBUILD_TESTS=OFF \
+ -DBUILD_EXAMPLES=OFF \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
cd ..
+rm -fR $PKG/usr/share/$PRGNAM
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
+rm -fR $PKG/usr/share/doc
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp COPYING ChangeLog README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install