java/openjdk20: Remove expired port
2026-03-12 java/openjdk20: No longer supported by upstream
This commit is contained in:
1
MOVED
1
MOVED
@@ -5167,3 +5167,4 @@ misc/cldr-emoji-annotation|misc/unicode-cldr|2026-03-14|Discontinued, use misc/u
|
||||
misc/unicode-cldr|textproc/CLDR|2026-03-14|Remove duplicate port. Use textproc/CLDR instead
|
||||
emulators/ppsspp-qt5|emulators/ppsspp|2026-03-15|Qt5 is end of life, please use emulators/ppsspp
|
||||
devel/py-marshmallow-enum||2026-03-15|Has expired: Upstream repository has been archived on Oct 19, 2022
|
||||
java/openjdk20||2026-03-15|Has expired: No longer supported by upstream
|
||||
|
||||
@@ -81,7 +81,6 @@
|
||||
SUBDIR += openjdk11-jre
|
||||
SUBDIR += openjdk17
|
||||
SUBDIR += openjdk17-jre
|
||||
SUBDIR += openjdk20
|
||||
SUBDIR += openjdk21
|
||||
SUBDIR += openjdk21-jre
|
||||
SUBDIR += openjdk22
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
PORTNAME= openjdk
|
||||
DISTVERSIONPREFIX= jdk-
|
||||
DISTVERSION= ${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_PATCH_VERSION}+${JDK_BUILD_NUMBER}-${BSD_JDK_VERSION}
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= java devel
|
||||
PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION}
|
||||
MASTER_SITES= LOCAL/openjdk/:boot
|
||||
DISTFILES= ${BOOTSTRAPJDKFILE}:boot
|
||||
|
||||
MAINTAINER= java@FreeBSD.org
|
||||
COMMENT?= Java Development Kit ${JDK_MAJOR_VERSION}
|
||||
WWW= https://openjdk.java.net/projects/jdk/20/
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
DEPRECATED= No longer supported by upstream
|
||||
EXPIRATION_DATE= 2026-03-12
|
||||
|
||||
ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64 powerpc64le
|
||||
|
||||
BUILD_DEPENDS= zip:archivers/zip \
|
||||
autoconf>0:devel/autoconf \
|
||||
${LOCALBASE}/include/cups/cups.h:print/cups \
|
||||
bash:shells/bash \
|
||||
gsed:textproc/gsed
|
||||
LIB_DEPENDS= libasound.so:audio/alsa-lib \
|
||||
libfontconfig.so:x11-fonts/fontconfig \
|
||||
libfreetype.so:print/freetype2 \
|
||||
libgif.so:graphics/giflib \
|
||||
libharfbuzz.so:print/harfbuzz \
|
||||
liblcms2.so:graphics/lcms2 \
|
||||
libpng.so:graphics/png
|
||||
RUN_DEPENDS= javavm:java/javavmwrapper \
|
||||
xorg-fonts-truetype>0:x11-fonts/xorg-fonts-truetype
|
||||
|
||||
USES= compiler:features cpe gmake iconv jpeg pkgconfig xorg
|
||||
USE_XORG= x11 xext xi xrandr xrender xt xtst
|
||||
|
||||
CPE_VENDOR= oracle
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= battleblow
|
||||
GH_PROJECT= jdk20u
|
||||
|
||||
NO_CCACHE= yes
|
||||
|
||||
# Suppress passing -j to do-build target via Mk/bsd.port.mk
|
||||
# In the JDK build the number of parallel jobs is passed in via configure --with-num-cores=N
|
||||
_MAKE_JOBS= #
|
||||
MAKE_ENV= LANG="C" \
|
||||
LC_ALL="C" \
|
||||
CLASSPATH="" \
|
||||
JAVA_HOME="" \
|
||||
LD_LIBRARY_PATH="" \
|
||||
CC=${CC} \
|
||||
CXX=${CXX} \
|
||||
CPP=${CPP} \
|
||||
LOG=cmdlines \
|
||||
MAKEFLAGS=""
|
||||
|
||||
JDK_ARCH= ${ARCH:S/amd64/x86_64/:S/i386/x86/:S/powerpc64/ppc64/}
|
||||
BOOTSTRAPJDKFILE= openjdk20-20.0.2+9.1_3.${JDK_ARCH}.tar.xz
|
||||
JDK_OSARCH= bsd-${JDK_ARCH}
|
||||
JDK_BUILDDIR= ${WRKSRC}/build/${JDK_OSARCH}-${JDK_BUILD_JVM}-${JDK_BUILD_TYPE}
|
||||
.if defined(BUILD_JRE)
|
||||
JDK_IMAGEDIR= ${JDK_BUILDDIR}/images/jre
|
||||
.else
|
||||
JDK_IMAGEDIR= ${JDK_BUILDDIR}/images/jdk
|
||||
.endif
|
||||
INSTALLDIR= ${PREFIX}/${PKGBASE}
|
||||
BOOTSTRAPJDKDIR= ${WRKDIR}/boot-jdk
|
||||
|
||||
NOPRECIOUSMAKEVARS= yes
|
||||
|
||||
JDK_MAJOR_VERSION= 20
|
||||
JDK_MINOR_VERSION= 0
|
||||
JDK_PATCH_VERSION= 2
|
||||
JDK_BUILD_NUMBER= 9
|
||||
BSD_JDK_VERSION= 1
|
||||
|
||||
JDK_BUG_URL= https://bugs.freebsd.org/bugzilla/enter_bug.cgi?product=Ports%20%26%20Packages&component=Individual%20Port(s)&short_desc=java/${PORTNAME}${JDK_MAJOR_VERSION}%3A%20
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ENV= CC=${CC} \
|
||||
CXX=${CXX} \
|
||||
CPP=${CPP} \
|
||||
ac_cv_path_SED=${LOCALBASE}/bin/gsed
|
||||
CONFIGURE_ARGS= --with-boot-jdk=${BOOTSTRAPJDKDIR} \
|
||||
--disable-ccache \
|
||||
--disable-javac-server \
|
||||
--with-alsa=${LOCALBASE} \
|
||||
--with-cups=${LOCALBASE} \
|
||||
--with-fontconfig=${LOCALBASE} \
|
||||
--with-freetype=system \
|
||||
--with-freetype-include=${LOCALBASE}/include/freetype2 \
|
||||
--with-freetype-lib=${LOCALBASE}/lib \
|
||||
--with-libjpeg=system \
|
||||
--with-giflib=system \
|
||||
--with-giflib-include=${LOCALBASE}/include \
|
||||
--with-giflib-lib=${LOCALBASE}/lib \
|
||||
--with-harfbuzz=system \
|
||||
--with-libpng=system \
|
||||
--with-num-cores=${MAKE_JOBS_NUMBER} \
|
||||
--with-zlib=system \
|
||||
--with-lcms=system \
|
||||
--x-includes=${LOCALBASE}/include \
|
||||
--x-libraries=${LOCALBASE}/lib \
|
||||
--with-version-string=${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_PATCH_VERSION}+${JDK_BUILD_NUMBER}-${BSD_JDK_VERSION} \
|
||||
--with-native-debug-symbols=none \
|
||||
--with-debug-level=release \
|
||||
--with-vendor-name="OpenJDK BSD Porting Team" \
|
||||
--with-vendor-url="https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/" \
|
||||
--with-vendor-bug-url="${JDK_BUG_URL}" \
|
||||
--with-vendor-vm-bug-url="${JDK_BUG_URL}"
|
||||
|
||||
JAVAVMS_COMMENT= OpenJDK${JDK_MAJOR_VERSION}
|
||||
|
||||
.if defined(BUILD_JRE)
|
||||
ALL_TARGET= legacy-images
|
||||
.else
|
||||
ALL_TARGET= images
|
||||
.endif
|
||||
JDK_BUILD_TYPE= release
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
JDK_BUILD_JVM= server
|
||||
|
||||
MAKE_ENV+= --with-toolchain-type=${COMPILER_TYPE}
|
||||
CONFIGURE_ARGS+= --with-toolchain-type=${COMPILER_TYPE}
|
||||
CONFIGURE_ARGS+= --disable-warnings-as-errors
|
||||
|
||||
.if ${COMPILER_TYPE} == gcc
|
||||
USE_GCC= yes
|
||||
CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT} -L${LOCALBASE}/lib/gcc${GCC_DEFAULT}" \
|
||||
--with-extra-cflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}" \
|
||||
--with-extra-cxxflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}"
|
||||
.else
|
||||
MAKE_ENV+= USE_CLANG=true
|
||||
EXTRA_CFLAGS+= -Wno-unused-but-set-parameter
|
||||
EXTRA_CFLAGS+= -Wno-bitwise-instead-of-logical
|
||||
EXTRA_CFLAGS+= -Wno-error=deprecated-non-prototype
|
||||
CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}"
|
||||
CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}"
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == aarch64
|
||||
CONFIGURE_ARGS+= --with-boot-jdk-jvmargs=-XX:-UseCompressedClassPointers --disable-dtrace
|
||||
MAKE_ENV+= JAVA_TOOL_OPTIONS="-XX:-UseCompressedClassPointers"
|
||||
.endif
|
||||
|
||||
.if empty(ICONV_LIB)
|
||||
ICONV_CFLAGS= -DLIBICONV_PLUG
|
||||
.else
|
||||
ICONV_CFLAGS= -I${LOCALBASE}/include
|
||||
ICONV_LDFLAGS= -L${LOCALBASE}/lib
|
||||
ICONV_LIBS= ${ICONV_LIB}
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${RM} ${WRKSRC}/src/hotspot/os_cpu/bsd_ppc/thread_bsd_ppc.cpp
|
||||
@${FIND} ${WRKSRC} -name '*.orig' -delete
|
||||
@${CHMOD} 755 ${WRKSRC}/configure
|
||||
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
|
||||
${WRKSRC}/configure \
|
||||
${WRKSRC}/src/hotspot/os/bsd/os_bsd.cpp
|
||||
@${REINPLACE_CMD} -e 's|%%ICONV_CFLAGS%%|${ICONV_CFLAGS}|' \
|
||||
-e 's|%%ICONV_LDFLAGS%%|${ICONV_LDFLAGS}|' \
|
||||
-e 's|%%ICONV_LIBS%%|${ICONV_LIBS}|' \
|
||||
${WRKSRC}/make/autoconf/libraries.m4
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${STAGEDIR}${INSTALLDIR}
|
||||
@cd ${JDK_IMAGEDIR} && ${COPYTREE_SHARE} . ${STAGEDIR}${INSTALLDIR}
|
||||
@cd ${STAGEDIR}${INSTALLDIR} && \
|
||||
${FIND} bin -type f -exec ${CHMOD} ${BINMODE} {} \;
|
||||
@${CHMOD} ${BINMODE} ${STAGEDIR}${INSTALLDIR}/lib/jspawnhelper
|
||||
@${ECHO} "@javavm ${INSTALLDIR}/bin/java" >> ${TMPPLIST}
|
||||
@${FIND} ${STAGEDIR}${INSTALLDIR} -not -type d | ${SORT} | \
|
||||
${SED} -e 's|^${STAGEDIR}${PREFIX}/||' >> ${TMPPLIST}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
@@ -1,13 +0,0 @@
|
||||
TIMESTAMP = 1766157633
|
||||
SHA256 (openjdk20-20.0.2+9.1_3.aarch64.tar.xz) = 4f2cbd343d102ce64e074f6cdba2576314e4333034d73cde0fe862c60f116850
|
||||
SIZE (openjdk20-20.0.2+9.1_3.aarch64.tar.xz) = 165170468
|
||||
SHA256 (openjdk20-20.0.2+9.1_3.ppc64.tar.xz) = d4bb08c5d5cd14fd46a5d008d0abc06fa81e197738fdf85da285e547bf3fff7d
|
||||
SIZE (openjdk20-20.0.2+9.1_3.ppc64.tar.xz) = 164279232
|
||||
SHA256 (openjdk20-20.0.2+9.1_3.ppc64le.tar.xz) = fa1443a9a5b5c111ff6e47ae5cc310cde307b740ed84ee7dfcd3f5dfecb64e7c
|
||||
SIZE (openjdk20-20.0.2+9.1_3.ppc64le.tar.xz) = 165194700
|
||||
SHA256 (openjdk20-20.0.2+9.1_3.x86.tar.xz) = e282998ba34489b30563d49d19dca155c8b982cb400af0eaa71f683cb4506faf
|
||||
SIZE (openjdk20-20.0.2+9.1_3.x86.tar.xz) = 161116020
|
||||
SHA256 (openjdk20-20.0.2+9.1_3.x86_64.tar.xz) = a9f76e7f51497ea06ca83076c879d38c5586464be83bdac6585495b6ce0b5c9f
|
||||
SIZE (openjdk20-20.0.2+9.1_3.x86_64.tar.xz) = 167203788
|
||||
SHA256 (battleblow-jdk20u-jdk-20.0.2+9-1_GH0.tar.gz) = 61b32462e53841dd8641e6b21de91bae9a141ed58a41972f6a6cfba45ac8c4a2
|
||||
SIZE (battleblow-jdk20u-jdk-20.0.2+9-1_GH0.tar.gz) = 109736899
|
||||
@@ -1,14 +0,0 @@
|
||||
--- configure.orig 2019-03-12 12:38:39.648907000 -0700
|
||||
+++ configure 2019-03-12 12:39:04.275572000 -0700
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!%%LOCALBASE%%/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
@@ -32,4 +32,4 @@
|
||||
# Delegate to wrapper, forcing wrapper to believe $0 is this script by using -c.
|
||||
# This trick is needed to get autoconf to co-operate properly.
|
||||
# The ${-:+-$-} construction passes on bash options.
|
||||
-bash ${-:+-$-} -c ". $this_script_dir/make/autoconf/configure" $this_script_dir/configure CHECKME $this_script_dir "$@"
|
||||
+%%LOCALBASE%%/bin/bash ${-:+-$-} -c ". $this_script_dir/make/autoconf/configure" $this_script_dir/configure CHECKME $this_script_dir "$@"
|
||||
@@ -1,13 +0,0 @@
|
||||
--- make/autoconf/flags-cflags.m4.orig 2020-01-08 09:12:31 UTC
|
||||
+++ make/autoconf/flags-cflags.m4
|
||||
@@ -770,6 +770,10 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
# for all archs except arm and ppc, prevent gcc to omit frame pointer
|
||||
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
|
||||
fi
|
||||
+ elif test "x$OPENJDK_TARGET_OS_ENV" = xbsd.freebsd; then
|
||||
+ if test "x$FLAGS_CPU" = xppc64; then
|
||||
+ $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=powerpc64 -mtune=power5"
|
||||
+ fi
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
@@ -1,11 +0,0 @@
|
||||
--- make/autoconf/help.m4.orig 2025-05-24 21:54:30 UTC
|
||||
+++ make/autoconf/help.m4
|
||||
@@ -269,7 +269,7 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
fi
|
||||
fi
|
||||
if test "x$CONFIGURE_COMMAND_LINE" != x; then
|
||||
- printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
|
||||
+ printf "using configure arguments '%s'.\n" "$CONFIGURE_COMMAND_LINE"
|
||||
else
|
||||
printf "using default settings.\n"
|
||||
fi
|
||||
@@ -1,15 +0,0 @@
|
||||
--- make/autoconf/libraries.m4~ 2019-08-12 19:10:36.292217000 -0700
|
||||
+++ make/autoconf/libraries.m4 2019-08-12 19:18:15.523606000 -0700
|
||||
@@ -188,9 +188,9 @@
|
||||
ICONV_LDFLAGS="-L/usr/local/lib"
|
||||
ICONV_LIBS=-liconv
|
||||
elif test "x$OPENJDK_TARGET_OS_ENV" = "xbsd.freebsd"; then
|
||||
- ICONV_CFLAGS=-DLIBICONV_PLUG
|
||||
- ICONV_LDFLAGS=
|
||||
- ICONV_LIBS=
|
||||
+ ICONV_CFLAGS=%%ICONV_CFLAGS%%
|
||||
+ ICONV_LDFLAGS=%%ICONV_LDFLAGS%%
|
||||
+ ICONV_LIBS=%%ICONV_LIBS%%
|
||||
else
|
||||
ICONV_CFLAGS=
|
||||
ICONV_LDFLAGS=
|
||||
@@ -1,20 +0,0 @@
|
||||
--- make/hotspot/lib/JvmMapfile.gmk.orig 2024-01-26 16:33:03 UTC
|
||||
+++ make/hotspot/lib/JvmMapfile.gmk
|
||||
@@ -53,7 +53,7 @@ endif
|
||||
# platform dependent.
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
- DUMP_SYMBOLS_CMD := $(NM) --defined-only *$(OBJ_SUFFIX)
|
||||
+ DUMP_SYMBOLS_CMD := $(NM) --extern-only --defined-only *$(OBJ_SUFFIX)
|
||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
||||
endif
|
||||
@@ -134,7 +134,7 @@ else ifeq ($(call isTargetOs, bsd), true)
|
||||
if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
|
||||
}'
|
||||
else
|
||||
- DUMP_SYMBOLS_CMD := $(NM) --defined-only *$(OBJ_SUFFIX)
|
||||
+ DUMP_SYMBOLS_CMD := $(NM) --extern-only --defined-only *$(OBJ_SUFFIX)
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
|
||||
@@ -1,11 +0,0 @@
|
||||
--- make/modules/java.desktop/lib/Awt2dLibraries.gmk.orig 2021-09-18 15:30:22.109237000 -0700
|
||||
+++ make/modules/java.desktop/lib/Awt2dLibraries.gmk 2021-09-18 15:31:02.024314000 -0700
|
||||
@@ -530,7 +530,7 @@
|
||||
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
|
||||
LDFLAGS_aix := -Wl$(COMMA)-berok, \
|
||||
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
|
||||
- LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
|
||||
+ LIBS_unix := -lfontconfig -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
|
||||
LIBS_macosx := -lawt_lwawt -framework CoreText -framework CoreFoundation -framework CoreGraphics, \
|
||||
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
|
||||
$(WIN_AWT_LIB), \
|
||||
@@ -1,28 +0,0 @@
|
||||
--- src/hotspot/os_cpu/bsd_ppc/javaThread_bsd_ppc.cpp.orig 2023-10-02 13:02:10 UTC
|
||||
+++ src/hotspot/os_cpu/bsd_ppc/javaThread_bsd_ppc.cpp
|
||||
@@ -58,14 +58,14 @@ bool JavaThread::pd_get_top_frame_for_profiling(frame*
|
||||
// if we were running Java code when SIGPROF came in.
|
||||
if (isInJava) {
|
||||
ucontext_t* uc = (ucontext_t*) ucontext;
|
||||
- address pc = (address)uc->uc_mcontext.regs->nip;
|
||||
+ address pc = (address)uc->uc_mcontext.mc_srr0;
|
||||
|
||||
if (pc == NULL) {
|
||||
// ucontext wasn't useful
|
||||
return false;
|
||||
}
|
||||
|
||||
- frame ret_frame((intptr_t*)uc->uc_mcontext.regs->gpr[1/*REG_SP*/], pc);
|
||||
+ frame ret_frame((intptr_t*)uc->uc_mcontext.mc_gpr[1/*REG_SP*/], pc);
|
||||
|
||||
if (ret_frame.fp() == NULL) {
|
||||
// The found frame does not have a valid frame pointer.
|
||||
@@ -84,7 +84,7 @@ bool JavaThread::pd_get_top_frame_for_profiling(frame*
|
||||
if (!Method::is_valid_method(m)) return false;
|
||||
if (!Metaspace::contains(m->constMethod())) return false;
|
||||
|
||||
- uint64_t reg_bcp = uc->uc_mcontext.regs->gpr[14/*R14_bcp*/];
|
||||
+ uint64_t reg_bcp = uc->uc_mcontext.mc_gpr[14/*R14_bcp*/];
|
||||
uint64_t istate_bcp = istate->bcp;
|
||||
uint64_t code_start = (uint64_t)(m->code_base());
|
||||
uint64_t code_end = (uint64_t)(m->code_base() + m->code_size());
|
||||
@@ -1,19 +0,0 @@
|
||||
--- src/hotspot/os_cpu/bsd_ppc/os_bsd_ppc.cpp.orig 2022-12-21 16:54:47 UTC
|
||||
+++ src/hotspot/os_cpu/bsd_ppc/os_bsd_ppc.cpp
|
||||
@@ -187,16 +187,6 @@ frame os::current_frame() {
|
||||
bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
|
||||
ucontext_t* uc, JavaThread* thread) {
|
||||
|
||||
- // Moved SafeFetch32 handling outside thread!=NULL conditional block to make
|
||||
- // it work if no associated JavaThread object exists.
|
||||
- if (uc) {
|
||||
- address const pc = os::Posix::ucontext_get_pc(uc);
|
||||
- if (pc && StubRoutines::is_safefetch_fault(pc)) {
|
||||
- os::Posix::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
|
||||
- return true;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
// decide if this trap can be handled by a stub
|
||||
address stub = NULL;
|
||||
address pc = NULL;
|
||||
@@ -1,11 +0,0 @@
|
||||
--- src/hotspot/os/bsd/os_bsd.cpp.orig 2021-09-29 21:25:10 UTC
|
||||
+++ src/hotspot/os/bsd/os_bsd.cpp
|
||||
@@ -361,7 +361,7 @@
|
||||
#elif defined(__NetBSD__)
|
||||
#define DEFAULT_LIBPATH "/usr/lib:/usr/pkg/lib"
|
||||
#else
|
||||
- #define DEFAULT_LIBPATH "/usr/lib:/usr/local/lib"
|
||||
+ #define DEFAULT_LIBPATH "/usr/lib:%%LOCALBASE%%/lib"
|
||||
#endif
|
||||
#else
|
||||
#define DEFAULT_LIBPATH OVERRIDE_LIBPATH
|
||||
@@ -1,209 +0,0 @@
|
||||
--- src/java.desktop/share/native/libfontmanager/freetypeScaler.c.orig 2020-07-08 21:34:01 UTC
|
||||
+++ src/java.desktop/share/native/libfontmanager/freetypeScaler.c
|
||||
@@ -43,6 +43,7 @@
|
||||
#include FT_SYNTHESIS_H
|
||||
#include FT_LCD_FILTER_H
|
||||
#include FT_MODULE_H
|
||||
+#include <fontconfig/fontconfig.h>
|
||||
|
||||
#include "fontscaler.h"
|
||||
|
||||
@@ -87,6 +88,133 @@ typedef struct FTScalerContext {
|
||||
int ptsz; /* size in points */
|
||||
} FTScalerContext;
|
||||
|
||||
+typedef struct {
|
||||
+ FT_Render_Mode ftRenderMode;
|
||||
+ int ftLoadFlags;
|
||||
+ FT_LcdFilter ftLcdFilter;
|
||||
+} RenderingProperties;
|
||||
+
|
||||
+static FcPattern* matchedPattern(const FcChar8* family, double ptSize) {
|
||||
+ FcPattern* pattern = FcPatternCreate();
|
||||
+ if (!pattern)
|
||||
+ return 0;
|
||||
+
|
||||
+ FcPatternAddString(pattern, FC_FAMILY, family);
|
||||
+ FcPatternAddBool(pattern, FC_SCALABLE, FcTrue);
|
||||
+ FcPatternAddDouble(pattern, FC_SIZE, ptSize);
|
||||
+
|
||||
+ FcConfigSubstitute(0, pattern, FcMatchPattern);
|
||||
+ FcDefaultSubstitute(pattern);
|
||||
+
|
||||
+ FcResult res;
|
||||
+ FcPattern *match = FcFontMatch(0, pattern, &res);
|
||||
+ FcPatternDestroy(pattern);
|
||||
+ return (res == FcResultMatch) ? match : NULL;
|
||||
+}
|
||||
+
|
||||
+static void readFontconfig(const FcChar8* family, double ptSize, jint aaType, RenderingProperties* rp) {
|
||||
+ FcPattern *pattern = matchedPattern(family, ptSize);
|
||||
+
|
||||
+ FT_Render_Mode ftRenderMode = FT_RENDER_MODE_NORMAL;
|
||||
+ int ftLoadFlags = FT_LOAD_DEFAULT;
|
||||
+ FT_LcdFilter ftLcdFilter = FT_LCD_FILTER_DEFAULT;
|
||||
+ FcBool fcAntialias = 0;
|
||||
+ char horizontal = 1;
|
||||
+
|
||||
+ // subpixel order
|
||||
+ if (aaType == TEXT_AA_ON)
|
||||
+ ftRenderMode = FT_RENDER_MODE_NORMAL;
|
||||
+ else if (aaType == TEXT_AA_OFF)
|
||||
+ ftRenderMode = FT_RENDER_MODE_MONO;
|
||||
+ else {
|
||||
+ int fcRGBA = FC_RGBA_UNKNOWN;
|
||||
+ if (pattern)
|
||||
+ FcPatternGetInteger(pattern, FC_RGBA, 0, &fcRGBA);
|
||||
+ switch (fcRGBA) {
|
||||
+ case FC_RGBA_NONE:
|
||||
+ ftRenderMode = FT_RENDER_MODE_NORMAL;
|
||||
+ break;
|
||||
+ case FC_RGBA_RGB:
|
||||
+ case FC_RGBA_BGR:
|
||||
+ ftRenderMode = FT_RENDER_MODE_LCD;
|
||||
+ horizontal = 1;
|
||||
+ break;
|
||||
+ case FC_RGBA_VRGB:
|
||||
+ case FC_RGBA_VBGR:
|
||||
+ ftRenderMode = FT_RENDER_MODE_LCD_V;
|
||||
+ horizontal = 0;
|
||||
+ break;
|
||||
+ default:
|
||||
+ ftRenderMode = FT_RENDER_MODE_NORMAL;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // loading mode
|
||||
+ if (aaType == TEXT_AA_OFF)
|
||||
+ ftLoadFlags |= FT_LOAD_TARGET_MONO;
|
||||
+ else {
|
||||
+ int fcHintStyle = FC_HINT_NONE;
|
||||
+ if (pattern)
|
||||
+ FcPatternGetInteger(pattern, FC_HINT_STYLE, 0, &fcHintStyle);
|
||||
+ switch (fcHintStyle) {
|
||||
+ case FC_HINT_NONE:
|
||||
+ ftLoadFlags |= FT_LOAD_NO_HINTING;
|
||||
+ break;
|
||||
+ case FC_HINT_SLIGHT:
|
||||
+ ftLoadFlags |= FT_LOAD_TARGET_LIGHT;
|
||||
+ break;
|
||||
+ case FC_HINT_MEDIUM:
|
||||
+ ftLoadFlags |= FT_LOAD_TARGET_NORMAL;
|
||||
+ break;
|
||||
+ case FC_HINT_FULL:
|
||||
+ if (aaType == TEXT_AA_ON)
|
||||
+ ftLoadFlags |= FT_LOAD_TARGET_NORMAL;
|
||||
+ else
|
||||
+ ftLoadFlags |= horizontal ? FT_LOAD_TARGET_LCD : FT_LOAD_TARGET_LCD_V;
|
||||
+ break;
|
||||
+ default:
|
||||
+ ftLoadFlags |= FT_LOAD_TARGET_NORMAL;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // autohinting
|
||||
+ FcBool fcAutohint = 0;
|
||||
+ if (pattern && FcPatternGetBool(pattern, FC_AUTOHINT, 0, &fcAutohint) == FcResultMatch)
|
||||
+ if (fcAutohint)
|
||||
+ ftLoadFlags |= FT_LOAD_FORCE_AUTOHINT;
|
||||
+
|
||||
+ // LCD filter
|
||||
+ int fcLCDFilter = FC_LCD_DEFAULT;
|
||||
+ if (pattern)
|
||||
+ FcPatternGetInteger(pattern, FC_LCD_FILTER, 0, &fcLCDFilter);
|
||||
+ switch (fcLCDFilter) {
|
||||
+ case FC_LCD_NONE:
|
||||
+ ftLcdFilter = FT_LCD_FILTER_NONE;
|
||||
+ break;
|
||||
+ case FC_LCD_DEFAULT:
|
||||
+ ftLcdFilter = FT_LCD_FILTER_DEFAULT;
|
||||
+ break;
|
||||
+ case FC_LCD_LIGHT:
|
||||
+ ftLcdFilter = FT_LCD_FILTER_LIGHT;
|
||||
+ break;
|
||||
+ case FC_LCD_LEGACY:
|
||||
+ ftLcdFilter = FT_LCD_FILTER_LEGACY;
|
||||
+ break;
|
||||
+ default:
|
||||
+ ftLcdFilter = FT_LCD_FILTER_DEFAULT;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (pattern)
|
||||
+ FcPatternDestroy(pattern);
|
||||
+
|
||||
+ rp->ftRenderMode = ftRenderMode;
|
||||
+ rp->ftLoadFlags = ftLoadFlags;
|
||||
+ rp->ftLcdFilter = ftLcdFilter;
|
||||
+}
|
||||
+
|
||||
#ifdef DEBUG
|
||||
/* These are referenced in the freetype sources if DEBUG macro is defined.
|
||||
To simplify work with debuging version of freetype we define
|
||||
@@ -868,29 +996,12 @@ static jlong
|
||||
renderFlags |= FT_LOAD_NO_HINTING;
|
||||
}
|
||||
|
||||
- if (!context->useSbits) {
|
||||
- renderFlags |= FT_LOAD_NO_BITMAP;
|
||||
- }
|
||||
+ RenderingProperties renderingProperties;
|
||||
+ readFontconfig((const FcChar8 *) scalerInfo->face->family_name,
|
||||
+ context->ptsz, context->aaType, &renderingProperties);
|
||||
|
||||
- /* NB: in case of non identity transform
|
||||
- we might also prefer to disable transform before hinting,
|
||||
- and apply it explicitly after hinting is performed.
|
||||
- Or we can disable hinting. */
|
||||
-
|
||||
- /* select appropriate hinting mode */
|
||||
- if (context->aaType == TEXT_AA_OFF) {
|
||||
- target = FT_LOAD_TARGET_MONO;
|
||||
- } else if (context->aaType == TEXT_AA_ON) {
|
||||
- target = FT_LOAD_TARGET_NORMAL;
|
||||
- } else if (context->aaType == TEXT_AA_LCD_HRGB ||
|
||||
- context->aaType == TEXT_AA_LCD_HBGR) {
|
||||
- target = FT_LOAD_TARGET_LCD;
|
||||
- } else {
|
||||
- target = FT_LOAD_TARGET_LCD_V;
|
||||
- }
|
||||
- renderFlags |= target;
|
||||
-
|
||||
- error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderFlags);
|
||||
+ FT_Library_SetLcdFilter(scalerInfo->library, renderingProperties.ftLcdFilter);
|
||||
+ error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderingProperties.ftLoadFlags);
|
||||
if (error) {
|
||||
//do not destroy scaler yet.
|
||||
//this can be problem of particular context (e.g. with bad transform)
|
||||
@@ -915,11 +1026,11 @@ static jlong
|
||||
glyphInfo = getNullGlyphImage();
|
||||
return ptr_to_jlong(glyphInfo);
|
||||
}
|
||||
- error = FT_Render_Glyph(ftglyph, FT_LOAD_TARGET_MODE(target));
|
||||
- if (error != 0) {
|
||||
- return ptr_to_jlong(getNullGlyphImage());
|
||||
- }
|
||||
}
|
||||
+ error = FT_Render_Glyph(ftglyph, renderingProperties.ftRenderMode);
|
||||
+ if (error != 0) {
|
||||
+ return ptr_to_jlong(getNullGlyphImage());
|
||||
+ }
|
||||
|
||||
if (renderImage) {
|
||||
width = (UInt16) ftglyph->bitmap.width;
|
||||
@@ -1134,9 +1245,11 @@ static FT_Outline* getFTOutline(JNIEnv* env, jobject f
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- renderFlags = FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
|
||||
+ RenderingProperties renderingProperties;
|
||||
+ readFontconfig((const FcChar8 *) scalerInfo->face->family_name,
|
||||
+ context->ptsz, context->aaType, &renderingProperties);
|
||||
|
||||
- error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderFlags);
|
||||
+ error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderingProperties.ftLoadFlags);
|
||||
if (error) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
--- src/jdk.management/unix/native/libmanagement_ext/OperatingSystemImpl.c.orig 2023-10-01 03:54:04 UTC
|
||||
+++ src/jdk.management/unix/native/libmanagement_ext/OperatingSystemImpl.c
|
||||
@@ -58,6 +58,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
+#include <sys/user.h>
|
||||
#include <vm/vm_param.h>
|
||||
#endif
|
||||
|
||||
@@ -177,23 +178,43 @@ Java_com_sun_management_internal_OperatingSystemImpl_g
|
||||
}
|
||||
return t_info.virtual_size;
|
||||
#elif defined(__FreeBSD__)
|
||||
- FILE *fp;
|
||||
- unsigned long end, start;
|
||||
- jlong total = 0;
|
||||
+ int mib[4];
|
||||
+ struct kinfo_vmentry *kve;
|
||||
+ long total = 0;
|
||||
+ size_t len = 0;
|
||||
+ int error;
|
||||
+ char *buf, *bp, *eb;
|
||||
|
||||
- if ((fp = fopen("/proc/curproc/map", "r")) == NULL) {
|
||||
- throw_internal_error(env, "Unable to open /proc/curproc/map");
|
||||
+ mib[0] = CTL_KERN;
|
||||
+ mib[1] = KERN_PROC;
|
||||
+ mib[2] = KERN_PROC_VMMAP;
|
||||
+ mib[3] = getpid();
|
||||
+ error = sysctl(mib, 4, NULL, &len, NULL, 0);
|
||||
+ if (error) {
|
||||
+ throw_internal_error(env, "Cannot sysctl(kern.proc.vvmap)");
|
||||
return -1;
|
||||
}
|
||||
-
|
||||
- for (;;) {
|
||||
- // Ignore everything except start and end entries
|
||||
- if (fscanf(fp, "0x%lx 0x%lx %*[^\n]\n", &start, &end) != 2 || start > end)
|
||||
- break;
|
||||
- total += end - start;
|
||||
+ len = len * 4 / 3;
|
||||
+ buf = malloc(len);
|
||||
+ if (buf == NULL) {
|
||||
+ throw_internal_error(env, "Fail to allocate memory");
|
||||
+ return -1;
|
||||
}
|
||||
-
|
||||
- fclose(fp);
|
||||
+ error = sysctl(mib, 4, buf, &len, NULL, 0);
|
||||
+ if (error) {
|
||||
+ throw_internal_error(env, "Cannot sysctl(kern.proc.vvmap)");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ bp = buf;
|
||||
+ eb = buf + len;
|
||||
+ while (bp < eb) {
|
||||
+ kve = (struct kinfo_vmentry *)(uintptr_t)bp;
|
||||
+ if (kve->kve_structsize == 0)
|
||||
+ break;
|
||||
+ bp += kve->kve_structsize;
|
||||
+ total += kve->kve_end - kve->kve_start;
|
||||
+ }
|
||||
+ free(buf);
|
||||
return total;
|
||||
#else /* _ALLBSD_SOURCE */
|
||||
/*
|
||||
@@ -403,6 +424,21 @@ Java_com_sun_management_internal_OperatingSystemImpl_g
|
||||
return nfiles;
|
||||
#elif defined(__OpenBSD__)
|
||||
return getdtablecount();
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ int mib[4];
|
||||
+ int error;
|
||||
+ int nfds;
|
||||
+ size_t len;
|
||||
+
|
||||
+ len = sizeof(nfds);
|
||||
+ mib[0] = CTL_KERN;
|
||||
+ mib[1] = KERN_PROC;
|
||||
+ mib[2] = KERN_PROC_NFDS;
|
||||
+ mib[3] = 0;
|
||||
+
|
||||
+ if (sysctl(mib, 4, &nfds, &len, NULL, 0) == -1)
|
||||
+ return -1;
|
||||
+ return nfds;
|
||||
#else /* solaris/linux */
|
||||
DIR *dirp;
|
||||
struct dirent* dentp;
|
||||
@@ -1 +0,0 @@
|
||||
An open-source implementation of the Java Platform, Standard Edition,
|
||||
@@ -1,16 +0,0 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
This OpenJDK implementation may require procfs(5) mounted on /proc for some
|
||||
applications.
|
||||
|
||||
If you have not done it yet, please do the following:
|
||||
|
||||
mount -t procfs proc /proc
|
||||
|
||||
To make it permanent, you need the following lines in /etc/fstab:
|
||||
|
||||
proc /proc procfs rw 0 0
|
||||
EOM
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user