3
0
Fork 0
forked from mirrors/nixpkgs

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 @@
* questions.
*/
+/* Use Infinality patches as default */
+#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 <fontconfig/fontconfig.h>
+#endif
#include "fontscaler.h"
@@ -676,6 +683,147 @@ static void CopyFTSubpixelVToSubpixel(co
}
}
+#ifdef INFINALITY
+typedef struct {
+ 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;
+}
+#endif
/*
* Class: sun_font_FreetypeFontScaler
@@ -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;
+#endif
FT_GlyphSlot ftglyph;
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());
}
+#ifdef INFINALITY
+ RenderingProperties renderingProperties;
+ readFontconfig((const FcChar8 *) scalerInfo->face->family_name,
+ context->ptsz, context->aaType, &renderingProperties);
+#else
/* if algorithmic styling is required then we do not request bitmap */
if (context->doBold || context->doItalize) {
renderFlags = FT_LOAD_DEFAULT;
if (!context->useSbits) {
renderFlags |= FT_LOAD_NO_BITMAP;
@@ -731,10 +886,17 @@ Java_sun_font_FreetypeFontScaler_getGlyp
target = FT_LOAD_TARGET_LCD_V;
}
renderFlags |= target;
+#endif
glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
+#ifdef INFINALITY
+ FT_Library_SetLcdFilter(scalerInfo->library, renderingProperties.ftLcdFilter);
+ 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.
//this can be problem of particular context (e.g. with bad transform)
@@ -753,9 +915,13 @@ Java_sun_font_FreetypeFontScaler_getGlyp
/* generate bitmap if it is not done yet
e.g. if algorithmic styling is performed and style was added to outline */
+#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));
}
+#endif
width = (UInt16) ftglyph->bitmap.width;
height = (UInt16) ftglyph->bitmap.rows;
@@ -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*
return NULL;
}
+#ifdef INFINALITY
+ RenderingProperties renderingProperties;
+ 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
renderFlags = FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
+#endif
glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
+#ifdef INFINALITY
+ error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderingProperties.ftLoadFlags);
+#else

View file

