app-backup/bareos: drop -Werror; fix build with GCC 12

Closes: https://bugs.gentoo.org/841734
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2022-06-10 12:14:53 +01:00
parent 653c88c980
commit e7fd214864
3 changed files with 50 additions and 0 deletions

View File

@@ -143,6 +143,8 @@ src_test() {
src_prepare() {
# fix gentoo platform support
eapply -p1 "${FILESDIR}/${PN}-21-cmake-gentoo.patch"
eapply "${FILESDIR}/${PN}-21.1.2-werror.patch"
eapply "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch"
# fix missing DESTDIR in symlink creation
sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt"

View File

@@ -0,0 +1,25 @@
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -44,12 +44,6 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME common)
include(GNUInstallDirs)
-find_program(CCACHE_FOUND ccache)
-if(CCACHE_FOUND)
- set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
- set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
-endif(CCACHE_FOUND)
-
# switch on CXX 17 Support
#
set(CMAKE_CXX_STANDARD 17)
@@ -584,9 +578,6 @@ message(STATUS "CMAKE_SUPPRESS_REGENERATION: " ${CMAKE_SUPPRESS_REGENERATION})
# A simple way to get switches to the compiler is to use ADD_DEFINITIONS(). But
# there are also two variables exactly for this purpose:
-# wheter or not
-message(STATUS "CCACHE_FOUND: " ${CCACHE_FOUND})
-
# Choose the type of build. Example: SET(CMAKE_BUILD_TYPE Debug)
message(STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE})

View File

@@ -0,0 +1,23 @@
https://bugs.gentoo.org/841734
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -96,7 +96,7 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
-Werror=format-security compiler_error_format_security
)
if(${compiler_error_format_security})
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=format-security")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat-security")
endif()
endif()
@@ -353,8 +353,8 @@ if(developer)
add_definitions("-DDEVELOPER=1")
endif()
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
include(BareosSetVariableDefaults)
option(ENABLE_BCONSOLE "Build bconsole binary" ON)