This package works. Note cwrappers issue below:

Traditionally pkgsrc does not allow $ORIGIN and that leads to very
invasive changes to the jdk. The build system used LD_LIBRARY_PATH
to be able to execute properly the bootstrap binaries. This interferes
with the build because the build needs to be able to run binaries it
just built and with LD_LIBRARY_PATH it will be using the bootstrap
ones and fail. This is also the reason we can't bootstrap from the
linux jdk and we need to bootstrap from NetBSD that has the same
version.

This build can either use the linux jdk to bootstrap, or a NetBSD
previous build. To be able to do this it will use $ORIGIN.
In my opinion $ORIGIN is a lesser evil that $LD_LIBRARY_PATH.

Here are the instructions to build:

Cwrappers filters out $ORIGIN, so the first step is to apply
cwrappers.diff found in this directory and re-install cwrappers.
This will allow link lines that contain $ORIGIN.

If you want to build i386 or aarch64:
    - install openjdk-bin. This is the latest openjdk-16 running
      under linux emulation. Make sure it works.
    - run make extract. This will extract the openjdk and bootstrap:
	$ cd $WORKDIR
	$ mv bootstrap{,.old}
	$ ln -s /usr/pkg/java/openjdk-bin bootstrap

If you want to install amd64, we have a bootstrap, nothing needs to be done.

'export MAKE_JOBS=<something>' to make the build go faster.

Then run 'make'.

For linux bootstraps:
    - If the build stalls because one of the openjdk-bin binaries SEGV'd
      kill the build and restart it.
