diff --git a/www/chromium/Makefile b/www/chromium/Makefile index 6b9ab5d964e7..e248d37833cc 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -3,9 +3,10 @@ PORTNAME= chromium PORTVERSION= 68.0.3440.106 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES?= www -MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ +MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ + LOCAL/cpm/chromium/:fonts DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER?= chromium@FreeBSD.org @@ -195,9 +196,9 @@ SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .endif -.include "Makefile.tests" -TEST_ALL_TARGET= ${TEST_TARGETS} -TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX} +TEST_ALL_TARGET= base_unittests +TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX} \ + test_fonts${EXTRACT_SUFX}:fonts .include @@ -223,6 +224,10 @@ pre-everything:: @${ECHO_MSG} "and ${WANTSPACE}." @${ECHO_MSG} +post-extract-TEST-on: + @${MKDIR} ${WRKSRC}/third_party/test_fonts/test_fonts + @${MV} ${WRKDIR}/test_fonts ${WRKSRC}/third_party/test_fonts/ + post-patch: @${REINPLACE_CMD} -e 's|@@PACKAGE@@|chromium|' \ -e 's|@@MENUNAME@@|Chromium Web Browser|' \ @@ -290,9 +295,13 @@ do-install: ${INSTALL_SCRIPT} ${WRKDIR}/chrome ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \ ${STAGEDIR}${DATADIR} + + # ANGLE .for f in libEGL.so libGLESv2.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor + + # SwiftShader @${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader .for g in libEGL.so libGLESv2.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/swiftshader/${g} \ diff --git a/www/chromium/Makefile.tests b/www/chromium/Makefile.tests deleted file mode 100644 index 0890147bbeac..000000000000 --- a/www/chromium/Makefile.tests +++ /dev/null @@ -1,20 +0,0 @@ -#$FreeBSD$ -#net_unittests : fatal error: 'sys/epoll.h' file not found -#telemetry_unittests : unknown ninja target -TEST_TARGETS= base_unittests \ - crypto_unittests \ - cacheinvalidation_unittests \ - gpu_unittests \ - printing_unittests \ - sql_unittests \ - content_unittests \ - cc_unittests \ - url_unittests \ - compositor_unittests \ - ipc_tests \ - dbus_unittests \ - media_unittests \ - chromedriver_unittests \ - chromedriver_tests \ - browser_tests \ - unit_tests diff --git a/www/chromium/distinfo b/www/chromium/distinfo index d77de6a29b8a..6004ba62cc2a 100644 --- a/www/chromium/distinfo +++ b/www/chromium/distinfo @@ -1,5 +1,7 @@ -TIMESTAMP = 1533765819 +TIMESTAMP = 1534764533 SHA256 (chromium-68.0.3440.106.tar.xz) = 7021040635a0a0d47f699bdb22e3ef5c91482e4f51b428d1de3016da95f0e698 SIZE (chromium-68.0.3440.106.tar.xz) = 630289544 SHA256 (chromium-68.0.3440.106-testdata.tar.xz) = 2a736b339f7cbf9fd26901666f17f53b51f7191ed2f64ea65fb8afe638a1633b SIZE (chromium-68.0.3440.106-testdata.tar.xz) = 310263984 +SHA256 (test_fonts.tar.xz) = cf9cbe3b7f1c4c42d426bddc65ec178d333ad7e205a36fe0a606a3c0c545ece1 +SIZE (test_fonts.tar.xz) = 200040 diff --git a/www/chromium/files/patch-base_process_memory__unittest.cc b/www/chromium/files/patch-base_process_memory__unittest.cc index 56989b877dcf..6b27c52005f2 100644 --- a/www/chromium/files/patch-base_process_memory__unittest.cc +++ b/www/chromium/files/patch-base_process_memory__unittest.cc @@ -1,5 +1,5 @@ ---- base/process/memory_unittest.cc.orig 2017-09-05 21:05:11.000000000 +0200 -+++ base/process/memory_unittest.cc 2017-09-06 16:53:33.919374000 +0200 +--- base/process/memory_unittest.cc.orig 2018-08-08 21:10:31.000000000 +0200 ++++ base/process/memory_unittest.cc 2018-08-20 13:06:25.303428000 +0200 @@ -104,7 +104,7 @@ // OpenBSD does not support these tests. Don't test these on ASan/TSan/MSan // configurations: only test the real allocator. @@ -9,9 +9,9 @@ !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) namespace { -@@ -507,5 +507,5 @@ +@@ -529,5 +529,5 @@ EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_)); - EXPECT_TRUE(value_ == NULL); + EXPECT_TRUE(value_ == nullptr); } -#endif // !defined(OS_OPENBSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && +#endif // !defined(OS_BSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && diff --git a/www/chromium/files/patch-chrome_test_base_in__process__browser__test.cc b/www/chromium/files/patch-chrome_test_base_in__process__browser__test.cc index f30e23f290e1..b66c5b5d2969 100644 --- a/www/chromium/files/patch-chrome_test_base_in__process__browser__test.cc +++ b/www/chromium/files/patch-chrome_test_base_in__process__browser__test.cc @@ -1,13 +1,22 @@ ---- chrome/test/base/in_process_browser_test.cc.orig 2017-06-05 19:03:04 UTC -+++ chrome/test/base/in_process_browser_test.cc -@@ -95,6 +95,10 @@ - - namespace { +--- chrome/test/base/in_process_browser_test.cc.orig 2018-08-08 21:10:43.000000000 +0200 ++++ chrome/test/base/in_process_browser_test.cc 2018-08-21 00:58:24.257483000 +0200 +@@ -69,6 +69,10 @@ + #include "chrome/test/base/scoped_bundle_swizzler_mac.h" + #endif +#if defined(OS_FREEBSD) +#include +#endif + - // Passed as value of kTestType. - const char kBrowserTestType[] = "browser"; + #if defined(OS_WIN) + #include "base/win/scoped_com_initializer.h" + #include "base/win/windows_version.h" +@@ -88,7 +92,7 @@ + #include "chrome/test/base/default_ash_event_generator_delegate.h" + #endif // defined(OS_CHROMEOS) + +-#if !defined(OS_CHROMEOS) && defined(OS_LINUX) ++#if !defined(OS_CHROMEOS) && (defined(OS_LINUX) || defined(OS_BSD)) + #include "ui/views/test/test_desktop_screen_x11.h" + #endif diff --git a/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_internal.h b/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_internal.h index fe87784174ba..98067e160205 100644 --- a/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_internal.h +++ b/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_internal.h @@ -1,6 +1,6 @@ ---- third_party/angle/src/gpu_info_util/SystemInfo_internal.h.orig 2017-09-10 02:31:40.635170000 +0200 -+++ third_party/angle/src/gpu_info_util/SystemInfo_internal.h 2017-09-10 02:32:27.153701000 +0200 -@@ -14,6 +14,8 @@ +--- third_party/angle/src/gpu_info_util/SystemInfo_internal.h.orig 2018-08-08 12:13:09.000000000 -0700 ++++ third_party/angle/src/gpu_info_util/SystemInfo_internal.h 2018-08-20 09:43:56.141492000 -0700 +@@ -14,8 +14,13 @@ namespace angle { @@ -8,4 +8,9 @@ + // Defined in SystemInfo_libpci when GPU_INFO_USE_LIBPCI is defined. bool GetPCIDevicesWithLibPCI(std::vector *devices); ++#if defined(__FreeBSD__) ++bool GetPCIDevicesFreeBSD(std::vector *devices); ++#endif // Defined in SystemInfo_x11 when GPU_INFO_USE_X11 is defined. + bool GetNvidiaDriverVersionWithXNVCtrl(std::string *version); + diff --git a/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_libpci.cpp b/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_libpci.cpp new file mode 100644 index 000000000000..c2da942ec165 --- /dev/null +++ b/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_libpci.cpp @@ -0,0 +1,90 @@ +--- third_party/angle/src/gpu_info_util/SystemInfo_libpci.cpp.orig 2018-08-20 10:00:10.885543000 -0700 ++++ third_party/angle/src/gpu_info_util/SystemInfo_libpci.cpp 2018-08-20 09:50:32.387980000 -0700 +@@ -12,6 +12,11 @@ + #include + #include + ++#if defined(__FreeBSD__) ++#include ++#include ++#endif ++ + #include "common/angleutils.h" + #include "common/debug.h" + +@@ -82,6 +87,75 @@ + }; + + } // anonymous namespace ++ ++#if defined(__FreeBSD__) ++// Adds an entry per PCI GPU found and fills the device and vendor ID. ++bool GetPCIDevicesFreeBSD(std::vector *devices) ++{ ++ int fd; ++ struct pci_conf_io conf; ++ struct pci_conf *matches; ++ uint32_t offset = 0; ++ ++ fd = open("/dev/pci", O_RDONLY); ++ if (fd < 0) ++ return false; ++ ++ matches = new struct pci_conf[32]; ++ conf.generation = 0; ++ do { ++ conf.pat_buf_len = 0; ++ conf.num_patterns = 0; ++ conf.patterns = NULL; ++ conf.match_buf_len = 32 * sizeof(struct pci_conf); ++ conf.num_matches = 32; ++ conf.matches = matches; ++ conf.offset = offset; ++ conf.status = PCI_GETCONF_ERROR; ++ if (ioctl(fd, PCIOCGETCONF, &conf) < 0) { ++ if (errno == ENODEV) ++ break; ++ } ++ /* PCI_GETCONF_LIST_CHANGED would require us to start over. */ ++ if (conf.status == PCI_GETCONF_ERROR || conf.status == PCI_GETCONF_LIST_CHANGED) { ++ break; ++ } ++ ++ for (unsigned int i = 0; i < conf.num_matches; i++) { ++ uint16_t device_class = (matches[i].pc_class << 8) | matches[i].pc_subclass; ++ ++ // Skip non-GPU devices ++ switch (device_class) ++ { ++ case PCI_CLASS_DISPLAY_VGA: ++ case PCI_CLASS_DISPLAY_XGA: ++ case PCI_CLASS_DISPLAY_3D: ++ break; ++ default: ++ continue; ++ } ++ ++ // Skip unknown devices ++ if (matches[i].pc_vendor == 0 || matches[i].pc_device == 0) { ++ continue; ++ } ++ ++ GPUDeviceInfo info; ++ info.vendorId = matches[i].pc_vendor; ++ info.deviceId = matches[i].pc_device; ++ ++ devices->push_back(info); ++ } ++ offset += conf.num_matches; ++ } while (conf.status == PCI_GETCONF_MORE_DEVS); ++ ++ delete[] matches; ++ ++ close(fd); ++ ++ return true; ++} ++#endif + + // Adds an entry per PCI GPU found and fills the device and vendor ID. + bool GetPCIDevicesWithLibPCI(std::vector *devices) diff --git a/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_linux.cpp b/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_linux.cpp index 159ad6ab6774..4a1ba62a0723 100644 --- a/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_linux.cpp +++ b/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_linux.cpp @@ -1,13 +1,14 @@ ---- third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp.orig 2017-09-10 02:34:01.568975000 +0200 -+++ third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp 2017-09-10 02:35:52.870068000 +0200 -@@ -71,10 +71,17 @@ +--- third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp.orig 2018-08-08 12:13:09.000000000 -0700 ++++ third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp 2018-08-20 09:50:36.331947000 -0700 +@@ -71,10 +71,18 @@ bool GetSystemInfo(SystemInfo *info) { +#if defined(__FreeBSD__) + if (!CollectMesaCardInfo(&(info->gpus))) + { -+ return false; ++ if (!GetPCIDevicesFreeBSD(&(info->gpus))) ++ return false; + } +#else if (!GetPCIDevicesWithLibPCI(&(info->gpus))) diff --git a/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_x11.cpp b/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_x11.cpp index 1bb84ac0aa33..f4fb9af45b5f 100644 --- a/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_x11.cpp +++ b/www/chromium/files/patch-third__party_angle_src_gpu_info_util_SystemInfo_x11.cpp @@ -1,5 +1,5 @@ ---- third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp.orig 2017-12-15 02:05:36.000000000 +0100 -+++ third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp 2017-12-30 05:11:53.917801000 +0100 +--- third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp.orig 2018-08-08 12:13:09.000000000 -0700 ++++ third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp 2018-08-20 09:34:48.052352000 -0700 @@ -8,6 +8,8 @@ #include "gpu_info_util/SystemInfo_internal.h" @@ -9,7 +9,7 @@ #include #include "common/debug.h" -@@ -18,8 +20,40 @@ +@@ -18,8 +20,43 @@ #error SystemInfo_x11.cpp compiled without GPU_INFO_USE_X11 #endif @@ -33,6 +33,9 @@ + (PFNGLXQUERYRENDERERINTEGERMESAPROC) glXGetProcAddressARB((const GLubyte *) + "glXQueryRendererIntegerMESA"); + ++ if (!queryInteger) ++ return false; ++ + bool vendor_ret = + queryInteger(display, 0, 0, GLX_RENDERER_VENDOR_ID_MESA, vid); + bool device_ret =