openjdk8: 8u212 -> 8u222

This commit is contained in:
Ben Wolsieffer 2019-07-21 19:45:39 -04:00
parent 4aaaf515dc
commit 6f8f3edbda
3 changed files with 65 additions and 57 deletions

View File

@ -6,7 +6,7 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
@@ -23,6 +23,9 @@ @@ -23,6 +23,9 @@
* questions. * questions.
*/ */
+/* Use Infinality patches as default */ +/* Use Infinality patches as default */
+#define INFINALITY +#define INFINALITY
+ +
@ -21,13 +21,13 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
+#include FT_LCD_FILTER_H +#include FT_LCD_FILTER_H
+#include <fontconfig/fontconfig.h> +#include <fontconfig/fontconfig.h>
+#endif +#endif
#include "fontscaler.h" #include "fontscaler.h"
@@ -676,6 +683,147 @@ static void CopyFTSubpixelVToSubpixel(co @@ -676,6 +683,147 @@ static void CopyFTSubpixelVToSubpixel(co
} }
} }
+#ifdef INFINALITY +#ifdef INFINALITY
+typedef struct { +typedef struct {
+ FT_Render_Mode ftRenderMode; + FT_Render_Mode ftRenderMode;
@ -169,7 +169,7 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
+ rp->ftLcdFilter = ftLcdFilter; + rp->ftLcdFilter = ftLcdFilter;
+} +}
+#endif +#endif
/* /*
* Class: sun_font_FreetypeFontScaler * Class: sun_font_FreetypeFontScaler
@@ -691,7 +839,9 @@ Java_sun_font_FreetypeFontScaler_getGlyp @@ -691,7 +839,9 @@ Java_sun_font_FreetypeFontScaler_getGlyp
@ -180,28 +180,27 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
int renderFlags = FT_LOAD_RENDER, target; int renderFlags = FT_LOAD_RENDER, target;
+#endif +#endif
FT_GlyphSlot ftglyph; FT_GlyphSlot ftglyph;
FTScalerContext* context = FTScalerContext* context =
@@ -709,6 +859,11 @@ Java_sun_font_FreetypeFontScaler_getGlyp @@ -709,5 +859,10 @@ Java_sun_font_FreetypeFontScaler_getGlyp
return ptr_to_jlong(getNullGlyphImage()); return ptr_to_jlong(getNullGlyphImage());
} }
+#ifdef INFINALITY +#ifdef INFINALITY
+ RenderingProperties renderingProperties; + RenderingProperties renderingProperties;
+ readFontconfig((const FcChar8 *) scalerInfo->face->family_name, + readFontconfig((const FcChar8 *) scalerInfo->face->family_name,
+ context->ptsz, context->aaType, &renderingProperties); + context->ptsz, context->aaType, &renderingProperties);
+#else +#else
/* if algorithmic styling is required then we do not request bitmap */ if (!context->useSbits) {
if (context->doBold || context->doItalize) { renderFlags |= FT_LOAD_NO_BITMAP;
renderFlags = FT_LOAD_DEFAULT;
@@ -731,10 +886,17 @@ Java_sun_font_FreetypeFontScaler_getGlyp @@ -731,10 +886,17 @@ Java_sun_font_FreetypeFontScaler_getGlyp
target = FT_LOAD_TARGET_LCD_V; target = FT_LOAD_TARGET_LCD_V;
} }
renderFlags |= target; renderFlags |= target;
+#endif +#endif
glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode); glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
+#ifdef INFINALITY +#ifdef INFINALITY
+ FT_Library_SetLcdFilter(scalerInfo->library, renderingProperties.ftLcdFilter); + FT_Library_SetLcdFilter(scalerInfo->library, renderingProperties.ftLcdFilter);
+ error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderingProperties.ftLoadFlags); + error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderingProperties.ftLoadFlags);
@ -213,7 +212,7 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
//do not destroy scaler yet. //do not destroy scaler yet.
//this can be problem of particular context (e.g. with bad transform) //this can be problem of particular context (e.g. with bad transform)
@@ -753,9 +915,13 @@ Java_sun_font_FreetypeFontScaler_getGlyp @@ -753,9 +915,13 @@ Java_sun_font_FreetypeFontScaler_getGlyp
/* generate bitmap if it is not done yet /* generate bitmap if it is not done yet
e.g. if algorithmic styling is performed and style was added to outline */ e.g. if algorithmic styling is performed and style was added to outline */
+#ifdef INFINALITY +#ifdef INFINALITY
@ -223,7 +222,7 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
FT_Render_Glyph(ftglyph, FT_LOAD_TARGET_MODE(target)); FT_Render_Glyph(ftglyph, FT_LOAD_TARGET_MODE(target));
} }
+#endif +#endif
width = (UInt16) ftglyph->bitmap.width; width = (UInt16) ftglyph->bitmap.width;
height = (UInt16) ftglyph->bitmap.rows; height = (UInt16) ftglyph->bitmap.rows;
@@ -969,7 +1135,9 @@ Java_sun_font_FreetypeFontScaler_getGlyp @@ -969,7 +1135,9 @@ Java_sun_font_FreetypeFontScaler_getGlyp
@ -239,7 +238,7 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
@@ -984,11 +1152,22 @@ static FT_Outline* getFTOutline(JNIEnv* @@ -984,11 +1152,22 @@ static FT_Outline* getFTOutline(JNIEnv*
return NULL; return NULL;
} }
+#ifdef INFINALITY +#ifdef INFINALITY
+ RenderingProperties renderingProperties; + RenderingProperties renderingProperties;
+ readFontconfig((const FcChar8 *) scalerInfo->face->family_name, + readFontconfig((const FcChar8 *) scalerInfo->face->family_name,
@ -247,9 +246,9 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
+#else +#else
renderFlags = FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP; renderFlags = FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
+#endif +#endif
glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode); glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
+#ifdef INFINALITY +#ifdef INFINALITY
+ error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderingProperties.ftLoadFlags); + error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderingProperties.ftLoadFlags);
+#else +#else

