mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
dev-cpp/lucene++: fixes for boost-1.89, cmake4, gtest & gcc-15
Closes: https://bugs.gentoo.org/957220 Closes: https://bugs.gentoo.org/963333 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Part-of: https://github.com/gentoo/gentoo/pull/43958 Closes: https://github.com/gentoo/gentoo/pull/43958 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
committed by
Andreas Sturmlechner
parent
8d86cea082
commit
bbc1170fe2
83
dev-cpp/lucene++/files/lucene++-3.0.9-boost-1.89.patch
Normal file
83
dev-cpp/lucene++/files/lucene++-3.0.9-boost-1.89.patch
Normal file
@@ -0,0 +1,83 @@
|
||||
Bug: https://bugs.gentoo.org/963333
|
||||
|
||||
--- LucenePlusPlus-rel_3.0.9/cmake/dependencies.cmake
|
||||
+++ LucenePlusPlus-rel_3.0.9-boost-1.89/cmake/dependencies.cmake
|
||||
@@ -7,7 +7,6 @@ find_package(Boost COMPONENTS
|
||||
filesystem
|
||||
iostreams
|
||||
regex
|
||||
- system
|
||||
thread
|
||||
REQUIRED
|
||||
)
|
||||
@@ -20,7 +19,6 @@ set(lucene_boost_libs
|
||||
${Boost_FILESYSTEM_LIBRARIES}
|
||||
${Boost_IOSTREAMS_LIBRARIES}
|
||||
${Boost_REGEX_LIBRARIES}
|
||||
- ${Boost_SYSTEM_LIBRARIES}
|
||||
${Boost_THREAD_LIBRARIES}
|
||||
)
|
||||
|
||||
--- LucenePlusPlus-rel_3.0.9/src/contrib/CMakeLists.txt
|
||||
+++ LucenePlusPlus-rel_3.0.9-boost-1.89/src/contrib/CMakeLists.txt
|
||||
@@ -67,7 +67,6 @@ target_link_libraries(lucene++-contrib
|
||||
Boost::filesystem
|
||||
Boost::iostreams
|
||||
Boost::regex
|
||||
- Boost::system
|
||||
Boost::thread
|
||||
ZLIB::ZLIB
|
||||
lucene++::lucene++)
|
||||
--- LucenePlusPlus-rel_3.0.9/src/core/CMakeLists.txt
|
||||
+++ LucenePlusPlus-rel_3.0.9-boost-1.89/src/core/CMakeLists.txt
|
||||
@@ -57,7 +57,6 @@ target_link_libraries(lucene++
|
||||
Boost::filesystem
|
||||
Boost::iostreams
|
||||
Boost::regex
|
||||
- Boost::system
|
||||
Boost::thread
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
--- LucenePlusPlus-rel_3.0.9/src/demo/deletefiles/CMakeLists.txt
|
||||
+++ LucenePlusPlus-rel_3.0.9-boost-1.89/src/demo/deletefiles/CMakeLists.txt
|
||||
@@ -38,7 +38,6 @@ target_link_libraries(deletefiles
|
||||
Boost::filesystem
|
||||
Boost::iostreams
|
||||
Boost::regex
|
||||
- Boost::system
|
||||
Boost::thread
|
||||
ZLIB::ZLIB
|
||||
lucene++::lucene++
|
||||
diff -rup LucenePlusPlus-rel_3.0.9/src/demo/indexfiles/CMakeLists.txt LucenePlusPlus-rel_3.0.9-boost-1.89/src/demo/indexfiles/CMakeLists.txt
|
||||
--- LucenePlusPlus-rel_3.0.9/src/demo/indexfiles/CMakeLists.txt
|
||||
+++ LucenePlusPlus-rel_3.0.9-boost-1.89/src/demo/indexfiles/CMakeLists.txt
|
||||
@@ -39,7 +39,6 @@ target_link_libraries(indexfiles
|
||||
Boost::filesystem
|
||||
Boost::iostreams
|
||||
Boost::regex
|
||||
- Boost::system
|
||||
Boost::thread
|
||||
ZLIB::ZLIB
|
||||
lucene++::lucene++
|
||||
diff -rup LucenePlusPlus-rel_3.0.9/src/demo/searchfiles/CMakeLists.txt LucenePlusPlus-rel_3.0.9-boost-1.89/src/demo/searchfiles/CMakeLists.txt
|
||||
--- LucenePlusPlus-rel_3.0.9/src/demo/searchfiles/CMakeLists.txt
|
||||
+++ LucenePlusPlus-rel_3.0.9-boost-1.89/src/demo/searchfiles/CMakeLists.txt
|
||||
@@ -38,7 +38,6 @@ target_link_libraries(searchfiles
|
||||
Boost::filesystem
|
||||
Boost::iostreams
|
||||
Boost::regex
|
||||
- Boost::system
|
||||
Boost::thread
|
||||
ZLIB::ZLIB
|
||||
lucene++::lucene++
|
||||
diff -rup LucenePlusPlus-rel_3.0.9/src/test/CMakeLists.txt LucenePlusPlus-rel_3.0.9-boost-1.89/src/test/CMakeLists.txt
|
||||
--- LucenePlusPlus-rel_3.0.9/src/test/CMakeLists.txt
|
||||
+++ LucenePlusPlus-rel_3.0.9-boost-1.89/src/test/CMakeLists.txt
|
||||
@@ -59,7 +59,6 @@ target_link_libraries(lucene++-tester
|
||||
Boost::filesystem
|
||||
Boost::iostreams
|
||||
Boost::regex
|
||||
- Boost::system
|
||||
Boost::thread
|
||||
ZLIB::ZLIB
|
||||
gtest_main
|
||||
62
dev-cpp/lucene++/files/lucene++-3.0.9-cmake4.patch
Normal file
62
dev-cpp/lucene++/files/lucene++-3.0.9-cmake4.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
From: https://github.com/luceneplusplus/LucenePlusPlus/pull/218
|
||||
|
||||
From: Gianfranco Costamagna <locutusofborg@debian.org>
|
||||
Date: Mon, 8 Sep 2025 15:05:10 +0200
|
||||
Subject: [PATCH] Bump minimum required cmake version to 3.10, for new cmake 4
|
||||
compatibility fix
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@
|
||||
# init
|
||||
####################################
|
||||
|
||||
-cmake_minimum_required(VERSION 3.5)
|
||||
+cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(lucene++)
|
||||
|
||||
--- a/cmake/cotire.cmake
|
||||
+++ b/cmake/cotire.cmake
|
||||
@@ -37,7 +37,7 @@ set(__COTIRE_INCLUDED TRUE)
|
||||
if (NOT CMAKE_SCRIPT_MODE_FILE)
|
||||
cmake_policy(PUSH)
|
||||
endif()
|
||||
-cmake_minimum_required(VERSION 2.8.12)
|
||||
+cmake_minimum_required(VERSION 3.10)
|
||||
if (NOT CMAKE_SCRIPT_MODE_FILE)
|
||||
cmake_policy(POP)
|
||||
endif()
|
||||
--- a/src/test/gtest/CMakeLists.txt
|
||||
+++ b/src/test/gtest/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
# Note: CMake support is community-based. The maintainers do not use CMake
|
||||
# internally.
|
||||
|
||||
-cmake_minimum_required(VERSION 2.8.8)
|
||||
+cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
if (POLICY CMP0048)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
--- a/src/test/gtest/googlemock/CMakeLists.txt
|
||||
+++ b/src/test/gtest/googlemock/CMakeLists.txt
|
||||
@@ -42,7 +42,7 @@ else()
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
|
||||
endif()
|
||||
-cmake_minimum_required(VERSION 2.6.4)
|
||||
+cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
if (COMMAND set_up_hermetic_build)
|
||||
set_up_hermetic_build()
|
||||
--- a/src/test/gtest/googletest/CMakeLists.txt
|
||||
+++ b/src/test/gtest/googletest/CMakeLists.txt
|
||||
@@ -53,7 +53,7 @@ else()
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
|
||||
endif()
|
||||
-cmake_minimum_required(VERSION 2.6.4)
|
||||
+cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
if (POLICY CMP0063) # Visibility
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
32
dev-cpp/lucene++/files/lucene++-3.0.9-gcc15.patch
Normal file
32
dev-cpp/lucene++/files/lucene++-3.0.9-gcc15.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From: https://github.com/luceneplusplus/LucenePlusPlus/pull/218
|
||||
|
||||
From: Gianfranco Costamagna <locutusofborg@debian.org>
|
||||
Date: Mon, 8 Sep 2025 15:05:58 +0200
|
||||
Subject: [PATCH] Bump minimum std-version to 17, fixing FTBFS with new gcc-15
|
||||
and googletest
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -47,7 +47,7 @@ include(dependencies)
|
||||
include(Lucene++Docs)
|
||||
|
||||
# Enable C++11
|
||||
-set(CMAKE_CXX_STANDARD 11)
|
||||
+set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
####################################
|
||||
--- a/src/test/gtest/CMakeLists.txt
|
||||
+++ b/src/test/gtest/CMakeLists.txt
|
||||
@@ -11,9 +11,9 @@ project(googletest-distribution)
|
||||
set(GOOGLETEST_VERSION 1.10.0)
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||
- add_definitions(-std=c++11)
|
||||
+ add_definitions(-std=c++17)
|
||||
else()
|
||||
- set(CMAKE_CXX_STANDARD 11)
|
||||
+ set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
if(NOT CYGWIN)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
21
dev-cpp/lucene++/files/lucene++-3.0.9-system-gtest.patch
Normal file
21
dev-cpp/lucene++/files/lucene++-3.0.9-system-gtest.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
From: https://github.com/luceneplusplus/LucenePlusPlus/pull/218
|
||||
|
||||
From: Gianfranco Costamagna <locutusofborg@debian.org>
|
||||
Date: Mon, 8 Sep 2025 15:05:34 +0200
|
||||
Subject: [PATCH] Find and use system googletest if available
|
||||
|
||||
--- a/src/test/CMakeLists.txt
|
||||
+++ b/src/test/CMakeLists.txt
|
||||
@@ -8,8 +8,10 @@ if(MSVC)
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
-add_subdirectory(gtest)
|
||||
-
|
||||
+find_package(GTest)
|
||||
+if(NOT GTEST_FOUND)
|
||||
+ add_subdirectory(gtest)
|
||||
+endif()
|
||||
|
||||
####################################
|
||||
# src
|
||||
53
dev-cpp/lucene++/lucene++-3.0.9-r1.ebuild
Normal file
53
dev-cpp/lucene++/lucene++-3.0.9-r1.ebuild
Normal file
@@ -0,0 +1,53 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MY_P="LucenePlusPlus-rel_${PV}"
|
||||
inherit edo cmake flag-o-matic
|
||||
|
||||
DESCRIPTION="C++ port of Lucene library, a high-performance, full-featured text search engine"
|
||||
HOMEPAGE="https://github.com/luceneplusplus/LucenePlusPlus"
|
||||
SRC_URI="https://github.com/luceneplusplus/LucenePlusPlus/archive/rel_${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="|| ( LGPL-3 Apache-2.0 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~hppa ~loong ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="debug test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="dev-libs/boost:=[zlib]"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="
|
||||
test? ( dev-cpp/gtest )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-3.0.7-boost-1.85.patch"
|
||||
"${FILESDIR}/${PN}-3.0.9-boost-1.87.patch"
|
||||
"${FILESDIR}/${PN}-3.0.9-pkgconfig.patch"
|
||||
"${FILESDIR}/${PN}-3.0.9-tests-gtest-cstdint.patch"
|
||||
"${FILESDIR}/${PN}-3.0.9-cmake4.patch"
|
||||
"${FILESDIR}/${PN}-3.0.9-system-gtest.patch"
|
||||
"${FILESDIR}/${PN}-3.0.9-gcc15.patch"
|
||||
"${FILESDIR}/${PN}-3.0.9-boost-1.89.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
# Can't be tested with LTO because of ODR issues in test mocks
|
||||
filter-lto
|
||||
|
||||
local mycmakeargs=(
|
||||
-DENABLE_DEMO=OFF
|
||||
-DENABLE_TEST=$(usex test)
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
edo "${BUILD_DIR}"/src/test/lucene++-tester \
|
||||
--test_dir="${S}"/src/test/testfiles \
|
||||
--gtest_filter="-ParallelMultiSearcherTest*:SortTest.*:"
|
||||
}
|
||||
Reference in New Issue
Block a user