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

Closes: https://bugs.gentoo.org/969068
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Andreas Sturmlechner
2026-01-20 20:41:29 +01:00
parent d5754851c5
commit 0d3d4470af
3 changed files with 41 additions and 2 deletions

View File

@@ -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 1.69 COMPONENTS mpi serialization thread REQUIRED CONFIG)
include_directories(${Boost_INCLUDE_DIRS})
add_definitions("-DHAVE_MPI")
endif()
--
2.47.1

View File

@@ -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>

View File

@@ -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"