dev-cpp/clucene: fix cross-compiling w/ compile-only tests

Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/249
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Nicolas PARLANT
2026-03-08 07:19:35 +01:00
committed by Sam James
parent ce4a807ded
commit b2b4f78085

View File

@@ -1,11 +1,11 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PN="${PN}"-core
MY_P="${MY_PN}"-"${PV}"
inherit cmake
inherit cmake toolchain-funcs
DESCRIPTION="High-performance, full-featured text search engine based off of lucene in C++"
HOMEPAGE="https://clucene.sourceforge.net"
@@ -46,6 +46,14 @@ src_prepare() {
-e 's%\(:\| -I\)${prefix}/include/CLucene/ext%%g' \
./src/core/libclucene-core.pc.cmake || die
rm -rf src/ext || die
# do compile-only tests while cross-compiling
# the EXITCODE for each test can be overrided otherwise
if tc-is-cross-compiler; then
sed -i \
-e '/CHECK_CXX_SOURCE_/s/_RUNS/_COMPILES/' \
src/shared/cmake/*.cmake || die
fi
}
src_configure() {