Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/bitlbee/files/, net-im/bitlbee/
Date: Thu, 18 Aug 2022 07:06:32
Message-Id: 1660806378.2f4aeedeec9c18047dbda18f31325ac3aeb6a617.juippis@gentoo
1 commit: 2f4aeedeec9c18047dbda18f31325ac3aeb6a617
2 Author: Petr Vaněk <arkamar <AT> atlas <DOT> cz>
3 AuthorDate: Mon Aug 1 20:35:08 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 18 07:06:18 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f4aeede
7
8 net-im/bitlbee: sync live
9
10 Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
11 Closes: https://github.com/gentoo/gentoo/pull/26703
12 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
13
14 net-im/bitlbee/bitlbee-9999.ebuild | 9 ++-
15 .../files/bitlbee-9999-system-json-parser.patch | 83 ++++++++++++++++++++++
16 2 files changed, 89 insertions(+), 3 deletions(-)
17
18 diff --git a/net-im/bitlbee/bitlbee-9999.ebuild b/net-im/bitlbee/bitlbee-9999.ebuild
19 index d811ebc6f0c2..0a8cc973ae18 100644
20 --- a/net-im/bitlbee/bitlbee-9999.ebuild
21 +++ b/net-im/bitlbee/bitlbee-9999.ebuild
22 @@ -12,7 +12,7 @@ if [[ ${PV} == "9999" ]]; then
23 inherit git-r3
24 else
25 SRC_URI="https://get.bitlbee.org/src/${P}.tar.gz"
26 - KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
27 + KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
28 fi
29
30 DESCRIPTION="irc to IM gateway that support multiple IM protocols"
31 @@ -36,6 +36,7 @@ COMMON_DEPEND="
32 acct-group/bitlbee
33 acct-user/bitlbee
34 dev-libs/glib:2
35 + dev-libs/json-parser:=
36 purple? ( net-im/pidgin )
37 libevent? ( dev-libs/libevent:= )
38 otr? ( >=net-libs/libotr-4 )
39 @@ -61,7 +62,8 @@ BDEPEND="${PYTHON_DEPS}
40 "
41
42 PATCHES=(
43 - "${FILESDIR}"/${PN}-3.5-systemd-user.patch
44 + "${FILESDIR}/${PN}-3.5-systemd-user.patch"
45 + "${FILESDIR}/${P}-system-json-parser.patch"
46 )
47
48 src_configure() {
49 @@ -112,8 +114,9 @@ src_configure() {
50 --datadir=/usr/share/bitlbee \
51 --etcdir=/etc/bitlbee \
52 --libdir=/usr/$(get_libdir) \
53 - --plugindir=/usr/$(get_libdir)/bitlbee \
54 --pcdir=/usr/$(get_libdir)/pkgconfig \
55 + --plugindir=/usr/$(get_libdir)/bitlbee \
56 + --externaljsonparser=1 \
57 --systemdsystemunitdir=$(systemd_get_systemunitdir) \
58 --doc=1 \
59 --strip=0 \
60
61 diff --git a/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch b/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch
62 new file mode 100644
63 index 000000000000..07f2878525ec
64 --- /dev/null
65 +++ b/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch
66 @@ -0,0 +1,83 @@
67 +This is adapted patch from upstream PR 151. Original PR defines
68 +--external-json-parser which breaks configuration, see [1]. It was changed to
69 +--externaljsonparser and $external_json_parser to $externaljsonparser.
70 +
71 +[1] https://github.com/bitlbee/bitlbee/pull/151#issuecomment-1201181905
72 +
73 +Upstream-PR: https://github.com/bitlbee/bitlbee/pull/151
74 +
75 +diff --git a/configure b/configure
76 +index 4640c806..77b1213b 100755
77 +--- a/configure
78 ++++ b/configure
79 +@@ -47,6 +47,7 @@ plugins=1
80 + otr=0
81 +
82 + events=glib
83 ++externaljsonparser=auto
84 + ssl=auto
85 +
86 + pam=0
87 +@@ -148,6 +149,7 @@ Option Description Default
88 + --events=... Event handler (glib, libevent) $events
89 + --ssl=... SSL library to use (gnutls, nss, openssl, auto)
90 + $ssl
91 ++--externaljsonparser=0/1/auto Use External JSON parser $externaljsonparser
92 +
93 +
94 + --target=... Cross compilation target same as host
95 +@@ -398,6 +400,20 @@ else
96 + fi
97 + echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings
98 +
99 ++if [ "$externaljsonparser" = "auto" ]; then
100 ++ if pkg-config --exists json-parser; then
101 ++ externaljsonparser=1
102 ++ else
103 ++ externaljsonparser=0
104 ++ fi
105 ++fi
106 ++echo "EXTERNAL_JSON_PARSER=$externaljsonparser" >> Makefile.settings
107 ++if [ "$externaljsonparser" = "1" ]; then
108 ++ echo "CFLAGS+=$(pkg-config --cflags json-parser)" >> Makefile.settings
109 ++ echo "LDFLAGS_BITLBEE+=$(pkg-config --libs json-parser)" >> Makefile.settings
110 ++fi
111 ++
112 ++
113 + detect_gnutls()
114 + {
115 + if $PKG_CONFIG --exists gnutls; then
116 +@@ -979,6 +995,12 @@ else
117 + echo ' systemd disabled.'
118 + fi
119 +
120 ++if [ "$externaljsonparser" = "1" ]; then
121 ++ echo ' Using system JSON parser.'
122 ++else
123 ++ echo ' Using bundled JSON parser.'
124 ++fi
125 ++
126 + echo ' Using python: '$PYTHON
127 + echo ' Using event handler: '$events
128 + echo ' Using SSL library: '$ssl
129 + #echo ' Building with these storage backends: '$STORAGES
130 +diff --git a/lib/Makefile b/lib/Makefile
131 +index fc46aedc..ad95d9cb 100644
132 +--- a/lib/Makefile
133 ++++ b/lib/Makefile
134 +@@ -12,7 +12,11 @@ _SRCDIR_ := $(_SRCDIR_)lib/
135 + endif
136 +
137 + # [SH] Program variables
138 +-objects = arc.o base64.o canohost.o $(EVENT_HANDLER) ftutil.o http_client.o ini.o json.o json_util.o md5.o misc.o oauth.o oauth2.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o ns_parse.o
139 ++objects = arc.o base64.o canohost.o $(EVENT_HANDLER) ftutil.o http_client.o ini.o json_util.o md5.o misc.o oauth.o oauth2.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o ns_parse.o
140 ++
141 ++ifneq ($(EXTERNAL_JSON_PARSER),1)
142 ++objects += json.o
143 ++endif
144 +
145 + LFLAGS += -r
146 +
147 +--
148 +2.35.1
149 +