Updated devel/remake to remake-4.3+dbg-1.5 [-fno-common]

Slightly massaged patches from:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d3f45f6f1ac0dbe8d987af727a0f7445cd30048

Passes all tests:
653 Tests in 124 Categories Complete ... No Failures :-)

ok sthen
This commit is contained in:
gnezdo 2021-02-25 15:09:08 +00:00
parent ef6e779540
commit 1040f4c68f
15 changed files with 177 additions and 86 deletions

View File

@ -1,10 +1,9 @@
# $OpenBSD: Makefile,v 1.12 2019/07/12 20:45:57 sthen Exp $
# $OpenBSD: Makefile,v 1.13 2021/02/25 15:09:08 gnezdo Exp $
COMMENT= GNU make debugger
PKGNAME= remake-0.61p0
DISTNAME= remake-3.80+dbg-0.61
REVISION= 2
PKGNAME= remake-1.5
DISTNAME= remake-4.3+dbg-1.5
CATEGORIES= devel
@ -18,11 +17,11 @@ WANTLIB += c curses readline
CONFIGURE_STYLE= gnu
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/make ${PREFIX}/bin/remake
${INSTALL_MAN} ${WRKSRC}/make.1 ${PREFIX}/man/man1/remake.1
# The test suite expects to find SHELL.
MAKE_ENV += SHELL=/bin/ksh
pre-test:
rm -f ${WRKSRC}/tests/scripts/debugger/trace.orig
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/make ${PREFIX}/bin/remake
${INSTALL_MAN} ${WRKSRC}/doc/make.1 ${PREFIX}/man/man1/remake.1
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (remake-3.80+dbg-0.61.tar.gz) = WFbqUR+HUoSltUIF33e2eCKkmv+ns67rpCecBuZXcfo=
SIZE (remake-3.80+dbg-0.61.tar.gz) = 1388889
SHA256 (remake-4.3+dbg-1.5.tar.gz) = Lm63CfPmuFiT8U8V40tMm3VKzq7wuSu2yjoCXxARnXY=
SIZE (remake-4.3+dbg-1.5.tar.gz) = 2546056

View File

