SHA256
1
0
forked from pool/polybar
polybar/cmake.patch
Mateusz Mielczarek 45f8b5d158 Accepting request 1124232 from home:sysek:branches:X11:Utilities
- Add 'cmake.patch' to pass build on openSUSE 15.4 and 15.5 

please check if everything is ok but with that the build pass

OBS-URL: https://build.opensuse.org/request/show/1124232
OBS-URL: https://build.opensuse.org/package/show/X11:Utilities/polybar?expand=0&rev=31
2023-11-10 14:43:55 +00:00

30 lines
1.4 KiB
Diff

diff -rub polybar-3.7.0-orig/cmake/cxx.cmake polybar-3.7.0/cmake/cxx.cmake
--- polybar-3.7.0-orig/cmake/cxx.cmake 2023-11-08 13:23:09.843705771 +0100
+++ polybar-3.7.0/cmake/cxx.cmake 2023-11-08 13:23:30.339494620 +0100
@@ -23,7 +23,7 @@
set(POLYBAR_FLAGS "" CACHE STRING "C++ compiler flags used for compiling polybar")
-list(APPEND cxx_base -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor)
+list(APPEND cxx_base -Wall -Wextra -Wpedantic -Wduplicated-cond)
list(APPEND cxx_debug -DDEBUG -g2 -Og)
list(APPEND cxx_minsizerel "")
list(APPEND cxx_sanitize ${cxx_debug} -O0 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls)
diff -rub polybar-3.7.0-orig/CMakeLists.txt polybar-3.7.0/CMakeLists.txt
--- polybar-3.7.0-orig/CMakeLists.txt 2023-11-08 13:23:09.831705895 +0100
+++ polybar-3.7.0/CMakeLists.txt 2023-11-08 13:24:22.538956833 +0100
@@ -4,6 +4,13 @@
cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR)
project(polybar CXX)
+# For openSUSE 15.4 and 15.5
+set(CMAKE_THREAD_LIBS_INIT "-lpthread")
+set(CMAKE_HAVE_THREADS_LIBRARY 1)
+set(CMAKE_USE_WIN32_THREADS_INIT 0)
+set(CMAKE_USE_PTHREADS_INIT 1)
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+
# Extract version information from version.txt. The first line that looks like
# a version string is used, so the file supports comments
file(STRINGS version.txt version_txt REGEX "^[0-9]+\\.[0-9]+\\.[0-9]+.*$" LIMIT_COUNT 1)