summaryrefslogtreecommitdiff
path: root/sci-libs/flann
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
commitf516638b7fe9592837389826a6152a7e1b251c54 (patch)
tree8bfecb640b7b6403d7a3d662d923eed630033da7 /sci-libs/flann
parent1a61119f9f7b057830e2ce0563f913ec86f282ad (diff)
gentoo resync : 30.05.2020
Diffstat (limited to 'sci-libs/flann')
-rw-r--r--sci-libs/flann/Manifest3
-rw-r--r--sci-libs/flann/files/flann-1.9.1-system-lz4.patch125
-rw-r--r--sci-libs/flann/flann-1.9.1-r3.ebuild (renamed from sci-libs/flann/flann-1.9.1-r2.ebuild)25
3 files changed, 139 insertions, 14 deletions
diff --git a/sci-libs/flann/Manifest b/sci-libs/flann/Manifest
index 23a5597c49c6..0a55d7d6c7ee 100644
--- a/sci-libs/flann/Manifest
+++ b/sci-libs/flann/Manifest
@@ -1,7 +1,8 @@
AUX flann-1.9.1-cmake-3.11-1.patch 663 BLAKE2B 7162cb27a4ba6e13ac6f65752224e53be4988b3bb2ab5b8a9afbbed69a262a36c394d445fbb006afe7edbc5c9e90c339a88040eb7bee4c5c6c3209e1ba21b4ef SHA512 6d5032c30c0509951aaa5afc3f24a423d275224f67e14e0c4defbbda92ec659cef86fcfa65d72265d000f8010f0117ca2b8905f2c6f496aeef74a98dee9ffa08
AUX flann-1.9.1-cmake-3.11.patch 2998 BLAKE2B 85c6b6feb800ab1a21af86a4001b0056fda416a6b61147f614670968cca13fa2b63d06673a11a2ef72b6f0d0876539ccb68134f4817975d4b796b66a716e606d SHA512 5cdffa2da3538965c0d20fb091a13124cdc301669b622ca35a131680db8abb58cf8e02f1366604a19a5cd10dd67f14861caa1c12da3154d82d576cb8052a4b87
AUX flann-1.9.1-cuda-9.patch 850 BLAKE2B f193a6fd25a1d2cd45201d547fb444393cb82f344da6f5d1e2a012599170a412b261f6cf35d8943da7e96fd9f204991580d5ea045b43e2aa33ea5ad9fa9307d4 SHA512 0b5cad7b928319b922bdaa27d07fd38f1c359799ef9c217b6c1979f8ac9a86706e7ad1547f484aeb1db449a37693d18b2710b877483266915a869372c29ee1e4
+AUX flann-1.9.1-system-lz4.patch 4934 BLAKE2B eea32abae8b13d5d0e5149c58b2639c1b6f3bbbedfa8aa91f5fb83afca4726571eb4e01eb440eb913b54f8a03124bc0266c8b039b6448bcdc0bc5e87a9512c6f SHA512 acb67eb59b400b82722f064e529fc86f43c4e16ba097a3742b5717b33fcd35a619c73ec6ea6391b23f906d4bc40a5167b56cffd0267bc2c8259b7298ad414e65
DIST flann-1.9.1.tar.gz 485391 BLAKE2B bf1e1e7feb33e939e1d0586db593bea3fdf66726fbadec63df9ed9c7bdb678babb11001769f0d041a7a569186b3d700db8b96af5eb9740615f6dfd880460f68b SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7
-EBUILD flann-1.9.1-r2.ebuild 2328 BLAKE2B 7561d9f02e10301add3c59c756c52380f2ecf66ced64cdfebd77852275275f2c1fd2f9899dde69ec5f72f024b09896d5dbd5afb0b644a1fbb3e4cc2fddaabb13 SHA512 8221d601cdc3a2899af889f74122a04f37e556f19bd52f743df234a644ee16b555cdd18927a37585800ed51a2b073609f8f3397b641f82df3b12d5c08e521c14
+EBUILD flann-1.9.1-r3.ebuild 2320 BLAKE2B e3a8d2a4014e5bad7c20712aec3aa52c1334525830a408811923e63a22934a936ce9408ae26101c61cdba54edbc76e8f83d49631398a96c090a945a9b72f157c SHA512 a9143b97f949c83ccffbacac4da2215058372197cca49149d562bf9a8709acbcfe658e24d2c0532f71727c68c75c51ce432ddebfcd0afe98d7f003c6a9cd0c94
EBUILD flann-9999.ebuild 2215 BLAKE2B bb8f804a838a8c6b1702666a92cca7ce919523b7c8590a6f816ae3ec2d8b85c44ecc237f55bd498c8e6e296388c7b1cfcb6338b7a2361a5eaef869f2987b85f4 SHA512 9d2c22c2e45bc73cd982a7d75f77ec05b0533a60dc1125cd5127aec43d74f990b81690a1e47fd67cabc2ed5da500dded79c4dd8c79dc138db6c2a36d10bac0a0
MISC metadata.xml 971 BLAKE2B 5cffd393d18c3719d8b61069dbc84f4ce4e16e6746637b1203dcba3719fb672d8db082afa93add6be9ebc4203df85391d20eb824a7a9ea3550b37295186538ff SHA512 b8416b149e26ede6d3f207d7e48316a8b880436c40c4ed5610953ceda0fee4e5b97f1b99f778678514dd115c257fb419b365ed46fdd90a19d444bca8e3e0fe03
diff --git a/sci-libs/flann/files/flann-1.9.1-system-lz4.patch b/sci-libs/flann/files/flann-1.9.1-system-lz4.patch
new file mode 100644
index 000000000000..dcc9fedd4a97
--- /dev/null
+++ b/sci-libs/flann/files/flann-1.9.1-system-lz4.patch
@@ -0,0 +1,125 @@
+From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
+Date: Sun, 14 Oct 2018 00:25:05 +0200
+Subject: Use system version of liblz4
+
+Also make sure that flann_cpp is linked against LZ4.
+---
+ CMakeLists.txt | 3 +++
+ cmake/flann.pc.in | 2 +-
+ examples/CMakeLists.txt | 3 +++
+ src/cpp/CMakeLists.txt | 8 ++++++--
+ src/cpp/flann/util/serialization.h | 4 ++--
+ 5 files changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a01fb7a..995e54e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -142,6 +142,9 @@ if (BUILD_CUDA_LIB)
+ endif(CUDA_FOUND)
+ endif(BUILD_CUDA_LIB)
+
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(LZ4 REQUIRED liblz4)
++
+ #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 82eee5e..07b8d64 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} -lflann -lflann_cpp
++Libs: -L${libdir} @LZ4_STATIC_LDFLAGS@ -lflann -lflann_cpp
+ Cflags: -I${includedir}
+
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index e9fef04..2b2bb9d 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -3,6 +3,7 @@ add_custom_target(examples ALL)
+
+ if (BUILD_C_BINDINGS)
+ add_executable(flann_example_c flann_example.c)
++ target_link_libraries(flann_example_c -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state)
+ target_link_libraries(flann_example_c flann)
+ set_target_properties(flann_example_c PROPERTIES COMPILE_FLAGS -std=c99)
+
+@@ -14,6 +15,7 @@ if (HDF5_FOUND)
+ include_directories(${HDF5_INCLUDE_DIRS})
+
+ add_executable(flann_example_cpp flann_example.cpp)
++ target_link_libraries(flann_example_cpp -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state)
+ target_link_libraries(flann_example_cpp ${HDF5_LIBRARIES} flann_cpp)
+ if (HDF5_IS_PARALLEL)
+ target_link_libraries(flann_example_cpp ${MPI_LIBRARIES})
+@@ -25,6 +27,7 @@ if (HDF5_FOUND)
+
+ if (USE_MPI AND HDF5_IS_PARALLEL)
+ add_executable(flann_example_mpi flann_example_mpi.cpp)
++ target_link_libraries(flann_example_mpi -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state)
+ target_link_libraries(flann_example_mpi flann_cpp ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${Boost_LIBRARIES})
+
+ add_dependencies(examples flann_example_mpi)
+diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
+index b453b27..5c4f693 100644
+--- a/src/cpp/CMakeLists.txt
++++ b/src/cpp/CMakeLists.txt
+@@ -4,11 +4,12 @@ add_definitions(-D_FLANN_VERSION=${FLANN_VERSION})
+
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/flann/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/flann/config.h)
+
+-file(GLOB_RECURSE C_SOURCES flann.cpp lz4.c lz4hc.c)
+-file(GLOB_RECURSE CPP_SOURCES flann_cpp.cpp lz4.c lz4hc.c)
++file(GLOB_RECURSE C_SOURCES flann.cpp)
++file(GLOB_RECURSE CPP_SOURCES flann_cpp.cpp)
+ file(GLOB_RECURSE CU_SOURCES *.cu)
+
+ add_library(flann_cpp_s STATIC ${CPP_SOURCES})
++target_link_libraries(flann_cpp_s ${LZ4_LIBRARIES})
+ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
+ set_target_properties(flann_cpp_s PROPERTIES COMPILE_FLAGS -fPIC)
+ endif()
+@@ -42,6 +43,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+ endif()
+ else()
+ add_library(flann_cpp SHARED ${CPP_SOURCES})
++ target_link_libraries(flann_cpp -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state)
+ if (BUILD_CUDA_LIB)
+ cuda_add_library(flann_cuda SHARED ${CPP_SOURCES})
+ set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA)
+@@ -77,6 +79,7 @@ endif()
+
+ if (BUILD_C_BINDINGS)
+ add_library(flann_s STATIC ${C_SOURCES})
++ target_link_libraries(flann_cpp -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state)
+ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
+ set_target_properties(flann_s PROPERTIES COMPILE_FLAGS -fPIC)
+ endif()
+@@ -88,6 +91,7 @@ if (BUILD_C_BINDINGS)
+ target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
+ else()
+ add_library(flann SHARED ${C_SOURCES})
++ target_link_libraries(flann_cpp -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state)
+
+ if(MINGW AND OPENMP_FOUND)
+ target_link_libraries(flann gomp)
+diff --git a/src/cpp/flann/util/serialization.h b/src/cpp/flann/util/serialization.h
+index d731021..cdc2e5e 100644
+--- a/src/cpp/flann/util/serialization.h
++++ b/src/cpp/flann/util/serialization.h
+@@ -6,8 +6,8 @@
+ #include <cstdlib>
+ #include <cstring>
+ #include <stdio.h>
+-#include "flann/ext/lz4.h"
+-#include "flann/ext/lz4hc.h"
++#include <lz4.h>
++#include <lz4hc.h>
+
+
+ namespace flann
diff --git a/sci-libs/flann/flann-1.9.1-r2.ebuild b/sci-libs/flann/flann-1.9.1-r3.ebuild
index f6ffdd259b22..e53d428ee73c 100644
--- a/sci-libs/flann/flann-1.9.1-r2.ebuild
+++ b/sci-libs/flann/flann-1.9.1-r3.ebuild
@@ -1,28 +1,29 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit cmake-utils cuda flag-o-matic toolchain-funcs
+inherit cmake cuda flag-o-matic toolchain-funcs
DESCRIPTION="Fast approximate nearest neighbor searches in high dimensional spaces"
-HOMEPAGE="https://www.cs.ubc.ca/research/flann/"
+HOMEPAGE="https://github.com/mariusmuja/flann"
SRC_URI="https://github.com/mariusmuja/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~arm arm64 ~ppc x86 ~amd64-linux ~x86-linux"
-IUSE="cuda doc examples mpi openmp octave static-libs"
+IUSE="cuda doc examples mpi octave openmp"
BDEPEND="
app-arch/unzip
doc? ( dev-tex/latex2html )
"
DEPEND="
+ app-arch/lz4:=
cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 )
mpi? (
- sci-libs/hdf5[mpi]
dev-libs/boost:=[mpi]
+ sci-libs/hdf5[mpi]
)
!mpi? ( !sci-libs/hdf5[mpi] )
octave? ( >=sci-mathematics/octave-3.6.4-r1 )
@@ -35,6 +36,7 @@ RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-cmake-3.11{,-1}.patch # bug 678030
"${FILESDIR}"/${P}-cuda-9.patch
+ "${FILESDIR}"/${P}-system-lz4.patch # bug 681898
)
pkg_pretend() {
@@ -59,14 +61,13 @@ src_prepare() {
src/matlab/CMakeLists.txt || die
use cuda && cuda_src_prepare
- cmake-utils_src_prepare
+ cmake_src_prepare
}
src_configure() {
append-cxxflags -std=c++11
- # python bindings are split
- # off into dev-python/pyflann
+ # python bindings are split off into dev-python/pyflann
local mycmakeargs=(
-DBUILD_C_BINDINGS=ON
-DBUILD_PYTHON_BINDINGS=OFF
@@ -84,12 +85,10 @@ src_configure() {
)
use doc && mycmakeargs+=( -DDOCDIR=share/doc/${PF} )
- cmake-utils_src_configure
+ cmake_src_configure
}
src_install() {
- cmake-utils_src_install
- if ! use static-libs; then
- find "${D}" -name 'lib*.a' -delete || die
- fi
+ cmake_src_install
+ find "${D}" -name 'lib*.a' -delete || die
}