commit: 998f0b24fde487bbc25b69222dc9b3d65cc9fdca Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> AuthorDate: Fri Jan 31 16:56:51 2020 +0000 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> CommitDate: Fri Jan 31 16:57:15 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=998f0b24
net-analyzer/echoping: Fix CFLAGS=-fno-common Package-Manager: Portage-2.3.86, Repoman-2.3.20 Closes: https://bugs.gentoo.org/show_bug.cgi?id=707400 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> .../echoping/echoping-6.0.2_p434-r4.ebuild | 65 ++++++++++++ .../files/echoping-6.0.2_p434-fno-common.patch | 111 +++++++++++++++++++++ 2 files changed, 176 insertions(+) diff --git a/net-analyzer/echoping/echoping-6.0.2_p434-r4.ebuild b/net-analyzer/echoping/echoping-6.0.2_p434-r4.ebuild new file mode 100644 index 00000000000..17e0727353a --- /dev/null +++ b/net-analyzer/echoping/echoping-6.0.2_p434-r4.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Small program to test performances of remote servers" +HOMEPAGE="http://echoping.sourceforge.net/" +SRC_URI="https://dev.gentoo.org/~jer/${P}.tar.gz" +LICENSE="GPL-2" + +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="libressl gnutls http icp idn priority smtp ssl tos postgres ldap" +RESTRICT="test" + +RDEPEND=" + idn? ( net-dns/libidn ) + ldap? ( net-nds/openldap ) + postgres? ( dev-db/postgresql:* ) + ssl? ( + gnutls? ( >=net-libs/gnutls-3.3:= ) + !gnutls? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + ) +" +DEPEND=" + ${RDEPEND} + >=sys-devel/libtool-2 +" + +REQUIRED_USE="gnutls? ( ssl )" +DOCS=( AUTHORS ChangeLog DETAILS NEWS README TODO ) +PATCHES=( + "${FILESDIR}"/${PN}-6.0.2_p434-fix_implicit_declarations.patch + "${FILESDIR}"/${PN}-6.0.2_p434-gnutls_certificate_type_set_priority.patch + "${FILESDIR}"/${PN}-6.0.2_p434-gnutls_session.patch + "${FILESDIR}"/${PN}-6.0.2_p434-fno-common.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_enable http) \ + $(use_enable icp) \ + $(use_enable priority) \ + $(use_enable smtp) \ + $(use_enable tos) \ + $(use_with idn libidn) \ + $(usex gnutls $(use_with gnutls) $(use_with ssl)) \ + --config-cache \ + --disable-static \ + --disable-ttcp +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-analyzer/echoping/files/echoping-6.0.2_p434-fno-common.patch b/net-analyzer/echoping/files/echoping-6.0.2_p434-fno-common.patch new file mode 100644 index 00000000000..5eafb8a401d --- /dev/null +++ b/net-analyzer/echoping/files/echoping-6.0.2_p434-fno-common.patch @@ -0,0 +1,111 @@ +--- a/echoping.c ++++ b/echoping.c +@@ -38,6 +38,25 @@ + struct timeval good_results[MAX_ITERATIONS]; + extern int tvcmp(); + ++char *server; ++#ifdef LIBIDN ++char *locale_server, *ace_server, *utf8_server; ++#endif ++ ++#ifndef IN_PLUGIN ++init_f plugin_init; ++start_f plugin_start; ++start_raw_f plugin_raw_start; ++execute_f plugin_execute; ++terminate_f plugin_terminate; ++#endif ++ ++struct timeval null_timeval; ++struct timeval max_timeval; ++ ++boolean timeout_flag; ++char big_recvline[MAXTOREAD]; ++ + int + main(argc, argv) + int argc; +--- a/echoping.h ++++ b/echoping.h +@@ -118,7 +118,6 @@ + struct timeval timevalue; + }; + +-boolean timeout_flag; + struct echoping_struct { + boolean udp; /* Use the UDP protocol (TCP is the default) */ + boolean ttcp; +@@ -132,21 +131,21 @@ + /* Initializes the plugin with its arguments. Returns the port name or number or NULL if the plugin wants to use the raw interface. */ + typedef char *(*init_f) (const int argc, const char **argv, + const echoping_options global_options); +-init_f plugin_init; ++extern init_f plugin_init; + typedef void (*start_f) (struct addrinfo *); +-start_f plugin_start; ++extern start_f plugin_start; + typedef void (*start_raw_f) (); +-start_raw_f plugin_raw_start; ++extern start_raw_f plugin_raw_start; + typedef int (*execute_f) (); +-execute_f plugin_execute; ++extern execute_f plugin_execute; + typedef void (*terminate_f) (); +-terminate_f plugin_terminate; ++extern terminate_f plugin_terminate; + #endif + + #endif + +-struct timeval null_timeval; +-struct timeval max_timeval; ++extern struct timeval null_timeval; ++extern struct timeval max_timeval; + + #define ECHO_TCP_PORT "echo" + #define DISCARD_TCP_PORT "discard" +@@ -169,9 +168,9 @@ + + #define CHARGENERATED " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefg"; + +-char *server; ++extern char *server; + #ifdef LIBIDN +-char *locale_server, *ace_server, *utf8_server; ++extern char *locale_server, *ace_server, *utf8_server; + #endif + + /* My functions */ +@@ -230,6 +229,9 @@ + + extern boolean timeout_flag; + ++extern char big_recvline[MAXTOREAD]; ++ ++ + #include "compilation.h" + + #ifndef HEADER_INCLUDED +--- a/http.c ++++ b/http.c +@@ -6,8 +6,6 @@ + #include "HTParse.h" + + +-char big_recvline[MAXTOREAD]; +- + char * + make_http_sendline(char *url, char *host, int port, int nocache) + { +--- a/smtp.c ++++ b/smtp.c +@@ -8,8 +8,6 @@ + + #ifdef SMTP + +-char big_recvline[MAXTOREAD]; +- + int + smtp_read_response_from_server(FILE * fs) + {