aboutsummaryrefslogtreecommitdiff
path: root/desktop/polybar
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2019-08-04 20:33:26 +0200
committerRobby Workman <rworkman@slackbuilds.org>2021-04-17 23:54:34 -0500
commitfd2b195e1ef3c4d8af5077911d72384e209125c3 (patch)
treed86d0e3773012d93384106ce4aecd3bfbfb1ba89 /desktop/polybar
parent71824e5a9104d0bd32d756d8da89ccee0c9078c1 (diff)
desktop/polybar: Fix for the newer xcb-proto.
Disable some warnings-as-errors Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'desktop/polybar')
-rw-r--r--desktop/polybar/00165e1a6d5dd61bc153e1352b21ec07fc81245d.patch44
-rw-r--r--desktop/polybar/polybar.SlackBuild5
2 files changed, 48 insertions, 1 deletions
diff --git a/desktop/polybar/00165e1a6d5dd61bc153e1352b21ec07fc81245d.patch b/desktop/polybar/00165e1a6d5dd61bc153e1352b21ec07fc81245d.patch
new file mode 100644
index 000000000000..81783617b9a7
--- /dev/null
+++ b/desktop/polybar/00165e1a6d5dd61bc153e1352b21ec07fc81245d.patch
@@ -0,0 +1,44 @@
+From 00165e1a6d5dd61bc153e1352b21ec07fc81245d Mon Sep 17 00:00:00 2001
+From: patrick96 <p.ziegler96@gmail.com>
+Date: Sun, 11 Feb 2018 21:27:52 +0100
+Subject: [PATCH] fix(generators): Add support for eventstruct
+
+Newer xcb-proto commits after the 1.12 release require the 'eventstruct'
+key in the output dictionary, otherwise the generator crashes.
+
+I don't see a need for xpp to actually support the eventstruct key and
+thus it uses a NOP lambda function
+---
+ generators/cpp_client.py | 19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/generators/cpp_client.py b/generators/cpp_client.py
+index 20d116f..709e8d8 100644
+--- a/generators/cpp_client.py
++++ b/generators/cpp_client.py
+@@ -3130,15 +3130,16 @@ def cpp_type_classes():
+ # }
+
+ # Must create an "output" dictionary before any xcbgen imports.
+-output = {'open' : c_open,
+- 'close' : c_close,
+- 'simple' : c_simple, # lambda x, y: None,
+- 'enum' : lambda x, y: None,
+- 'struct' : lambda x, y: None,
+- 'union' : lambda x, y: None,
+- 'request' : c_request,
+- 'event' : cpp_event,
+- 'error' : cpp_error,
++output = {'open' : c_open,
++ 'close' : c_close,
++ 'simple' : c_simple, # lambda x, y: None,
++ 'enum' : lambda x, y: None,
++ 'struct' : lambda x, y: None,
++ 'union' : lambda x, y: None,
++ 'request' : c_request,
++ 'event' : cpp_event,
++ 'error' : cpp_error,
++ 'eventstruct' : lambda x, y: None,
+ }
+
+ # Boilerplate below this point
diff --git a/desktop/polybar/polybar.SlackBuild b/desktop/polybar/polybar.SlackBuild
index b86a3cabea75..9856cb3da0e3 100644
--- a/desktop/polybar/polybar.SlackBuild
+++ b/desktop/polybar/polybar.SlackBuild
@@ -75,6 +75,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+( cd lib/xpp
+ patch -p1 < $CWD/00165e1a6d5dd61bc153e1352b21ec07fc81245d.patch )
+
# Fixes install location
sed -i -e '/share\/doc\/polybar/s/share\///' doc/CMakeLists.txt
sed -i -e "/DESTINATION doc\/polybar/s/polybar/$PRGNAM-$VERSION/" doc/CMakeLists.txt
@@ -87,7 +90,7 @@ mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-error=implicit-fallthrough -Wno-error=stringop-truncation -Wno-error=deprecated-copy" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release ..
make -j1