From a411614149262f826b66443e6cf0ad1d7c66db70 Mon Sep 17 00:00:00 2001 From: Yixun Lan Date: Fri, 12 May 2023 07:52:00 +0800 Subject: net-misc/autossh: fix undefined setproctile & QA issue update EAPI 7 -> 8 Closes: https://bugs.gentoo.org/861596 Closes: https://bugs.gentoo.org/900252 Signed-off-by: Yixun Lan --- net-misc/autossh/autossh-1.4g-r2.ebuild | 34 ++++++++++++++++++++++++ net-misc/autossh/files/autossh-1.4g-libbsd.patch | 28 +++++++++++++++++++ net-misc/autossh/files/autossh-1.4g-printf.patch | 17 ++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 net-misc/autossh/autossh-1.4g-r2.ebuild create mode 100644 net-misc/autossh/files/autossh-1.4g-libbsd.patch create mode 100644 net-misc/autossh/files/autossh-1.4g-printf.patch (limited to 'net-misc/autossh') diff --git a/net-misc/autossh/autossh-1.4g-r2.ebuild b/net-misc/autossh/autossh-1.4g-r2.ebuild new file mode 100644 index 000000000000..d792505d9987 --- /dev/null +++ b/net-misc/autossh/autossh-1.4g-r2.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Automatically restart SSH sessions and tunnels" +HOMEPAGE="https://www.harding.motd.ca/autossh/" +SRC_URI="https://www.harding.motd.ca/${PN}/${P}.tgz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +SLOT="0" + +DEPEND="dev-libs/libbsd" +RDEPEND="${DEPEND} + virtual/openssh" + +PATCHES=( + "${FILESDIR}"/autossh-1.4g-libbsd.patch + "${FILESDIR}"/autossh-1.4g-printf.patch +) + +src_prepare() { + default + eautoreconf +} + +src_install() { + dobin autossh + dodoc CHANGES README autossh.host rscreen + doman autossh.1 +} diff --git a/net-misc/autossh/files/autossh-1.4g-libbsd.patch b/net-misc/autossh/files/autossh-1.4g-libbsd.patch new file mode 100644 index 000000000000..09292b8b096d --- /dev/null +++ b/net-misc/autossh/files/autossh-1.4g-libbsd.patch @@ -0,0 +1,28 @@ +diff --git a/configure.ac b/configure.ac +index 4bb9380..8c15089 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -110,9 +110,10 @@ AC_FUNC_SELECT_ARGTYPES + AC_FUNC_STRFTIME + AC_FUNC_VPRINTF + AC_CHECK_FUNCS([alarm daemon dup2 gethostbyname gettimeofday memmove]) +-AC_CHECK_FUNCS([memset poll select setproctitle socket strchr strerror]) ++AC_CHECK_FUNCS([memset poll select socket strchr strerror]) + AC_CHECK_FUNCS([strncasecmp strtoul uname vsyslog]) + ++AC_CHECK_LIB(bsd, setproctitle) + AC_CHECK_LIB(nsl, gethostbyname) + AC_CHECK_LIB(socket, connect) + +diff --git a/autossh.c b/autossh.c +index e2e3b84..9d3c1bf 100644 +--- a/autossh.c ++++ b/autossh.c +@@ -52,6 +52,7 @@ typedef int32_t socklen_t; + #include + #include + #include ++#include + + #ifndef HAVE_POLL + # ifdef HAVE_SELECT diff --git a/net-misc/autossh/files/autossh-1.4g-printf.patch b/net-misc/autossh/files/autossh-1.4g-printf.patch new file mode 100644 index 000000000000..362232395dd8 --- /dev/null +++ b/net-misc/autossh/files/autossh-1.4g-printf.patch @@ -0,0 +1,17 @@ +diff --git a/configure.ac b/configure.ac +index 4bb9380..38e2cf6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -133,7 +134,11 @@ AC_CHECK_LIB(socket, connect) + # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ + AC_TRY_LINK([], +- [ extern char *__progname; printf("%s", __progname); ], ++ [ ++ #include ; ++ extern char *__progname; ++ printf("%s", __progname); ++ ], + [ ac_cv_libc_defines___progname="yes" ], + [ ac_cv_libc_defines___progname="no" ] + ) -- cgit v1.2.3-65-gdbad