Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jun 2017 00:36:33 +0000 (UTC)
From:      "Carlos J. Puga Medina" <cpm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r444531 - in head/www/chromium: . files
Message-ID:  <201706280036.v5S0aXNT001869@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cpm
Date: Wed Jun 28 00:36:33 2017
New Revision: 444531
URL: https://svnweb.freebsd.org/changeset/ports/444531

Log:
  www/chromium: update to 59.0.3071.115
  
  - Add my LOCAL to MASTER_SITES to provide FreeType source. This makes possible to build chromium from this tarball.
  - Backport several patches from OpenBSD to enable SwiftShader.
  
  Changelog: https://chromium.googlesource.com/chromium/src/+log/59.0.3071.109..59.0.3071.115?pretty=fuller&n=10000

Added:
  head/www/chromium/files/patch-base_i18n_icu__util.cc   (contents, props changed)
  head/www/chromium/files/patch-third__party_skia_src_ports_SkFontHost_FreeType_common.cpp   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_BUILD.gn   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_src_Common_MutexLock.hpp   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_src_Common_SharedLibrary.hpp   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_src_Common_Socket.cpp   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_Display.cpp   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_EGLSurface.cpp   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_libEGL.cpp   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_libEGL.hpp   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libGLES_CM_libGLES_CM.hpp   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libGLESv2_libGLESv2.hpp   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_third_party_llvm-subzero_build_Linux_include_llvm_Config_config.h   (contents, props changed)
  head/www/chromium/files/patch-v8_src_trap-handler_handler-inside.cc   (contents, props changed)
Modified:
  head/www/chromium/Makefile
  head/www/chromium/distinfo
  head/www/chromium/files/patch-chrome_browser_ui_webui_about__ui.cc

Modified: head/www/chromium/Makefile
==============================================================================
--- head/www/chromium/Makefile	Wed Jun 28 00:25:27 2017	(r444530)
+++ head/www/chromium/Makefile	Wed Jun 28 00:36:33 2017	(r444531)
@@ -2,10 +2,12 @@
 # $FreeBSD$
 
 PORTNAME=	chromium
-PORTVERSION=	59.0.3071.109
+PORTVERSION=	59.0.3071.115
 CATEGORIES=	www
-MASTER_SITES=	https://commondatastorage.googleapis.com/chromium-browser-official/
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX} # default, but needed to get distinfo correct if TEST is on
+MASTER_SITES=	https://commondatastorage.googleapis.com/chromium-browser-official/:source1 \
+		LOCAL/cpm:source2
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:source1 \
+		${PORTNAME}-freetype2${EXTRACT_SUFX}:source2
 
 MAINTAINER=	chromium@FreeBSD.org
 COMMENT=	Google web browser based on WebKit
@@ -139,7 +141,7 @@ SNDIO_VARS=		GN_ARGS+=use_sndio=true
 SNDIO_VARS_OFF=		GN_ARGS+=use_sndio=false
 
 DRIVER_MAKE_ARGS=chromedriver
-TEST_DISTFILES=	${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX}
+TEST_DISTFILES=	${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX}:source1
 
 .include <bsd.port.options.mk>
 
@@ -222,6 +224,9 @@ pre-everything::
 	@${ECHO_MSG} "and a fair amount of free diskspace (~ 3.7GB)."
 .endif
 	@${ECHO_MSG}
+
+post-extract:
+	@${MV} ${WRKDIR}/freetype2 ${WRKSRC}/third_party/freetype/src
 
 post-patch-SNDIO-on:
 	@${MKDIR} ${WRKSRC}/media/audio/sndio ${WRKSRC}/media/audio/openbsd

