From owner-svn-ports-all@freebsd.org Thu Oct 17 23:45:39 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 30B3F16080A; Thu, 17 Oct 2019 23:45:39 +0000 (UTC) (envelope-from glewis@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46vQlR0DCdz3NsV; Thu, 17 Oct 2019 23:45:39 +0000 (UTC) (envelope-from glewis@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E035A336; Thu, 17 Oct 2019 23:45:38 +0000 (UTC) (envelope-from glewis@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9HNjcEV047425; Thu, 17 Oct 2019 23:45:38 GMT (envelope-from glewis@FreeBSD.org) Received: (from glewis@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9HNjcJm047424; Thu, 17 Oct 2019 23:45:38 GMT (envelope-from glewis@FreeBSD.org) Message-Id: <201910172345.x9HNjcJm047424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glewis set sender to glewis@FreeBSD.org using -f From: Greg Lewis Date: Thu, 17 Oct 2019 23:45:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r514691 - head/java/openjdk8/files X-SVN-Group: ports-head X-SVN-Commit-Author: glewis X-SVN-Commit-Paths: head/java/openjdk8/files X-SVN-Commit-Revision: 514691 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Oct 2019 23:45:39 -0000 Author: glewis Date: Thu Oct 17 23:45:38 2019 New Revision: 514691 URL: https://svnweb.freebsd.org/changeset/ports/514691 Log: Fix build with FONTCONFIG * This gets the fontconfig patch applying cleanly and building. No idea if it actually works or not. PR: 241294 Modified: head/java/openjdk8/files/fontconfig.patch Modified: head/java/openjdk8/files/fontconfig.patch ============================================================================== --- head/java/openjdk8/files/fontconfig.patch Thu Oct 17 22:39:05 2019 (r514690) +++ head/java/openjdk8/files/fontconfig.patch Thu Oct 17 23:45:38 2019 (r514691) @@ -1,17 +1,17 @@ --- jdk/src/share/native/sun/font/freetypeScaler.c.orig 2017-01-20 17:04:07 UTC +++ jdk/src/share/native/sun/font/freetypeScaler.c -@@ -38,6 +38,8 @@ - #include FT_SIZES_H +@@ -42,6 +42,8 @@ #include FT_OUTLINE_H #include FT_SYNTHESIS_H + #include FT_MODULE_H +#include FT_LCD_FILTER_H +#include #include "fontscaler.h" -@@ -693,6 +695,132 @@ static void CopyFTSubpixelVToSubpixel(co - } - } +@@ -87,6 +89,133 @@ + int ptsz; /* size in points */ + } FTScalerContext; +typedef struct { + FT_Render_Mode ftRenderMode; @@ -139,20 +139,18 @@ + rp->ftLoadFlags = ftLoadFlags; + rp->ftLcdFilter = ftLcdFilter; +} - - /* - * Class: sun_font_FreetypeFontScaler -@@ -698,31 +826,15 @@ ++ + #ifdef DEBUG + /* These are referenced in the freetype sources if DEBUG macro is defined. + To simplify work with debuging version of freetype we define +@@ -809,31 +938,14 @@ return ptr_to_jlong(getNullGlyphImage()); } - 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. @@ -170,28 +168,34 @@ - target = FT_LOAD_TARGET_LCD_V; - } - renderFlags |= target; -- ++ RenderingProperties renderingProperties; ++ readFontconfig((const FcChar8 *) scalerInfo->face->family_name, ++ context->ptsz, context->aaType, &renderingProperties); + glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode); - 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) -@@ -770,9 +877,7 @@ Java_sun_font_FreetypeFontScaler_getGlyp +@@ -862,10 +974,10 @@ + 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()); + } - /* generate bitmap if it is not done yet - e.g. if algorithmic styling is performed and style was added to outline */ -- if (ftglyph->format == FT_GLYPH_FORMAT_OUTLINE) { -- FT_Render_Glyph(ftglyph, FT_LOAD_TARGET_MODE(target)); -- } -+ FT_Render_Glyph(ftglyph, renderingProperties.ftRenderMode); - width = (UInt16) ftglyph->bitmap.width; - height = (UInt16) ftglyph->bitmap.rows; -@@ -1001,11 +1106,14 @@ static FT_Outline* getFTOutline(JNIEnv* +@@ -1100,11 +1211,14 @@ return NULL; }