From: "Sam James" <sam@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 20:35:20 +0000 (UTC) [thread overview]
Message-ID: <1736109202.2cda6ab88d02080257efbf24eafcee545dd14ac5.sam@gentoo> (raw)
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>
next reply other threads:[~2025-01-05 20:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-05 20:35 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-05 11:05 [gentoo-commits] repo/gentoo:master commit in: sci-libs/flann/, sci-libs/flann/files/ Miroslav Šulc
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=1736109202.2cda6ab88d02080257efbf24eafcee545dd14ac5.sam@gentoo \
--to=sam@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