mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-16 13:31:26 +02:00
added firefox78, openjdk17, llvm13; updated libnss, libnspr, rustc
This commit is contained in:
BIN
java/openjdk17/files/cacerts
Normal file
BIN
java/openjdk17/files/cacerts
Normal file
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
--- src/hotspot/cpu/ppc/vm_version_ppc.hpp.orig 2019-10-16 11:31:09.000000000 -0700
|
||||
+++ src/hotspot/cpu/ppc/vm_version_ppc.hpp 2019-10-23 12:54:06.972903000 -0700
|
||||
@@ -108,7 +108,7 @@
|
||||
static bool has_lqarx() { return (_features & lqarx_m) != 0; }
|
||||
static bool has_vcipher() { return (_features & vcipher_m) != 0; }
|
||||
static bool has_vpmsumb() { return (_features & vpmsumb_m) != 0; }
|
||||
- static bool has_mfdscr() { return (_features & mfdscr_m) != 0; }
|
||||
+ static bool has_mfdscr() { return false; }
|
||||
static bool has_vsx() { return (_features & vsx_m) != 0; }
|
||||
static bool has_ldbrx() { return (_features & ldbrx_m) != 0; }
|
||||
static bool has_stdbrx() { return (_features & stdbrx_m) != 0; }
|
||||
6
java/openjdk17/files/man.conf.in
Normal file
6
java/openjdk17/files/man.conf.in
Normal file
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
MANPATH %%PREFIX%%/%%PORTNAME%%/man
|
||||
#EOF
|
||||
|
||||
14
java/openjdk17/files/patch-configure
Normal file
14
java/openjdk17/files/patch-configure
Normal file
@@ -0,0 +1,14 @@
|
||||
--- 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 "$@"
|
||||
13
java/openjdk17/files/patch-make_autoconf_flags-cflags.m4
Normal file
13
java/openjdk17/files/patch-make_autoconf_flags-cflags.m4
Normal file
@@ -0,0 +1,13 @@
|
||||
--- 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
|
||||
15
java/openjdk17/files/patch-make_autoconf_libraries.m4
Normal file
15
java/openjdk17/files/patch-make_autoconf_libraries.m4
Normal file
@@ -0,0 +1,15 @@
|
||||
--- 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=
|
||||
@@ -0,0 +1,11 @@
|
||||
--- 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), \
|
||||
11
java/openjdk17/files/patch-src_hotspot_os_bsd_os__bsd.cpp
Normal file
11
java/openjdk17/files/patch-src_hotspot_os_bsd_os__bsd.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
--- 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
|
||||
@@ -0,0 +1,209 @@
|
||||
--- 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;
|
||||
}
|
||||
Reference in New Issue
Block a user