UniFi controller is headless Java application that requires
OpenJDK that depends on full CUPS port. In fact, the latter originally
required cups-client port only that was later removed and merged
to full cups port, so openjdk11 now requires full CUPS.
However, OpenJDK really needs only some header files out of CUPS distribution
and officially supports building --with-cups-include instead of --with-cups.
This change introduces new CUPS port option to java/openjdk11
that defaults to ON to preserve current behaviour.
With CUPS option turned OFF it skips build dependency on full cups:
instead, it downloads and extracts its distfile and
builds --with-cups-include pointing to extracted cups distfile.
Default build not affected, so PORTREVISION not changed.
PR: 264792
Approved by: java (maintainer timeout, over 7 months)
Commit b7f05445c0 has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.
There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.
The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.
Approved by: portmgr (tcberner)
Recent LLVM versions issue warnings for "|" being used with boolean
operands. Such operations exist in OpenJDK and the source lines are
marked with comments to not use logical operations instead.
This breaks the build on 13.1 and -CURRENT when building with LLVM-13
or newer due to the -Werror option being passed to the compiler.
Fix this issue by casting one of the boolean operands to int, as
suggested by the compiler in the error message for the case that the
"|" operation should actually be used on purpose.
I had submitted this patch as an attachment to PR 265687 on
2022-08-07, but it has been ignored by the maintainer (java team).
PR: 265687
Approved by: portmgr (implicit)
Go back to using LLVM 12, bin/java built with LLVM 13 crashes with:
* For target jdk__packages_attribute.done:
A fatal error has been detected by the Java Runtime Environment:
SIGILL (0x4) at pc=0x0000000802e3d438, pid=28756, tid=149399
JRE version: (11.0.16+8) (build )
Java VM: OpenJDK 64-Bit Server VM (11.0.16+8-1, mixed mode, tiered, compressed oops, serial gc, bsd-ppc64)
Problematic frame:
V [libjvm.so+0xe3d438] JVM_RaiseSignal+0x446bcc
Revert part of commit 3d803e4460 that should only have affected the
deskutils/calendar port.
This patch that has been committed by accident had already been
attached to PR 265687 to fix the build issue of openjdk11 on -CURRENT,
but it is up to the java@ team to apply this or some other fix.
Approved by: portmgr (implicit)
Update the man page to match the version the -CURRENT base system.
The only change is a better description of the // single line comment
syntax, i.e. that // is only considered to start a comment when it
appears at the start of the line or after white space. This allows to
embed URLs in calendar entries.
This restores the previous LLVM/Clang 13 workaround. I had thought
the upstream changes would address this, but still seeing reports of
crashes when compiled with LLVM/Clang 13.
PR: 260319
Reported by: various
During an exp-run for llvm 13 (see bug 258209), it turned out that
java/openjdk11 through openjdk13 fail to build with clang 13:
=== Output from failing command(s) repeated here ===
* For target jdk__packages_attribute.done:
These crashes are all caused by the markOop/markOopDesc classes, which
are used to keep track of objects, and which are 'marked' using the low
few bits. (See
https://github.com/openjdk/jdk13u/blob/master/src/hotspot/share/oops/markOop.hpp
).
After some laborious bisecting, I found out that these crashes start
occuring after the upstream commit https://github.com
/llvm/llvm-project/commit/16d03818412 (Return "[CGCall] Annotate this
argument with alignment").
What happens afterwards, is that clang considers the "this" pointer to
always be aligned to the alignment of the actual object, and then
masking or adding a few low bits is not working as expected.
The reason openjdk14 and higher work fine with clang 13, and don't crash
similarly, is that the OpenJDK people completely redid the
markOop/markOopDesc classes in
ae5615c614
("8229258: Rework markOop and markOopDesc into a simpler mark word value
carrier"). E.g, the markOopDesc class was renamed to markWord, and
*stores* a pointer-like value instead of *being* a pointer-like value.
This is a much safer way of handling things.
However, this upstream commit is *very* large, as are a few of its
follow-ups, which is probably the reason why it has not been backported
to JDKs <= 13. I tried manually backporting it, but got lost in many
nasty patch conflicts and problems.
As a workaround, build openjdk8 through 13 with clang12 from the
devel/llvm12 port, for the time being.
In addition, allow openjdk14 through 17 to be built with clang 13, by
adding -Wno-unused-but-set-parameter to the compilation flags.
PR: 258954
Approved by: maintainer timeout (2 weeks)
MFH: 2021Q4
During an exp-run for llvm 12 (see bug 255570), it turned out that
java/openjdk11 and java/openjdk11-jre do not build with clang 12.0.0:
Creating interim jimage
Compiling 2 files for BUILD_DEMO_Notepad
This is due to a missing backport of an upstream commit:
commit c484d8904285652246c3af212a4211b9a8955149
Author: Thomas Stuefe <stuefe@openjdk.org>
Date: Tue Mar 16 05:49:01 2021 +0000
8263557: Possible NULL dereference in Arena::destruct_contents()
Reviewed-by: kbarrett, coleenp
Approved by: maintainer timeout (2 weeks)
PR: 255900
MFH: 2021Q2
These changes largely fall into just two categories:
1. Need textproc/gsed for GNU extensions
2. Extraneous escapes that can go away
For #1, there's a further subdivision into those that require autoconf magic
and those that can get away with BINARY_ALIAS=sed=${LOCALBASE}/bin/gsed.
-CURRENT will soon gain GNU extensions, but these will take longer to get to
all supported releases; we must switch them to gsed to ensure we're actually
properly building them as intended.
For #2, I've fixed these as I can and we should upstream these fixes.
PORTREVISION is bumped for all of the above, because we will almost
certainly build these differently when the replacements actually start
working.
These were all detected by the below-referenced exp-run [1]. The patch
included forbids many ordinary characters from being escaped, since we'll
later imbue those with special meanings. This has had the nice side effect
of picking up various things that we didn't handle properly, e.g. \t and \r
for tab and carriage return.
PR: 229925 [1]
Approved by: koobs (mentor)
Approved by: portmgr (blanket: trivial build fixes)
MFH: no (invasive risk)
Differential Revision: https://reviews.freebsd.org/D25185