diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2022-02-05 22:41:39 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-02-06 15:47:07 +0700 |
commit | 20418956d740ee2cf2d57e8a51debe7c8bf0ca32 (patch) | |
tree | 9d0513f515c89a5e9df2c5f57fa1e80ace94ede9 /academic | |
parent | 0f98bc619f9451708619a521d10de6bc26681dc7 (diff) |
academic/flann: Fix building with the newer cmake, cleanups.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r-- | academic/flann/flann.SlackBuild | 14 |
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 |