new package: libflann
This commit is contained in:
parent
bbacda630d
commit
a548be9a2d
29
packages/libflann/build.sh
Normal file
29
packages/libflann/build.sh
Normal file
@ -0,0 +1,29 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/flann-lib/flann
|
||||
TERMUX_PKG_DESCRIPTION="A library for performing fast approximate nearest neighbor searches in high dimensional spaces"
|
||||
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
_COMMIT=1d04523268c388dabf1c0865d69e1b638c8c7d9d
|
||||
TERMUX_PKG_VERSION=2019.04.06
|
||||
TERMUX_PKG_SRCURL=https://github.com/flann-lib/flann.git
|
||||
TERMUX_PKG_GIT_BRANCH=master
|
||||
TERMUX_PKG_DEPENDS="libc++, liblz4"
|
||||
TERMUX_PKG_BUILD_DEPENDS="libhdf5-static"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DBUILD_PYTHON_BINDINGS=OFF
|
||||
-DBUILD_MATLAB_BINDINGS=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_DOC=OFF
|
||||
"
|
||||
|
||||
termux_step_post_get_source() {
|
||||
git fetch --unshallow
|
||||
git checkout $_COMMIT
|
||||
|
||||
local version="$(git log -1 --format=%cs | sed 's/-/./g')"
|
||||
if [ "$version" != "$TERMUX_PKG_VERSION" ]; then
|
||||
echo -n "ERROR: The specified version \"$TERMUX_PKG_VERSION\""
|
||||
echo " is different from what is expected to be: \"$version\""
|
||||
return 1
|
||||
fi
|
||||
}
|
42
packages/libflann/pkgconfig.patch
Normal file
42
packages/libflann/pkgconfig.patch
Normal file
@ -0,0 +1,42 @@
|
||||
https://github.com/flann-lib/flann/pull/480
|
||||
|
||||
From 25eb56ec78472bd419a121c6905095a793cf8992 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Purvis <mpurvis@clearpath.ai>
|
||||
Date: Fri, 9 Jul 2021 15:53:06 +0000
|
||||
Subject: [PATCH] Use string(JOIN) to avoid semicolons in pc file.
|
||||
|
||||
---
|
||||
CMakeLists.txt | 3 ++-
|
||||
cmake/flann.pc.in | 2 +-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f4b94d25..aabf93ac 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 2.6)
|
||||
+cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
@@ -148,6 +148,7 @@ endif(BUILD_CUDA_LIB)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LZ4 REQUIRED liblz4)
|
||||
+string(JOIN " " LZ4_STATIC_LDFLAGS_STR ${LZ4_STATIC_LDFLAGS})
|
||||
|
||||
#set the C/C++ include path to the "include" directory
|
||||
include_directories(BEFORE ${PROJECT_SOURCE_DIR}/src/cpp)
|
||||
diff --git a/cmake/flann.pc.in b/cmake/flann.pc.in
|
||||
index 07b8d649..1e7673ac 100644
|
||||
--- a/cmake/flann.pc.in
|
||||
+++ b/cmake/flann.pc.in
|
||||
@@ -8,6 +8,6 @@ Name: @PROJECT_NAME@
|
||||
Description: @PKG_DESC@
|
||||
Version: @FLANN_VERSION@
|
||||
Requires: @PKG_EXTERNAL_DEPS@
|
||||
-Libs: -L${libdir} @LZ4_STATIC_LDFLAGS@ -lflann -lflann_cpp
|
||||
+Libs: -L${libdir} @LZ4_STATIC_LDFLAGS_STR@ -lflann -lflann_cpp
|
||||
Cflags: -I${includedir}
|
||||
|
Loading…
Reference in New Issue
Block a user