mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
app-i18n/libime: fix build with -Werror=odr
Fixes already accepted in upstream repo Closes: https://bugs.gentoo.org/962546 Signed-off-by: Yongxiang Liang <tanekliang@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/43758 Closes: https://github.com/gentoo/gentoo/pull/43758 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
e8d1a04aaf
commit
a0c1b7e6cc
22
app-i18n/libime/files/libime-1.1.11-fix-kenlm-odr.patch
Normal file
22
app-i18n/libime/files/libime-1.1.11-fix-kenlm-odr.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
https://github.com/fcitx/libime/commit/39ced92b4450f49b03e38bdd6a58d1f1b9430824
|
||||
|
||||
fix odr: build kenlm with C++20
|
||||
|
||||
--- a/src/libime/core/CMakeLists.txt
|
||||
+++ b/src/libime/core/CMakeLists.txt
|
||||
@@ -14,9 +14,14 @@ target_include_directories(kenlm PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE
|
||||
target_compile_definitions(kenlm PUBLIC -DKENLM_MAX_ORDER=3 PRIVATE -DNDEBUG)
|
||||
target_link_libraries(kenlm PUBLIC Boost::boost PkgConfig::ZSTD)
|
||||
set_target_properties(kenlm PROPERTIES
|
||||
- CXX_STANDARD 11
|
||||
POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
+include(CheckCXXSymbolExists)
|
||||
+check_cxx_symbol_exists(_LIBCPP_VERSION version LIBCPP)
|
||||
+if(LIBCPP)
|
||||
+ target_compile_definitions(kenlm PUBLIC -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
|
||||
+endif()
|
||||
+
|
||||
if(UNIX)
|
||||
check_library_exists(rt clock_gettime "clock_gettime from librt" HAVE_CLOCKGETTIME_RT)
|
||||
if (HAVE_CLOCKGETTIME_RT)
|
||||
@@ -30,6 +30,8 @@ BDEPEND="
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${P}-fix-kenlm-odr.patch )
|
||||
|
||||
src_configure() {
|
||||
# 957570 : remove unused kenlm CMakeLists.txt
|
||||
rm src/libime/core/kenlm/CMakeLists.txt || die
|
||||
|
||||
Reference in New Issue
Block a user