@ -1,37 +0,0 @@
$OpenBSD: patch-glob_glob_h,v 1.1.1.1 2006/12/26 18:16:09 deanna Exp $
--- glob/glob.h.orig Sat Dec 16 22:41:12 2006
+++ glob/glob.h Sat Dec 16 22:41:27 2006
@@ -33,33 +33,6 @@
# define __ptr_t char *
#endif /* C++ or ANSI C. */
-/* We need `size_t' for the following definitions. */
-#ifndef __size_t
-# if defined __FreeBSD__
-# define __size_t size_t
-# else
-# if defined __GNUC__ && __GNUC__ >= 2
-typedef __SIZE_TYPE__ __size_t;
-# else
-/* This is a guess. */
-/*hb
- * Conflicts with DECCs aready defined type __size_t.
- * Defining an own type with a name beginning with '__' is no good.
- * Anyway if DECC is used and __SIZE_T is defined then __size_t is
- * already defined (and I hope it's exactly the one we need here).
- */
-# if !(defined __DECC && defined __SIZE_T)
-typedef unsigned long int __size_t;
-# endif
-# endif
-# endif
-#else
-/* The GNU CC stddef.h version defines __size_t as empty. We need a real
- definition. */
-# undef __size_t
-# define __size_t size_t
-#endif
-
/* Bits set in the FLAGS argument to `glob'. */
#define GLOB_ERR (1 << 0)/* Return on read errors. */
#define GLOB_MARK (1 << 1)/* Append a slash to each name. */

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-src_dbg_cmd_c,v 1.1.1.1 2006/12/26 18:16:09 deanna Exp $
--- src/dbg_cmd.c.orig Mon Dec 25 17:27:33 2006
+++ src/dbg_cmd.c Mon Dec 25 17:30:09 2006
@@ -868,14 +868,19 @@ dbg_cmd_quit (char *psz_arg)
static debug_return_t
dbg_cmd_run (char *psz_arg)
{
+ char **ppsz_argv = global_argv;
+ char *psz_full_args;
+ const char *psz_make_cmd = global_argv[0];
+
+ unsigned int len;
+
printf("Changing directory to %s and restarting...\n",
directory_before_chdir);
chdir (directory_before_chdir);
- char **ppsz_argv = global_argv;
- const char *psz_make_cmd = global_argv[0];
+
if (psz_arg && strlen(psz_arg)) {
- unsigned int len = strlen(global_argv[0]) + strlen(psz_arg) + 2;
- char *psz_full_args = CALLOC(char, len);
+ len = strlen(global_argv[0]) + strlen(psz_arg) + 2;
+ psz_full_args = CALLOC(char, len);
snprintf(psz_full_args, len, "%s %s", global_argv[0], psz_arg);
ppsz_argv = buildargv(psz_full_args);
}

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-src_debugger_file2line_c,v 1.1 2021/02/25 15:09:09 gnezdo Exp $
-fno-common
https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/remake/files/remake-4.2.1.1.4-fno-common.patch?id=2d3f45f6f1ac0dbe8d987af727a0f7445cd30048
Index: src/debugger/file2line.c
--- src/debugger/file2line.c.orig
+++ src/debugger/file2line.c
@@ -26,6 +26,8 @@ Boston, MA 02111-1307, USA. */
#include "../rule.h"
#include "./file2line.h"
+struct hash_table file2lines;
+
unsigned long
file2lines_hash_1 (const void *key)
{

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_debugger_file2line_h,v 1.1 2021/02/25 15:09:09 gnezdo Exp $
-fno-common
Index: src/debugger/file2line.h
--- src/debugger/file2line.h.orig
+++ src/debugger/file2line.h
@@ -19,7 +19,7 @@ the Free Software Foundation, Inc., 59 Temple Place -
Boston, MA 02111-1307, USA. */
#ifndef REMAKE_FILE2LINE
#define REMAKE_FILE2LINE
-struct hash_table file2lines;
+extern struct hash_table file2lines;
typedef enum {
F2L_TARGET,

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_dep_h,v 1.1 2021/02/25 15:09:09 gnezdo Exp $
-fno-common
Index: src/dep.h
--- src/dep.h.orig
+++ src/dep.h
@@ -139,7 +139,7 @@ struct dep *copy_dep_chain (const struct dep *d);
struct goaldep *read_all_makefiles (const char **makefiles);
/*! The chain of makefiles read by read_makefile. */
-struct goaldep *read_makefiles;
+extern struct goaldep *read_makefiles;
void eval_buffer (char *buffer, const gmk_floc *floc);
enum update_status update_goal_chain (struct goaldep *goals);

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_globals_h,v 1.1 2021/02/25 15:09:09 gnezdo Exp $
-fno-common
Index: src/globals.h
--- src/globals.h.orig
+++ src/globals.h
@@ -89,6 +89,12 @@ extern int in_debugger;
extern bool b_debugger_preread;
/* Remember the original value of the SHELL variable, from the environment. */
-struct variable shell_var;
+extern struct variable shell_var;
+
+/**! The default value of SHELL and the shell that is used when issuing
+ commands on targets.
+*/
+extern const char *default_shell;
+
#endif /*GLOBALS_H*/

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_main_c,v 1.1 2021/02/25 15:09:09 gnezdo Exp $
-fno-common
Index: src/main.c
--- src/main.c.orig
+++ src/main.c
@@ -43,6 +43,8 @@ this program. If not, see <http://www.gnu.org/license
# include <fcntl.h>
#endif
+struct goaldep *read_makefiles;
+
extern void initialize_stopchar_map ();
#if defined HAVE_WAITPID || defined HAVE_WAIT3

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-src_main_h,v 1.1 2021/02/25 15:09:09 gnezdo Exp $
-fno-common
Index: src/main.h
--- src/main.h.orig
+++ src/main.h
@@ -35,10 +35,5 @@ extern int use_readline_flag;
/* is default_shell unixy? */
extern int unixy_shell;
-/**! The default value of SHELL and the shell that is used when issuing
- commands on targets.
-*/
-extern char *default_shell;
-
/*! Print version information. */
extern void print_version (void);

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_make_h,v 1.1 2021/02/25 15:09:09 gnezdo Exp $
-fno-common
Index: src/make.h
--- src/make.h.orig
+++ src/make.h
@@ -333,7 +333,7 @@ extern int unixy_shell;
#endif
#ifdef SET_STACK_SIZE
# include <sys/resource.h>
-struct rlimit stack_limit;
+extern struct rlimit stack_limit;
#endif
/* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_print_h,v 1.1 2021/02/25 15:09:09 gnezdo Exp $
-fno-common
Index: src/print.h
--- src/print.h.orig
+++ src/print.h
@@ -39,7 +39,7 @@ void fatal_err (target_stack_node_t *p_call, const cha
/* Think of the below not as an enumeration but as #defines done in a
way that we'll be able to use the value in a gdb. */
-enum debug_print_enums_e {
+extern enum debug_print_enums_e {
MAX_STACK_SHOW = 1000,
} debug_print_enums1;

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-src_variable_c,v 1.1 2021/02/25 15:09:09 gnezdo Exp $
-fno-common
Index: src/variable.c
--- src/variable.c.orig
+++ src/variable.c
@@ -29,6 +29,7 @@ this program. If not, see <http://www.gnu.org/license
#endif
#include "hash.h"
#include "main.h"
+#include "globals.h"
/* Incremented every time we add or remove a global variable. */
static unsigned long variable_changenum;

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-src_variable_h,v 1.1 2021/02/25 15:09:09 gnezdo Exp $
-fno-common
Index: src/variable.h
--- src/variable.h.orig
+++ src/variable.h
@@ -116,7 +116,6 @@ struct pattern_var
extern char *variable_buffer;
extern struct variable_set_list *current_variable_set_list;
extern struct variable *default_goal_var;
-extern struct variable shell_var;
/* expand.c */
#ifndef SIZE_MAX

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-tests_scripts_debugger_trace,v 1.1.1.1 2006/12/26 18:16:09 deanna Exp $
--- tests/scripts/debugger/trace.orig Sat Dec 16 14:57:55 2006
+++ tests/scripts/debugger/trace Sat Dec 16 15:06:27 2006
@@ -83,6 +83,7 @@ work/debugger/trace.mk:4: foo
echo hi > /dev/null
##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ echo hi
++ > /dev/null
##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
work/debugger/trace.mk:5: foo
exit 5