archivers/sharutils: Fix build with -fno-common

Sponsored by:	Rubicon Communications, LLC (Netgate)
This commit is contained in:
Renato Botelho 2020-08-28 17:41:34 +00:00
parent 7d54ea6a01
commit 61a1313619
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=546768
4 changed files with 43 additions and 1 deletions

View file

@ -12,13 +12,14 @@ COMMENT= Pack, send, and unpack shell archives; synchronize via e-mail
LICENSE= GPLv3
USES= charsetfix cpe perl5 tar:xz
OPTIONS_DEFINE= NLS
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --program-prefix=g --disable-uucode
INSTALL_TARGET= install install-man
INFO= sharutils
USES= charsetfix cpe perl5 tar:xz
USE_PERL5= build
OPTIONS_SUB= yes
CPE_VENDOR= gnu
@ -30,6 +31,14 @@ NLS_CONFIGURE_OFF= --disable-nls
post-patch:
@${REINPLACE_CMD} -e '/Please include config.h first./ s,^.*$$,#include <config.h>,' \
${WRKSRC}/lib/unistd.in.h
@${REINPLACE_CMD} -e '/char const . const program_name/d' \
${WRKSRC}/src/shar-opts.h \
${WRKSRC}/src/shar-opts.c \
${WRKSRC}/src/unshar-opts.h \
${WRKSRC}/src/unshar-opts.c \
${WRKSRC}/src/uudecode-opts.h \
${WRKSRC}/src/uudecode-opts.c \
${WRKSRC}/src/uuencode-opts.h
.for man in shar.1 unshar.1
@${REINPLACE_CMD} \
-e 's, SHAR , GSHAR ,' \

View file

@ -0,0 +1,11 @@
--- src/shar.c.orig 2020-08-28 17:03:20 UTC
+++ src/shar.c
@@ -83,6 +83,8 @@ static const char cright_years_z[] =
#define LOG10_MAX_INT 11
+char const * const program_name = "shar";
+
/* System related declarations. */
/* Convert a possibly-signed character to an unsigned character. This is

View file

@ -0,0 +1,11 @@
--- src/unshar.c.orig 2020-08-28 17:03:20 UTC
+++ src/unshar.c
@@ -32,6 +32,8 @@
#include "xgetcwd.h"
+char const * const program_name = "unshar";
+
/*
* FIXME: actually configure this stuff:
*/

View file

@ -0,0 +1,11 @@
--- src/uudecode.c.orig 2020-08-28 17:15:21 UTC
+++ src/uudecode.c
@@ -82,6 +82,8 @@ static char const cright_years_z[] =
#define UU_CHMOD(_n, _fd, _m) chmod ((_n), UU_MODE_BITS(_m))
#endif
+char const * const program_name = "uudecode";
+
struct passwd *getpwnam ();
static uudecode_exit_code_t read_stduu(