From 8e683037f089a54db92749d9e4b6d98e8556e032 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 13 May 2024 15:59:55 -0700 Subject: [PATCH] schroot: fix compilation with GCC14 GCC now does not allow assigning an std::locale to an std::string. No idea why it worked originally. Also fixed compilation with full NLS. Signed-off-by: Rosen Penev (cherry picked from commit c3e2dcc128adde5af8b0d07c38962cc4fd8b3a3b) --- admin/schroot/Makefile | 2 +- admin/schroot/patches/020-gcc14.patch | 32 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 admin/schroot/patches/020-gcc14.patch diff --git a/admin/schroot/Makefile b/admin/schroot/Makefile index 967efdc077..d769e5dc7d 100644 --- a/admin/schroot/Makefile +++ b/admin/schroot/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=reschroot PKG_VERSION:=1.6.13 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeberg.org/shelter/reschroot/archive/release diff --git a/admin/schroot/patches/020-gcc14.patch b/admin/schroot/patches/020-gcc14.patch new file mode 100644 index 0000000000..23a57ac19e --- /dev/null +++ b/admin/schroot/patches/020-gcc14.patch @@ -0,0 +1,32 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -310,6 +310,8 @@ include_directories(${PROJECT_BINARY_DIR + ${PROJECT_BINARY_DIR} + ${PROJECT_SOURCE_DIR}) + ++find_package(Intl) ++ + add_subdirectory(sbuild) + add_subdirectory(bin) + add_subdirectory(etc) +--- a/sbuild/CMakeLists.txt ++++ b/sbuild/CMakeLists.txt +@@ -208,6 +208,7 @@ add_library(sbuild STATIC + ${public_chroot_facet_cc_sources}) + target_link_libraries(sbuild + PRIVATE ++ Intl::Intl + ${CMAKE_THREAD_LIBS_INIT} + ${PAM_LIBRARY} + ${UUID_LIBRARY} +--- a/sbuild/sbuild-basic-keyfile.tcc ++++ b/sbuild/sbuild-basic-keyfile.tcc +@@ -214,7 +214,7 @@ sbuild::basic_keyfile::get_locale_ + } + catch (std::runtime_error const& e) // Invalid locale + { +- localename = std::locale::classic(); ++ localename = std::locale::classic().name(); + } + std::string::size_type pos; + bool status = false; -- 2.30.2