net-dialup/lrzsz: Sync with Gentoo

It's from Gentoo commit fa855c43dc629fede17b882ed1a293089ff40ba4.
This commit is contained in:
Flatcar Buildbot 2025-01-13 07:09:06 +00:00 committed by Krzesimir Nowak
parent 1bc902b46f
commit a5d7ece350
3 changed files with 176 additions and 0 deletions

View File

@ -1,2 +1,3 @@
DIST gettext-0.19.8-runtime-m4.tar.xz 26092 BLAKE2B 671c43cbdc393658c0f9960cf6b743b5126a52ff0a87dbd8a59f6a8c398eecfab7509421d6e01096d73e40f2feb7b2bc229822c4d475d91a703c941134a506b5 SHA512 a5e5a64c7e2bd1a0fa6d426ff72a286027451ff034050541a92ba5a4d7889f925e4674e1df89e0c7e9657329209284995afcb0180a2e441136694556450e4edd
DIST lrzsz-0.12.20.tar.gz 280938 BLAKE2B 86511ab112da849f5894f18c045f2c8a9dd4c4e97426c1d98c5b91aade6c39e26f4a7e5674e057c9596a240dfd3ef32053fcdc8ee58b33654cf15eec64779b1e SHA512 9bce64036f1f1c65f5910f19802aecaf3dc5ffeab0feeca10fa8d2fe1b83e212391cce23056d22fd0eda52df89e12ede68eb5d22ffcf22f935910d2af7399f12
DIST lrzsz-m4-0.12.20.tar.bz2 23959 BLAKE2B 933e43f80a40478baef77d69f81fcb04947f2d0afb87f777b0c000ea4223408bf3e55d687cf625ab4835fb30e274f7058ff09ee3b51ad90e09723cd3053ee038 SHA512 c8818381f2e5271bc2dd7d469c0a33a6b22d42d3159b41f168223473a8b03322f3ff91a49ce398e3ef5abe7b355d92b83b1429d0c6d450d19985a60e2e1190d4

View File

@ -0,0 +1,98 @@
https://bugs.gentoo.org/943880
--- a/lib/error.c
+++ b/lib/error.c
@@ -73,7 +73,7 @@ extern char *program_name;
# if HAVE_STRERROR
# ifndef strerror /* On some systems, strerror is a macro */
-char *strerror ();
+char *strerror (int);
# endif
# else
static char *
--- a/lib/long-options.c
+++ b/lib/long-options.c
@@ -36,11 +36,11 @@ static struct option const long_options[] =
/* Process long options --help and --version, but only if argc == 2.
Be careful not to gobble up `--'. */
void
-parse_long_options (argc, argv,version, usage)
- int argc;
- char **argv;
- void (*version)();
- void (*usage)();
+parse_long_options (
+ int argc,
+ char **argv,
+ void (*version)(void),
+ void (*usage)(int))
{
int c;
int saved_opterr;
@@ -61,7 +61,7 @@ parse_long_options (argc, argv,version, usage)
(*usage) (0);
case 'v':
- (*version) (0);
+ (*version) ();
/* printf ("%s (%s) %s\n", command_name, package, version_string); */
exit (0);
--- a/lib/xstrtol.c
+++ b/lib/xstrtol.c
@@ -65,17 +65,17 @@ extern int errno;
} \
while (0)
-__unsigned long int __strtol ();
+__unsigned long int __strtol (const char*, char**, int);
/* FIXME: comment. */
strtol_error
-__xstrtol (s, ptr, base, val, valid_suffixes)
- const char *s;
- char **ptr;
- int base;
- __unsigned long int *val;
- const char *valid_suffixes;
+__xstrtol (
+ const char *s,
+ char **ptr,
+ int base,
+ __unsigned long int *val,
+ const char *valid_suffixes)
{
char *t_ptr;
char **p;
--- a/src/lrz.c
+++ b/src/lrz.c
@@ -42,9 +42,9 @@
#include "error.h"
#ifndef STRICT_PROTOTYPES
-extern time_t time();
-extern char *strerror();
-extern char *strstr();
+extern time_t time(time_t*);
+extern char *strerror(int);
+extern char *strstr(const char* , const char*);
#endif
#ifndef HAVE_ERRNO_DECLARATION
--- a/src/lsz.c
+++ b/src/lsz.c
@@ -51,9 +51,9 @@ void *mm_addr=NULL;
#include "error.h"
#ifndef STRICT_PROTOTYPES
-extern time_t time();
-extern char *strerror();
-extern char *strstr();
+extern time_t time(time_t*);
+extern char *strerror(int);
+extern char *strstr(const char*, const char*);
#endif
#ifndef HAVE_ERRNO_DECLARATION

View File

@ -0,0 +1,77 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools toolchain-funcs
DESCRIPTION="Communication package providing the X, Y, and ZMODEM file transfer protocols"
HOMEPAGE="https://www.ohse.de/uwe/software/lrzsz.html"
SRC_URI="
https://www.ohse.de/uwe/releases/${P}.tar.gz
https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/gettext-0.19.8-runtime-m4.tar.xz
"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="nls"
DEPEND="nls? ( virtual/libintl )"
BDEPEND="nls? ( sys-devel/gettext )"
PATCHES=(
"${FILESDIR}"/${PN}-autotools.patch
"${FILESDIR}"/${PN}-implicit-decl.patch
"${FILESDIR}"/${P}-automake-1.12.patch
"${FILESDIR}"/${P}-automake-1.13.patch
"${FILESDIR}"/${P}-gettext-0.20.patch
"${FILESDIR}"/${P}-AR.patch
"${FILESDIR}"/${P}-configure-clang16.patch
"${FILESDIR}"/${P}-gettext-0.22.patch
"${FILESDIR}"/${P}-disable-nls.patch
"${FILESDIR}"/${P}-c99.patch
"${FILESDIR}"/${P}-fix-integer-overflow.patch
"${FILESDIR}"/${P}-c23.patch
)
DOCS=( AUTHORS COMPATABILITY ChangeLog NEWS \
README{,.cvs,.gettext,.isdn4linux,.tests} THANKS TODO )
src_prepare() {
default
# automake is unhappy if this is missing
>> config.rpath || die
# This is too old. Remove it so automake puts in a newer copy.
rm missing || die
# Autoheader does not like seeing this file.
rm acconfig.h || die
# embed default m4 files in case gettext is not installed
mv "${WORKDIR}"/m4 . || die
eautoreconf
}
src_configure() {
tc-export CC
econf $(use_enable nls)
}
src_test() {
# Don't use check target.
# See bug #120748 before changing this function.
emake vcheck
}
src_install() {
default
local x
for x in {r,s}{b,x,z} ; do
dosym l${x} /usr/bin/${x}
dosym l${x:0:1}z.1 /usr/share/man/man1/${x}.1
[ "${x:1:1}" = "z" ] || dosym l${x:0:1}z.1 /usr/share/man/man1/l${x}.1
done
}