From: Ben Kohler Date: Tue, 5 May 2020 12:29:55 +0000 (-0500) Subject: net-misc/connman-json-client: add json-0.14 fix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1202b6e7b9e4e4738c7994733fa33950fb990fd2;p=gentoo.git net-misc/connman-json-client: add json-0.14 fix Closes: https://bugs.gentoo.org/720446 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Ben Kohler --- diff --git a/net-misc/connman-json-client/connman-json-client-1.0_p20150721-r1.ebuild b/net-misc/connman-json-client/connman-json-client-1.0_p20150721-r1.ebuild new file mode 100644 index 000000000000..71df6bec7998 --- /dev/null +++ b/net-misc/connman-json-client/connman-json-client-1.0_p20150721-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools vcs-snapshot +COMMIT="3c34b2ee62d2e188090d20e7ed2fd94bab9c47f2" + +DESCRIPTION="An ncurses UI for connman" +HOMEPAGE="https://github.com/eurogiciel-oss/connman-json-client" +SRC_URI="https://github.com/eurogiciel-oss/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="dev-libs/json-c:0= + >=sys-apps/dbus-1.4 + sys-libs/ncurses:0" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}"/cjc-fix-for-json-0.14.patch ) + +src_prepare() { + sed -i -e '/^AM_CFLAGS/ s/ -Werror$//' Makefile.am || die + default + eautoreconf +} + +src_install() { + default + dobin connman_ncurses +} diff --git a/net-misc/connman-json-client/files/cjc-fix-for-json-0.14.patch b/net-misc/connman-json-client/files/cjc-fix-for-json-0.14.patch new file mode 100644 index 000000000000..5cc8d55f3247 --- /dev/null +++ b/net-misc/connman-json-client/files/cjc-fix-for-json-0.14.patch @@ -0,0 +1,33 @@ +diff -ur a/json_regex.c b/json_regex.c +--- a/json_regex.c 2020-05-05 07:24:03.294949374 -0500 ++++ b/json_regex.c 2020-05-05 07:24:38.883944012 -0500 +@@ -64,7 +64,7 @@ + json_object_object_add(jregex_agent_response, "Username", json_object_new_string("^([[:print:]]*)$")); + json_object_object_add(jregex_agent_response, "Password", json_object_new_string("^([[:print:]]*)$")); + +- jregex_agent_retry_response = json_object_new_boolean(TRUE); ++ jregex_agent_retry_response = json_object_new_boolean(1); + + // See commands.c __cmd_config_service for a better idea of the format. + jregex_config_service = json_object_new_object(); +@@ -94,7 +94,7 @@ + json_object_array_add(arr, json_object_new_string("^([[:print:]]*)$")); + json_object_object_add(tmp, key_serv_proxy_excludes, arr); + json_object_object_add(opt, key_serv_proxy_config, tmp); +- json_object_object_add(opt, key_serv_autoconnect, json_object_new_boolean(TRUE)); ++ json_object_object_add(opt, key_serv_autoconnect, json_object_new_boolean(1)); + arr = json_object_new_array(); + json_object_array_add(arr, json_object_new_string("^([[:print:]]*)$")); + json_object_object_add(opt, key_serv_domains_config, arr); +diff -ur a/json_utils.c b/json_utils.c +--- a/json_utils.c 2020-05-05 07:24:03.294949374 -0500 ++++ b/json_utils.c 2020-05-05 07:24:58.877379129 -0500 +@@ -83,7 +83,7 @@ + key_is_trusted = json_object_object_get_ex(jtrusted, key, + &tmp_trusted); + +- if (key_is_trusted == FALSE) ++ if (key_is_trusted == 0) + return false; + + res = __json_type_dispatch(val, tmp_trusted);