View File

@ -20,8 +20,8 @@ let
"aarch64-linux" = "aarch64"; "aarch64-linux" = "aarch64";
}.${stdenv.system} or (throw "Unsupported platform"); }.${stdenv.system} or (throw "Unsupported platform");
update = "212"; update = "222";
build = if stdenv.isAarch64 then "b04" build = if stdenv.isAarch64 then "b10"
else "ga"; else "ga";
baseurl = if stdenv.isAarch64 then "https://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah" baseurl = if stdenv.isAarch64 then "https://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah"
else "https://hg.openjdk.java.net/jdk8u/jdk8u"; else "https://hg.openjdk.java.net/jdk8u/jdk8u";
@ -31,50 +31,50 @@ let
jdk8 = fetchurl { jdk8 = fetchurl {
name = "jdk8-${repover}.tar.gz"; name = "jdk8-${repover}.tar.gz";
url = "${baseurl}/archive/${repover}.tar.gz"; url = "${baseurl}/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "0z2n2b5f1jmdzycb7ppqz3dx5sf1rwwd3fvk15zq4cm7908wapjw" sha256 = if stdenv.isAarch64 then "1h19zpmc76f8v4s0mfvqxmxvv8imdwq92z5dmgi19y4xnl978qq8"
else "00rl33h4cl4b4p3hcid765h38x2jdkb14ylh8k1zhnd0ka76crgg"; else "19dyqayn8n2y08p08g34xxnf0dkm6bfjxkp7633m7dx50mjcpxnj";
}; };
langtools = fetchurl { langtools = fetchurl {
name = "langtools-${repover}.tar.gz"; name = "langtools-${repover}.tar.gz";
url = "${baseurl}/langtools/archive/${repover}.tar.gz"; url = "${baseurl}/langtools/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "0j0fbxj7fkl8bn8lq3s3sssa26hskaf8c9rmsay8r91m4vnxisv1" sha256 = if stdenv.isAarch64 then "09phy2izw2yyp3hnw7jmb7lp559dgnp2a0rymx1k3q97anfz3bzj"
else "0va6g2dccf1ph6mpwxswbks5axp7zz258cl89qq9r8jn4ni04agw"; else "11nibmqnf7nap10sydk57gimgwpxqk5mn12dyg6fzg4s2fxf0y1q";
}; };
hotspot = fetchurl { hotspot = fetchurl {
name = "hotspot-${repover}.tar.gz"; name = "hotspot-${repover}.tar.gz";
url = "${baseurl}/hotspot/archive/${repover}.tar.gz"; url = "${baseurl}/hotspot/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "1ld76jx0v1z6755a61k5da0cks7dqwvwc5l8rvyw9r9py1n7421w" sha256 = if stdenv.isAarch64 then "1dqrzg2af94pjam6jg9nq8ydaibn4bsjv7ai6m7m3r2ph2fml80s"
else "0sgr9df10hs49pjld6c6kr374v4zwd9s52pc3drz68zrlk71ja4s"; else "1g512xrrxvnrk5szg7wqqz00x4gv53dx3yffk5im2zfcalyka2q7";
}; };
corba = fetchurl { corba = fetchurl {
name = "corba-${repover}.tar.gz"; name = "corba-${repover}.tar.gz";
url = "${baseurl}/corba/archive/${repover}.tar.gz"; url = "${baseurl}/corba/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "1jcw90y3d8rnvqpiyyvsx976f5i8d60p0d6652v4mz41pyjjhyw5" sha256 = if stdenv.isAarch64 then "15l1ccvk2slx8wf5gilzjvhc428hl57gg1knbma1jqgs3ymnqwpr"
else "1hq0sr4k4k4iv815kg72i9lvd7n7mn5pmw96ckk9p1rnyagn9z03"; else "0h8nprfzpy21mfl39fxxzfa420skwmaaji4r31j7lj3g8c1wp62r";
}; };
jdk = fetchurl { jdk = fetchurl {
name = "jdk-${repover}.tar.gz"; name = "jdk-${repover}.tar.gz";
url = "${baseurl}/jdk/archive/${repover}.tar.gz"; url = "${baseurl}/jdk/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "19mnlw7igxblxx8qp6l9rn2w0xw1akdx2v1rw6pq14d03dgwby22" sha256 = if stdenv.isAarch64 then "179ij3rs1ahl6dh3n64k4xp2prv413ckqk7sj1g5lw48rj7bjh83"
else "1fc59jrbfq8l067mggzy5dnrvni7lwaqd7hahs4nqv87kyrfg545"; else "1sb38h0rckgkr2y0kfzav6mb74nv5whb9l8m842mv1jpavxrdv6k";
}; };
jaxws = fetchurl { jaxws = fetchurl {
name = "jaxws-${repover}.tar.gz"; name = "jaxws-${repover}.tar.gz";
url = "${baseurl}/jaxws/archive/${repover}.tar.gz"; url = "${baseurl}/jaxws/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "1dvlcj5jrwia08im1is9ms6r619jvzkhyg3ls0czh2yycabg6p51" sha256 = if stdenv.isAarch64 then "16bayw7c4vzm9s0ixhw2dv6pan6wywyiddh9a8dss35660dnhrm0"
else "1ka2fvyxdmpfhk814s314gx53yvdr19vpsqygx283v9nbq90l1yg"; else "0akn5zapff5m32ibgm3f4lhgq96bsqx74g4xl38xmivvxddsd6kz";
}; };
jaxp = fetchurl { jaxp = fetchurl {
name = "jaxp-${repover}.tar.gz"; name = "jaxp-${repover}.tar.gz";
url = "${baseurl}/jaxp/archive/${repover}.tar.gz"; url = "${baseurl}/jaxp/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "1imz7bsiqhhh5qx8hjpm46y7a4j282vmdd6xljz8n148vml2p936" sha256 = if stdenv.isAarch64 then "176db7pi2irc7q87c273cjm5nrlj5g973fjmh24m6a1jxanrrm9x"
else "15vlgs5v2ax8sqwh7bg50fnlrwlpnkp0myzrvpqs1mcza8pyasp8"; else "0bw4q8yhmrl8hqlimy1ijnarav4r91dj73lpr7axba77rqlr41c8";
}; };
nashorn = fetchurl { nashorn = fetchurl {
name = "nashorn-${repover}.tar.gz"; name = "nashorn-${repover}.tar.gz";
url = "${baseurl}/nashorn/archive/${repover}.tar.gz"; url = "${baseurl}/nashorn/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "0rnrzz42f3ismhwj05sim7d05wccp5bcr5rhxgnvs3hjqaqvq51n" sha256 = if stdenv.isAarch64 then "0vi3kbsqfpdjxc08ayxk2c87zycd7z0qbqw9xka1vc59iyv97n62"
else "1jzn0yi0v6lda5y8ib07g1p6zymnbcx9yy6iz8niggpm7205y93h"; else "0bfcf3iv2lr0xlp6sclxq7zz7b9ahajl008hz5rasjnrnr993qja";
}; };
openjdk8 = stdenv.mkDerivation { openjdk8 = stdenv.mkDerivation {
pname = "openjdk" + lib.optionalString headless "-headless"; pname = "openjdk" + lib.optionalString headless "-headless";

View File

@ -1,21 +1,30 @@
diff -ur openjdk-7u65-b32/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java openjdk-7u65-b32.new/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java --- a/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java 2017-06-26 21:48:25.000000000 -0400
--- openjdk-7u65-b32/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2014-07-17 12:12:14.000000000 +0200 +++ b/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java 2017-07-05 20:45:57.491295030 -0400
+++ openjdk-7u65-b32.new/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2014-12-09 13:31:27.821960372 +0100 @@ -71,6 +71,7 @@
@@ -161,6 +161,7 @@ *
/* * The preference of the default trusted KeyStore is:
* Try: * javax.net.ssl.trustStore
* javax.net.ssl.trustStore (if this variable exists, stop) + * system environment variable JAVAX_NET_SSL_TRUSTSTORE
+ * system environment variable JAVAX_NET_SSL_TRUSTSTORE * jssecacerts
* jssecacerts * cacerts
* cacerts */
* @@ -132,7 +133,8 @@
@@ -169,6 +169,9 @@ public TrustStoreDescriptor run() {
// Get the system properties for trust store.
try { String storePropName = System.getProperty(
storeFileName = props.get("trustStore"); - "javax.net.ssl.trustStore", jsseDefaultStore);
+ if (storeFileName == null) { + "javax.net.ssl.trustStore",
+ storeFileName = System.getenv("JAVAX_NET_SSL_TRUSTSTORE"); + System.getenv("JAVAX_NET_SSL_TRUSTSTORE"));
+ } String storePropType = System.getProperty(
if (!"NONE".equals(storeFileName)) { "javax.net.ssl.trustStoreType",
if (storeFileName != null) { KeyStore.getDefaultType());
storeFile = new File(storeFileName); @@ -144,6 +146,9 @@
String temporaryName = "";
File temporaryFile = null;
long temporaryTime = 0L;
+ if (storePropName == null) {
+ storePropName = jsseDefaultStore;
+ }
if (!"NONE".equals(storePropName)) {
String[] fileNames =
new String[] {storePropName, defaultStore};