sci-mathematics/fann: update EAPI 7 -> 8, other fixes

Patch out bundled GTest, fix install directory for pkg-config files

Closes: https://bugs.gentoo.org/951922
Closes: https://bugs.gentoo.org/863050
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/41260
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
NHOrus
2025-03-25 21:29:00 +03:00
committed by Sam James
parent 5748b186c3
commit f747ba062e
2 changed files with 52 additions and 4 deletions

View File

@@ -1,17 +1,42 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
inherit cmake git-r3 toolchain-funcs
DESCRIPTION="Fast Artificial Neural Network Library"
HOMEPAGE="http://leenissen.dk/fann/wp/"
HOMEPAGE="https://leenissen.dk"
EGIT_REPO_URI="https://github.com/libfann/fann"
LICENSE="LGPL-2.1"
SLOT="0"
IUSE="examples"
IUSE="examples test"
RESTRICT="!test? ( test )"
BDEPEND="
test? ( dev-cpp/gtest )
"
PATCHES=(
"${FILESDIR}/${P}-cmake.patch"
)
src_prepare() {
cmake_src_prepare
if use !test; then
sed -i '/ADD_SUBDIRECTORY( tests )/d' CMakeLists.txt || die
fi
}
src_configure() {
local mycmakeargs=(
# https://bugs.gentoo.org/863050
-DPKGCONFIG_INSTALL_DIR="${EPREFIX}/$(get_libdir)/pkgconfig"
)
cmake_src_configure
}
src_test() {
cd examples || die 'fails to enter examples directory'

View File

@@ -0,0 +1,23 @@
Bump minimum CMake version to fix build with CMake 4
Unbundle gtest
https://bugs.gentoo.org/863050
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,7 +38,7 @@
ENDIF()
ENDIF()
ELSE()
-cmake_minimum_required (VERSION 2.8)
+cmake_minimum_required (VERSION 3.5)
if (NOT DEFINED CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type")
@@ -161,8 +161,6 @@
################# compile tests ################
-ADD_SUBDIRECTORY( lib/googletest )
-
if(COMPILER_SUPPORTS_CXX11)
ADD_SUBDIRECTORY( tests )
endif()