* [gentoo-commits] repo/gentoo:master commit in: sci-libs/flann/, sci-libs/flann/files/
@ 2018-07-01 10:11 Maxim Koltsov
0 siblings, 0 replies; 5+ messages in thread
From: Maxim Koltsov @ 2018-07-01 10:11 UTC (permalink / raw
To: gentoo-commits
commit: 9140856244cc5799ca2c9d3196ec3d381414a2ab
Author: Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 1 10:10:55 2018 +0000
Commit: Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Sun Jul 1 10:10:55 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91408562
sci-libs/flann: fix build with >cmake-3.10
Took patch from Buildroot project, see
https://github.com/buildroot/buildroot/commit/0c469478f64d0ddaf72c0622a1830d855306d51c
Closes: https://bugs.gentoo.org/652594
Closes: https://bugs.gentoo.org/657470
Package-Manager: Portage-2.3.41, Repoman-2.3.9
sci-libs/flann/files/flann-1.9.1-cmake-3.11.patch | 80 ++++++++++++++++++++++
.../{flann-9999.ebuild => flann-1.9.1-r1.ebuild} | 10 ++-
sci-libs/flann/flann-9999.ebuild | 4 ++
3 files changed, 91 insertions(+), 3 deletions(-)
diff --git a/sci-libs/flann/files/flann-1.9.1-cmake-3.11.patch b/sci-libs/flann/files/flann-1.9.1-cmake-3.11.patch
new file mode 100644
index 00000000000..b37bedcf6d5
--- /dev/null
+++ b/sci-libs/flann/files/flann-1.9.1-cmake-3.11.patch
@@ -0,0 +1,80 @@
+From fa5ec96a94646492a3f908e12905b3e48a8e800b Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Wed, 18 Apr 2018 20:24:13 +0200
+Subject: [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>
+---
+ src/cpp/CMakeLists.txt | 4 ++--
+ src/cpp/empty.cpp | 1 +
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+ create mode 100644 src/cpp/empty.cpp
+
+diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
+index b44a735..a816863 100644
+--- a/src/cpp/CMakeLists.txt
++++ b/src/cpp/CMakeLists.txt
+@@ -29,7 +29,7 @@ if (BUILD_CUDA_LIB)
+ endif()
+
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+- add_library(flann_cpp SHARED "")
++ add_library(flann_cpp SHARED "empty.cpp")
+ set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX)
+ target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)
+
+@@ -85,7 +85,7 @@ if (BUILD_C_BINDINGS)
+ set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC)
+
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+- add_library(flann SHARED "")
++ add_library(flann SHARED "empty.cpp")
+ set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX)
+ target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
+ else()
+diff --git a/src/cpp/empty.cpp b/src/cpp/empty.cpp
+new file mode 100644
+index 0000000..40a8c17
+--- /dev/null
++++ b/src/cpp/empty.cpp
+@@ -0,0 +1 @@
++/* empty */
+--
+2.14.3
+
diff --git a/sci-libs/flann/flann-9999.ebuild b/sci-libs/flann/flann-1.9.1-r1.ebuild
similarity index 88%
copy from sci-libs/flann/flann-9999.ebuild
copy to sci-libs/flann/flann-1.9.1-r1.ebuild
index 06d78eb963d..fcb4ef999df 100644
--- a/sci-libs/flann/flann-9999.ebuild
+++ b/sci-libs/flann/flann-1.9.1-r1.ebuild
@@ -3,15 +3,15 @@
EAPI=6
-inherit cmake-utils cuda flag-o-matic git-r3 toolchain-funcs
+inherit cmake-utils cuda flag-o-matic toolchain-funcs
DESCRIPTION="Fast approximate nearest neighbor searches in high dimensional spaces"
HOMEPAGE="http://www.cs.ubc.ca/research/flann/"
-EGIT_REPO_URI="https://github.com/mariusmuja/flann.git"
+SRC_URI="https://github.com/mariusmuja/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
IUSE="cuda doc examples mpi openmp octave static-libs"
RDEPEND="
@@ -29,6 +29,10 @@ DEPEND="${RDEPEND}
# readd dependencies for test suite,
# requires multiple ruby dependencies
+PATCHES=(
+ "${FILESDIR}"/flann-1.9.1-cmake-3.11.patch
+)
+
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
diff --git a/sci-libs/flann/flann-9999.ebuild b/sci-libs/flann/flann-9999.ebuild
index 06d78eb963d..e8b80e9f855 100644
--- a/sci-libs/flann/flann-9999.ebuild
+++ b/sci-libs/flann/flann-9999.ebuild
@@ -29,6 +29,10 @@ DEPEND="${RDEPEND}
# readd dependencies for test suite,
# requires multiple ruby dependencies
+PATCHES=(
+ "${FILESDIR}"/flann-1.9.1-cmake-3.11.patch
+)
+
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/flann/, sci-libs/flann/files/
@ 2020-05-23 10:53 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2020-05-23 10:53 UTC (permalink / raw
To: gentoo-commits
commit: 2951aa020dc9973598a0ed83c1a92c512fbe19b9
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat May 23 09:38:04 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat May 23 10:52:50 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2951aa02
sci-libs/flann: Use system-lz4 and fix underlinking
Closes: https://bugs.gentoo.org/681898
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
sci-libs/flann/files/flann-1.9.1-system-lz4.patch | 125 ++++++++++++++++++++++
sci-libs/flann/flann-1.9.1-r3.ebuild | 94 ++++++++++++++++
2 files changed, 219 insertions(+)
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 00000000000..dcc9fedd4a9
--- /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-r3.ebuild b/sci-libs/flann/flann-1.9.1-r3.ebuild
new file mode 100644
index 00000000000..b34a54471dc
--- /dev/null
+++ b/sci-libs/flann/flann-1.9.1-r3.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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/"
+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 octave openmp"
+
+BDEPEND="
+ app-arch/unzip
+ doc? ( dev-tex/latex2html )
+"
+DEPEND="
+ app-arch/lz4:=
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 )
+ mpi? (
+ dev-libs/boost:=[mpi]
+ sci-libs/hdf5[mpi]
+ )
+ !mpi? ( !sci-libs/hdf5[mpi] )
+ octave? ( >=sci-mathematics/octave-3.6.4-r1 )
+"
+RDEPEND="${DEPEND}"
+# TODO:
+# readd dependencies for test suite,
+# requires multiple ruby dependencies
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cmake-3.11{,-1}.patch # bug 678030
+ "${FILESDIR}"/${P}-cuda-9.patch
+ "${FILESDIR}"/${P}-system-lz4.patch # bug 681898
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ # bug #302621
+ use mpi && export CXX=mpicxx
+ # produce pure octave files
+ # octave gentoo installation for .m files respected
+ sed -i \
+ -e 's/--mex//' \
+ -e 's/\.mex/\.oct/' \
+ -e '/FILES/s/${MEX_FILE}//' \
+ -e 's:share/flann/octave:share/octave/site/m:' \
+ -e "/CUSTOM_TARGET/a\INSTALL(FILES \${MEX_FILE} DESTINATION libexec/octave/site/oct/${CHOST})" \
+ src/matlab/CMakeLists.txt || die
+ use cuda && cuda_src_prepare
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ append-cxxflags -std=c++11
+
+ # python bindings are split off into dev-python/pyflann
+ local mycmakeargs=(
+ -DBUILD_C_BINDINGS=ON
+ -DBUILD_PYTHON_BINDINGS=OFF
+ -DPYTHON_EXECUTABLE=
+ -DBUILD_CUDA_LIB=$(usex cuda)
+ -DBUILD_EXAMPLES=$(usex examples)
+ -DBUILD_DOC=$(usex doc)
+ -DBUILD_TESTS=OFF
+ -DBUILD_MATLAB_BINDINGS=$(usex octave)
+ -DUSE_MPI=$(usex mpi)
+ -DUSE_OPENMP=$(usex openmp)
+ )
+ use cuda && mycmakeargs+=(
+ -DCUDA_NVCC_FLAGS="${NVCCFLAGS} --linker-options \"-arsch\""
+ )
+ use doc && mycmakeargs+=( -DDOCDIR=share/doc/${PF} )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ find "${D}" -name 'lib*.a' -delete || die
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/flann/, sci-libs/flann/files/
@ 2021-12-26 3:03 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2021-12-26 3:03 UTC (permalink / raw
To: gentoo-commits
commit: 65f96213bd1cc2f77a9c5c5fb5665c91d8279909
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 26 03:02:27 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 26 03:03:39 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65f96213
sci-libs/flann: fix pkgconfig file format (no semicolons)
Not sure why but a semicolon seems to have started appearing more
recently, probably with a newer CMake version. Anyway, a problem
from the past resurfaced (in a slightly different way, but
same outcome).
flann's malformed pkgconfig file was causing consumers to be
underlinked against lz4 and libflann* (and usually fail to build).
Closes: https://bugs.gentoo.org/827263
Closes: https://bugs.gentoo.org/829398
Bug: https://bugs.gentoo.org/681898
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/flann-1.9.1-system-lz4-pkgconfig.patch | 38 ++++++++++++++++++++++
...flann-1.9.1-r3.ebuild => flann-1.9.1-r4.ebuild} | 3 +-
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/sci-libs/flann/files/flann-1.9.1-system-lz4-pkgconfig.patch b/sci-libs/flann/files/flann-1.9.1-system-lz4-pkgconfig.patch
new file mode 100644
index 000000000000..35ea0d0e9841
--- /dev/null
+++ b/sci-libs/flann/files/flann-1.9.1-system-lz4-pkgconfig.patch
@@ -0,0 +1,38 @@
+https://github.com/flann-lib/flann/pull/480
+
+https://bugs.gentoo.org/827263
+https://bugs.gentoo.org/829398
+https://bugs.gentoo.org/681898
+
+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.
+
+--- 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)
+--- 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}
+
+
diff --git a/sci-libs/flann/flann-1.9.1-r3.ebuild b/sci-libs/flann/flann-1.9.1-r4.ebuild
similarity index 96%
rename from sci-libs/flann/flann-1.9.1-r3.ebuild
rename to sci-libs/flann/flann-1.9.1-r4.ebuild
index e53d428ee73c..49a8a1c514e2 100644
--- a/sci-libs/flann/flann-1.9.1-r3.ebuild
+++ b/sci-libs/flann/flann-1.9.1-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -37,6 +37,7 @@ PATCHES=(
"${FILESDIR}"/${P}-cmake-3.11{,-1}.patch # bug 678030
"${FILESDIR}"/${P}-cuda-9.patch
"${FILESDIR}"/${P}-system-lz4.patch # bug 681898
+ "${FILESDIR}"/flann-1.9.1-system-lz4-pkgconfig.patch
)
pkg_pretend() {
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/flann/, sci-libs/flann/files/
@ 2025-01-05 11:05 Miroslav Šulc
0 siblings, 0 replies; 5+ messages in thread
From: Miroslav Šulc @ 2025-01-05 11:05 UTC (permalink / raw
To: gentoo-commits
commit: d9f9cf5391a70beb6ccd898209330cbcfa606a7c
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 5 11:05:17 2025 +0000
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Sun Jan 5 11:05:32 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9f9cf53
sci-libs/flann: fixed (probably) boost 1.87 issues
Bug: https://bugs.gentoo.org/946465
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
sci-libs/flann/files/flann-1.9.1-boost-1.87.patch | 64 +++++++++++++++
sci-libs/flann/flann-1.9.1-r7.ebuild | 95 +++++++++++++++++++++++
2 files changed, 159 insertions(+)
diff --git a/sci-libs/flann/files/flann-1.9.1-boost-1.87.patch b/sci-libs/flann/files/flann-1.9.1-boost-1.87.patch
new file mode 100644
index 000000000000..e18604528684
--- /dev/null
+++ b/sci-libs/flann/files/flann-1.9.1-boost-1.87.patch
@@ -0,0 +1,64 @@
+diff --git a/src/cpp/flann/mpi/client.h b/src/cpp/flann/mpi/client.h
+index 19a410c..b7df70e 100644
+--- a/src/cpp/flann/mpi/client.h
++++ b/src/cpp/flann/mpi/client.h
+@@ -45,17 +45,16 @@ class Client
+ public:
+ Client(const std::string& host, const std::string& service)
+ {
+- tcp::resolver resolver(io_service_);
+- tcp::resolver::query query(tcp::v4(), host, service);
+- iterator_ = resolver.resolve(query);
++ tcp::resolver resolver(io_context_);
++ results_ = resolver.resolve(host, service);
+ }
+
+
+ template<typename ElementType, typename DistanceType>
+ void knnSearch(const flann::Matrix<ElementType>& queries, flann::Matrix<int>& indices, flann::Matrix<DistanceType>& dists, int knn, const SearchParams& params)
+ {
+- tcp::socket sock(io_service_);
+- sock.connect(*iterator_);
++ tcp::socket sock(io_context_);
++ boost::asio::connect(sock, results_);
+
+ Request<ElementType> req;
+ req.nn = knn;
+@@ -78,8 +77,8 @@ public:
+
+
+ private:
+- boost::asio::io_service io_service_;
+- tcp::resolver::iterator iterator_;
++ boost::asio::io_context io_context_;
++ tcp::resolver::results_type results_;
+ };
+
+
+diff --git a/src/cpp/flann/mpi/server.h b/src/cpp/flann/mpi/server.h
+index 2caab43..a90538e 100644
+--- a/src/cpp/flann/mpi/server.h
++++ b/src/cpp/flann/mpi/server.h
+@@ -119,18 +119,18 @@ public:
+ void run()
+ {
+ boost::mpi::communicator world;
+- boost::shared_ptr<boost::asio::io_service> io_service;
++ boost::shared_ptr<boost::asio::io_context> io_context;
+ boost::shared_ptr<tcp::acceptor> acceptor;
+
+ if (world.rank()==0) {
+- io_service.reset(new boost::asio::io_service());
+- acceptor.reset(new tcp::acceptor(*io_service, tcp::endpoint(tcp::v4(), port_)));
++ io_context.reset(new boost::asio::io_context());
++ acceptor.reset(new tcp::acceptor(*io_context, tcp::endpoint(tcp::v4(), port_)));
+ std::cout << "Start listening for queries...\n";
+ }
+ for (;;) {
+ socket_ptr sock;
+ if (world.rank()==0) {
+- sock.reset(new tcp::socket(*io_service));
++ sock.reset(new tcp::socket(*io_context));
+ acceptor->accept(*sock);
+ std::cout << "Accepted connection\n";
+ }
diff --git a/sci-libs/flann/flann-1.9.1-r7.ebuild b/sci-libs/flann/flann-1.9.1-r7.ebuild
new file mode 100644
index 000000000000..8bd2008b221d
--- /dev/null
+++ b/sci-libs/flann/flann-1.9.1-r7.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake cuda flag-o-matic toolchain-funcs
+
+DESCRIPTION="Fast approximate nearest neighbor searches in high dimensional spaces"
+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 octave openmp"
+
+BDEPEND="
+ app-arch/unzip
+ doc? ( dev-tex/latex2html )
+ mpi? ( app-admin/chrpath )
+"
+DEPEND="
+ app-arch/lz4:=
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 )
+ mpi? (
+ dev-libs/boost:=[mpi]
+ sci-libs/hdf5:=[mpi]
+ )
+ !mpi? ( !sci-libs/hdf5[mpi] )
+ octave? ( >=sci-mathematics/octave-3.6.4-r1:= )
+"
+RDEPEND="${DEPEND}"
+# TODO:
+# readd dependencies for test suite,
+# requires multiple ruby dependencies
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cmake-3.11{,-1}.patch # bug 678030
+ "${FILESDIR}"/${P}-cuda-9.patch
+ "${FILESDIR}"/${P}-system-lz4.patch # bug 681898
+ "${FILESDIR}"/${P}-system-lz4-pkgconfig.patch # bug 827263
+ "${FILESDIR}"/${P}-build-oct-rather-than-mex-files-for-octave.patch # bug 830424
+ "${FILESDIR}"/${P}-boost-1.87.patch # bug 946465
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ # bug #302621
+ use mpi && export CXX=mpicxx
+
+ use cuda && cuda_src_prepare
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ append-cxxflags -std=c++11
+
+ # python bindings are split off into dev-python/pyflann
+ local mycmakeargs=(
+ -DBUILD_C_BINDINGS=ON
+ -DBUILD_PYTHON_BINDINGS=OFF
+ -DPYTHON_EXECUTABLE=
+ -DBUILD_CUDA_LIB=$(usex cuda)
+ -DBUILD_EXAMPLES=$(usex examples)
+ -DBUILD_DOC=$(usex doc)
+ -DBUILD_TESTS=OFF
+ -DBUILD_MATLAB_BINDINGS=$(usex octave)
+ -DUSE_MPI=$(usex mpi)
+ -DUSE_OPENMP=$(usex openmp)
+ )
+ use cuda && mycmakeargs+=(
+ -DCUDA_NVCC_FLAGS="${NVCCFLAGS} --linker-options \"-arsch\""
+ )
+ use doc && mycmakeargs+=( -DDOCDIR=share/doc/${PF} )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ find "${D}" -name 'lib*.a' -delete || die
+
+ # bug 795828; mpicc volunterely adds some runpaths
+ if use mpi; then
+ chrpath -d "${ED}"/usr/bin/flann_mpi_{client,server} || die
+ fi
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/flann/, sci-libs/flann/files/
@ 2025-01-05 20:35 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2025-01-05 20:35 UTC (permalink / raw
To: gentoo-commits
commit: 2cda6ab88d02080257efbf24eafcee545dd14ac5
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Sat Jun 8 13:17:09 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 5 20:33:22 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cda6ab8
sci-libs/flann: add 1.9.2
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
sci-libs/flann/Manifest | 1 +
.../flann/files/flann-1.9.2-asio-boost187.patch | 55 ++++++++++++
.../flann/files/flann-1.9.2-boost-config.patch | 23 +++++
sci-libs/flann/flann-1.9.2.ebuild | 99 ++++++++++++++++++++++
sci-libs/flann/metadata.xml | 2 +-
5 files changed, 179 insertions(+), 1 deletion(-)
diff --git a/sci-libs/flann/Manifest b/sci-libs/flann/Manifest
index c8693334eeea..96227eff8fec 100644
--- a/sci-libs/flann/Manifest
+++ b/sci-libs/flann/Manifest
@@ -1 +1,2 @@
DIST flann-1.9.1.tar.gz 485391 BLAKE2B bf1e1e7feb33e939e1d0586db593bea3fdf66726fbadec63df9ed9c7bdb678babb11001769f0d041a7a569186b3d700db8b96af5eb9740615f6dfd880460f68b SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7
+DIST flann-1.9.2.tar.gz 34641759 BLAKE2B 92a31ac2c39e4e41c9d985735c318f800fbf65053784a3afe8301df7529cb0203f7fdde2544d0615add56fa823f7123b09ae9b3ca5277250a5a7e9c5108f6f97 SHA512 e1235383e4e3919607cd1417738220c1601342dcf908071a6f75039c45116bd558d9f0534be037b1a8ac5b4ba5b0be5b62bf1d96e44911f14b34f73d941addb2
diff --git a/sci-libs/flann/files/flann-1.9.2-asio-boost187.patch b/sci-libs/flann/files/flann-1.9.2-asio-boost187.patch
new file mode 100644
index 000000000000..be8961c6af68
--- /dev/null
+++ b/sci-libs/flann/files/flann-1.9.2-asio-boost187.patch
@@ -0,0 +1,55 @@
+From 8972fc0ebb7f26e8f1f985d3ada52f9cd4510207 Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 16 Dec 2024 15:48:52 +0100
+Subject: [PATCH] Update asio for boost 1.87
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/src/cpp/flann/mpi/client.h b/src/cpp/flann/mpi/client.h
+index 19a410c..8b7fbed 100644
+--- a/src/cpp/flann/mpi/client.h
++++ b/src/cpp/flann/mpi/client.h
+@@ -45,9 +45,8 @@ class Client
+ public:
+ Client(const std::string& host, const std::string& service)
+ {
+- tcp::resolver resolver(io_service_);
+- tcp::resolver::query query(tcp::v4(), host, service);
+- iterator_ = resolver.resolve(query);
++ boost::asio::ip::basic_resolver<tcp> resolver(io_service_);
++ iterator_ = resolver.resolve(tcp::v4(), host, service).begin();
+ }
+
+
+@@ -78,8 +77,8 @@ public:
+
+
+ private:
+- boost::asio::io_service io_service_;
+- tcp::resolver::iterator iterator_;
++ boost::asio::io_context io_service_;
++ boost::asio::ip::basic_resolver_iterator<tcp> iterator_;
+ };
+
+
+diff --git a/src/cpp/flann/mpi/server.h b/src/cpp/flann/mpi/server.h
+index 2caab43..9d10280 100644
+--- a/src/cpp/flann/mpi/server.h
++++ b/src/cpp/flann/mpi/server.h
+@@ -119,11 +119,11 @@ public:
+ void run()
+ {
+ boost::mpi::communicator world;
+- boost::shared_ptr<boost::asio::io_service> io_service;
++ boost::shared_ptr<boost::asio::io_context> io_service;
+ boost::shared_ptr<tcp::acceptor> acceptor;
+
+ if (world.rank()==0) {
+- io_service.reset(new boost::asio::io_service());
++ io_service.reset(new boost::asio::io_context());
+ acceptor.reset(new tcp::acceptor(*io_service, tcp::endpoint(tcp::v4(), port_)));
+ std::cout << "Start listening for queries...\n";
+ }
+--
+2.47.1
+
diff --git a/sci-libs/flann/files/flann-1.9.2-boost-config.patch b/sci-libs/flann/files/flann-1.9.2-boost-config.patch
new file mode 100644
index 000000000000..2e3f8598bd79
--- /dev/null
+++ b/sci-libs/flann/files/flann-1.9.2-boost-config.patch
@@ -0,0 +1,23 @@
+From 5127212278ef3675f36e962dc2f057583ab80f57 Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 16 Dec 2024 16:02:03 +0100
+Subject: [PATCH] boost config
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 64ead01..0e0b4dc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -108,7 +108,7 @@ endif(USE_MPI)
+
+
+ if (USE_MPI AND HDF5_IS_PARALLEL)
+- find_package(Boost COMPONENTS mpi system serialization thread REQUIRED)
++ find_package(Boost COMPONENTS mpi system serialization thread REQUIRED CONFIG)
+ include_directories(${Boost_INCLUDE_DIRS})
+ add_definitions("-DHAVE_MPI")
+ endif()
+--
+2.47.1
+
diff --git a/sci-libs/flann/flann-1.9.2.ebuild b/sci-libs/flann/flann-1.9.2.ebuild
new file mode 100644
index 000000000000..ed7fd815459d
--- /dev/null
+++ b/sci-libs/flann/flann-1.9.2.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake cuda toolchain-funcs
+
+DESCRIPTION="Fast approximate nearest neighbor searches in high dimensional spaces"
+HOMEPAGE="https://github.com/flann-lib/flann"
+SRC_URI="https://github.com/flann-lib/${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 octave openmp"
+
+BDEPEND="
+ app-arch/unzip
+ doc? ( dev-tex/latex2html )
+ mpi? ( app-admin/chrpath )
+"
+DEPEND="
+ app-arch/lz4:=
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 )
+ mpi? (
+ dev-libs/boost:=[mpi]
+ sci-libs/hdf5:=[mpi=]
+ )
+ octave? ( >=sci-mathematics/octave-3.6.4-r1:= )
+"
+RDEPEND="${DEPEND}"
+# TODO:
+# readd dependencies for test suite,
+# requires multiple ruby dependencies
+
+PATCHES=(
+ # "${FILESDIR}"/${PN}-1.9.1-cmake-3.11{,-1}.patch # bug 678030
+ # "${FILESDIR}"/${PN}-1.9.1-cuda-9.patch
+ # "${FILESDIR}"/${PN}-1.9.1-system-lz4.patch # bug 681898
+ # "${FILESDIR}"/${PN}-1.9.1-system-lz4-pkgconfig.patch # bug 827263
+ "${FILESDIR}"/${PN}-1.9.1-build-oct-rather-than-mex-files-for-octave.patch # bug 830424
+ "${FILESDIR}"/${PN}-1.9.2-asio-boost187.patch
+ "${FILESDIR}"/${PN}-1.9.2-boost-config.patch
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ # bug #302621
+ use mpi && export CXX=mpicxx
+
+ use cuda && cuda_src_prepare
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # append-cxxflags -std=c++17
+
+ # python bindings are split off into dev-python/pyflann
+ local mycmakeargs=(
+ -DCMAKE_CXX_STANDARD=17
+ -DBUILD_C_BINDINGS=ON
+ -DBUILD_PYTHON_BINDINGS=OFF
+ -DPYTHON_EXECUTABLE=python3.12
+ -DBUILD_CUDA_LIB="$(usex cuda)"
+ -DBUILD_EXAMPLES="$(usex examples)"
+ -DBUILD_DOC="$(usex doc)"
+ -DBUILD_TESTS=OFF
+ -DBUILD_MATLAB_BINDINGS="$(usex octave)"
+ -DUSE_MPI="$(usex mpi)"
+ -DUSE_OPENMP="$(usex openmp)"
+ )
+
+ # einfo "NVCCFLAGS ${NVCCFLAGS}"
+ use cuda && mycmakeargs+=(
+ # -DCUDA_NVCC_FLAGS="${NVCCFLAGS} --linker-options \"-arsch\""
+ -DCUDA_NVCC_FLAGS="-ccbin /usr/x86_64-pc-linux-gnu/gcc-bin/13/g++"
+ )
+ use doc && mycmakeargs+=( -DDOCDIR="share/doc/${PF}" )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ find "${ED}" -name 'lib*.a' -delete || die
+
+ # bug 795828; mpicc volunterely adds some runpaths
+ if use mpi; then
+ chrpath -d "${ED}/usr/bin/flann_mpi_"{client,server} || die
+ fi
+}
diff --git a/sci-libs/flann/metadata.xml b/sci-libs/flann/metadata.xml
index c33b2618d660..f54c9e238fb6 100644
--- a/sci-libs/flann/metadata.xml
+++ b/sci-libs/flann/metadata.xml
@@ -19,6 +19,6 @@
<pkg>sci-mathematics/octave</pkg></flag>
</use>
<upstream>
- <remote-id type="github">mariusmuja/flann</remote-id>
+ <remote-id type="github">flann-lib/flann</remote-id>
</upstream>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-01-05 20:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-05 20:35 [gentoo-commits] repo/gentoo:master commit in: sci-libs/flann/, sci-libs/flann/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2025-01-05 11:05 Miroslav Šulc
2021-12-26 3:03 Sam James
2020-05-23 10:53 Andreas Sturmlechner
2018-07-01 10:11 Maxim Koltsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox