commit:     0d3d4470afd1a68f02c6a8cef385d0d526db63fa
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 20 19:41:29 2026 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jan 20 22:07:09 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d3d4470

sci-libs/flann: Fix build w/ boost-1.89

Closes: https://bugs.gentoo.org/969068
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/flann-1.9.2-boost-config-1.89.patch      | 23 ++++++++++++++++++++++
 .../flann/files/flann-1.9.2-gettimeofday.patch     | 15 ++++++++++++++
 sci-libs/flann/flann-1.9.2_p20221027-r1.ebuild     |  5 +++--
 3 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/sci-libs/flann/files/flann-1.9.2-boost-config-1.89.patch 
b/sci-libs/flann/files/flann-1.9.2-boost-config-1.89.patch
new file mode 100644
index 000000000000..fbbbd39c9d3b
--- /dev/null
+++ b/sci-libs/flann/files/flann-1.9.2-boost-config-1.89.patch
@@ -0,0 +1,23 @@
+From 5127212278ef3675f36e962dc2f057583ab80f57 Mon Sep 17 00:00:00 2001
+From: Paul Zander <[email protected]>
+Date: Mon, 16 Dec 2024 16:02:03 +0100
+Subject: [PATCH] boost config
+
+Signed-off-by: Paul Zander <[email protected]>
+
+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 1.69 COMPONENTS mpi serialization thread REQUIRED 
CONFIG)
+     include_directories(${Boost_INCLUDE_DIRS})
+     add_definitions("-DHAVE_MPI")
+ endif()
+-- 
+2.47.1
+

diff --git a/sci-libs/flann/files/flann-1.9.2-gettimeofday.patch 
b/sci-libs/flann/files/flann-1.9.2-gettimeofday.patch
new file mode 100644
index 000000000000..5808211ec01e
--- /dev/null
+++ b/sci-libs/flann/files/flann-1.9.2-gettimeofday.patch
@@ -0,0 +1,15 @@
+Fixes:
+
+src/cpp/flann/mpi/flann_mpi_client.cpp:21:5: error: ‘gettimeofday’ was not 
declared in this scope
+   21 |     gettimeofday(&start_time_,NULL);
+      |     ^~~~~~~~~~~~
+
+--- a/src/cpp/flann/mpi/flann_mpi_client.cpp
++++ b/src/cpp/flann/mpi/flann_mpi_client.cpp
+@@ -1,5 +1,5 @@
+ #include <stdio.h>
+-#include <time.h>
++#include <sys/time.h>
+ 
+ #include <cstdlib>
+ #include <iostream>

diff --git a/sci-libs/flann/flann-1.9.2_p20221027-r1.ebuild 
b/sci-libs/flann/flann-1.9.2_p20221027-r1.ebuild
index 6f90c133c03a..530ddd9114ec 100644
--- a/sci-libs/flann/flann-1.9.2_p20221027-r1.ebuild
+++ b/sci-libs/flann/flann-1.9.2_p20221027-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -53,8 +53,9 @@ DEPEND="${RDEPEND}
 PATCHES=(
        
"${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
+       "${FILESDIR}"/${PN}-1.9.2-boost-config-1.89.patch
        "${FILESDIR}"/${PN}-1.9.2-system-gtest.patch
+       "${FILESDIR}"/${PN}-1.9.2-gettimeofday.patch
 
        # "${FILESDIR}/${PN}-1.9.2-lz4-dependency-fix.patch" # 
https://github.com/flann-lib/flann/pull/523
        # "${FILESDIR}/${PN}-1.9.2-fix-build.patch"

Reply via email to