commit: 2f72902c1d4bebe3b907a14edfd9082dadb30edb Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr> AuthorDate: Mon Dec 28 14:15:32 2020 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Mon Dec 28 14:15:32 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f72902c
app-portage/conf-update: Port to EAPI 7 Closes: https://bugs.gentoo.org/706684 Package-Manager: Portage-3.0.9, Repoman-3.0.1 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr> Signed-off-by: David Seifert <soap <AT> gentoo.org> .../conf-update/conf-update-1.0.3-r1.ebuild | 28 ++++++---- .../files/conf-update-1.0.3-fno-common.patch | 64 ++++++++++++++++++++++ 2 files changed, 80 insertions(+), 12 deletions(-) diff --git a/app-portage/conf-update/conf-update-1.0.3-r1.ebuild b/app-portage/conf-update/conf-update-1.0.3-r1.ebuild index b599d25db4b..e45068f6d28 100644 --- a/app-portage/conf-update/conf-update-1.0.3-r1.ebuild +++ b/app-portage/conf-update/conf-update-1.0.3-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -inherit eutils toolchain-funcs +inherit toolchain-funcs DESCRIPTION="${PN} is a ncurses-based config management utility" HOMEPAGE="https://gitweb.gentoo.org/proj/conf-update.git/" @@ -14,18 +14,22 @@ SLOT="0" KEYWORDS="amd64 ppc x86" IUSE="colordiff libressl" -RDEPEND=">=dev-libs/glib-2.6 - sys-libs/ncurses:0 - !libressl? ( dev-libs/openssl:0 ) - libressl? ( dev-libs/libressl ) - colordiff? ( app-misc/colordiff )" -DEPEND="virtual/pkgconfig - ${RDEPEND}" +RDEPEND=" + dev-libs/glib + sys-libs/ncurses:0 + colordiff? ( app-misc/colordiff ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) src_prepare() { - sed -i -e "s/\$Rev:.*\\$/${PVR}/" "${S}"/"${PN}".h || die + default + sed -i -e "s/\$Rev:.*\\$/${PVR}/" ${PN}.h || die if use colordiff ; then - sed -i -e "s/diff_tool=diff/diff_tool=colordiff/" ${PN}.conf \ die 'colordiff-sed failed' + sed -i -e "s/diff_tool=diff/diff_tool=colordiff/" ${PN}.conf || die fi tc-export PKG_CONFIG } diff --git a/app-portage/conf-update/files/conf-update-1.0.3-fno-common.patch b/app-portage/conf-update/files/conf-update-1.0.3-fno-common.patch new file mode 100644 index 00000000000..04c72687dde --- /dev/null +++ b/app-portage/conf-update/files/conf-update-1.0.3-fno-common.patch @@ -0,0 +1,64 @@ +--- a/config.c ++++ b/config.c +@@ -1,5 +1,7 @@ + #include "conf-update.h" + ++struct configuration config; ++ + bool get_boolean(GKeyFile *conffile, const char *key, bool default_value) { + GError *error = NULL; + bool value, invalid_value, key_not_found; +@@ -26,7 +28,6 @@ char *get_string(GKeyFile *conffile, const char *key, char *default_value) { + } + + void read_config() { +- extern struct configuration config; + GKeyFile *conffile; + + // set reasonable defaults +--- a/config.h ++++ b/config.h +@@ -8,6 +8,8 @@ struct configuration { + char *diff_tool; + char *merge_tool; + char *edit_tool; +-} config; ++}; ++ ++extern struct configuration config; + + void read_config(); +--- a/core.c ++++ b/core.c +@@ -1,5 +1,7 @@ + #include "conf-update.h" + ++extern struct configuration config; ++ + char *get_real_filename(const char *update) { + char *file = (char *)calloc(strlen(update) + 1 - strlen("._cfg????_"), sizeof(char)); + strncpy(file, update, strrchr(update, '/') - update + 1); +@@ -73,7 +75,6 @@ void merge(char *update, char **index) { + } + + int show_diff(char *update) { +- extern struct configuration config; + char *realfile = get_real_filename(update); + char *esc_realfile = g_shell_quote(realfile); + char *esc_update = g_shell_quote(update); +@@ -98,7 +99,6 @@ int show_diff(char *update) { + } + + int edit_update(char *update) { +- extern struct configuration config; + char *esc_update = g_shell_quote(update); + char *cmd = calloc(strlen(config.edit_tool) + strlen(" ") + strlen(esc_update), sizeof(char)); + int ret; +@@ -116,7 +116,6 @@ int edit_update(char *update) { + char **merge_interactively(char *update, char **index) { + // customized versions are ._cfg????- with a minus instead of a underscore + // that way get_real_filename() works without modification +- extern struct configuration config; + char *realfile = get_real_filename(update); + char *esc_realfile = g_shell_quote(realfile); + char *esc_update = g_shell_quote(update);
