From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5813E15812D for ; Sun, 05 Jan 2025 11:05:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8FF2EE0788; Sun, 05 Jan 2025 11:05:37 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 73A3AE0788 for ; Sun, 05 Jan 2025 11:05:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 89AB0335DC5 for ; Sun, 05 Jan 2025 11:05:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 21E151993 for ; Sun, 05 Jan 2025 11:05:35 +0000 (UTC) From: "Miroslav Šulc" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" Message-ID: <1736075132.d9f9cf5391a70beb6ccd898209330cbcfa606a7c.fordfrog@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/flann/, sci-libs/flann/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/flann/files/flann-1.9.1-boost-1.87.patch sci-libs/flann/flann-1.9.1-r7.ebuild X-VCS-Directories: sci-libs/flann/ sci-libs/flann/files/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: d9f9cf5391a70beb6ccd898209330cbcfa606a7c X-VCS-Branch: master Date: Sun, 05 Jan 2025 11:05:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 63b17531-703d-4f2a-af17-da6f6cedb44b X-Archives-Hash: 7fd6dca9d7bfc96f9a5f96746ff0d045 commit: d9f9cf5391a70beb6ccd898209330cbcfa606a7c Author: Miroslav Šulc gentoo org> AuthorDate: Sun Jan 5 11:05:17 2025 +0000 Commit: Miroslav Šulc gentoo 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 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 + void knnSearch(const flann::Matrix& queries, flann::Matrix& indices, flann::Matrix& 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 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 io_service; ++ boost::shared_ptr io_context; + boost::shared_ptr 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 +}