=> Bootstrap dependency digest>=20010302: found digest-20190127
===> Skipping vulnerability checks.
WARNING: No /var/db/pkg/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /var/db/pkg fetch-pkg-vulnerabilities'.
=> Checksum SHA1 OK for grub-2.02.tar.gz
=> Checksum RMD160 OK for grub-2.02.tar.gz
=> Checksum SHA512 OK for grub-2.02.tar.gz
=> Checksum SHA1 OK for unifont-5.1.20080820.pcf.gz
=> Checksum RMD160 OK for unifont-5.1.20080820.pcf.gz
=> Checksum SHA512 OK for unifont-5.1.20080820.pcf.gz
===> Installing dependencies for grub2-2.02
==========================================================================
The supported build options for grub2 are:

	debug freetype fuse

The currently selected options are:

	freetype

You can select which build options to use by setting PKG_DEFAULT_OPTIONS
or the following variable.  Its current value is shown:

	PKG_OPTIONS.grub2 (not defined)

==========================================================================
=> Tool dependency bison>=1.0: found bison-3.4.2
=> Tool dependency gmake>=3.81: found gmake-4.2.1nb1
=> Tool dependency pkgconf-[0-9]*: found pkgconf-1.6.0
=> Tool dependency checkperms>=1.1: found checkperms-1.12
=> Build dependency help2man>=1.36: found help2man-1.47.13
=> Build dependency dejavu-ttf>=2.34nb1: found dejavu-ttf-2.37
=> Build dependency cwrappers>=20150314: found cwrappers-20180325
=> Full dependency freetype2>=2.8.1: found freetype2-2.10.1
===> Overriding tools for grub2-2.02
===> Extracting for grub2-2.02
mv -f /data/scratch/sysutils/grub2/work/unifont-5.1.20080820.pcf /data/scratch/sysutils/grub2/work/grub-2.02/unifont.pcf
===> Patching for grub2-2.02
=> Applying pkgsrc patches for grub2-2.02
=> Verifying /data/pkgsrc/sysutils/grub2/patches/patch-grub-core_osdep_bsd_hostdisk.c
=> Applying pkgsrc patch /data/pkgsrc/sysutils/grub2/patches/patch-grub-core_osdep_bsd_hostdisk.c
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-grub-core_osdep_bsd_hostdisk.c,v 1.1 2018/05/23 07:56:53 triaxx Exp $
|
|Fix build error for NetBSD:
| * undefined RAW_FLOPPY_MAJOR macro
| * undefined fd variable
|
|--- grub-core/osdep/bsd/hostdisk.c.orig    2015-05-21 15:50:29.000000000 +0000
|+++ grub-core/osdep/bsd/hostdisk.c
--------------------------
Patching file grub-core/osdep/bsd/hostdisk.c using Plan A...
Hunk #1 succeeded at 50.
Hunk #2 succeeded at 64.
Hunk #3 succeeded at 84.
Hunk #4 succeeded at 93.
done
=> Verifying /data/pkgsrc/sysutils/grub2/patches/patch-util_getroot.c
=> Applying pkgsrc patch /data/pkgsrc/sysutils/grub2/patches/patch-util_getroot.c
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-util_getroot.c,v 1.3 2018/11/25 15:51:01 maya Exp $
|
|Be consistent about macros. The required headers are only
|included if both libzfs and libnvpair are detected.
|
|--- util/getroot.c.orig	2017-04-24 09:16:00.000000000 +0000
|+++ util/getroot.c
--------------------------
Patching file util/getroot.c using Plan A...
Hunk #1 succeeded at 456.
done
===> Creating toolchain wrappers for grub2-2.02
===> Configuring for grub2-2.02
=> Fixing dejavu search paths in configure.
=> Fixing installation of OS configuration scripts.
=> Fixing configuration paths in scripts.
=> Fixing tabulations for sed in scripts.
INFO: [subst.mk:fix-sed-tabs] Nothing changed in ./util/grub.d/00_header.in.
INFO: [subst.mk:fix-sed-tabs] Nothing changed in ./util/grub.d/10_illumos.in.
INFO: [subst.mk:fix-sed-tabs] Nothing changed in ./util/grub.d/10_windows.in.
INFO: [subst.mk:fix-sed-tabs] Nothing changed in ./util/grub.d/10_xnu.in.
INFO: [subst.mk:fix-sed-tabs] Nothing changed in ./util/grub.d/40_custom.in.
INFO: [subst.mk:fix-sed-tabs] Nothing changed in ./util/grub.d/41_custom.in.
=> Modifying GNU configure scripts to avoid --recheck
=> Replacing config-guess with pkgsrc versions
=> Replacing config-sub with pkgsrc versions
=> Replacing install-sh with pkgsrc version
=> Fixing locale directory references.
=> Checking for portability problems in extracted files
ERROR: [check-portability.awk] => Found test ... == ...:
ERROR: [check-portability.awk] tests/util/grub-fs-tester.in:548: 		if [ $((i%3)) == 0 ]; then
ERROR: [check-portability.awk] tests/util/grub-fs-tester.in:557: 		if [ $((i%3)) == 0 ]; then

Explanation:
===========================================================================
The "test" command, as well as the "[" command, are not required to know
the "==" operator. Only a few implementations like bash and some
versions of ksh support it.

When you run "test foo == foo" on a platform that does not support the
"==" operator, the result will be "false" instead of "true". This can
lead to unexpected behavior.

There are two ways to fix this error message. If the file that contains
the "test ==" is needed for building the package, you should create a
patch for it, replacing the "==" operator with "=". If the file is not
needed, add its name to the CHECK_PORTABILITY_SKIP variable in the
package Makefile.
===========================================================================

*** Error code 1

Stop.
make[1]: stopped in /data/pkgsrc/sysutils/grub2
*** Error code 1

Stop.
make: stopped in /data/pkgsrc/sysutils/grub2