From 18e0a3d4e320830836dac3dce5fbcebd0a8c3803 Mon Sep 17 00:00:00 2001 From: Bernhard M. Wiedemann Date: Oct 22 2022 04:52:17 +0000 Subject: update --- diff --git a/.files b/.files index bda6a9a..2c5e957 100644 Binary files a/.files and b/.files differ diff --git a/.rev b/.rev index 657cca5..00d91c5 100644 --- a/.rev +++ b/.rev @@ -44,4 +44,12 @@ 1003413 + + 52b424e3c92c339185cb57d46fdb3423 + 1.9.2 + + favogt_factory + + 1008939 + diff --git a/0001-Cleanup-library-build-make-static-library-optional.patch b/0001-Cleanup-library-build-make-static-library-optional.patch index 8df5a29..a9e2281 100644 --- a/0001-Cleanup-library-build-make-static-library-optional.patch +++ b/0001-Cleanup-library-build-make-static-library-optional.patch @@ -23,7 +23,7 @@ diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt index d8bff04..1ebcecc 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt -@@ -13,7 +13,14 @@ target_link_libraries(flann_cpp_s ${LZ4_LINK_LIBRARIES}) +@@ -13,7 +13,14 @@ target_link_libraries(flann_cpp_s PUBLIC ${LZ4_LINK_LIBRARIES}) if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) set_target_properties(flann_cpp_s PROPERTIES COMPILE_FLAGS -fPIC) endif() @@ -39,7 +39,7 @@ index d8bff04..1ebcecc 100644 if (BUILD_CUDA_LIB) SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-DFLANN_USE_CUDA") -@@ -27,28 +34,27 @@ if (BUILD_CUDA_LIB) +@@ -27,29 +34,27 @@ if (BUILD_CUDA_LIB) endif() cuda_add_library(flann_cuda_s STATIC ${CU_SOURCES}) set_property(TARGET flann_cuda_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) @@ -61,6 +61,7 @@ index d8bff04..1ebcecc 100644 - add_library(flann_cpp SHARED dummy.c) set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive) + target_link_libraries(flann_cpp PUBLIC ${LZ4_LINK_LIBRARIES}) - - if (BUILD_CUDA_LIB) - cuda_add_library(flann_cuda SHARED dummy.c) @@ -68,10 +69,9 @@ index d8bff04..1ebcecc 100644 - target_link_libraries(flann_cuda -Wl,-whole-archive flann_cuda_s -Wl,-no-whole-archive) - set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) - endif() -+ target_link_libraries(flann_cpp ${LZ4_LINK_LIBRARIES}) else() - add_library(flann_cpp SHARED ${CPP_SOURCES}) - target_link_libraries(flann_cpp ${LZ4_LINK_LIBRARIES}) + target_link_libraries(flann_cpp PUBLIC ${LZ4_LINK_LIBRARIES}) # export lz4 headers, so that MSVC to creates flann_cpp.lib set_target_properties(flann_cpp PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS YES) - if (BUILD_CUDA_LIB) @@ -81,7 +81,7 @@ index d8bff04..1ebcecc 100644 endif() set_target_properties(flann_cpp PROPERTIES -@@ -85,13 +91,17 @@ if (BUILD_C_BINDINGS) +@@ -85,14 +91,17 @@ if (BUILD_C_BINDINGS) set_target_properties(flann_s PROPERTIES COMPILE_FLAGS -fPIC) endif() set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) @@ -97,10 +97,10 @@ index d8bff04..1ebcecc 100644 - add_library(flann SHARED dummy.c) - set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive) -+ target_link_libraries(flann ${LZ4_LINK_LIBRARIES}) + target_link_libraries(flann PUBLIC ${LZ4_LINK_LIBRARIES}) else() - add_library(flann SHARED ${C_SOURCES}) - target_link_libraries(flann ${LZ4_LINK_LIBRARIES}) + target_link_libraries(flann PUBLIC ${LZ4_LINK_LIBRARIES}) if(MINGW AND OPENMP_FOUND) @@ -117,7 +127,7 @@ endif(WIN32) diff --git a/flann.changes b/flann.changes index eaaac66..bf8ea48 100644 --- a/flann.changes +++ b/flann.changes @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Thu Oct 6 15:27:24 UTC 2022 - Stefan Brüns + +- Make sure lz4 is referenced correctly from CMake and pkgconfig + * Add fix_lz4_linkage.patch + * Add 0001-Fix-LZ4_LDFLAGS-format-for-pkgconfig-file.patch +- Add liblz4 devel dependency +- Correct CMake config install patch + +------------------------------------------------------------------- Sun Sep 11 16:59:36 UTC 2022 - Stefan Brüns - Make sure the static libflann_cpp is neither installed nor diff --git a/flann.spec b/flann.spec index 9cb4ace..ac209a3 100644 --- a/flann.spec +++ b/flann.spec @@ -26,7 +26,11 @@ Group: Productivity/Scientific/Other URL: https://www.cs.ubc.ca/research/flann/ Source: https://github.com/tkircher/flann/releases/download/%version/flann-%version.tar.xz # PATCH-FIX-UPSTREAM -Patch0: 0001-Cleanup-library-build-make-static-library-optional.patch +Patch0: https://github.com/tkircher/flann/commit/c9572a40574c18a79e50b6a8c0043a8cafed6e69.patch#/fix_lz4_linkage.patch +# PATCH-FIX-UPSTREAM +Patch1: 0001-Cleanup-library-build-make-static-library-optional.patch +# PATCH-FIX-UPSTREAM +Patch2: 0001-Fix-LZ4_LDFLAGS-format-for-pkgconfig-file.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: googletest-devel @@ -54,6 +58,7 @@ This package contains the shared library. Summary: Development files for %{name} Group: Development/Libraries/C and C++ Requires: lib%{name}%{sover} = %{version} +Requires: liblz4-devel %description devel Fast Library for Approximate Nearest Neighbors. @@ -63,6 +68,8 @@ application that use %{name}. %prep %autosetup -p1 +# Correct install path for CMake config +sed -i -e 's@\(set(config_install_dir\).*)@\1 "%{_libdir}/cmake/flann")@' CMakeLists.txt %build %cmake \ @@ -89,6 +96,6 @@ application that use %{name}. %{_includedir}/%{name}/ %{_libdir}/lib%{name}*so %{_libdir}/pkgconfig/%{name}.pc -%{_prefix}/lib/cmake/ +%{_libdir}/cmake/flann %changelog