Modified: head/www/chromium/distinfo
==============================================================================
--- head/www/chromium/distinfo	Wed Jun 28 00:25:27 2017	(r444530)
+++ head/www/chromium/distinfo	Wed Jun 28 00:36:33 2017	(r444531)
@@ -1,5 +1,7 @@
-TIMESTAMP = 1498132680
-SHA256 (chromium-59.0.3071.109.tar.xz) = 83faeb3537428d83728258b28e907caaee6e6572bcd7d9b9a5f6009e7ea758d9
-SIZE (chromium-59.0.3071.109.tar.xz) = 531839168
-SHA256 (chromium-59.0.3071.109-testdata.tar.xz) = 211447bd78861623329ab39f6611b7caccc69c483d616adcd9610def524699b0
-SIZE (chromium-59.0.3071.109-testdata.tar.xz) = 124235432
+TIMESTAMP = 1498576960
+SHA256 (chromium-59.0.3071.115.tar.xz) = 37cbc9955ae3b25cd4e9851a82ea97a0035021cc90658902938ad1c20f263170
+SIZE (chromium-59.0.3071.115.tar.xz) = 530808448
+SHA256 (chromium-freetype2.tar.xz) = 5bcb3d3da82905b2077ae0dcca52b99a25344c7e8dbdcd52691d69ab269356e3
+SIZE (chromium-freetype2.tar.xz) = 22847212
+SHA256 (chromium-59.0.3071.115-testdata.tar.xz) = a66e7b4a8f6002fe64b2b5609deb6eff2a0da442cb68e22ce404023021f20852
+SIZE (chromium-59.0.3071.115-testdata.tar.xz) = 124229320

Added: head/www/chromium/files/patch-base_i18n_icu__util.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-base_i18n_icu__util.cc	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,20 @@
+--- base/i18n/icu_util.cc.orig	2017-06-09 16:50:47.670684000 +0200
++++ base/i18n/icu_util.cc	2017-06-09 16:52:10.911955000 +0200
+@@ -20,7 +20,7 @@
+ #include "build/build_config.h"
+ #include "third_party/icu/source/common/unicode/putil.h"
+ #include "third_party/icu/source/common/unicode/udata.h"
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #include "third_party/icu/source/i18n/unicode/timezone.h"
+ #endif
+ 
+@@ -298,7 +298,7 @@
+ // TODO(jungshik): Some callers do not care about tz at all. If necessary,
+ // add a boolean argument to this function to init'd the default tz only
+ // when requested.
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   if (result)
+     std::unique_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
+ #endif

Modified: head/www/chromium/files/patch-chrome_browser_ui_webui_about__ui.cc
==============================================================================
--- head/www/chromium/files/patch-chrome_browser_ui_webui_about__ui.cc	Wed Jun 28 00:25:27 2017	(r444530)
+++ head/www/chromium/files/patch-chrome_browser_ui_webui_about__ui.cc	Wed Jun 28 00:36:33 2017	(r444531)
@@ -1,6 +1,6 @@
---- chrome/browser/ui/webui/about_ui.cc.orig	2017-06-05 19:03:03 UTC
-+++ chrome/browser/ui/webui/about_ui.cc
-@@ -420,7 +420,7 @@ std::string ChromeURLs() {
+--- chrome/browser/ui/webui/about_ui.cc.orig	2017-06-21 00:03:13.000000000 +0200
++++ chrome/browser/ui/webui/about_ui.cc	2017-06-27 01:22:41.801626000 +0200
+@@ -420,7 +420,7 @@
    return html;
  }
  
@@ -9,7 +9,7 @@
  
  const char kAboutDiscardsRunCommand[] = "run";
  
-@@ -539,7 +539,7 @@ std::string AboutDiscards(const std::string& path) {
+@@ -539,11 +539,13 @@
    output.append(base::StringPrintf("<a href='%s%s'>Discard tab now</a>",
                                     chrome::kChromeUIDiscardsURL,
                                     kAboutDiscardsRunCommand));
@@ -17,16 +17,20 @@
 +#if !defined(OS_BSD)
    base::SystemMemoryInfoKB meminfo;
    base::GetSystemMemoryInfo(&meminfo);
++#endif
    output.append("<h3>System memory information in MB</h3>");
-@@ -551,6 +551,7 @@ std::string AboutDiscards(const std::string& path) {
-       "Free",
-       base::IntToString(base::SysInfo::AmountOfAvailablePhysicalMemory() /
-                         1024 / 1024)));
+   output.append("<table>");
++#if !defined(OS_BSD)
+   // Start with summary statistics.
+   output.append(AddStringRow(
+       "Total", base::IntToString(meminfo.total / 1024)));
+@@ -575,12 +577,13 @@
+   output.append(AddStringRow(
+       "Graphics", base::IntToString(meminfo.gem_size / 1024 / 1024)));
+ #endif  // OS_CHROMEOS
 +#endif
- #if defined(OS_CHROMEOS)
-   int mem_allocated_kb = meminfo.active_anon + meminfo.inactive_anon;
- #if defined(ARCH_CPU_ARM_FAMILY)
-@@ -580,7 +581,7 @@ std::string AboutDiscards(const std::string& path) {
+   output.append("</table>");
+   AppendFooter(&output);
    return output;
  }
  
