From: "Miroslav Šulc" <fordfrog@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/flann/, sci-libs/flann/files/
Date: Sun, 05 Jan 2025 11:05:35 +0000 (UTC) [thread overview]
Message-ID: <1736075132.d9f9cf5391a70beb6ccd898209330cbcfa606a7c.fordfrog@gentoo> (raw)
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
+}
next reply other threads:[~2025-01-05 11:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-05 11:05 Miroslav Šulc [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-05 20:35 [gentoo-commits] repo/gentoo:master commit in: sci-libs/flann/, sci-libs/flann/files/ Sam James
2021-12-26 3:03 Sam James
2020-05-23 10:53 Andreas Sturmlechner
2018-07-01 10:11 Maxim Koltsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1736075132.d9f9cf5391a70beb6ccd898209330cbcfa606a7c.fordfrog@gentoo \
--to=fordfrog@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox