From 20418956d740ee2cf2d57e8a51debe7c8bf0ca32 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Sat, 5 Feb 2022 22:41:39 +0100 Subject: academic/flann: Fix building with the newer cmake, cleanups. Signed-off-by: Matteo Bernardini Signed-off-by: Andrew Clemons Signed-off-by: Willy Sudiarto Raharjo --- academic/flann/flann.SlackBuild | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'academic/flann') 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 -- cgit v1.2.3