UPDATE: devel/gmake 4.2.1 => 4.3

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

UPDATE: devel/gmake 4.2.1 => 4.3

Brian Callahan-5
Hi ports --

Attached is an update to gmake.
A changelog can be found here:
http://git.savannah.gnu.org/cgit/make.git/tree/NEWS

There is a lot of churn because upstream reworked their directory structure.

All tests pass on amd64 and mips64. One test fails on arm64 (but the
same test fails with 4.2.1 too).

Obviously needs more testing than I can provide, but here for the
interested.

Add debug package while here.

Comments/OKs welcome.

~Brian


gmake-43.diff (32K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: devel/gmake 4.2.1 => 4.3

Marc Espie-2
On Mon, Jan 20, 2020 at 09:58:41AM -0500, Brian Callahan wrote:

> Hi ports --
>
> Attached is an update to gmake.
> A changelog can be found here:
> http://git.savannah.gnu.org/cgit/make.git/tree/NEWS
>
> There is a lot of churn because upstream reworked their directory structure.
>
> All tests pass on amd64 and mips64. One test fails on arm64 (but the same
> test fails with 4.2.1 too).
>
> Obviously needs more testing than I can provide, but here for the
> interested.

As usual, any gmake update needs at least a bulk...

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: devel/gmake 4.2.1 => 4.3

Brian Callahan-5


On 2020-01-20 10:39 AM, Marc Espie wrote:

> On Mon, Jan 20, 2020 at 09:58:41AM -0500, Brian Callahan wrote:
>> Hi ports --
>>
>> Attached is an update to gmake.
>> A changelog can be found here:
>> http://git.savannah.gnu.org/cgit/make.git/tree/NEWS
>>
>> There is a lot of churn because upstream reworked their directory structure.
>>
>> All tests pass on amd64 and mips64. One test fails on arm64 (but the same
>> test fails with 4.2.1 too).
>>
>> Obviously needs more testing than I can provide, but here for the
>> interested.
> As usual, any gmake update needs at least a bulk...
>

Agreed. Hence my original message. I'm not equipped to run bulks here,
so I sent it to the list in the hopes that someone would pick it up...

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: devel/gmake 4.2.1 => 4.3

Stuart Henderson
In reply to this post by Marc Espie-2
Bulk obviously needed but I'm not expecting huge problems with 4.3 since
they relented on the most controversial change (prerequisites on suffix
rules) and made it only apply in POSIX mode. They intend to change it in
normal mode in the future, so we will need to keep an eye out for "warning:
ignoring prerequisites on suffix rule definition" messages.

--
Sent from a phone, apologies for poor formatting.

On 20 January 2020 15:40:13 Marc Espie <[hidden email]> wrote:

> On Mon, Jan 20, 2020 at 09:58:41AM -0500, Brian Callahan wrote:
>> Hi ports --
>>
>> Attached is an update to gmake.
>> A changelog can be found here:
>> http://git.savannah.gnu.org/cgit/make.git/tree/NEWS
>>
>> There is a lot of churn because upstream reworked their directory structure.
>>
>> All tests pass on amd64 and mips64. One test fails on arm64 (but the same
>> test fails with 4.2.1 too).
>>
>> Obviously needs more testing than I can provide, but here for the
>> interested.
>
> As usual, any gmake update needs at least a bulk...



Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: devel/gmake 4.2.1 => 4.3

Christian Weisgerber
In reply to this post by Brian Callahan-5
Brian Callahan:

> Attached is an update to gmake.

I worked on this independently and comparing the results, I have
some objections:

* We can use the .tar.lz distfile.

* MODGNU_CONFIG_GUESS_DIRS should not be removed but set to the
  correct ${WRKSRC}/build-aux.

* Instead of patching tests/scripts/features/exec we can just set
  TEST_ENV= SHELL=$$SHELL
  and honor the intention of the test.

* "You should use this name if you have a makefile that is specific
   to GNU gmake, and will not be understood by other versions of
   gmake."
  Uhm, no.  You cannot blindly substitute all instances of "make"
  with "gmake" in the man page.

* You dropped the comment at the top of patch-src_makeint_h.

> One test fails on arm64 (but the same test fails with 4.2.1 too).

A great opportunity to look into this failure!

> Obviously needs more testing than I can provide, but here for the
> interested.

I'll run an amd64 bulk build with it sometime in the next few days.
The "WARNING: Backward-incompatibility!" changes could break some
cruft.

--
Christian "naddy" Weisgerber                          [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: devel/gmake 4.2.1 => 4.3

Brian Callahan-5


On 2020-01-20 5:57 PM, Christian Weisgerber wrote:

> Brian Callahan:
>
>> Attached is an update to gmake.
> I worked on this independently and comparing the results, I have
> some objections:
>
> * We can use the .tar.lz distfile.
>
> * MODGNU_CONFIG_GUESS_DIRS should not be removed but set to the
>    correct ${WRKSRC}/build-aux.
>
> * Instead of patching tests/scripts/features/exec we can just set
>    TEST_ENV= SHELL=$$SHELL
>    and honor the intention of the test.

That's a better solution that I thought of for sure.

> * "You should use this name if you have a makefile that is specific
>     to GNU gmake, and will not be understood by other versions of
>     gmake."
>    Uhm, no.  You cannot blindly substitute all instances of "make"
>    with "gmake" in the man page.
>
> * You dropped the comment at the top of patch-src_makeint_h.

These two were just oversights; thanks for catching.

>> One test fails on arm64 (but the same test fails with 4.2.1 too).
> A great opportunity to look into this failure!

Agreed. For completeness, here's the relevant part of the test log:
features/output-sync .................................... Error running
/usr/ports/pobj/gmake-4.3/build-aarch64/tests/../make (expected 0; got
512): /usr/ports/pobj/gmake-4.3/build-aarch64/tests/../make -f
work/features/output-sync.mk -j -Orecurse
Error running /usr/ports/pobj/gmake-4.3/build-aarch64/tests/../make
(expected 0; got 512):
/usr/ports/pobj/gmake-4.3/build-aarch64/tests/../make -f
work/features/output-sync.mk.1 -j --output-sync=target
FAILED (13/15 passed)

Digging through the logs, it appears that the two tests are timing out.
This also happened in 4.2.1, which makes me wonder if it's something
specific to my arm64 machine. Anyhow, I can look into it but not for the
next few days.

>> Obviously needs more testing than I can provide, but here for the
>> interested.
> I'll run an amd64 bulk build with it sometime in the next few days.
> The "WARNING: Backward-incompatibility!" changes could break some
> cruft.
>

Yes, this warning coupled with what sthen mentioned about how it will
become the default behavior in the future is what spurred my interest to
update.

~Brian

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: devel/gmake 4.2.1 => 4.3

Christian Weisgerber
In reply to this post by Christian Weisgerber
On 2020-01-20, Christian Weisgerber <[hidden email]> wrote:

> I'll run an amd64 bulk build with it sometime in the next few days.
> The "WARNING: Backward-incompatibility!" changes could break some
> cruft.

These failed to build:

devel/jdk/11                                    ?
devel/libfirm                                   # vs. \#
emulators/mame                                  spaces not added by +=
multimedia/gstreamer-0.10/plugins-base          # vs. \#

The failures also caused 500 package paths to be skipped.

--
Christian "naddy" Weisgerber                          [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: devel/gmake 4.2.1 => 4.3

Christian Weisgerber
Christian Weisgerber:

> These failed to build:
>
> devel/jdk/11                                    ?
> devel/libfirm                                   # vs. \#
> emulators/mame                                  spaces not added by +=
> multimedia/gstreamer-0.10/plugins-base          # vs. \#

FWIW, I intend to work on these over the coming days.

At the moment I'm looking into the regression test that fails on
aarch64.

--
Christian "naddy" Weisgerber                          [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: devel/gmake 4.2.1 => 4.3

Christian Weisgerber
In reply to this post by Christian Weisgerber
On 2020-01-22, Christian Weisgerber <[hidden email]> wrote:

> These failed to build:

multimedia/gstreamer-0.10/plugins-base   fixed
devel/libfirm                            fixed
emulators/mame                           commit pending
devel/jdk/11                             tentative upstream fix available

> The failures also caused 500 package paths to be skipped.

I'll start another test build shortly.

--
Christian "naddy" Weisgerber                          [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: devel/gmake 4.2.1 => 4.3

Christian Weisgerber
Christian Weisgerber:

> I'll start another test build shortly.

Remaining fallout:

multimedia/gstreamer-0.10/plugins-good
multimedia/gstreamer-0.10/plugins-bad
  These need the same fix as plugins-base.

devel/jdk/11
  Upstream fix available.

Commits ready, pending approval from the respective maintainers.

Once those are in, I think we can go ahead with the gmake update
itself.  Below is the cumulative patch from bcallah@'s and my work
that I have in my tree.

Any further comments?

Brian, do you want to commit or should I?

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/gmake/Makefile,v
retrieving revision 1.63
diff -u -p -r1.63 Makefile
--- Makefile 13 Sep 2019 16:59:34 -0000 1.63
+++ Makefile 30 Jan 2020 21:32:49 -0000
@@ -2,12 +2,11 @@
 
 COMMENT= GNU make
 
-DISTNAME= make-4.2.1
+DISTNAME= make-4.3
 PKGNAME= g${DISTNAME}
-REVISION= 4
 CATEGORIES= devel
 MASTER_SITES= ${MASTER_SITE_GNU:=make/}
-EXTRACT_SUFX= .tar.bz2
+EXTRACT_SUFX= .tar.lz
 
 HOMEPAGE= https://www.gnu.org/software/make/
 
@@ -18,14 +17,18 @@ PERMIT_PACKAGE= Yes
 
 WANTLIB= c iconv intl
 
+DEBUG_PACKAGES= ${BUILD_PACKAGES}
+
 SEPARATE_BUILD= Yes
 CONFIGURE_STYLE= gnu
 CONFIGURE_ARGS= --program-prefix="g" --without-guile
 CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
  LDFLAGS="-L${LOCALBASE}/lib"
-MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/config
+MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/build-aux
+
+TEST_ENV= SHELL=$$SHELL
 
-pre-test:
- find ${WRKSRC}/tests/scripts -name \*.orig -delete
+# Known test failures:
+# output-sync can fail due to a race condition in the test itself
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/gmake/distinfo,v
retrieving revision 1.9
diff -u -p -r1.9 distinfo
--- distinfo 25 Jun 2016 19:47:11 -0000 1.9
+++ distinfo 30 Jan 2020 21:32:49 -0000
@@ -1,2 +1,2 @@
-SHA256 (make-4.2.1.tar.bz2) = 1uJivzYBtC0rHk74MQAp4dzyAIPFRGtLeqZwgf3/xYk=
-SIZE (make-4.2.1.tar.bz2) = 1407126
+SHA256 (make-4.3.tar.lz) = 3hpEHE7flSUh2zC/yoC6roag/xrNCgBAKZk0TwTEXoI=
+SIZE (make-4.3.tar.lz) = 1266180
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/devel/gmake/patches/patch-Makefile_in,v
retrieving revision 1.4
diff -u -p -r1.4 patch-Makefile_in
--- patches/patch-Makefile_in 25 Jun 2016 19:47:11 -0000 1.4
+++ patches/patch-Makefile_in 30 Jan 2020 21:32:49 -0000
@@ -1,12 +1,14 @@
-$OpenBSD: patch-Makefile_in,v 1.4 2016/06/25 19:47:11 naddy Exp $
---- Makefile.in.orig Sat Jun 11 01:03:22 2016
-+++ Makefile.in Fri Jun 24 18:19:09 2016
-@@ -481,7 +481,7 @@ EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cs
- noinst_HEADERS = commands.h dep.h filedef.h job.h makeint.h rule.h variable.h \
- debug.h getopt.h gettext.h hash.h output.h os.h
+$OpenBSD$
+
+Index: Makefile.in
+--- Makefile.in.orig
++++ Makefile.in
+@@ -1039,7 +1039,7 @@ make_SOURCES = $(make_SRCS) $(am__append_1) $(am__appe
+ $(am__append_4) $(am__append_5)
+ EXTRA_make_SOURCES = $(amiga_SRCS) $(vms_SRCS)
+ make_LDADD = $(LIBOBJS) $(GUILE_LIBS) lib/libgnu.a $(GETLOADAVG_LIBS) \
+- @LIBINTL@
++ @LTLIBINTL@
 
--make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ \
-+make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LTLIBINTL@ \
- $(GUILE_LIBS) $(am__append_1)
- man_MANS = make.1
- AM_CPPFLAGS = $(GLOBINC) $(am__append_2)
+ AM_CPPFLAGS = -Isrc -I$(top_srcdir)/src -Ilib -I$(top_srcdir)/lib \
+ -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" \
Index: patches/patch-doc_make_1
===================================================================
RCS file: patches/patch-doc_make_1
diff -N patches/patch-doc_make_1
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-doc_make_1 30 Jan 2020 21:32:49 -0000
@@ -0,0 +1,197 @@
+$OpenBSD$
+
+Since we install GNU make as gmake replace make with gmake in the
+manpage where it makes sense.
+
+Index: doc/make.1
+--- doc/make.1.orig
++++ doc/make.1
+@@ -1,13 +1,13 @@
+-.TH MAKE 1 "28 February 2016" "GNU" "User Commands"
++.TH GMAKE 1 "28 February 2016" "GNU" "User Commands"
+ .SH NAME
+-make \- GNU make utility to maintain groups of programs
++gmake \- GNU make utility to maintain groups of programs
+ .SH SYNOPSIS
+-.B make
++.B gmake
+ [\fIOPTION\fR]... [\fITARGET\fR]...
+ .SH DESCRIPTION
+ .LP
+ The
+-.I make
++.I gmake
+ utility will determine automatically which pieces of a large program need to
+ be recompiled, and issue the commands to recompile them.  The manual describes
+ the GNU implementation of
+@@ -15,15 +15,15 @@ the GNU implementation of
+ which was written by Richard Stallman and Roland McGrath, and is currently
+ maintained by Paul Smith.  Our examples show C programs, since they are very
+ common, but you can use
+-.B make
++.B gmake
+ with any programming language whose compiler can be run with a shell command.
+ In fact,
+-.B make
++.B gmake
+ is not limited to programs.  You can use it to describe any task where some
+ files must be updated automatically from others whenever the others change.
+ .LP
+ To prepare to use
+-.BR make ,
++.BR gmake ,
+ you must write a file called the
+ .I makefile
+ that describes the relationships among files in your program, and the states
+@@ -35,17 +35,17 @@ Once a suitable makefile exists, each time you change
+ this simple shell command:
+ .sp 1
+ .RS
+-.B make
++.B gmake
+ .RE
+ .sp 1
+ suffices to perform all necessary recompilations.
+ The
+-.B make
++.B gmake
+ program uses the makefile description and the last-modification times of the
+ files to decide which of the files need to be updated.  For each of those
+ files, it issues the commands recorded in the makefile.
+ .LP
+-.B make
++.B gmake
+ executes commands in the
+ .I makefile
+ to update one or more target
+@@ -56,7 +56,7 @@ is typically a program.
+ If no
+ .B \-f
+ option is present,
+-.B make
++.B gmake
+ will look for the makefiles
+ .IR GNUmakefile ,
+ .IR makefile ,
+@@ -84,7 +84,7 @@ If
+ .I makefile
+ is '\-', the standard input is read.
+ .LP
+-.B make
++.B gmake
+ updates a target if it depends on prerequisite files
+ that have been modified since the target was last modified,
+ or if the target does not exist.
+@@ -111,7 +111,7 @@ previous one:
+ is equivalent to
+ .BR "\-C " /etc.
+ This is typically used with recursive invocations of
+-.BR make .
++.BR gmake .
+ .TP 0.5i
+ .B \-d
+ Print debugging information in addition to normal processing.
+@@ -119,7 +119,7 @@ The debugging information says which files are being c
+ remaking, which file-times are being compared and with what results,
+ which files actually need to be remade, which implicit rules are
+ considered and which are applied---everything interesting about how
+-.B make
++.B gmake
+ decides what to do.
+ .TP 0.5i
+ .BI \-\-debug "[=FLAGS]"
+@@ -172,7 +172,7 @@ If several
+ options are used to specify several directories, the directories are
+ searched in the order specified.
+ Unlike the arguments to other flags of
+-.BR make ,
++.BR gmake ,
+ directories given with
+ .B \-I
+ flags may come directly after the flag:
+@@ -195,7 +195,7 @@ option, the last one is effective.
+ If the
+ .B \-j
+ option is given without an argument,
+-.BR make
++.BR gmake
+ will not limit the number of jobs that can run simultaneously.
+ .TP 0.5i
+ \fB\-k\fR, \fB\-\-keep\-going\fR
+@@ -256,7 +256,7 @@ This also prints the version information given by the
+ .B \-v
+ switch (see below).
+ To print the data base without trying to remake any files, use
+-.IR "make \-p \-f/dev/null" .
++.IR "gmake \-p \-f/dev/null" .
+ .TP 0.5i
+ \fB\-q\fR, \fB\-\-question\fR
+ ``Question mode''.
+@@ -287,7 +287,7 @@ Touch files (mark them up to date without really chang
+ instead of running their commands.
+ This is used to pretend that the commands were done, in order to fool
+ future invocations of
+-.BR make .
++.BR gmake .
+ .TP 0.5i
+ .B \-\-trace
+ Information about the disposition of each target is printed (why the target is
+@@ -295,7 +295,7 @@ being rebuilt and what commands are run to rebuild it)
+ .TP 0.5i
+ \fB\-v\fR, \fB\-\-version\fR
+ Print the version of the
+-.B make
++.B gmake
+ program plus a copyright, a list of authors and a notice that there
+ is no warranty.
+ .TP 0.5i
+@@ -304,7 +304,7 @@ Print a message containing the working directory
+ before and after other processing.
+ This may be useful for tracking down errors from complicated nests of
+ recursive
+-.B make
++.B gmake
+ commands.
+ .TP 0.5i
+ .B \-\-no\-print\-directory
+@@ -324,33 +324,33 @@ Without
+ it is almost the same as running a
+ .I touch
+ command on the given file before running
+-.BR make ,
++.BR gmake ,
+ except that the modification time is changed only in the imagination of
+-.BR make .
++.BR gmake .
+ .TP 0.5i
+ .B \-\-warn\-undefined\-variables
+ Warn when an undefined variable is referenced.
+ .SH "EXIT STATUS"
+ GNU
+-.B make
++.B gmake
+ exits with a status of zero if all makefiles were successfully parsed
+ and no targets that were built failed.  A status of one will be returned
+ if the
+ .B \-q
+ flag was used and
+-.B make
++.B gmake
+ determines that a target needs to be rebuilt.  A status of two will be
+ returned if any errors were encountered.
+ .SH "SEE ALSO"
+ The full documentation for
+-.B make
++.B gmake
+ is maintained as a Texinfo manual.  If the
+ .B info
+ and
+-.B make
++.B gmake
+ programs are properly installed at your site, the command
+ .IP
+-.B info make
++.B info 'GNU make'
+ .PP
+ should give you access to the complete manual.
+ .SH BUGS
Index: patches/patch-job_c
===================================================================
RCS file: patches/patch-job_c
diff -N patches/patch-job_c
--- patches/patch-job_c 2 Nov 2019 00:33:29 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,114 +0,0 @@
-$OpenBSD: patch-job_c,v 1.3 2019/11/02 00:33:29 jca Exp $
-
-Only unblock fatal signals after child invocation
-http://git.savannah.gnu.org/cgit/make.git/commit/?id=78b5fec6898c26956d00548427cda1101cb80f8a
-
-Index: job.c
---- job.c.orig
-+++ job.c
-@@ -461,6 +461,62 @@ is_bourne_compatible_shell (const char *path)
-   return 0;
- }
-
-+#ifdef POSIX
-+extern sigset_t fatal_signal_set;
-+
-+static void
-+block_sigs ()
-+{
-+  sigprocmask (SIG_BLOCK, &fatal_signal_set, (sigset_t *) 0);
-+}
-+
-+static void
-+unblock_sigs ()
-+{
-+  sigprocmask (SIG_UNBLOCK, &fatal_signal_set, (sigset_t *) 0);
-+}
-+
-+void
-+unblock_all_sigs ()
-+{
-+  sigset_t empty;
-+  sigemptyset (&empty);
-+  sigprocmask (SIG_SETMASK, &empty, (sigset_t *) 0);
-+}
-+
-+#elif defined(HAVE_SIGSETMASK)
-+
-+extern int fatal_signal_mask;
-+
-+static void
-+block_sigs ()
-+{
-+  sigblock (fatal_signal_mask);
-+}
-+
-+static void
-+unblock_sigs ()
-+{
-+  sigsetmask (siggetmask (0) & ~fatal_signal_mask);
-+}
-+
-+void
-+unblock_all_sigs ()
-+{
-+  sigsetmask (0);
-+}
-+
-+#else
-+
-+#define block_sigs()
-+#define unblock_sigs()
-+
-+void
-+unblock_all_sigs ()
-+{
-+}
-+
-+#endif
-
- /* Write an error message describing the exit status given in
-    EXIT_CODE, EXIT_SIG, and COREDUMP, for the target TARGET_NAME.
-@@ -1031,33 +1087,7 @@ free_child (struct child *child)
-   free (child);
- }
-
--#ifdef POSIX
--extern sigset_t fatal_signal_set;
--#endif
-
--void
--block_sigs (void)
--{
--#ifdef POSIX
--  (void) sigprocmask (SIG_BLOCK, &fatal_signal_set, (sigset_t *) 0);
--#else
--# ifdef HAVE_SIGSETMASK
--  (void) sigblock (fatal_signal_mask);
--# endif
--#endif
--}
--
--#ifdef POSIX
--void
--unblock_sigs (void)
--{
--  sigset_t empty;
--  sigemptyset (&empty);
--  sigprocmask (SIG_SETMASK, &empty, (sigset_t *) 0);
--}
--#endif
--
--
- /* Start a job to run the commands specified in CHILD.
-    CHILD is updated to reflect the commands and ID of the child process.
-
-@@ -2138,7 +2168,7 @@ child_execute_job (struct output *out, int good_stdin,
-     return pid;
-
-   /* We are the child.  */
--  unblock_sigs ();
-+  unblock_all_sigs ();
-
- #ifdef SET_STACK_SIZE
-   /* Reset limits, if necessary.  */
Index: patches/patch-job_h
===================================================================
RCS file: patches/patch-job_h
diff -N patches/patch-job_h
--- patches/patch-job_h 13 Sep 2019 16:59:34 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-$OpenBSD: patch-job_h,v 1.2 2019/09/13 16:59:34 kurt Exp $
-
-Only unblock fatal signals after child invocation
-http://git.savannah.gnu.org/cgit/make.git/commit/?id=78b5fec6898c26956d00548427cda1101cb80f8a
-
-Index: job.h
---- job.h.orig
-+++ job.h
-@@ -142,18 +142,7 @@ int exec_command (char **argv, char **envp);
- void exec_command (char **argv, char **envp) __attribute__ ((noreturn));
- #endif
-
--extern unsigned int job_slots_used;
-+void unblock_all_sigs (void);
-
--void block_sigs (void);
--#ifdef POSIX
--void unblock_sigs (void);
--#else
--#ifdef  HAVE_SIGSETMASK
--extern int fatal_signal_mask;
--#define unblock_sigs()  sigsetmask (0)
--#else
--#define unblock_sigs()
--#endif
--#endif
--
-+extern unsigned int job_slots_used;
- extern unsigned int jobserver_tokens;
Index: patches/patch-main_c
===================================================================
RCS file: patches/patch-main_c
diff -N patches/patch-main_c
--- patches/patch-main_c 13 Sep 2019 16:59:34 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-main_c,v 1.5 2019/09/13 16:59:34 kurt Exp $
-
-Only unblock fatal signals after child invocation
-http://git.savannah.gnu.org/cgit/make.git/commit/?id=78b5fec6898c26956d00548427cda1101cb80f8a
-
-Index: main.c
---- main.c.orig
-+++ main.c
-@@ -590,12 +590,10 @@ struct output make_sync;
-
- /* Mask of signals that are being caught with fatal_error_signal.  */
-
--#ifdef POSIX
-+#if defined(POSIX)
- sigset_t fatal_signal_set;
--#else
--# ifdef HAVE_SIGSETMASK
-+#elif defined(HAVE_SIGSETMASK)
- int fatal_signal_mask;
--# endif
- #endif
-
- #if !HAVE_DECL_BSD_SIGNAL && !defined bsd_signal
Index: patches/patch-make_1
===================================================================
RCS file: patches/patch-make_1
diff -N patches/patch-make_1
--- patches/patch-make_1 25 Jun 2016 19:47:11 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,202 +0,0 @@
-$OpenBSD: patch-make_1,v 1.3 2016/06/25 19:47:11 naddy Exp $
-
-Since we install GNU make as gmake replace make with gmake in the
-manpage where it makes sense.
-
---- make.1.orig Sun Feb 28 18:51:00 2016
-+++ make.1 Fri Jun 24 18:19:09 2016
-@@ -1,13 +1,13 @@
--.TH MAKE 1 "28 February 2016" "GNU" "User Commands"
-+.TH GMAKE 1 "03 March 2012" "GNU" "User Commands"
- .SH NAME
--make \- GNU make utility to maintain groups of programs
-+gmake \- GNU make utility to maintain groups of programs
- .SH SYNOPSIS
--.B make
-+.B gmake
- [\fIOPTION\fR]... [\fITARGET\fR]...
- .SH DESCRIPTION
- .LP
- The
--.I make
-+.I gmake
- utility will determine automatically which pieces of a large program need to
- be recompiled, and issue the commands to recompile them.  The manual describes
- the GNU implementation of
-@@ -15,15 +15,15 @@ the GNU implementation of
- which was written by Richard Stallman and Roland McGrath, and is currently
- maintained by Paul Smith.  Our examples show C programs, since they are very
- common, but you can use
--.B make
-+.B gmake
- with any programming language whose compiler can be run with a shell command.
- In fact,
--.B make
-+.B gmake
- is not limited to programs.  You can use it to describe any task where some
- files must be updated automatically from others whenever the others change.
- .LP
- To prepare to use
--.BR make ,
-+.BR gmake ,
- you must write a file called the
- .I makefile
- that describes the relationships among files in your program, and the states
-@@ -35,17 +35,17 @@ Once a suitable makefile exists, each time you change
- this simple shell command:
- .sp 1
- .RS
--.B make
-+.B gmake
- .RE
- .sp 1
- suffices to perform all necessary recompilations.
- The
--.B make
-+.B gmake
- program uses the makefile description and the last-modification times of the
- files to decide which of the files need to be updated.  For each of those
- files, it issues the commands recorded in the makefile.
- .LP
--.B make
-+.B gmake
- executes commands in the
- .I makefile
- to update one or more target
-@@ -56,7 +56,7 @@ is typically a program.
- If no
- .B \-f
- option is present,
--.B make
-+.B gmake
- will look for the makefiles
- .IR GNUmakefile ,
- .IR makefile ,
-@@ -84,7 +84,7 @@ If
- .I makefile
- is '\-', the standard input is read.
- .LP
--.B make
-+.B gmake
- updates a target if it depends on prerequisite files
- that have been modified since the target was last modified,
- or if the target does not exist.
-@@ -111,7 +111,7 @@ previous one:
- is equivalent to
- .BR "\-C " /etc.
- This is typically used with recursive invocations of
--.BR make .
-+.BR gmake .
- .TP 0.5i
- .B \-d
- Print debugging information in addition to normal processing.
-@@ -119,7 +119,7 @@ The debugging information says which files are being c
- remaking, which file-times are being compared and with what results,
- which files actually need to be remade, which implicit rules are
- considered and which are applied---everything interesting about how
--.B make
-+.B gmake
- decides what to do.
- .TP 0.5i
- .BI \-\-debug "[=FLAGS]"
-@@ -168,7 +168,7 @@ If several
- options are used to specify several directories, the directories are
- searched in the order specified.
- Unlike the arguments to other flags of
--.BR make ,
-+.BR gmake ,
- directories given with
- .B \-I
- flags may come directly after the flag:
-@@ -191,7 +191,7 @@ option, the last one is effective.
- If the
- .B \-j
- option is given without an argument,
--.BR make
-+.BR gmake
- will not limit the number of jobs that can run simultaneously.
- .TP 0.5i
- \fB\-k\fR, \fB\-\-keep\-going\fR
-@@ -252,7 +252,7 @@ This also prints the version information given by the
- .B \-v
- switch (see below).
- To print the data base without trying to remake any files, use
--.IR "make \-p \-f/dev/null" .
-+.IR "gmake \-p \-f/dev/null" .
- .TP 0.5i
- \fB\-q\fR, \fB\-\-question\fR
- ``Question mode''.
-@@ -275,11 +275,11 @@ Cancel the effect of the
- .B \-k
- option.
- This is never necessary except in a recursive
--.B make
-+.B gmake
- where
- .B \-k
- might be inherited from the top-level
--.B make
-+.B gmake
- via MAKEFLAGS or if you set
- .B \-k
- in MAKEFLAGS in your environment.
-@@ -289,7 +289,7 @@ Touch files (mark them up to date without really chang
- instead of running their commands.
- This is used to pretend that the commands were done, in order to fool
- future invocations of
--.BR make .
-+.BR gmake .
- .TP 0.5i
- .B \-\-trace
- Information about the disposition of each target is printed (why the target is
-@@ -297,7 +297,7 @@ being rebuilt and what commands are run to rebuild it)
- .TP 0.5i
- \fB\-v\fR, \fB\-\-version\fR
- Print the version of the
--.B make
-+.B gmake
- program plus a copyright, a list of authors and a notice that there
- is no warranty.
- .TP 0.5i
-@@ -306,7 +306,7 @@ Print a message containing the working directory
- before and after other processing.
- This may be useful for tracking down errors from complicated nests of
- recursive
--.B make
-+.B gmake
- commands.
- .TP 0.5i
- .B \-\-no\-print\-directory
-@@ -326,7 +326,7 @@ Without
- it is almost the same as running a
- .I touch
- command on the given file before running
--.BR make ,
-+.BR gmake ,
- except that the modification time is changed only in the imagination of
- .BR make .
- .TP 0.5i
-@@ -340,19 +340,19 @@ and no targets that were built failed.  A status of on
- if the
- .B \-q
- flag was used and
--.B make
-+.B gmake
- determines that a target needs to be rebuilt.  A status of two will be
- returned if any errors were encountered.
- .SH "SEE ALSO"
- The full documentation for
--.B make
-+.B gmake
- is maintained as a Texinfo manual.  If the
- .B info
- and
--.B make
-+.B gmake
- programs are properly installed at your site, the command
- .IP
--.B info make
-+.B info 'GNU make'
- .PP
- should give you access to the complete manual.
- .SH BUGS
Index: patches/patch-makeint_h
===================================================================
RCS file: patches/patch-makeint_h
diff -N patches/patch-makeint_h
--- patches/patch-makeint_h 2 Nov 2019 00:33:29 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-makeint_h,v 1.3 2019/11/02 00:33:29 jca Exp $
-
-Remove too broad #ifdef so that we also use modern code on arm.
-
-Index: makeint.h
---- makeint.h.orig
-+++ makeint.h
-@@ -114,7 +114,7 @@ extern int errno;
- #endif
-
- /* Some systems define _POSIX_VERSION but are not really POSIX.1.  */
--#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
-+#if (defined (butterfly) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
- # undef POSIX
- #endif
-
Index: patches/patch-posixos_c
===================================================================
RCS file: patches/patch-posixos_c
diff -N patches/patch-posixos_c
--- patches/patch-posixos_c 6 Aug 2019 12:19:26 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,156 +0,0 @@
-$OpenBSD: patch-posixos_c,v 1.1 2019/08/06 12:19:26 naddy Exp $
-
-Use a non-blocking read with pselect to avoid hangs.
-https://git.savannah.gnu.org/cgit/make.git/commit/?id=b552b05251980f693c729e251f93f5225b400714
-
-Index: posixos.c
---- posixos.c.orig
-+++ posixos.c
-@@ -59,6 +59,24 @@ make_job_rfd (void)
- #endif
- }
-
-+static void
-+set_blocking (int fd, int blocking)
-+{
-+  // If we're not using pselect() don't change the blocking
-+#ifdef HAVE_PSELECT
-+  int flags;
-+  EINTRLOOP (flags, fcntl (fd, F_GETFL));
-+  if (flags >= 0)
-+    {
-+      int r;
-+      flags = blocking ? (flags & ~O_NONBLOCK) : (flags | O_NONBLOCK);
-+      EINTRLOOP (r, fcntl (fd, F_SETFL, flags));
-+      if (r < 0)
-+        pfatal_with_name ("fcntl(O_NONBLOCK)");
-+    }
-+#endif
-+}
-+
- unsigned int
- jobserver_setup (int slots)
- {
-@@ -78,6 +96,9 @@ jobserver_setup (int slots)
-         pfatal_with_name (_("init jobserver pipe"));
-     }
-
-+  /* When using pselect() we want the read to be non-blocking.  */
-+  set_blocking (job_fds[0], 0);
-+
-   return 1;
- }
-
-@@ -113,6 +134,9 @@ jobserver_parse_auth (const char *auth)
-       return 0;
-     }
-
-+  /* When using pselect() we want the read to be non-blocking.  */
-+  set_blocking (job_fds[0], 0);
-+
-   return 1;
- }
-
-@@ -161,7 +185,10 @@ jobserver_acquire_all (void)
- {
-   unsigned int tokens = 0;
-
--  /* Close the write side, so the read() won't hang.  */
-+  /* Use blocking reads to wait for all outstanding jobs.  */
-+  set_blocking (job_fds[0], 1);
-+
-+  /* Close the write side, so the read() won't hang forever.  */
-   close (job_fds[1]);
-   job_fds[1] = -1;
-
-@@ -239,18 +266,12 @@ jobserver_pre_acquire (void)
- unsigned int
- jobserver_acquire (int timeout)
- {
--  sigset_t empty;
--  fd_set readfds;
-   struct timespec spec;
-   struct timespec *specp = NULL;
--  int r;
--  char intake;
-+  sigset_t empty;
-
-   sigemptyset (&empty);
-
--  FD_ZERO (&readfds);
--  FD_SET (job_fds[0], &readfds);
--
-   if (timeout)
-     {
-       /* Alarm after one second (is this too granular?)  */
-@@ -259,28 +280,52 @@ jobserver_acquire (int timeout)
-       specp = &spec;
-     }
-
--  r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty);
--
--  if (r == -1)
-+  while (1)
-     {
--      /* Better be SIGCHLD.  */
--      if (errno != EINTR)
--        pfatal_with_name (_("pselect jobs pipe"));
--      return 0;
--    }
-+      fd_set readfds;
-+      int r;
-+      char intake;
-
--  if (r == 0)
--    /* Timeout.  */
--    return 0;
-+      FD_ZERO (&readfds);
-+      FD_SET (job_fds[0], &readfds);
-
--  /* The read FD is ready: read it!  */
--  EINTRLOOP (r, read (job_fds[0], &intake, 1));
--  if (r < 0)
--    pfatal_with_name (_("read jobs pipe"));
-+      r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty);
-+      if (r < 0)
-+        switch (errno)
-+          {
-+          case EINTR:
-+            /* SIGCHLD will show up as an EINTR.  */
-+            return 0;
-
--  /* What does it mean if read() returns 0?  It shouldn't happen because only
--     the master make can reap all the tokens and close the write side...??  */
--  return r > 0;
-+          case EBADF:
-+            /* Someone closed the jobs pipe.
-+               That shouldn't happen but if it does we're done.  */
-+              O (fatal, NILF, _("job server shut down"));
-+
-+          default:
-+            pfatal_with_name (_("pselect jobs pipe"));
-+          }
-+
-+      if (r == 0)
-+        /* Timeout.  */
-+        return 0;
-+
-+      /* The read FD is ready: read it!  This is non-blocking.  */
-+      EINTRLOOP (r, read (job_fds[0], &intake, 1));
-+
-+      if (r < 0)
-+        {
-+          /* Someone sniped our token!  Try again.  */
-+          if (errno == EAGAIN)
-+            continue;
-+
-+          pfatal_with_name (_("read jobs pipe"));
-+        }
-+
-+      /* read() should never return 0: only the master make can reap all the
-+         tokens and close the write side...??  */
-+      return r > 0;
-+    }
- }
-
- #else
Index: patches/patch-read_c
===================================================================
RCS file: patches/patch-read_c
diff -N patches/patch-read_c
--- patches/patch-read_c 5 Jan 2019 22:19:17 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-read_c,v 1.3 2019/01/05 22:19:17 naddy Exp $
-
-Use after free().
-https://git.savannah.gnu.org/cgit/make.git/commit/?id=816a867ff51110cbca1956ad0e625d8251a7531b
-
-Index: read.c
---- read.c.orig
-+++ read.c
-@@ -204,7 +204,7 @@ read_all_makefiles (const char **makefiles)
-       {
-         if (*p != '\0')
-           *p++ = '\0';
--        eval_makefile (name, RM_NO_DEFAULT_GOAL|RM_INCLUDED|RM_DONTCARE);
-+        eval_makefile (strcache_add (name), RM_NO_DEFAULT_GOAL|RM_INCLUDED|RM_DONTCARE);
-       }
-
-     free (value);
Index: patches/patch-remote-cstms_c
===================================================================
RCS file: patches/patch-remote-cstms_c
diff -N patches/patch-remote-cstms_c
--- patches/patch-remote-cstms_c 13 Sep 2019 16:59:34 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-remote-cstms_c,v 1.1 2019/09/13 16:59:34 kurt Exp $
-
-Only unblock fatal signals after child invocation
-http://git.savannah.gnu.org/cgit/make.git/commit/?id=78b5fec6898c26956d00548427cda1101cb80f8a
-
-Index: remote-cstms.c
---- remote-cstms.c.orig
-+++ remote-cstms.c
-@@ -246,7 +246,7 @@ start_remote_job (char **argv, char **envp, int stdin_
-         (void) dup2 (stdin_fd, 0);
-
-       /* Unblock signals in the child.  */
--      unblock_sigs ();
-+      unblock_all_sigs ();
-
-       /* Run the command.  */
-       exec_command (new_argv, envp);
Index: patches/patch-src_makeint_h
===================================================================
RCS file: patches/patch-src_makeint_h
diff -N patches/patch-src_makeint_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_makeint_h 30 Jan 2020 21:32:49 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/makeint.h
+--- src/makeint.h.orig
++++ src/makeint.h
+@@ -115,7 +115,7 @@ extern int errno;
+ #endif
+
+ /* Some systems define _POSIX_VERSION but are not really POSIX.1.  */
+-#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
++#if (defined (butterfly) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
+ # undef POSIX
+ #endif
+
Index: patches/patch-tests_run_make_tests_pl
===================================================================
RCS file: patches/patch-tests_run_make_tests_pl
diff -N patches/patch-tests_run_make_tests_pl
--- patches/patch-tests_run_make_tests_pl 5 Aug 2019 12:14:52 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-tests_run_make_tests_pl,v 1.1 2019/08/05 12:14:52 naddy Exp $
-
-Find Perl modules
-https://git.savannah.gnu.org/cgit/make.git/commit/?id=d9d4e06084a4c7da480bd49a3487aadf6ba77b54
-
-Index: tests/run_make_tests.pl
---- tests/run_make_tests.pl.orig
-+++ tests/run_make_tests.pl
-@@ -58,6 +58,9 @@ if ($^O eq 'VMS')
-   *CORE::GLOBAL::rmdir = \&vms_rmdir;
- }
-
-+use FindBin;
-+use lib "$FindBin::Bin";
-+
- require "test_driver.pl";
- require "config-flags.pm";
-
Index: patches/patch-tests_scripts_features_archives
===================================================================
RCS file: /cvs/ports/devel/gmake/patches/patch-tests_scripts_features_archives,v
retrieving revision 1.2
diff -u -p -r1.2 patch-tests_scripts_features_archives
--- patches/patch-tests_scripts_features_archives 25 Jun 2016 19:47:11 -0000 1.2
+++ patches/patch-tests_scripts_features_archives 30 Jan 2020 21:32:49 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-tests_scripts_features_archives,v 1.2 2016/06/25 19:47:11 naddy Exp $
---- tests/scripts/features/archives.orig Mon Feb 29 07:31:16 2016
-+++ tests/scripts/features/archives Fri Jun 24 18:19:09 2016
-@@ -183,7 +183,7 @@ $mk_string = q!
+Index: tests/scripts/features/archives
+--- tests/scripts/features/archives.orig
++++ tests/scripts/features/archives
+@@ -184,7 +184,7 @@ $mk_string = q!
  DIR = artest
  vpath % $(DIR)
  default: lib(foo)
Index: patches/patch-tests_scripts_misc_close_stdout
===================================================================
RCS file: patches/patch-tests_scripts_misc_close_stdout
diff -N patches/patch-tests_scripts_misc_close_stdout
--- patches/patch-tests_scripts_misc_close_stdout 5 Aug 2019 15:05:09 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-$OpenBSD: patch-tests_scripts_misc_close_stdout,v 1.1 2019/08/05 15:05:09 naddy Exp $
-
-Don't error out on empty test: "Add test suite support to Windows"
-https://git.savannah.gnu.org/cgit/make.git/commit/?id=fda00f88d3180be1a898c19bfa23b7adba6c2a9e
-
-Index: tests/scripts/misc/close_stdout
---- tests/scripts/misc/close_stdout.orig
-+++ tests/scripts/misc/close_stdout
-@@ -2,8 +2,8 @@
-
- $description = "Make sure make exits with an error if stdout is full.";
-
--if (-e '/dev/full') {
--  run_make_test('', '-v > /dev/full', '/^#MAKE#: write error/', 256);
--}
-+-e '/dev/full' or return -1;
-+
-+run_make_test('', '-v > /dev/full', '/^#MAKE#: write error/', 256);
-
- 1;
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/gmake/pkg/PLIST,v
retrieving revision 1.16
diff -u -p -r1.16 PLIST
--- pkg/PLIST 30 Oct 2013 23:08:56 -0000 1.16
+++ pkg/PLIST 30 Jan 2020 21:32:49 -0000
@@ -4,6 +4,7 @@ include/gnumake.h
 @info info/make.info
 @man man/man1/gmake.1
 share/locale/be/LC_MESSAGES/make.mo
+share/locale/bg/LC_MESSAGES/make.mo
 share/locale/cs/LC_MESSAGES/make.mo
 share/locale/da/LC_MESSAGES/make.mo
 share/locale/de/LC_MESSAGES/make.mo
@@ -23,10 +24,13 @@ share/locale/lt/LC_MESSAGES/
 share/locale/lt/LC_MESSAGES/make.mo
 share/locale/nl/LC_MESSAGES/make.mo
 share/locale/pl/LC_MESSAGES/make.mo
+share/locale/pt/LC_MESSAGES/make.mo
 share/locale/pt_BR/LC_MESSAGES/make.mo
 share/locale/ru/LC_MESSAGES/make.mo
+share/locale/sr/LC_MESSAGES/make.mo
 share/locale/sv/LC_MESSAGES/make.mo
 share/locale/tr/LC_MESSAGES/make.mo
 share/locale/uk/LC_MESSAGES/make.mo
 share/locale/vi/LC_MESSAGES/make.mo
 share/locale/zh_CN/LC_MESSAGES/make.mo
+share/locale/zh_TW/LC_MESSAGES/make.mo
--
Christian "naddy" Weisgerber                          [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: devel/gmake 4.2.1 => 4.3

Brian Callahan-5
Hi Christian --

On 2020-01-30 4:46 PM, Christian Weisgerber wrote:

> Christian Weisgerber:
>
>> I'll start another test build shortly.
> Remaining fallout:
>
> multimedia/gstreamer-0.10/plugins-good
> multimedia/gstreamer-0.10/plugins-bad
>    These need the same fix as plugins-base.
>
> devel/jdk/11
>    Upstream fix available.
>
> Commits ready, pending approval from the respective maintainers.
>
> Once those are in, I think we can go ahead with the gmake update
> itself.  Below is the cumulative patch from bcallah@'s and my work
> that I have in my tree.
>
> Any further comments?
>
> Brian, do you want to commit or should I?

By all means, feel free to be the one to commit this. You did the heavy
lifting! Much appreciated.

~Brian

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/gmake/Makefile,v
> retrieving revision 1.63
> diff -u -p -r1.63 Makefile
> --- Makefile 13 Sep 2019 16:59:34 -0000 1.63
> +++ Makefile 30 Jan 2020 21:32:49 -0000
> @@ -2,12 +2,11 @@
>  
>   COMMENT= GNU make
>  
> -DISTNAME= make-4.2.1
> +DISTNAME= make-4.3
>   PKGNAME= g${DISTNAME}
> -REVISION= 4
>   CATEGORIES= devel
>   MASTER_SITES= ${MASTER_SITE_GNU:=make/}
> -EXTRACT_SUFX= .tar.bz2
> +EXTRACT_SUFX= .tar.lz
>  
>   HOMEPAGE= https://www.gnu.org/software/make/
>  
> @@ -18,14 +17,18 @@ PERMIT_PACKAGE= Yes
>  
>   WANTLIB= c iconv intl
>  
> +DEBUG_PACKAGES= ${BUILD_PACKAGES}
> +
>   SEPARATE_BUILD= Yes
>   CONFIGURE_STYLE= gnu
>   CONFIGURE_ARGS= --program-prefix="g" --without-guile
>   CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
>   LDFLAGS="-L${LOCALBASE}/lib"
> -MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/config
> +MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/build-aux
> +
> +TEST_ENV= SHELL=$$SHELL
>  
> -pre-test:
> - find ${WRKSRC}/tests/scripts -name \*.orig -delete
> +# Known test failures:
> +# output-sync can fail due to a race condition in the test itself
>  
>   .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/devel/gmake/distinfo,v
> retrieving revision 1.9
> diff -u -p -r1.9 distinfo
> --- distinfo 25 Jun 2016 19:47:11 -0000 1.9
> +++ distinfo 30 Jan 2020 21:32:49 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (make-4.2.1.tar.bz2) = 1uJivzYBtC0rHk74MQAp4dzyAIPFRGtLeqZwgf3/xYk=
> -SIZE (make-4.2.1.tar.bz2) = 1407126
> +SHA256 (make-4.3.tar.lz) = 3hpEHE7flSUh2zC/yoC6roag/xrNCgBAKZk0TwTEXoI=
> +SIZE (make-4.3.tar.lz) = 1266180
> Index: patches/patch-Makefile_in
> ===================================================================
> RCS file: /cvs/ports/devel/gmake/patches/patch-Makefile_in,v
> retrieving revision 1.4
> diff -u -p -r1.4 patch-Makefile_in
> --- patches/patch-Makefile_in 25 Jun 2016 19:47:11 -0000 1.4
> +++ patches/patch-Makefile_in 30 Jan 2020 21:32:49 -0000
> @@ -1,12 +1,14 @@
> -$OpenBSD: patch-Makefile_in,v 1.4 2016/06/25 19:47:11 naddy Exp $
> ---- Makefile.in.orig Sat Jun 11 01:03:22 2016
> -+++ Makefile.in Fri Jun 24 18:19:09 2016
> -@@ -481,7 +481,7 @@ EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cs
> - noinst_HEADERS = commands.h dep.h filedef.h job.h makeint.h rule.h variable.h \
> - debug.h getopt.h gettext.h hash.h output.h os.h
> +$OpenBSD$
> +
> +Index: Makefile.in
> +--- Makefile.in.orig
> ++++ Makefile.in
> +@@ -1039,7 +1039,7 @@ make_SOURCES = $(make_SRCS) $(am__append_1) $(am__appe
> + $(am__append_4) $(am__append_5)
> + EXTRA_make_SOURCES = $(amiga_SRCS) $(vms_SRCS)
> + make_LDADD = $(LIBOBJS) $(GUILE_LIBS) lib/libgnu.a $(GETLOADAVG_LIBS) \
> +- @LIBINTL@
> ++ @LTLIBINTL@
>    
> --make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ \
> -+make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LTLIBINTL@ \
> - $(GUILE_LIBS) $(am__append_1)
> - man_MANS = make.1
> - AM_CPPFLAGS = $(GLOBINC) $(am__append_2)
> + AM_CPPFLAGS = -Isrc -I$(top_srcdir)/src -Ilib -I$(top_srcdir)/lib \
> + -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" \
> Index: patches/patch-doc_make_1
> ===================================================================
> RCS file: patches/patch-doc_make_1
> diff -N patches/patch-doc_make_1
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-doc_make_1 30 Jan 2020 21:32:49 -0000
> @@ -0,0 +1,197 @@
> +$OpenBSD$
> +
> +Since we install GNU make as gmake replace make with gmake in the
> +manpage where it makes sense.
> +
> +Index: doc/make.1
> +--- doc/make.1.orig
> ++++ doc/make.1
> +@@ -1,13 +1,13 @@
> +-.TH MAKE 1 "28 February 2016" "GNU" "User Commands"
> ++.TH GMAKE 1 "28 February 2016" "GNU" "User Commands"
> + .SH NAME
> +-make \- GNU make utility to maintain groups of programs
> ++gmake \- GNU make utility to maintain groups of programs
> + .SH SYNOPSIS
> +-.B make
> ++.B gmake
> + [\fIOPTION\fR]... [\fITARGET\fR]...
> + .SH DESCRIPTION
> + .LP
> + The
> +-.I make
> ++.I gmake
> + utility will determine automatically which pieces of a large program need to
> + be recompiled, and issue the commands to recompile them.  The manual describes
> + the GNU implementation of
> +@@ -15,15 +15,15 @@ the GNU implementation of
> + which was written by Richard Stallman and Roland McGrath, and is currently
> + maintained by Paul Smith.  Our examples show C programs, since they are very
> + common, but you can use
> +-.B make
> ++.B gmake
> + with any programming language whose compiler can be run with a shell command.
> + In fact,
> +-.B make
> ++.B gmake
> + is not limited to programs.  You can use it to describe any task where some
> + files must be updated automatically from others whenever the others change.
> + .LP
> + To prepare to use
> +-.BR make ,
> ++.BR gmake ,
> + you must write a file called the
> + .I makefile
> + that describes the relationships among files in your program, and the states
> +@@ -35,17 +35,17 @@ Once a suitable makefile exists, each time you change
> + this simple shell command:
> + .sp 1
> + .RS
> +-.B make
> ++.B gmake
> + .RE
> + .sp 1
> + suffices to perform all necessary recompilations.
> + The
> +-.B make
> ++.B gmake
> + program uses the makefile description and the last-modification times of the
> + files to decide which of the files need to be updated.  For each of those
> + files, it issues the commands recorded in the makefile.
> + .LP
> +-.B make
> ++.B gmake
> + executes commands in the
> + .I makefile
> + to update one or more target
> +@@ -56,7 +56,7 @@ is typically a program.
> + If no
> + .B \-f
> + option is present,
> +-.B make
> ++.B gmake
> + will look for the makefiles
> + .IR GNUmakefile ,
> + .IR makefile ,
> +@@ -84,7 +84,7 @@ If
> + .I makefile
> + is '\-', the standard input is read.
> + .LP
> +-.B make
> ++.B gmake
> + updates a target if it depends on prerequisite files
> + that have been modified since the target was last modified,
> + or if the target does not exist.
> +@@ -111,7 +111,7 @@ previous one:
> + is equivalent to
> + .BR "\-C " /etc.
> + This is typically used with recursive invocations of
> +-.BR make .
> ++.BR gmake .
> + .TP 0.5i
> + .B \-d
> + Print debugging information in addition to normal processing.
> +@@ -119,7 +119,7 @@ The debugging information says which files are being c
> + remaking, which file-times are being compared and with what results,
> + which files actually need to be remade, which implicit rules are
> + considered and which are applied---everything interesting about how
> +-.B make
> ++.B gmake
> + decides what to do.
> + .TP 0.5i
> + .BI \-\-debug "[=FLAGS]"
> +@@ -172,7 +172,7 @@ If several
> + options are used to specify several directories, the directories are
> + searched in the order specified.
> + Unlike the arguments to other flags of
> +-.BR make ,
> ++.BR gmake ,
> + directories given with
> + .B \-I
> + flags may come directly after the flag:
> +@@ -195,7 +195,7 @@ option, the last one is effective.
> + If the
> + .B \-j
> + option is given without an argument,
> +-.BR make
> ++.BR gmake
> + will not limit the number of jobs that can run simultaneously.
> + .TP 0.5i
> + \fB\-k\fR, \fB\-\-keep\-going\fR
> +@@ -256,7 +256,7 @@ This also prints the version information given by the
> + .B \-v
> + switch (see below).
> + To print the data base without trying to remake any files, use
> +-.IR "make \-p \-f/dev/null" .
> ++.IR "gmake \-p \-f/dev/null" .
> + .TP 0.5i
> + \fB\-q\fR, \fB\-\-question\fR
> + ``Question mode''.
> +@@ -287,7 +287,7 @@ Touch files (mark them up to date without really chang
> + instead of running their commands.
> + This is used to pretend that the commands were done, in order to fool
> + future invocations of
> +-.BR make .
> ++.BR gmake .
> + .TP 0.5i
> + .B \-\-trace
> + Information about the disposition of each target is printed (why the target is
> +@@ -295,7 +295,7 @@ being rebuilt and what commands are run to rebuild it)
> + .TP 0.5i
> + \fB\-v\fR, \fB\-\-version\fR
> + Print the version of the
> +-.B make
> ++.B gmake
> + program plus a copyright, a list of authors and a notice that there
> + is no warranty.
> + .TP 0.5i
> +@@ -304,7 +304,7 @@ Print a message containing the working directory
> + before and after other processing.
> + This may be useful for tracking down errors from complicated nests of
> + recursive
> +-.B make
> ++.B gmake
> + commands.
> + .TP 0.5i
> + .B \-\-no\-print\-directory
> +@@ -324,33 +324,33 @@ Without
> + it is almost the same as running a
> + .I touch
> + command on the given file before running
> +-.BR make ,
> ++.BR gmake ,
> + except that the modification time is changed only in the imagination of
> +-.BR make .
> ++.BR gmake .
> + .TP 0.5i
> + .B \-\-warn\-undefined\-variables
> + Warn when an undefined variable is referenced.
> + .SH "EXIT STATUS"
> + GNU
> +-.B make
> ++.B gmake
> + exits with a status of zero if all makefiles were successfully parsed
> + and no targets that were built failed.  A status of one will be returned
> + if the
> + .B \-q
> + flag was used and
> +-.B make
> ++.B gmake
> + determines that a target needs to be rebuilt.  A status of two will be
> + returned if any errors were encountered.
> + .SH "SEE ALSO"
> + The full documentation for
> +-.B make
> ++.B gmake
> + is maintained as a Texinfo manual.  If the
> + .B info
> + and
> +-.B make
> ++.B gmake
> + programs are properly installed at your site, the command
> + .IP
> +-.B info make
> ++.B info 'GNU make'
> + .PP
> + should give you access to the complete manual.
> + .SH BUGS
> Index: patches/patch-job_c
> ===================================================================
> RCS file: patches/patch-job_c
> diff -N patches/patch-job_c
> --- patches/patch-job_c 2 Nov 2019 00:33:29 -0000 1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,114 +0,0 @@
> -$OpenBSD: patch-job_c,v 1.3 2019/11/02 00:33:29 jca Exp $
> -
> -Only unblock fatal signals after child invocation
> -http://git.savannah.gnu.org/cgit/make.git/commit/?id=78b5fec6898c26956d00548427cda1101cb80f8a
> -
> -Index: job.c
> ---- job.c.orig
> -+++ job.c
> -@@ -461,6 +461,62 @@ is_bourne_compatible_shell (const char *path)
> -   return 0;
> - }
> -
> -+#ifdef POSIX
> -+extern sigset_t fatal_signal_set;
> -+
> -+static void
> -+block_sigs ()
> -+{
> -+  sigprocmask (SIG_BLOCK, &fatal_signal_set, (sigset_t *) 0);
> -+}
> -+
> -+static void
> -+unblock_sigs ()
> -+{
> -+  sigprocmask (SIG_UNBLOCK, &fatal_signal_set, (sigset_t *) 0);
> -+}
> -+
> -+void
> -+unblock_all_sigs ()
> -+{
> -+  sigset_t empty;
> -+  sigemptyset (&empty);
> -+  sigprocmask (SIG_SETMASK, &empty, (sigset_t *) 0);
> -+}
> -+
> -+#elif defined(HAVE_SIGSETMASK)
> -+
> -+extern int fatal_signal_mask;
> -+
> -+static void
> -+block_sigs ()
> -+{
> -+  sigblock (fatal_signal_mask);
> -+}
> -+
> -+static void
> -+unblock_sigs ()
> -+{
> -+  sigsetmask (siggetmask (0) & ~fatal_signal_mask);
> -+}
> -+
> -+void
> -+unblock_all_sigs ()
> -+{
> -+  sigsetmask (0);
> -+}
> -+
> -+#else
> -+
> -+#define block_sigs()
> -+#define unblock_sigs()
> -+
> -+void
> -+unblock_all_sigs ()
> -+{
> -+}
> -+
> -+#endif
> -
> - /* Write an error message describing the exit status given in
> -    EXIT_CODE, EXIT_SIG, and COREDUMP, for the target TARGET_NAME.
> -@@ -1031,33 +1087,7 @@ free_child (struct child *child)
> -   free (child);
> - }
> -
> --#ifdef POSIX
> --extern sigset_t fatal_signal_set;
> --#endif
> -
> --void
> --block_sigs (void)
> --{
> --#ifdef POSIX
> --  (void) sigprocmask (SIG_BLOCK, &fatal_signal_set, (sigset_t *) 0);
> --#else
> --# ifdef HAVE_SIGSETMASK
> --  (void) sigblock (fatal_signal_mask);
> --# endif
> --#endif
> --}
> --
> --#ifdef POSIX
> --void
> --unblock_sigs (void)
> --{
> --  sigset_t empty;
> --  sigemptyset (&empty);
> --  sigprocmask (SIG_SETMASK, &empty, (sigset_t *) 0);
> --}
> --#endif
> --
> --
> - /* Start a job to run the commands specified in CHILD.
> -    CHILD is updated to reflect the commands and ID of the child process.
> -
> -@@ -2138,7 +2168,7 @@ child_execute_job (struct output *out, int good_stdin,
> -     return pid;
> -
> -   /* We are the child.  */
> --  unblock_sigs ();
> -+  unblock_all_sigs ();
> -
> - #ifdef SET_STACK_SIZE
> -   /* Reset limits, if necessary.  */
> Index: patches/patch-job_h
> ===================================================================
> RCS file: patches/patch-job_h
> diff -N patches/patch-job_h
> --- patches/patch-job_h 13 Sep 2019 16:59:34 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,29 +0,0 @@
> -$OpenBSD: patch-job_h,v 1.2 2019/09/13 16:59:34 kurt Exp $
> -
> -Only unblock fatal signals after child invocation
> -http://git.savannah.gnu.org/cgit/make.git/commit/?id=78b5fec6898c26956d00548427cda1101cb80f8a
> -
> -Index: job.h
> ---- job.h.orig
> -+++ job.h
> -@@ -142,18 +142,7 @@ int exec_command (char **argv, char **envp);
> - void exec_command (char **argv, char **envp) __attribute__ ((noreturn));
> - #endif
> -
> --extern unsigned int job_slots_used;
> -+void unblock_all_sigs (void);
> -
> --void block_sigs (void);
> --#ifdef POSIX
> --void unblock_sigs (void);
> --#else
> --#ifdef  HAVE_SIGSETMASK
> --extern int fatal_signal_mask;
> --#define unblock_sigs()  sigsetmask (0)
> --#else
> --#define unblock_sigs()
> --#endif
> --#endif
> --
> -+extern unsigned int job_slots_used;
> - extern unsigned int jobserver_tokens;
> Index: patches/patch-main_c
> ===================================================================
> RCS file: patches/patch-main_c
> diff -N patches/patch-main_c
> --- patches/patch-main_c 13 Sep 2019 16:59:34 -0000 1.5
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,23 +0,0 @@
> -$OpenBSD: patch-main_c,v 1.5 2019/09/13 16:59:34 kurt Exp $
> -
> -Only unblock fatal signals after child invocation
> -http://git.savannah.gnu.org/cgit/make.git/commit/?id=78b5fec6898c26956d00548427cda1101cb80f8a
> -
> -Index: main.c
> ---- main.c.orig
> -+++ main.c
> -@@ -590,12 +590,10 @@ struct output make_sync;
> -
> - /* Mask of signals that are being caught with fatal_error_signal.  */
> -
> --#ifdef POSIX
> -+#if defined(POSIX)
> - sigset_t fatal_signal_set;
> --#else
> --# ifdef HAVE_SIGSETMASK
> -+#elif defined(HAVE_SIGSETMASK)
> - int fatal_signal_mask;
> --# endif
> - #endif
> -
> - #if !HAVE_DECL_BSD_SIGNAL && !defined bsd_signal
> Index: patches/patch-make_1
> ===================================================================
> RCS file: patches/patch-make_1
> diff -N patches/patch-make_1
> --- patches/patch-make_1 25 Jun 2016 19:47:11 -0000 1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,202 +0,0 @@
> -$OpenBSD: patch-make_1,v 1.3 2016/06/25 19:47:11 naddy Exp $
> -
> -Since we install GNU make as gmake replace make with gmake in the
> -manpage where it makes sense.
> -
> ---- make.1.orig Sun Feb 28 18:51:00 2016
> -+++ make.1 Fri Jun 24 18:19:09 2016
> -@@ -1,13 +1,13 @@
> --.TH MAKE 1 "28 February 2016" "GNU" "User Commands"
> -+.TH GMAKE 1 "03 March 2012" "GNU" "User Commands"
> - .SH NAME
> --make \- GNU make utility to maintain groups of programs
> -+gmake \- GNU make utility to maintain groups of programs
> - .SH SYNOPSIS
> --.B make
> -+.B gmake
> - [\fIOPTION\fR]... [\fITARGET\fR]...
> - .SH DESCRIPTION
> - .LP
> - The
> --.I make
> -+.I gmake
> - utility will determine automatically which pieces of a large program need to
> - be recompiled, and issue the commands to recompile them.  The manual describes
> - the GNU implementation of
> -@@ -15,15 +15,15 @@ the GNU implementation of
> - which was written by Richard Stallman and Roland McGrath, and is currently
> - maintained by Paul Smith.  Our examples show C programs, since they are very
> - common, but you can use
> --.B make
> -+.B gmake
> - with any programming language whose compiler can be run with a shell command.
> - In fact,
> --.B make
> -+.B gmake
> - is not limited to programs.  You can use it to describe any task where some
> - files must be updated automatically from others whenever the others change.
> - .LP
> - To prepare to use
> --.BR make ,
> -+.BR gmake ,
> - you must write a file called the
> - .I makefile
> - that describes the relationships among files in your program, and the states
> -@@ -35,17 +35,17 @@ Once a suitable makefile exists, each time you change
> - this simple shell command:
> - .sp 1
> - .RS
> --.B make
> -+.B gmake
> - .RE
> - .sp 1
> - suffices to perform all necessary recompilations.
> - The
> --.B make
> -+.B gmake
> - program uses the makefile description and the last-modification times of the
> - files to decide which of the files need to be updated.  For each of those
> - files, it issues the commands recorded in the makefile.
> - .LP
> --.B make
> -+.B gmake
> - executes commands in the
> - .I makefile
> - to update one or more target
> -@@ -56,7 +56,7 @@ is typically a program.
> - If no
> - .B \-f
> - option is present,
> --.B make
> -+.B gmake
> - will look for the makefiles
> - .IR GNUmakefile ,
> - .IR makefile ,
> -@@ -84,7 +84,7 @@ If
> - .I makefile
> - is '\-', the standard input is read.
> - .LP
> --.B make
> -+.B gmake
> - updates a target if it depends on prerequisite files
> - that have been modified since the target was last modified,
> - or if the target does not exist.
> -@@ -111,7 +111,7 @@ previous one:
> - is equivalent to
> - .BR "\-C " /etc.
> - This is typically used with recursive invocations of
> --.BR make .
> -+.BR gmake .
> - .TP 0.5i
> - .B \-d
> - Print debugging information in addition to normal processing.
> -@@ -119,7 +119,7 @@ The debugging information says which files are being c
> - remaking, which file-times are being compared and with what results,
> - which files actually need to be remade, which implicit rules are
> - considered and which are applied---everything interesting about how
> --.B make
> -+.B gmake
> - decides what to do.
> - .TP 0.5i
> - .BI \-\-debug "[=FLAGS]"
> -@@ -168,7 +168,7 @@ If several
> - options are used to specify several directories, the directories are
> - searched in the order specified.
> - Unlike the arguments to other flags of
> --.BR make ,
> -+.BR gmake ,
> - directories given with
> - .B \-I
> - flags may come directly after the flag:
> -@@ -191,7 +191,7 @@ option, the last one is effective.
> - If the
> - .B \-j
> - option is given without an argument,
> --.BR make
> -+.BR gmake
> - will not limit the number of jobs that can run simultaneously.
> - .TP 0.5i
> - \fB\-k\fR, \fB\-\-keep\-going\fR
> -@@ -252,7 +252,7 @@ This also prints the version information given by the
> - .B \-v
> - switch (see below).
> - To print the data base without trying to remake any files, use
> --.IR "make \-p \-f/dev/null" .
> -+.IR "gmake \-p \-f/dev/null" .
> - .TP 0.5i
> - \fB\-q\fR, \fB\-\-question\fR
> - ``Question mode''.
> -@@ -275,11 +275,11 @@ Cancel the effect of the
> - .B \-k
> - option.
> - This is never necessary except in a recursive
> --.B make
> -+.B gmake
> - where
> - .B \-k
> - might be inherited from the top-level
> --.B make
> -+.B gmake
> - via MAKEFLAGS or if you set
> - .B \-k
> - in MAKEFLAGS in your environment.
> -@@ -289,7 +289,7 @@ Touch files (mark them up to date without really chang
> - instead of running their commands.
> - This is used to pretend that the commands were done, in order to fool
> - future invocations of
> --.BR make .
> -+.BR gmake .
> - .TP 0.5i
> - .B \-\-trace
> - Information about the disposition of each target is printed (why the target is
> -@@ -297,7 +297,7 @@ being rebuilt and what commands are run to rebuild it)
> - .TP 0.5i
> - \fB\-v\fR, \fB\-\-version\fR
> - Print the version of the
> --.B make
> -+.B gmake
> - program plus a copyright, a list of authors and a notice that there
> - is no warranty.
> - .TP 0.5i
> -@@ -306,7 +306,7 @@ Print a message containing the working directory
> - before and after other processing.
> - This may be useful for tracking down errors from complicated nests of
> - recursive
> --.B make
> -+.B gmake
> - commands.
> - .TP 0.5i
> - .B \-\-no\-print\-directory
> -@@ -326,7 +326,7 @@ Without
> - it is almost the same as running a
> - .I touch
> - command on the given file before running
> --.BR make ,
> -+.BR gmake ,
> - except that the modification time is changed only in the imagination of
> - .BR make .
> - .TP 0.5i
> -@@ -340,19 +340,19 @@ and no targets that were built failed.  A status of on
> - if the
> - .B \-q
> - flag was used and
> --.B make
> -+.B gmake
> - determines that a target needs to be rebuilt.  A status of two will be
> - returned if any errors were encountered.
> - .SH "SEE ALSO"
> - The full documentation for
> --.B make
> -+.B gmake
> - is maintained as a Texinfo manual.  If the
> - .B info
> - and
> --.B make
> -+.B gmake
> - programs are properly installed at your site, the command
> - .IP
> --.B info make
> -+.B info 'GNU make'
> - .PP
> - should give you access to the complete manual.
> - .SH BUGS
> Index: patches/patch-makeint_h
> ===================================================================
> RCS file: patches/patch-makeint_h
> diff -N patches/patch-makeint_h
> --- patches/patch-makeint_h 2 Nov 2019 00:33:29 -0000 1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,16 +0,0 @@
> -$OpenBSD: patch-makeint_h,v 1.3 2019/11/02 00:33:29 jca Exp $
> -
> -Remove too broad #ifdef so that we also use modern code on arm.
> -
> -Index: makeint.h
> ---- makeint.h.orig
> -+++ makeint.h
> -@@ -114,7 +114,7 @@ extern int errno;
> - #endif
> -
> - /* Some systems define _POSIX_VERSION but are not really POSIX.1.  */
> --#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
> -+#if (defined (butterfly) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
> - # undef POSIX
> - #endif
> -
> Index: patches/patch-posixos_c
> ===================================================================
> RCS file: patches/patch-posixos_c
> diff -N patches/patch-posixos_c
> --- patches/patch-posixos_c 6 Aug 2019 12:19:26 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,156 +0,0 @@
> -$OpenBSD: patch-posixos_c,v 1.1 2019/08/06 12:19:26 naddy Exp $
> -
> -Use a non-blocking read with pselect to avoid hangs.
> -https://git.savannah.gnu.org/cgit/make.git/commit/?id=b552b05251980f693c729e251f93f5225b400714
> -
> -Index: posixos.c
> ---- posixos.c.orig
> -+++ posixos.c
> -@@ -59,6 +59,24 @@ make_job_rfd (void)
> - #endif
> - }
> -
> -+static void
> -+set_blocking (int fd, int blocking)
> -+{
> -+  // If we're not using pselect() don't change the blocking
> -+#ifdef HAVE_PSELECT
> -+  int flags;
> -+  EINTRLOOP (flags, fcntl (fd, F_GETFL));
> -+  if (flags >= 0)
> -+    {
> -+      int r;
> -+      flags = blocking ? (flags & ~O_NONBLOCK) : (flags | O_NONBLOCK);
> -+      EINTRLOOP (r, fcntl (fd, F_SETFL, flags));
> -+      if (r < 0)
> -+        pfatal_with_name ("fcntl(O_NONBLOCK)");
> -+    }
> -+#endif
> -+}
> -+
> - unsigned int
> - jobserver_setup (int slots)
> - {
> -@@ -78,6 +96,9 @@ jobserver_setup (int slots)
> -         pfatal_with_name (_("init jobserver pipe"));
> -     }
> -
> -+  /* When using pselect() we want the read to be non-blocking.  */
> -+  set_blocking (job_fds[0], 0);
> -+
> -   return 1;
> - }
> -
> -@@ -113,6 +134,9 @@ jobserver_parse_auth (const char *auth)
> -       return 0;
> -     }
> -
> -+  /* When using pselect() we want the read to be non-blocking.  */
> -+  set_blocking (job_fds[0], 0);
> -+
> -   return 1;
> - }
> -
> -@@ -161,7 +185,10 @@ jobserver_acquire_all (void)
> - {
> -   unsigned int tokens = 0;
> -
> --  /* Close the write side, so the read() won't hang.  */
> -+  /* Use blocking reads to wait for all outstanding jobs.  */
> -+  set_blocking (job_fds[0], 1);
> -+
> -+  /* Close the write side, so the read() won't hang forever.  */
> -   close (job_fds[1]);
> -   job_fds[1] = -1;
> -
> -@@ -239,18 +266,12 @@ jobserver_pre_acquire (void)
> - unsigned int
> - jobserver_acquire (int timeout)
> - {
> --  sigset_t empty;
> --  fd_set readfds;
> -   struct timespec spec;
> -   struct timespec *specp = NULL;
> --  int r;
> --  char intake;
> -+  sigset_t empty;
> -
> -   sigemptyset (&empty);
> -
> --  FD_ZERO (&readfds);
> --  FD_SET (job_fds[0], &readfds);
> --
> -   if (timeout)
> -     {
> -       /* Alarm after one second (is this too granular?)  */
> -@@ -259,28 +280,52 @@ jobserver_acquire (int timeout)
> -       specp = &spec;
> -     }
> -
> --  r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty);
> --
> --  if (r == -1)
> -+  while (1)
> -     {
> --      /* Better be SIGCHLD.  */
> --      if (errno != EINTR)
> --        pfatal_with_name (_("pselect jobs pipe"));
> --      return 0;
> --    }
> -+      fd_set readfds;
> -+      int r;
> -+      char intake;
> -
> --  if (r == 0)
> --    /* Timeout.  */
> --    return 0;
> -+      FD_ZERO (&readfds);
> -+      FD_SET (job_fds[0], &readfds);
> -
> --  /* The read FD is ready: read it!  */
> --  EINTRLOOP (r, read (job_fds[0], &intake, 1));
> --  if (r < 0)
> --    pfatal_with_name (_("read jobs pipe"));
> -+      r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty);
> -+      if (r < 0)
> -+        switch (errno)
> -+          {
> -+          case EINTR:
> -+            /* SIGCHLD will show up as an EINTR.  */
> -+            return 0;
> -
> --  /* What does it mean if read() returns 0?  It shouldn't happen because only
> --     the master make can reap all the tokens and close the write side...??  */
> --  return r > 0;
> -+          case EBADF:
> -+            /* Someone closed the jobs pipe.
> -+               That shouldn't happen but if it does we're done.  */
> -+              O (fatal, NILF, _("job server shut down"));
> -+
> -+          default:
> -+            pfatal_with_name (_("pselect jobs pipe"));
> -+          }
> -+
> -+      if (r == 0)
> -+        /* Timeout.  */
> -+        return 0;
> -+
> -+      /* The read FD is ready: read it!  This is non-blocking.  */
> -+      EINTRLOOP (r, read (job_fds[0], &intake, 1));
> -+
> -+      if (r < 0)
> -+        {
> -+          /* Someone sniped our token!  Try again.  */
> -+          if (errno == EAGAIN)
> -+            continue;
> -+
> -+          pfatal_with_name (_("read jobs pipe"));
> -+        }
> -+
> -+      /* read() should never return 0: only the master make can reap all the
> -+         tokens and close the write side...??  */
> -+      return r > 0;
> -+    }
> - }
> -
> - #else
> Index: patches/patch-read_c
> ===================================================================
> RCS file: patches/patch-read_c
> diff -N patches/patch-read_c
> --- patches/patch-read_c 5 Jan 2019 22:19:17 -0000 1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,17 +0,0 @@
> -$OpenBSD: patch-read_c,v 1.3 2019/01/05 22:19:17 naddy Exp $
> -
> -Use after free().
> -https://git.savannah.gnu.org/cgit/make.git/commit/?id=816a867ff51110cbca1956ad0e625d8251a7531b
> -
> -Index: read.c
> ---- read.c.orig
> -+++ read.c
> -@@ -204,7 +204,7 @@ read_all_makefiles (const char **makefiles)
> -       {
> -         if (*p != '\0')
> -           *p++ = '\0';
> --        eval_makefile (name, RM_NO_DEFAULT_GOAL|RM_INCLUDED|RM_DONTCARE);
> -+        eval_makefile (strcache_add (name), RM_NO_DEFAULT_GOAL|RM_INCLUDED|RM_DONTCARE);
> -       }
> -
> -     free (value);
> Index: patches/patch-remote-cstms_c
> ===================================================================
> RCS file: patches/patch-remote-cstms_c
> diff -N patches/patch-remote-cstms_c
> --- patches/patch-remote-cstms_c 13 Sep 2019 16:59:34 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,17 +0,0 @@
> -$OpenBSD: patch-remote-cstms_c,v 1.1 2019/09/13 16:59:34 kurt Exp $
> -
> -Only unblock fatal signals after child invocation
> -http://git.savannah.gnu.org/cgit/make.git/commit/?id=78b5fec6898c26956d00548427cda1101cb80f8a
> -
> -Index: remote-cstms.c
> ---- remote-cstms.c.orig
> -+++ remote-cstms.c
> -@@ -246,7 +246,7 @@ start_remote_job (char **argv, char **envp, int stdin_
> -         (void) dup2 (stdin_fd, 0);
> -
> -       /* Unblock signals in the child.  */
> --      unblock_sigs ();
> -+      unblock_all_sigs ();
> -
> -       /* Run the command.  */
> -       exec_command (new_argv, envp);
> Index: patches/patch-src_makeint_h
> ===================================================================
> RCS file: patches/patch-src_makeint_h
> diff -N patches/patch-src_makeint_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_makeint_h 30 Jan 2020 21:32:49 -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: src/makeint.h
> +--- src/makeint.h.orig
> ++++ src/makeint.h
> +@@ -115,7 +115,7 @@ extern int errno;
> + #endif
> +
> + /* Some systems define _POSIX_VERSION but are not really POSIX.1.  */
> +-#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
> ++#if (defined (butterfly) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
> + # undef POSIX
> + #endif
> +
> Index: patches/patch-tests_run_make_tests_pl
> ===================================================================
> RCS file: patches/patch-tests_run_make_tests_pl
> diff -N patches/patch-tests_run_make_tests_pl
> --- patches/patch-tests_run_make_tests_pl 5 Aug 2019 12:14:52 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,18 +0,0 @@
> -$OpenBSD: patch-tests_run_make_tests_pl,v 1.1 2019/08/05 12:14:52 naddy Exp $
> -
> -Find Perl modules
> -https://git.savannah.gnu.org/cgit/make.git/commit/?id=d9d4e06084a4c7da480bd49a3487aadf6ba77b54
> -
> -Index: tests/run_make_tests.pl
> ---- tests/run_make_tests.pl.orig
> -+++ tests/run_make_tests.pl
> -@@ -58,6 +58,9 @@ if ($^O eq 'VMS')
> -   *CORE::GLOBAL::rmdir = \&vms_rmdir;
> - }
> -
> -+use FindBin;
> -+use lib "$FindBin::Bin";
> -+
> - require "test_driver.pl";
> - require "config-flags.pm";
> -
> Index: patches/patch-tests_scripts_features_archives
> ===================================================================
> RCS file: /cvs/ports/devel/gmake/patches/patch-tests_scripts_features_archives,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-tests_scripts_features_archives
> --- patches/patch-tests_scripts_features_archives 25 Jun 2016 19:47:11 -0000 1.2
> +++ patches/patch-tests_scripts_features_archives 30 Jan 2020 21:32:49 -0000
> @@ -1,7 +1,8 @@
>   $OpenBSD: patch-tests_scripts_features_archives,v 1.2 2016/06/25 19:47:11 naddy Exp $
> ---- tests/scripts/features/archives.orig Mon Feb 29 07:31:16 2016
> -+++ tests/scripts/features/archives Fri Jun 24 18:19:09 2016
> -@@ -183,7 +183,7 @@ $mk_string = q!
> +Index: tests/scripts/features/archives
> +--- tests/scripts/features/archives.orig
> ++++ tests/scripts/features/archives
> +@@ -184,7 +184,7 @@ $mk_string = q!
>    DIR = artest
>    vpath % $(DIR)
>    default: lib(foo)
> Index: patches/patch-tests_scripts_misc_close_stdout
> ===================================================================
> RCS file: patches/patch-tests_scripts_misc_close_stdout
> diff -N patches/patch-tests_scripts_misc_close_stdout
> --- patches/patch-tests_scripts_misc_close_stdout 5 Aug 2019 15:05:09 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,20 +0,0 @@
> -$OpenBSD: patch-tests_scripts_misc_close_stdout,v 1.1 2019/08/05 15:05:09 naddy Exp $
> -
> -Don't error out on empty test: "Add test suite support to Windows"
> -https://git.savannah.gnu.org/cgit/make.git/commit/?id=fda00f88d3180be1a898c19bfa23b7adba6c2a9e
> -
> -Index: tests/scripts/misc/close_stdout
> ---- tests/scripts/misc/close_stdout.orig
> -+++ tests/scripts/misc/close_stdout
> -@@ -2,8 +2,8 @@
> -
> - $description = "Make sure make exits with an error if stdout is full.";
> -
> --if (-e '/dev/full') {
> --  run_make_test('', '-v > /dev/full', '/^#MAKE#: write error/', 256);
> --}
> -+-e '/dev/full' or return -1;
> -+
> -+run_make_test('', '-v > /dev/full', '/^#MAKE#: write error/', 256);
> -
> - 1;
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/devel/gmake/pkg/PLIST,v
> retrieving revision 1.16
> diff -u -p -r1.16 PLIST
> --- pkg/PLIST 30 Oct 2013 23:08:56 -0000 1.16
> +++ pkg/PLIST 30 Jan 2020 21:32:49 -0000
> @@ -4,6 +4,7 @@ include/gnumake.h
>   @info info/make.info
>   @man man/man1/gmake.1
>   share/locale/be/LC_MESSAGES/make.mo
> +share/locale/bg/LC_MESSAGES/make.mo
>   share/locale/cs/LC_MESSAGES/make.mo
>   share/locale/da/LC_MESSAGES/make.mo
>   share/locale/de/LC_MESSAGES/make.mo
> @@ -23,10 +24,13 @@ share/locale/lt/LC_MESSAGES/
>   share/locale/lt/LC_MESSAGES/make.mo
>   share/locale/nl/LC_MESSAGES/make.mo
>   share/locale/pl/LC_MESSAGES/make.mo
> +share/locale/pt/LC_MESSAGES/make.mo
>   share/locale/pt_BR/LC_MESSAGES/make.mo
>   share/locale/ru/LC_MESSAGES/make.mo
> +share/locale/sr/LC_MESSAGES/make.mo
>   share/locale/sv/LC_MESSAGES/make.mo
>   share/locale/tr/LC_MESSAGES/make.mo
>   share/locale/uk/LC_MESSAGES/make.mo
>   share/locale/vi/LC_MESSAGES/make.mo
>   share/locale/zh_CN/LC_MESSAGES/make.mo
> +share/locale/zh_TW/LC_MESSAGES/make.mo