Package: flann / 1.9.1+dfsg-9

Metadata

Package Version Patches format
flann 1.9.1+dfsg-9 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
0001 Updated fix cmake hdf5.patch | (download)

CMakeLists.txt | 2 1 + 1 - 0 !
examples/CMakeLists.txt | 2 1 + 1 - 0 !
test/CMakeLists.txt | 2 1 + 1 - 0 !
3 files changed, 3 insertions(+), 3 deletions(-)

 updated fix cmake hdf5


0001 src cpp fix cmake 3.11 build.patch | (download)

src/cpp/CMakeLists.txt | 4 2 + 2 - 0 !
src/cpp/empty.cpp | 1 1 + 0 - 0 !
2 files changed, 3 insertions(+), 2 deletions(-)

 [patch] src/cpp: fix cmake >= 3.11 build

CMake < 3.11 doesn't support add_library() without any source file
(i.e add_library(foo SHARED)). But flann CMake use a trick that use
an empty string "" as source list (i.e add_library(foo SHARED "")).
This look like a bug in CMake < 3.11.

With CMake >= 3.11, the new behaviour of add_library() break the
existing flann CMake code.

From CMake Changelog [1]:
"add_library() and add_executable() commands can now be called without
 any sources and will not complain as long as sources are added later
 via the target_sources() command."

Note: flann CMake code doesn't use target_sources() since no source file
are provided intentionally since the flann shared library is created by
linking with the flann_cpp_s static library with this line:

target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)

If you try to use "add_library(flann_cpp SHARED ${CPP_SOURCES})" (as it should
be normally done), the link fail due to already defined symbol.

They are building the shared version using the static library "to speedup the
build time" [3]

This issue is already reported upstream [2] with a proposed solution.

Upstream status: Pending

Fixes:
http://autobuild.buildroot.net/results/b2f/b2febfaf8c44ce477b3e4a5b9b976fd25e8d7454

[1] https://cmake.org/cmake/help/v3.11/release/3.11.html
[2] https://github.com/mariusmuja/flann/issues/369
[3] https://github.com/mariusmuja/flann/commit/0fd62b43be2fbb0b8d791ee36290791224dc030c

Signed-off-by: Romain Naour <romain.naour@gmail.com>

0003 Use system version of liblz4.patch | (download)

CMakeLists.txt | 3 3 + 0 - 0 !
cmake/flann.pc.in | 2 1 + 1 - 0 !
examples/CMakeLists.txt | 3 3 + 0 - 0 !
src/cpp/CMakeLists.txt | 8 6 + 2 - 0 !
src/cpp/flann/util/serialization.h | 4 2 + 2 - 0 !
5 files changed, 15 insertions(+), 5 deletions(-)

 use system version of liblz4

Also make sure that flann_cpp is linked against LZ4.

0004 Add empty date in manual to make build reproducible.patch | (download)

doc/manual.tex | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 add empty date in manual to make build reproducible