From a459b41dcc9e37d3178a7198a95fb610a38aa566 Mon Sep 17 00:00:00 2001 From: Ben Kohler Date: Tue, 5 May 2020 07:21:40 -0500 Subject: net-misc/ncman: revbump for json-0.14 fixes Closes: https://bugs.gentoo.org/720726 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Ben Kohler --- .../ncman/files/ncman-fix-for-json-c-0.14.patch | 33 ++++++++++++++++++++ net-misc/ncman/ncman-0.0.1_p20190327-r2.ebuild | 36 ++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 net-misc/ncman/files/ncman-fix-for-json-c-0.14.patch create mode 100644 net-misc/ncman/ncman-0.0.1_p20190327-r2.ebuild (limited to 'net-misc') diff --git a/net-misc/ncman/files/ncman-fix-for-json-c-0.14.patch b/net-misc/ncman/files/ncman-fix-for-json-c-0.14.patch new file mode 100644 index 000000000000..c0ff5ded937d --- /dev/null +++ b/net-misc/ncman/files/ncman-fix-for-json-c-0.14.patch @@ -0,0 +1,33 @@ +diff -ur a/src/json_regex.c b/src/json_regex.c +--- a/src/json_regex.c 2020-05-05 06:50:49.643196630 -0500 ++++ b/src/json_regex.c 2020-05-05 06:59:32.722322215 -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/src/json_utils.c b/src/json_utils.c +--- a/src/json_utils.c 2020-05-05 06:50:49.643196630 -0500 ++++ b/src/json_utils.c 2020-05-05 06:59:46.140940810 -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 == 1) + return false; + + res = __json_type_dispatch(val, tmp_trusted); diff --git a/net-misc/ncman/ncman-0.0.1_p20190327-r2.ebuild b/net-misc/ncman/ncman-0.0.1_p20190327-r2.ebuild new file mode 100644 index 000000000000..c57a4f960f9b --- /dev/null +++ b/net-misc/ncman/ncman-0.0.1_p20190327-r2.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic meson +COMMIT="21a55145ddbc5d085e91352586875abe92cff73b" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI=https://github.com/l4rzy/ncman.git +else + SRC_URI="https://github.com/l4rzy/ncman/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +fi + +DESCRIPTION="An ncurses UI for connman, forked from connman-json-client" +HOMEPAGE="https://github.com/l4rzy/ncman" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +RDEPEND="dev-libs/json-c:0= + >=sys-apps/dbus-1.4 + sys-libs/ncurses:0=" +DEPEND="${RDEPEND}" + +PATCHES=( "${FILESDIR}"/${PN}-fix-for-json-c-0.14.patch ) + +[[ ${PV} == *9999* ]] || S="${WORKDIR}/${PN}-${COMMIT}" + +src_prepare() { + default + append-cflags "-D_POSIX_C_SOURCE=200809L" +} -- cgit v1.2.3-65-gdbad