@@ -35,7 +39,7 @@
  
  // AboutDnsHandler bounces the request back to the IO thread to collect
  // the DNS information.
-@@ -642,7 +643,7 @@ class AboutDnsHandler : public base::RefCountedThreadS
+@@ -642,7 +645,7 @@
    DISALLOW_COPY_AND_ASSIGN(AboutDnsHandler);
  };
  
@@ -44,7 +48,7 @@
  std::string AboutLinuxProxyConfig() {
    std::string data;
    AppendHeader(&data, 0,
-@@ -717,14 +718,14 @@ void AboutUIHTMLSource::StartDataRequest(
+@@ -717,14 +720,14 @@
      } else {
        response = raw_response.as_string();
      }

Added: head/www/chromium/files/patch-third__party_skia_src_ports_SkFontHost_FreeType_common.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_skia_src_ports_SkFontHost_FreeType_common.cpp	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,140 @@
+--- third_party/skia/src/ports/SkFontHost_FreeType_common.cpp.orig	2017-06-27 15:42:02.870865000 +0200
++++ third_party/skia/src/ports/SkFontHost_FreeType_common.cpp	2017-06-27 15:55:12.348145000 +0200
+@@ -395,8 +395,6 @@
+     switch ( face->glyph->format ) {
+         case FT_GLYPH_FORMAT_OUTLINE: {
+             FT_Outline* outline = &face->glyph->outline;
+-            FT_BBox     bbox;
+-            FT_Bitmap   target;
+ 
+             int dx = 0, dy = 0;
+             if (fRec.fFlags & SkScalerContext::kSubpixelPositioning_Flag) {
+@@ -405,36 +403,97 @@
+                 // negate dy since freetype-y-goes-up and skia-y-goes-down
+                 dy = -dy;
+             }
+-            FT_Outline_Get_CBox(outline, &bbox);
+-            /*
+-                what we really want to do for subpixel is
+-                    offset(dx, dy)
+-                    compute_bounds
+-                    offset(bbox & !63)
+-                but that is two calls to offset, so we do the following, which
+-                achieves the same thing with only one offset call.
+-            */
+-            FT_Outline_Translate(outline, dx - ((bbox.xMin + dx) & ~63),
+-                                          dy - ((bbox.yMin + dy) & ~63));
+ 
++            memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight);
++
+             if (SkMask::kLCD16_Format == glyph.fMaskFormat) {
++                FT_Outline_Translate(outline, dx, dy);
+                 FT_Error err = FT_Render_Glyph(face->glyph, doVert ? FT_RENDER_MODE_LCD_V :
+                                                                      FT_RENDER_MODE_LCD);
+                 if (err) {
+                     SK_TRACEFTR(err, "Could not render glyph.");
+-                    sk_bzero(glyph.fImage, glyph.computeImageSize());
+                     return;
+                 }
++
+                 SkMask mask;
+                 glyph.toMask(&mask);
++#ifdef SK_SHOW_TEXT_BLIT_COVERAGE
++                memset(mask.fImage, 0x80, mask.fBounds.height() * mask.fRowBytes);
++#endif
++                FT_GlyphSlotRec& ftGlyph = *face->glyph;
++
++                if (!SkIRect::Intersects(mask.fBounds,
++                                         SkIRect::MakeXYWH( ftGlyph.bitmap_left,
++                                                           -ftGlyph.bitmap_top,
++                                                            ftGlyph.bitmap.width,
++                                                            ftGlyph.bitmap.rows)))
++                {
++                    return;
++                }
++
++                // If the FT_Bitmap extent is larger, discard bits of the bitmap outside the mask.
++                // If the SkMask extent is larger, shrink mask to fit bitmap (clearing discarded).
++                unsigned char* origBuffer = ftGlyph.bitmap.buffer;
++                // First align the top left (origin).
++                if (-ftGlyph.bitmap_top < mask.fBounds.fTop) {
++                    int32_t topDiff = mask.fBounds.fTop - (-ftGlyph.bitmap_top);
++                    ftGlyph.bitmap.buffer += ftGlyph.bitmap.pitch * topDiff;
++                    ftGlyph.bitmap.rows -= topDiff;
++                    ftGlyph.bitmap_top = -mask.fBounds.fTop;
++                }
++                if (ftGlyph.bitmap_left < mask.fBounds.fLeft) {
++                    int32_t leftDiff = mask.fBounds.fLeft - ftGlyph.bitmap_left;
++                    ftGlyph.bitmap.buffer += leftDiff;
++                    ftGlyph.bitmap.width -= leftDiff;
++                    ftGlyph.bitmap_left = mask.fBounds.fLeft;
++                }
++                if (mask.fBounds.fTop < -ftGlyph.bitmap_top) {
++                    mask.fImage += mask.fRowBytes * (-ftGlyph.bitmap_top - mask.fBounds.fTop);
++                    mask.fBounds.fTop = -ftGlyph.bitmap_top;
++                }
++                if (mask.fBounds.fLeft < ftGlyph.bitmap_left) {
++                    mask.fImage += sizeof(uint16_t) * (ftGlyph.bitmap_left - mask.fBounds.fLeft);
++                    mask.fBounds.fLeft = ftGlyph.bitmap_left;
++                }
++                // Origins aligned, clean up the width and height.
++                int ftVertScale = (doVert ? 3 : 1);
++                int ftHoriScale = (doVert ? 1 : 3);
++                if (mask.fBounds.height() * ftVertScale < SkToInt(ftGlyph.bitmap.rows)) {
++                    ftGlyph.bitmap.rows = mask.fBounds.height() * ftVertScale;
++                }
++                if (mask.fBounds.width() * ftHoriScale < SkToInt(ftGlyph.bitmap.width)) {
++                    ftGlyph.bitmap.width = mask.fBounds.width() * ftHoriScale;
++                }
++                if (SkToInt(ftGlyph.bitmap.rows) < mask.fBounds.height() * ftVertScale) {
++                    mask.fBounds.fBottom = mask.fBounds.fTop + ftGlyph.bitmap.rows / ftVertScale;
++                }
++                if (SkToInt(ftGlyph.bitmap.width) < mask.fBounds.width() * ftHoriScale) {
++                    mask.fBounds.fRight = mask.fBounds.fLeft + ftGlyph.bitmap.width / ftHoriScale;
++                }
+                 if (fPreBlend.isApplicable()) {
+-                    copyFT2LCD16<true>(face->glyph->bitmap, mask, doBGR,
++                    copyFT2LCD16<true>(ftGlyph.bitmap, mask, doBGR,
+                                        fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
+                 } else {
+-                    copyFT2LCD16<false>(face->glyph->bitmap, mask, doBGR,
++                    copyFT2LCD16<false>(ftGlyph.bitmap, mask, doBGR,
+                                         fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
+                 }
++                // Restore the buffer pointer so FreeType can properly free it.
++                ftGlyph.bitmap.buffer = origBuffer;
+             } else {
++                FT_BBox     bbox;
++                FT_Bitmap   target;
++                FT_Outline_Get_CBox(outline, &bbox);
++                /*
++                    what we really want to do for subpixel is
++                        offset(dx, dy)
++                        compute_bounds
++                        offset(bbox & !63)
++                    but that is two calls to offset, so we do the following, which
++                    achieves the same thing with only one offset call.
++                */
++                FT_Outline_Translate(outline, dx - ((bbox.xMin + dx) & ~63),
++                                              dy - ((bbox.yMin + dy) & ~63));
++
+                 target.width = glyph.fWidth;
+                 target.rows = glyph.fHeight;
+                 target.pitch = glyph.rowBytes();
+@@ -442,8 +501,15 @@
+                 target.pixel_mode = compute_pixel_mode( (SkMask::Format)fRec.fMaskFormat);
+                 target.num_grays = 256;
+ 
+-                memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight);
+                 FT_Outline_Get_Bitmap(face->glyph->library, outline, &target);
++#ifdef SK_SHOW_TEXT_BLIT_COVERAGE
++                for (int y = 0; y < glyph.fHeight; ++y) {
++                    for (int x = 0; x < glyph.fWidth; ++x) {
++                        uint8_t& a = ((uint8_t*)glyph.fImage)[(glyph.rowBytes() * y) + x];
++                        a = SkTMax<uint8_t>(a, 0x20);
++                    }
++                }
++#endif
+             }
+         } break;
+ 

Added: head/www/chromium/files/patch-third__party_swiftshader_BUILD.gn
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_BUILD.gn	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,10 @@
+--- third_party/swiftshader/BUILD.gn.orig	2017-06-26 22:05:22.958335000 +0200
++++ third_party/swiftshader/BUILD.gn	2017-06-26 22:05:34.834212000 +0200
+@@ -85,7 +85,6 @@
+ 
+     if (is_linux) {
+       ldflags = [
+-        "-Wl,--hash-style=both",
+         "-Wl,--gc-sections",
+       ]
+     }

Added: head/www/chromium/files/patch-third__party_swiftshader_src_Common_MutexLock.hpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_src_Common_MutexLock.hpp	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,11 @@
+--- third_party/swiftshader/src/Common/MutexLock.hpp.orig	2017-06-26 22:06:54.283201000 +0200
++++ third_party/swiftshader/src/Common/MutexLock.hpp	2017-06-26 22:07:18.656810000 +0200
+@@ -17,7 +17,7 @@
+ 
+ #include "Thread.hpp"
+ 
+-#if defined(__linux__)
++#if defined(__linux__) || defined(__FreeBSD__)
+ // Use a pthread mutex on Linux. Since many processes may use SwiftShader
+ // at the same time it's best to just have the scheduler overhead.
+ #include <pthread.h>

Added: head/www/chromium/files/patch-third__party_swiftshader_src_Common_SharedLibrary.hpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_src_Common_SharedLibrary.hpp	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,11 @@
+--- third_party/swiftshader/src/Common/SharedLibrary.hpp.orig	2017-06-26 22:08:50.265243000 +0200
++++ third_party/swiftshader/src/Common/SharedLibrary.hpp	2017-06-26 22:10:22.637465000 +0200
+@@ -92,7 +92,7 @@
+ 
+ 	inline void *getLibraryHandle(const char *path)
+ 	{
+-		#ifdef __ANDROID__
++		#if defined( __ANDROID__) || defined(__FreeBSD__)
+ 			// bionic doesn't support RTLD_NOLOAD before L
+ 			return dlopen(path, RTLD_NOW | RTLD_LOCAL);
+ 		#else

Added: head/www/chromium/files/patch-third__party_swiftshader_src_Common_Socket.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_src_Common_Socket.cpp	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,10 @@
+--- third_party/swiftshader/src/Common/Socket.cpp.orig	2017-06-26 22:11:33.917807000 +0200
++++ third_party/swiftshader/src/Common/Socket.cpp	2017-06-26 22:11:54.516354000 +0200
+@@ -20,6 +20,7 @@
+ 	#include <unistd.h>
+ 	#include <netdb.h>
+ 	#include <netinet/in.h>
++       #include <sys/select.h>
+ #endif
+ 
+ namespace sw

Added: head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_Display.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_Display.cpp	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,47 @@
+--- third_party/swiftshader/src/OpenGL/libEGL/Display.cpp.orig	2017-06-26 22:14:07.363371000 +0200
++++ third_party/swiftshader/src/OpenGL/libEGL/Display.cpp	2017-06-26 22:15:57.992270000 +0200
+@@ -30,7 +30,7 @@
+ #include <sys/ioctl.h>
+ #include <linux/fb.h>
+ #include <fcntl.h>
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__)
+ #include "Main/libX11.hpp"
+ #elif defined(__APPLE__)
+ #include "OSXUtils.hpp"
+@@ -53,7 +53,7 @@
+ 
+ 	static void *nativeDisplay = nullptr;
+ 
+-	#if defined(__linux__) && !defined(__ANDROID__)
++	#if (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__)
+ 		// Even if the application provides a native display handle, we open (and close) our own connection
+ 		if(!nativeDisplay && dpy != HEADLESS_DISPLAY && libX11 && libX11->XOpenDisplay)
+ 		{
+@@ -76,7 +76,7 @@
+ {
+ 	terminate();
+ 
+-	#if defined(__linux__) && !defined(__ANDROID__)
++	#if (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__)
+ 		if(nativeDisplay && libX11->XCloseDisplay)
+ 		{
+ 			libX11->XCloseDisplay((::Display*)nativeDisplay);
+@@ -550,7 +550,7 @@
+ 			return false;
+ 		}
+ 		return true;
+-	#elif defined(__linux__)
++	#elif defined(__linux__) || defined(__FreeBSD__)
+ 		if(nativeDisplay)
+ 		{
+ 			XWindowAttributes windowAttributes;
+@@ -707,7 +707,7 @@
+ 
+ 		// No framebuffer device found, or we're in user space
+ 		return sw::FORMAT_X8B8G8R8;
+-	#elif defined(__linux__)
++	#elif defined(__linux__) || defined(__FreeBSD__)
+ 		if(nativeDisplay)
+ 		{
+ 			Screen *screen = libX11->XDefaultScreenOfDisplay((::Display*)nativeDisplay);

Added: head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_EGLSurface.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_EGLSurface.cpp	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,20 @@
+--- third_party/swiftshader/src/OpenGL/libEGL/EGLSurface.cpp.orig	2017-06-26 22:17:25.800342000 +0200
++++ third_party/swiftshader/src/OpenGL/libEGL/EGLSurface.cpp	2017-06-26 22:18:03.230149000 +0200
+@@ -26,7 +26,7 @@
+ #include "common/debug.h"
+ #include "Main/FrameBuffer.hpp"
+ 
+-#if defined(__linux__) && !defined(__ANDROID__)
++#if (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__)
+ #include "Main/libX11.hpp"
+ #elif defined(_WIN32)
+ #include <tchar.h>
+@@ -278,7 +278,7 @@
+ 	#elif defined(__ANDROID__)
+ 		int windowWidth;  window->query(window, NATIVE_WINDOW_WIDTH, &windowWidth);
+ 		int windowHeight; window->query(window, NATIVE_WINDOW_HEIGHT, &windowHeight);
+-	#elif defined(__linux__)
++	#elif defined(__linux__) || defined(__FreeBSD__)
+ 		XWindowAttributes windowAttributes;
+ 		libX11->XGetWindowAttributes((::Display*)display->getNativeDisplay(), window, &windowAttributes);
+ 

Added: head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_libEGL.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_libEGL.cpp	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,38 @@
+--- third_party/swiftshader/src/OpenGL/libEGL/libEGL.cpp.orig	2017-06-26 22:19:30.621745000 +0200
++++ third_party/swiftshader/src/OpenGL/libEGL/libEGL.cpp	2017-06-26 22:21:00.530994000 +0200
+@@ -25,7 +25,7 @@
+ 
+ #if defined(__ANDROID__)
+ #include <system/window.h>
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__)
+ #include "Main/libX11.hpp"
+ #endif
+ 
+@@ -118,7 +118,7 @@
+ 		// FIXME: Check if display_id is the default display
+ 	}
+ 
+-	#if defined(__linux__) && !defined(__ANDROID__)
++	#if (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__)
+ 		if(!libX11)
+ 		{
+ 			return success(HEADLESS_DISPLAY);
+@@ -171,7 +171,7 @@
+ {
+ 	TRACE("(EGLDisplay dpy = %p, EGLint name = %d)", dpy, name);
+ 
+-	#if defined(__linux__) && !defined(__ANDROID__)
++	#if (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__)
+ 		if(dpy == EGL_NO_DISPLAY && name == EGL_EXTENSIONS)
+ 		{
+ 			return success("EGL_KHR_platform_gbm "
+@@ -1043,7 +1043,7 @@
+ {
+ 	TRACE("(EGLenum platform = 0x%X, void *native_display = %p, const EGLint *attrib_list = %p)", platform, native_display, attrib_list);
+ 
+-	#if defined(__linux__) && !defined(__ANDROID__)
++	#if (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__)
+ 		switch(platform)
+ 		{
+ 		case EGL_PLATFORM_X11_EXT: break;

Added: head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_libEGL.hpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libEGL_libEGL.hpp	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,11 @@
+--- third_party/swiftshader/src/OpenGL/libEGL/libEGL.hpp.orig	2017-06-26 22:22:21.418803000 +0200
++++ third_party/swiftshader/src/OpenGL/libEGL/libEGL.hpp	2017-06-26 22:22:37.089147000 +0200
+@@ -106,7 +106,7 @@
+ 				#else
+ 					const char *libEGL_lib[] = {"/vendor/lib/egl/libEGL_swiftshader.so"};
+ 				#endif
+-			#elif defined(__linux__)
++			#elif defined(__linux__) || defined(__FreeBSD__)
+ 				#if defined(__LP64__)
+ 					const char *libEGL_lib[] = {"lib64EGL_translator.so", "libEGL.so.1", "libEGL.so"};
+ 				#else

Added: head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libGLES_CM_libGLES_CM.hpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libGLES_CM_libGLES_CM.hpp	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,11 @@
+--- third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.hpp.orig	2017-06-26 22:23:31.609734000 +0200
++++ third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.hpp	2017-06-26 22:23:56.904096000 +0200
+@@ -267,7 +267,7 @@
+ 				#else
+ 					const char *libGLES_CM_lib[] = {"/vendor/lib/egl/libGLESv1_CM_swiftshader.so"};
+ 				#endif
+-			#elif defined(__linux__)
++			#elif defined(__linux__) || defined(__FreeBSD__)
+ 				#if defined(__LP64__)
+ 					const char *libGLES_CM_lib[] = {"lib64GLES_CM_translator.so", "libGLES_CM.so.1", "libGLES_CM.so"};
+ 				#else

Added: head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libGLESv2_libGLESv2.hpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_src_OpenGL_libGLESv2_libGLESv2.hpp	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,11 @@
+--- third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.hpp.orig	2017-06-26 22:26:03.983772000 +0200
++++ third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.hpp	2017-06-26 22:26:31.197604000 +0200
+@@ -290,7 +290,7 @@
+ 				#else
+ 					const char *libGLESv2_lib[] = {"/vendor/lib/egl/libGLESv2_swiftshader.so"};
+ 				#endif
+-			#elif defined(__linux__)
++			#elif defined(__linux__) || defined(__FreeBSD__)
+ 				#if defined(__LP64__)
+ 					const char *libGLESv2_lib[] = {"lib64GLES_V2_translator.so", "libGLESv2.so.2", "libGLESv2.so"};
+ 				#else

Added: head/www/chromium/files/patch-third__party_swiftshader_third_party_llvm-subzero_build_Linux_include_llvm_Config_config.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_third_party_llvm-subzero_build_Linux_include_llvm_Config_config.h	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,29 @@
+--- third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h.orig	2017-06-26 22:28:18.140795000 +0200
++++ third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h	2017-06-26 22:30:40.465311000 +0200
+@@ -121,7 +121,7 @@
+ #define HAVE_LINK_H 1
+ 
+ /* Define to 1 if you have the `lseek64' function. */
+-#define HAVE_LSEEK64 1
++/* #undef HAVE_LSEEK64 */
+ 
+ /* Define to 1 if you have the <mach/mach.h> header file. */
+ /* #undef HAVE_MACH_MACH_H */
+@@ -130,7 +130,7 @@
+ /* #undef HAVE_MALLCTL */
+ 
+ /* Define to 1 if you have the `mallinfo' function. */
+-#define HAVE_MALLINFO 1
++/* #undef HAVE_MALLINFO */
+ 
+ /* Define to 1 if you have the <malloc.h> header file. */
+ #define HAVE_MALLOC_H 1
+@@ -154,7 +154,7 @@
+ /* #undef HAVE_NDIR_H */
+ 
+ /* Define to 1 if you have the `posix_fallocate' function. */
+-#define HAVE_POSIX_FALLOCATE 1
++/* #undef HAVE_POSIX_FALLOCATE */
+ 
+ /* Define to 1 if you have the `posix_spawn' function. */
+ #define HAVE_POSIX_SPAWN 1

Added: head/www/chromium/files/patch-v8_src_trap-handler_handler-inside.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-v8_src_trap-handler_handler-inside.cc	Wed Jun 28 00:36:33 2017	(r444531)
@@ -0,0 +1,16 @@
+--- v8/src/trap-handler/handler-inside.cc.orig	2017-06-27 01:24:28.401955000 +0200
++++ v8/src/trap-handler/handler-inside.cc	2017-06-27 01:25:16.190737000 +0200
+@@ -36,11 +36,13 @@
+ 
+ namespace {
+ 
++#if V8_TRAP_HANDLER_SUPPORTED && V8_OS_LINUX
+ bool IsKernelGeneratedSignal(siginfo_t* info) {
+   return info->si_code > 0 && info->si_code != SI_USER &&
+          info->si_code != SI_QUEUE && info->si_code != SI_TIMER &&
+          info->si_code != SI_ASYNCIO && info->si_code != SI_MESGQ;
+ }
++#endif
+ 
+ #if V8_TRAP_HANDLER_SUPPORTED
+ class SigUnmaskStack {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706280036.v5S0aXNT001869>