1 |
commit: 9234f9e1d6a7a7c9b4bd9f4fd11c33b1bd33bee1 |
2 |
Author: Petr Vaněk <arkamar <AT> atlas <DOT> cz> |
3 |
AuthorDate: Thu Aug 18 09:25:51 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 23 04:50:22 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9234f9e1 |
7 |
|
8 |
net-im/bitlbee: fix tests in 3.6-r3 and live |
9 |
|
10 |
It was necessary to adapt system-json-parser patches more with |
11 |
LDFLAGS_CHECK variable which is used when ./tests/check binary is |
12 |
linked. |
13 |
|
14 |
Fixes: 90a3d5fff1c0 ("net-im/bitlbee: Use system json-parser") |
15 |
Fixes: 2f4aeedeec9c ("net-im/bitlbee: sync live") |
16 |
Closes: https://bugs.gentoo.org/865667 |
17 |
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz> |
18 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
19 |
|
20 |
.../files/bitlbee-3.6-system-json-parser.patch | 23 ++++++++++++++++--- |
21 |
.../files/bitlbee-9999-system-json-parser.patch | 26 +++++++++++++++++----- |
22 |
2 files changed, 41 insertions(+), 8 deletions(-) |
23 |
|
24 |
diff --git a/net-im/bitlbee/files/bitlbee-3.6-system-json-parser.patch b/net-im/bitlbee/files/bitlbee-3.6-system-json-parser.patch |
25 |
index 02d57e02d6d2..0a9c197d763d 100644 |
26 |
--- a/net-im/bitlbee/files/bitlbee-3.6-system-json-parser.patch |
27 |
+++ b/net-im/bitlbee/files/bitlbee-3.6-system-json-parser.patch |
28 |
@@ -1,13 +1,16 @@ |
29 |
This is adapted patch from upstream PR 151. Original PR defines |
30 |
--external-json-parser which breaks configuration, see [1]. It was changed to |
31 |
--externaljsonparser and $external_json_parser to $externaljsonparser. |
32 |
+Additionally, LDFLAGS_CHECK variable was introduced in order to make |
33 |
+tests working, see [2] and #865667. |
34 |
|
35 |
[1] https://github.com/bitlbee/bitlbee/pull/151#issuecomment-1201181905 |
36 |
+[2] https://github.com/bitlbee/bitlbee/pull/151#issuecomment-1219254239 |
37 |
|
38 |
Upstream-PR: https://github.com/bitlbee/bitlbee/pull/151 |
39 |
|
40 |
diff --git a/configure b/configure |
41 |
-index 4640c806..77b1213b 100755 |
42 |
+index fd8d363a..39495515 100755 |
43 |
--- a/configure |
44 |
+++ b/configure |
45 |
@@ -47,6 +47,7 @@ plugins=1 |
46 |
@@ -26,7 +29,7 @@ index 4640c806..77b1213b 100755 |
47 |
|
48 |
|
49 |
--target=... Cross compilation target same as host |
50 |
-@@ -398,6 +400,20 @@ else |
51 |
+@@ -398,6 +400,21 @@ else |
52 |
fi |
53 |
echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings |
54 |
|
55 |
@@ -41,13 +44,14 @@ index 4640c806..77b1213b 100755 |
56 |
+if [ "$externaljsonparser" = "1" ]; then |
57 |
+ echo "CFLAGS+=$(pkg-config --cflags json-parser)" >> Makefile.settings |
58 |
+ echo "LDFLAGS_BITLBEE+=$(pkg-config --libs json-parser)" >> Makefile.settings |
59 |
++ echo "LDFLAGS_CHECK+=$(pkg-config --libs json-parser)" >> Makefile.settings |
60 |
+fi |
61 |
+ |
62 |
+ |
63 |
detect_gnutls() |
64 |
{ |
65 |
if $PKG_CONFIG --exists gnutls; then |
66 |
-@@ -979,6 +995,12 @@ else |
67 |
+@@ -979,6 +996,12 @@ else |
68 |
echo ' systemd disabled.' |
69 |
fi |
70 |
|
71 |
@@ -77,6 +81,19 @@ index fc46aedc..ad95d9cb 100644 |
72 |
|
73 |
LFLAGS += -r |
74 |
|
75 |
+diff --git a/tests/Makefile b/tests/Makefile |
76 |
+index 76122a2f..2235bf1d 100644 |
77 |
+--- a/tests/Makefile |
78 |
++++ b/tests/Makefile |
79 |
+@@ -20,7 +20,7 @@ test_objs = check.o check_util.o check_nick.o check_md5.o check_arc.o check_irc. |
80 |
+ |
81 |
+ check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o ../lib/lib.o |
82 |
+ @echo '*' Linking $@ |
83 |
+- $(VERBOSE) $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(EFLAGS) |
84 |
++ $(VERBOSE) $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(LDFLAGS_CHECK) $(EFLAGS) |
85 |
+ |
86 |
+ %.o: $(_SRCDIR_)%.c |
87 |
+ @echo '*' Compiling $< |
88 |
-- |
89 |
2.35.1 |
90 |
|
91 |
|
92 |
diff --git a/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch b/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch |
93 |
index 07f2878525ec..d0020307cfa3 100644 |
94 |
--- a/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch |
95 |
+++ b/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch |
96 |
@@ -1,13 +1,16 @@ |
97 |
This is adapted patch from upstream PR 151. Original PR defines |
98 |
--external-json-parser which breaks configuration, see [1]. It was changed to |
99 |
--externaljsonparser and $external_json_parser to $externaljsonparser. |
100 |
+Additionally, LDFLAGS_CHECK variable was introduced in order to make |
101 |
+tests working, see [2] and #865667. |
102 |
|
103 |
[1] https://github.com/bitlbee/bitlbee/pull/151#issuecomment-1201181905 |
104 |
+[2] https://github.com/bitlbee/bitlbee/pull/151#issuecomment-1219254239 |
105 |
|
106 |
Upstream-PR: https://github.com/bitlbee/bitlbee/pull/151 |
107 |
|
108 |
diff --git a/configure b/configure |
109 |
-index 4640c806..77b1213b 100755 |
110 |
+index 2291e9a4..3ba40933 100755 |
111 |
--- a/configure |
112 |
+++ b/configure |
113 |
@@ -47,6 +47,7 @@ plugins=1 |
114 |
@@ -18,7 +21,7 @@ index 4640c806..77b1213b 100755 |
115 |
ssl=auto |
116 |
|
117 |
pam=0 |
118 |
-@@ -148,6 +149,7 @@ Option Description Default |
119 |
+@@ -154,6 +155,7 @@ Option Description Default |
120 |
--events=... Event handler (glib, libevent) $events |
121 |
--ssl=... SSL library to use (gnutls, nss, openssl, auto) |
122 |
$ssl |
123 |
@@ -26,7 +29,7 @@ index 4640c806..77b1213b 100755 |
124 |
|
125 |
|
126 |
--target=... Cross compilation target same as host |
127 |
-@@ -398,6 +400,20 @@ else |
128 |
+@@ -404,6 +406,21 @@ else |
129 |
fi |
130 |
echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings |
131 |
|
132 |
@@ -41,13 +44,14 @@ index 4640c806..77b1213b 100755 |
133 |
+if [ "$externaljsonparser" = "1" ]; then |
134 |
+ echo "CFLAGS+=$(pkg-config --cflags json-parser)" >> Makefile.settings |
135 |
+ echo "LDFLAGS_BITLBEE+=$(pkg-config --libs json-parser)" >> Makefile.settings |
136 |
++ echo "LDFLAGS_CHECK+=$(pkg-config --libs json-parser)" >> Makefile.settings |
137 |
+fi |
138 |
+ |
139 |
+ |
140 |
detect_gnutls() |
141 |
{ |
142 |
if $PKG_CONFIG --exists gnutls; then |
143 |
-@@ -979,6 +995,12 @@ else |
144 |
+@@ -993,6 +1010,12 @@ else |
145 |
echo ' systemd disabled.' |
146 |
fi |
147 |
|
148 |
@@ -60,7 +64,6 @@ index 4640c806..77b1213b 100755 |
149 |
echo ' Using python: '$PYTHON |
150 |
echo ' Using event handler: '$events |
151 |
echo ' Using SSL library: '$ssl |
152 |
- #echo ' Building with these storage backends: '$STORAGES |
153 |
diff --git a/lib/Makefile b/lib/Makefile |
154 |
index fc46aedc..ad95d9cb 100644 |
155 |
--- a/lib/Makefile |
156 |
@@ -78,6 +81,19 @@ index fc46aedc..ad95d9cb 100644 |
157 |
|
158 |
LFLAGS += -r |
159 |
|
160 |
+diff --git a/tests/Makefile b/tests/Makefile |
161 |
+index 76122a2f..2235bf1d 100644 |
162 |
+--- a/tests/Makefile |
163 |
++++ b/tests/Makefile |
164 |
+@@ -20,7 +20,7 @@ test_objs = check.o check_util.o check_nick.o check_md5.o check_arc.o check_irc. |
165 |
+ |
166 |
+ check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o ../lib/lib.o |
167 |
+ @echo '*' Linking $@ |
168 |
+- $(VERBOSE) $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(EFLAGS) |
169 |
++ $(VERBOSE) $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(LDFLAGS_CHECK) $(EFLAGS) |
170 |
+ |
171 |
+ %.o: $(_SRCDIR_)%.c |
172 |
+ @echo '*' Compiling $< |
173 |
-- |
174 |
2.35.1 |