1 |
commit: 5bb90a4bbfa570b3ca06462cd7d7093f27fb5a9d |
2 |
Author: Johannes Huber <johu <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 23 11:53:47 2019 +0000 |
4 |
Commit: Johannes Huber <johu <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 23 12:20:34 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bb90a4b |
7 |
|
8 |
x11-misc/polybar: Replace sed w/ patch |
9 |
|
10 |
Package-Manager: Portage-2.3.67, Repoman-2.3.15 |
11 |
Signed-off-by: Johannes Huber <johu <AT> gentoo.org> |
12 |
|
13 |
.../polybar/files/polybar-3.3.1-eventstruct.patch | 44 ++++++++++++++++++++++ |
14 |
x11-misc/polybar/polybar-3.3.1.ebuild | 8 ++-- |
15 |
x11-misc/polybar/polybar-9999.ebuild | 6 +-- |
16 |
3 files changed, 50 insertions(+), 8 deletions(-) |
17 |
|
18 |
diff --git a/x11-misc/polybar/files/polybar-3.3.1-eventstruct.patch b/x11-misc/polybar/files/polybar-3.3.1-eventstruct.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..93bf034f7de |
21 |
--- /dev/null |
22 |
+++ b/x11-misc/polybar/files/polybar-3.3.1-eventstruct.patch |
23 |
@@ -0,0 +1,44 @@ |
24 |
+From 00165e1a6d5dd61bc153e1352b21ec07fc81245d Mon Sep 17 00:00:00 2001 |
25 |
+From: patrick96 <p.ziegler96@×××××.com> |
26 |
+Date: Sun, 11 Feb 2018 21:27:52 +0100 |
27 |
+Subject: [PATCH] fix(generators): Add support for eventstruct |
28 |
+ |
29 |
+Newer xcb-proto commits after the 1.12 release require the 'eventstruct' |
30 |
+key in the output dictionary, otherwise the generator crashes. |
31 |
+ |
32 |
+I don't see a need for xpp to actually support the eventstruct key and |
33 |
+thus it uses a NOP lambda function |
34 |
+--- |
35 |
+ generators/cpp_client.py | 19 ++++++++++--------- |
36 |
+ 1 file changed, 10 insertions(+), 9 deletions(-) |
37 |
+ |
38 |
+diff --git a/generators/cpp_client.py b/generators/cpp_client.py |
39 |
+index 20d116f..709e8d8 100644 |
40 |
+--- a/lib/xpp/generators/cpp_client.py |
41 |
++++ b/lib/xpp/generators/cpp_client.py |
42 |
+@@ -3130,15 +3130,16 @@ def cpp_type_classes(): |
43 |
+ # } |
44 |
+ |
45 |
+ # Must create an "output" dictionary before any xcbgen imports. |
46 |
+-output = {'open' : c_open, |
47 |
+- 'close' : c_close, |
48 |
+- 'simple' : c_simple, # lambda x, y: None, |
49 |
+- 'enum' : lambda x, y: None, |
50 |
+- 'struct' : lambda x, y: None, |
51 |
+- 'union' : lambda x, y: None, |
52 |
+- 'request' : c_request, |
53 |
+- 'event' : cpp_event, |
54 |
+- 'error' : cpp_error, |
55 |
++output = {'open' : c_open, |
56 |
++ 'close' : c_close, |
57 |
++ 'simple' : c_simple, # lambda x, y: None, |
58 |
++ 'enum' : lambda x, y: None, |
59 |
++ 'struct' : lambda x, y: None, |
60 |
++ 'union' : lambda x, y: None, |
61 |
++ 'request' : c_request, |
62 |
++ 'event' : cpp_event, |
63 |
++ 'error' : cpp_error, |
64 |
++ 'eventstruct' : lambda x, y: None, |
65 |
+ } |
66 |
+ |
67 |
+ # Boilerplate below this point |
68 |
|
69 |
diff --git a/x11-misc/polybar/polybar-3.3.1.ebuild b/x11-misc/polybar/polybar-3.3.1.ebuild |
70 |
index d90ec9a2e76..ec73759fe76 100644 |
71 |
--- a/x11-misc/polybar/polybar-3.3.1.ebuild |
72 |
+++ b/x11-misc/polybar/polybar-3.3.1.ebuild |
73 |
@@ -46,18 +46,18 @@ DEPEND=" |
74 |
|
75 |
RDEPEND="${DEPEND}" |
76 |
|
77 |
-src_prepare() { |
78 |
- cmake-utils_src_prepare |
79 |
+PATCHES=( "${FILESDIR}/${P}-eventstruct.patch" ) |
80 |
|
81 |
+src_prepare() { |
82 |
if [[ ${PV} != *9999* ]]; then |
83 |
rmdir "${S}"/lib/xpp || die |
84 |
mv "${WORKDIR}"/xpp-$XPP_VERSION "${S}"/lib/xpp || die |
85 |
|
86 |
rmdir "${S}"/lib/i3ipcpp || die |
87 |
mv "${WORKDIR}"/i3ipcpp-$I3IPCPP_VERSION "${S}"/lib/i3ipcpp || die |
88 |
- |
89 |
- sed -i "s/.*cpp_error,.*/&\n\t 'eventstruct' : lambda x, y: None,/" lib/xpp/generators/cpp_client.py || die "sed failed" |
90 |
fi |
91 |
+ |
92 |
+ cmake-utils_src_prepare |
93 |
} |
94 |
|
95 |
src_configure() { |
96 |
|
97 |
diff --git a/x11-misc/polybar/polybar-9999.ebuild b/x11-misc/polybar/polybar-9999.ebuild |
98 |
index 70e8d426aaf..adddc936af6 100644 |
99 |
--- a/x11-misc/polybar/polybar-9999.ebuild |
100 |
+++ b/x11-misc/polybar/polybar-9999.ebuild |
101 |
@@ -47,17 +47,15 @@ DEPEND=" |
102 |
RDEPEND="${DEPEND}" |
103 |
|
104 |
src_prepare() { |
105 |
- cmake-utils_src_prepare |
106 |
- |
107 |
if [[ ${PV} != *9999* ]]; then |
108 |
rmdir "${S}"/lib/xpp || die |
109 |
mv "${WORKDIR}"/xpp-$XPP_VERSION "${S}"/lib/xpp || die |
110 |
|
111 |
rmdir "${S}"/lib/i3ipcpp || die |
112 |
mv "${WORKDIR}"/i3ipcpp-$I3IPCPP_VERSION "${S}"/lib/i3ipcpp || die |
113 |
- |
114 |
- sed -i "s/.*cpp_error,.*/&\n\t 'eventstruct' : lambda x, y: None,/" lib/xpp/generators/cpp_client.py || die "sed failed" |
115 |
fi |
116 |
+ |
117 |
+ cmake-utils_src_prepare |
118 |
} |
119 |
|
120 |
src_configure() { |