@ -20,8 +20,8 @@ let
"aarch64-linux" = "aarch64";
}.${stdenv.system} or (throw "Unsupported platform");
update = "212";
build = if stdenv.isAarch64 then "b04"
update = "222";
build = if stdenv.isAarch64 then "b10"
else "ga";
baseurl = if stdenv.isAarch64 then "https://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah"
else "https://hg.openjdk.java.net/jdk8u/jdk8u";
@ -31,50 +31,50 @@ let
jdk8 = fetchurl {
name = "jdk8-${repover}.tar.gz";
url = "${baseurl}/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "0z2n2b5f1jmdzycb7ppqz3dx5sf1rwwd3fvk15zq4cm7908wapjw"
else "00rl33h4cl4b4p3hcid765h38x2jdkb14ylh8k1zhnd0ka76crgg";
sha256 = if stdenv.isAarch64 then "1h19zpmc76f8v4s0mfvqxmxvv8imdwq92z5dmgi19y4xnl978qq8"
else "19dyqayn8n2y08p08g34xxnf0dkm6bfjxkp7633m7dx50mjcpxnj";
};
langtools = fetchurl {
name = "langtools-${repover}.tar.gz";
url = "${baseurl}/langtools/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "0j0fbxj7fkl8bn8lq3s3sssa26hskaf8c9rmsay8r91m4vnxisv1"
else "0va6g2dccf1ph6mpwxswbks5axp7zz258cl89qq9r8jn4ni04agw";
sha256 = if stdenv.isAarch64 then "09phy2izw2yyp3hnw7jmb7lp559dgnp2a0rymx1k3q97anfz3bzj"
else "11nibmqnf7nap10sydk57gimgwpxqk5mn12dyg6fzg4s2fxf0y1q";
};
hotspot = fetchurl {
name = "hotspot-${repover}.tar.gz";
url = "${baseurl}/hotspot/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "1ld76jx0v1z6755a61k5da0cks7dqwvwc5l8rvyw9r9py1n7421w"
else "0sgr9df10hs49pjld6c6kr374v4zwd9s52pc3drz68zrlk71ja4s";
sha256 = if stdenv.isAarch64 then "1dqrzg2af94pjam6jg9nq8ydaibn4bsjv7ai6m7m3r2ph2fml80s"
else "1g512xrrxvnrk5szg7wqqz00x4gv53dx3yffk5im2zfcalyka2q7";
};
corba = fetchurl {
name = "corba-${repover}.tar.gz";
url = "${baseurl}/corba/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "1jcw90y3d8rnvqpiyyvsx976f5i8d60p0d6652v4mz41pyjjhyw5"
else "1hq0sr4k4k4iv815kg72i9lvd7n7mn5pmw96ckk9p1rnyagn9z03";
sha256 = if stdenv.isAarch64 then "15l1ccvk2slx8wf5gilzjvhc428hl57gg1knbma1jqgs3ymnqwpr"
else "0h8nprfzpy21mfl39fxxzfa420skwmaaji4r31j7lj3g8c1wp62r";
};
jdk = fetchurl {
name = "jdk-${repover}.tar.gz";
url = "${baseurl}/jdk/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "19mnlw7igxblxx8qp6l9rn2w0xw1akdx2v1rw6pq14d03dgwby22"
else "1fc59jrbfq8l067mggzy5dnrvni7lwaqd7hahs4nqv87kyrfg545";
sha256 = if stdenv.isAarch64 then "179ij3rs1ahl6dh3n64k4xp2prv413ckqk7sj1g5lw48rj7bjh83"
else "1sb38h0rckgkr2y0kfzav6mb74nv5whb9l8m842mv1jpavxrdv6k";
};
jaxws = fetchurl {
name = "jaxws-${repover}.tar.gz";
url = "${baseurl}/jaxws/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "1dvlcj5jrwia08im1is9ms6r619jvzkhyg3ls0czh2yycabg6p51"
else "1ka2fvyxdmpfhk814s314gx53yvdr19vpsqygx283v9nbq90l1yg";
sha256 = if stdenv.isAarch64 then "16bayw7c4vzm9s0ixhw2dv6pan6wywyiddh9a8dss35660dnhrm0"
else "0akn5zapff5m32ibgm3f4lhgq96bsqx74g4xl38xmivvxddsd6kz";
};
jaxp = fetchurl {
name = "jaxp-${repover}.tar.gz";
url = "${baseurl}/jaxp/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "1imz7bsiqhhh5qx8hjpm46y7a4j282vmdd6xljz8n148vml2p936"
else "15vlgs5v2ax8sqwh7bg50fnlrwlpnkp0myzrvpqs1mcza8pyasp8";
sha256 = if stdenv.isAarch64 then "176db7pi2irc7q87c273cjm5nrlj5g973fjmh24m6a1jxanrrm9x"
else "0bw4q8yhmrl8hqlimy1ijnarav4r91dj73lpr7axba77rqlr41c8";
};
nashorn = fetchurl {
name = "nashorn-${repover}.tar.gz";
url = "${baseurl}/nashorn/archive/${repover}.tar.gz";
sha256 = if stdenv.isAarch64 then "0rnrzz42f3ismhwj05sim7d05wccp5bcr5rhxgnvs3hjqaqvq51n"
else "1jzn0yi0v6lda5y8ib07g1p6zymnbcx9yy6iz8niggpm7205y93h";
sha256 = if stdenv.isAarch64 then "0vi3kbsqfpdjxc08ayxk2c87zycd7z0qbqw9xka1vc59iyv97n62"
else "0bfcf3iv2lr0xlp6sclxq7zz7b9ahajl008hz5rasjnrnr993qja";
};
openjdk8 = stdenv.mkDerivation {
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
--- openjdk-7u65-b32/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2014-07-17 12:12:14.000000000 +0200
+++ openjdk-7u65-b32.new/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2014-12-09 13:31:27.821960372 +0100
@@ -161,6 +161,7 @@
/*
* Try:
* javax.net.ssl.trustStore (if this variable exists, stop)
+ * system environment variable JAVAX_NET_SSL_TRUSTSTORE
* jssecacerts
* cacerts
*
@@ -169,6 +169,9 @@
try {
storeFileName = props.get("trustStore");
+ if (storeFileName == null) {
+ storeFileName = System.getenv("JAVAX_NET_SSL_TRUSTSTORE");
+ }
if (!"NONE".equals(storeFileName)) {
if (storeFileName != null) {
storeFile = new File(storeFileName);
--- a/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java 2017-06-26 21:48:25.000000000 -0400
+++ b/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java 2017-07-05 20:45:57.491295030 -0400
@@ -71,6 +71,7 @@
*
* The preference of the default trusted KeyStore is:
* javax.net.ssl.trustStore
+ * system environment variable JAVAX_NET_SSL_TRUSTSTORE
* jssecacerts
* cacerts
*/
@@ -132,7 +133,8 @@
public TrustStoreDescriptor run() {
// Get the system properties for trust store.
String storePropName = System.getProperty(
- "javax.net.ssl.trustStore", jsseDefaultStore);
+ "javax.net.ssl.trustStore",
+ System.getenv("JAVAX_NET_SSL_TRUSTSTORE"));
String storePropType = System.getProperty(
"javax.net.ssl.trustStoreType",
KeyStore.getDefaultType());
@@ -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};