Index: branches/2017Q3/www/iridium/Makefile =================================================================== --- branches/2017Q3/www/iridium/Makefile (revision 446398) +++ branches/2017Q3/www/iridium/Makefile (revision 446399) @@ -1,236 +1,237 @@ # Created by: Carlos J. Puga Medina # $FreeBSD$ PORTNAME= iridium PORTVERSION= 58.0 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= www MASTER_SITES= https://downloads.iridiumbrowser.de/source/ PKGNAMESUFFIX= -browser DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION} MAINTAINER= chromium@FreeBSD.org COMMENT= Iridium browser LICENSE= BSD3CLAUSE LGPL21 MPL LICENSE_COMB= multi BUILD_DEPENDS= gperf:devel/gperf \ clang40:devel/llvm40 \ yasm:devel/yasm \ python:lang/python \ ffmpeg>=3.2.2,1:multimedia/ffmpeg \ bash:shells/bash \ flock:sysutils/flock \ node:www/node \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2 \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib LIB_DEPENDS= libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libavcodec.so:multimedia/ffmpeg \ libcups.so:print/cups \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libgnome-keyring.so:security/libgnome-keyring \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libxml2.so:textproc/libxml2 \ libfontconfig.so:x11-fonts/fontconfig RUN_DEPENDS= xdg-open:devel/xdg-utils \ droid-fonts-ttf>0:x11-fonts/droid-fonts-ttf ONLY_FOR_ARCHS= amd64 i386 -USES= bison cpe desktop-file-utils execinfo jpeg ninja perl5 \ +USES= bison desktop-file-utils execinfo jpeg ninja perl5 \ pkgconfig python:2,build shebangfix tar:xz USE_PERL5= build USE_XORG= scrnsaverproto x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xproto xrandr xrender xscrnsaver xtst USE_GNOME= atk dconf glib20 gtk20 gtk30 libxml2 libxslt MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome INSTALLS_ICONS= yes CC= clang40 CXX= clang++40 EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ enable_media_router=true \ enable_nacl=false \ enable_one_click_signin=true \ enable_remoting=false \ enable_webrtc=false \ fieldtrial_testing_like_official_build=true \ is_clang=true \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator="none" \ use_aura=true \ use_cups=true \ use_experimental_allocator_shim=false \ + use_gtk3=true \ use_lld=true \ use_sysroot=false \ use_system_libjpeg=true \ use_system_sqlite=false # chrome has additional patches # TODO: investigate building with these options: # use_system_icu use_system_harfbuzz use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild SUB_FILES= iridium-browser.desktop iridium SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS DEBUG GCONF KERBEROS CODECS_DESC= Compile and enable patented codecs like H.264 OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_DEFAULT= ALSA CODECS GCONF KERBEROS OPTIONS_SUB= yes ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=ffmpeg_branding="Chrome" \ GN_ARGS+=proprietary_codecs=true \ GN_ARGS+=enable_hevc_demuxing=true CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ GN_ARGS+=proprietary_codecs=false \ GN_ARGS+=enable_hevc_demuxing=false DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="lots of free diskspace (~ 8.5GB)" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=is_debug=false \ GN_ARGS+=symbol_level=0 \ GN_ARGS+=remove_webcore_debug_symbols=true \ WANTSPACE="a fair amount of free diskspace (~ 3.7GB)" GCONF_USE= GNOME=gconf2 GCONF_VARS= GN_ARGS+=use_gconf=true GCONF_VARS_OFF= GN_ARGS+=use_gconf=false KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA. In theory it supports falling back to # PulseAudio, but this is untested. SNDIO_PREVENTS= ALSA PULSEAUDIO SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .include # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include # Work around base r261801 .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100508 GN_ARGS+= extra_cxxflags="-D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1" .endif pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Iridium, you should have around 2GB of memory" @${ECHO_MSG} "and ${WANTSPACE}." @${ECHO_MSG} post-patch-SNDIO-on: @${MKDIR} ${WRKSRC}/media/audio/sndio ${WRKSRC}/media/audio/openbsd @${CP} ${FILESDIR}/sndio_output.* ${WRKSRC}/media/audio/sndio @${CP} ${FILESDIR}/sndio_input.* ${WRKSRC}/media/audio/sndio @${CP} ${FILESDIR}/audio_manager_openbsd.* ${WRKSRC}/media/audio/openbsd pre-configure: # We used to remove bundled libraries to be sure that iridium uses # system libraries and not shippen ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ ffmpeg flac harfbuzz-ng libwebp libxml libxslt snappy yasm || ${FALSE} do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/linux/node-linux-x64/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/linux/node-linux-x64/bin/node do-install: @${MKDIR} ${STAGEDIR}${DATADIR} .for m in font_service test_ime_driver ui ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${m}.service \ ${STAGEDIR}${DATADIR} .endfor ${INSTALL_MAN} ${WRKSRC}/out/${BUILDTYPE}/chrome.1 ${STAGEDIR}${MANPREFIX}/man/man1/iridium.1 .for s in 22 24 48 64 128 256 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps ${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/iridium.png .endfor .for p in chrome_100_percent chrome_200_percent headless_lib keyboard_resources \ resources mus_app_resources_100 mus_app_resources_200 mus_app_resources_strings \ views_mus_resources ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${p}.pak \ ${STAGEDIR}${DATADIR} .endfor .for d in icudtl.dat natives_blob.bin snapshot_blob.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR}/iridium cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/iridium-browser.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/iridium ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/mksnapshot \ ${STAGEDIR}${DATADIR} .include Index: branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__posix.cc =================================================================== --- branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__posix.cc (revision 446398) +++ branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__posix.cc (nonexistent) @@ -1,20 +0,0 @@ ---- net/base/network_interfaces_posix.cc.orig 2017-04-19 19:06:36 UTC -+++ net/base/network_interfaces_posix.cc -@@ -9,7 +9,7 @@ - #include - #include - --#if !defined(OS_NACL) -+#if !defined(OS_NACL) && !defined(OS_BSD) - #include "net/base/network_interfaces_posix.h" - #include - #include -@@ -17,7 +17,7 @@ - - namespace net { - --#if !defined(OS_NACL) -+#if !defined(OS_NACL) && !defined(OS_BSD) - namespace internal { - - // The application layer can pass |policy| defined in net_util.h to Property changes on: branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__posix.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2017Q3/www/iridium/files/patch-net_BUILD.gn =================================================================== --- branches/2017Q3/www/iridium/files/patch-net_BUILD.gn (revision 446398) +++ branches/2017Q3/www/iridium/files/patch-net_BUILD.gn (revision 446399) @@ -1,84 +1,85 @@ ---- net/BUILD.gn.orig 2017-04-19 19:06:36 UTC -+++ net/BUILD.gn -@@ -79,7 +79,7 @@ if (use_glib && use_gconf && !is_chromeo +--- net/BUILD.gn.orig 2017-04-19 21:06:36.000000000 +0200 ++++ net/BUILD.gn 2017-07-05 02:17:00.063914000 +0200 +@@ -79,7 +79,7 @@ net_configs += [ "//build/config/linux/gconf" ] } -if (is_linux) { +if (is_linux && !is_bsd) { net_configs += [ "//build/config/linux:libresolv" ] } -@@ -1824,6 +1824,16 @@ component("net") { +@@ -1824,6 +1824,17 @@ sources -= [ "disk_cache/blockfile/file_posix.cc" ] } + if (is_bsd) { + sources -= [ + "base/address_tracker_linux.cc", + "base/address_tracker_linux.h", + "base/network_change_notifier_linux.cc", + "base/network_change_notifier_linux.h", + "base/network_interfaces_linux.cc", + ] ++ sources += [ "base/network_interfaces_freebsd.cc" ] + } + if (is_ios || is_mac) { sources += [ "base/mac/url_conversions.h", -@@ -2773,7 +2783,7 @@ if (!is_ios && !is_android) { +@@ -2773,7 +2784,7 @@ } } -if (is_linux || is_mac) { +if (is_linux || is_bsd || is_mac) { executable("cachetool") { testonly = true sources = [ -@@ -2802,7 +2812,7 @@ if (is_linux || is_mac) { +@@ -2802,7 +2813,7 @@ } } -if (is_linux) { +if (is_linux || is_bsd) { static_library("epoll_server") { sources = [ "tools/epoll_server/epoll_server.cc", -@@ -2906,7 +2916,7 @@ if (is_android) { +@@ -2906,7 +2917,7 @@ } } -if (is_android || is_linux) { +if (is_android || is_linux || is_bsd) { executable("disk_cache_memory_test") { testonly = true sources = [ -@@ -4767,7 +4777,7 @@ test("net_unittests") { +@@ -4767,7 +4778,7 @@ "third_party/nist-pkits/", ] - if (is_linux || is_mac || is_win) { + if (is_linux || is_bsd || is_mac || is_win) { deps += [ "//third_party/pyftpdlib/", "//third_party/pywebsocket/", -@@ -4790,7 +4800,7 @@ test("net_unittests") { +@@ -4790,7 +4801,7 @@ if (is_desktop_linux) { deps += [ ":epoll_quic_tools" ] } - if (is_linux) { + if (is_linux || is_bsd) { sources += [ "tools/quic/chlo_extractor_test.cc", "tools/quic/end_to_end_test.cc", -@@ -4852,6 +4862,10 @@ test("net_unittests") { - sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ] - } +@@ -4850,6 +4861,10 @@ -+ if (is_bsd) { -+ sources -= [ "base/address_tracker_linux_unittest.cc" ] + if (is_chromeos) { + sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ] + } + - if (!is_proto_quic && v8_use_external_startup_data) { - deps += [ "//gin" ] ++ if (is_bsd) { ++ sources -= [ "base/address_tracker_linux_unittest.cc" ] } + + if (!is_proto_quic && v8_use_external_startup_data) { Index: branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__freebsd.cc =================================================================== --- branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__freebsd.cc (nonexistent) +++ branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__freebsd.cc (revision 446399) @@ -0,0 +1,243 @@ +--- net/base/network_interfaces_freebsd.cc.orig 2017-07-05 18:08:44.779023000 +0200 ++++ net/base/network_interfaces_freebsd.cc 2017-07-05 22:03:18.679624000 +0200 +@@ -0,0 +1,240 @@ ++// Copyright (c) 2014 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "net/base/network_interfaces_freebsd.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "base/files/file_path.h" ++#include "base/logging.h" ++#include "base/strings/string_number_conversions.h" ++#include "base/strings/string_tokenizer.h" ++#include "base/strings/string_util.h" ++#include "base/threading/thread_restrictions.h" ++#include "net/base/escape.h" ++#include "net/base/ip_endpoint.h" ++#include "net/base/net_errors.h" ++#include "net/base/network_interfaces_posix.h" ++#include "url/gurl.h" ++ ++namespace net { ++ ++namespace { ++ ++// FreeBSD implementation of IPAttributesGetterFreeBSD which calls ioctl on socket to ++// retrieve IP attributes. ++class IPAttributesGetterFreeBSDImpl : public internal::IPAttributesGetterFreeBSD { ++ public: ++ IPAttributesGetterFreeBSDImpl(); ++ ~IPAttributesGetterFreeBSDImpl() override; ++ bool IsInitialized() const override; ++ bool GetIPAttributes(const char* ifname, ++ const sockaddr* sock_addr, ++ int* native_attributes) override; ++ ++ private: ++ int ioctl_socket_; ++}; ++ ++IPAttributesGetterFreeBSDImpl::IPAttributesGetterFreeBSDImpl() ++ : ioctl_socket_(socket(AF_INET6, SOCK_DGRAM, 0)) { ++ DCHECK_GE(ioctl_socket_, 0); ++} ++ ++bool IPAttributesGetterFreeBSDImpl::IsInitialized() const { ++ return ioctl_socket_ >= 0; ++} ++ ++IPAttributesGetterFreeBSDImpl::~IPAttributesGetterFreeBSDImpl() { ++ if (ioctl_socket_ >= 0) { ++ close(ioctl_socket_); ++ } ++} ++ ++bool IPAttributesGetterFreeBSDImpl::GetIPAttributes(const char* ifname, ++ const sockaddr* sock_addr, ++ int* native_attributes) { ++ struct in6_ifreq ifr = {}; ++ strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name) - 1); ++ memcpy(&ifr.ifr_ifru.ifru_addr, sock_addr, sock_addr->sa_len); ++ int rv = ioctl(ioctl_socket_, SIOCGIFAFLAG_IN6, &ifr); ++ if (rv >= 0) { ++ *native_attributes = ifr.ifr_ifru.ifru_flags; ++ } ++ return (rv >= 0); ++} ++ ++// When returning true, the platform native IPv6 address attributes were ++// successfully converted to net IP address attributes. Otherwise, returning ++// false and the caller should drop the IP address which can't be used by the ++// application layer. ++bool TryConvertNativeToNetIPAttributes(int native_attributes, ++ int* net_attributes) { ++ // For FreeBSD, we disallow addresses with attributes IN6_IFF_ANYCASE, ++ // IN6_IFF_DUPLICATED, IN6_IFF_TENTATIVE, and IN6_IFF_DETACHED as these are ++ // still progressing through duplicated address detection (DAD) or are not ++ // suitable to be used in an one-to-one communication and shouldn't be used ++ // by the application layer. ++ if (native_attributes & (IN6_IFF_ANYCAST | IN6_IFF_DUPLICATED | ++ IN6_IFF_TENTATIVE | IN6_IFF_DETACHED)) { ++ return false; ++ } ++ ++ if (native_attributes & IN6_IFF_DEPRECATED) { ++ *net_attributes |= IP_ADDRESS_ATTRIBUTE_DEPRECATED; ++ } ++ ++ return true; ++} ++ ++NetworkChangeNotifier::ConnectionType GetNetworkInterfaceType( ++ int addr_family, ++ const std::string& interface_name) { ++ NetworkChangeNotifier::ConnectionType type = ++ NetworkChangeNotifier::CONNECTION_UNKNOWN; ++ ++ struct ifmediareq ifmr = {}; ++ strncpy(ifmr.ifm_name, interface_name.c_str(), sizeof(ifmr.ifm_name) - 1); ++ ++ int s = socket(addr_family, SOCK_DGRAM, 0); ++ if (s == -1) { ++ return type; ++ } ++ ++ if (ioctl(s, SIOCGIFMEDIA, &ifmr) != -1) { ++ if (ifmr.ifm_current & IFM_IEEE80211) { ++ type = NetworkChangeNotifier::CONNECTION_WIFI; ++ } else if (ifmr.ifm_current & IFM_ETHER) { ++ type = NetworkChangeNotifier::CONNECTION_ETHERNET; ++ } ++ } ++ close(s); ++ return type; ++} ++ ++} // namespace ++ ++namespace internal { ++ ++bool GetNetworkListImpl(NetworkInterfaceList* networks, ++ int policy, ++ const ifaddrs* interfaces, ++ IPAttributesGetterFreeBSD* ip_attributes_getter) { ++ // Enumerate the addresses assigned to network interfaces which are up. ++ for (const ifaddrs* interface = interfaces; interface != NULL; ++ interface = interface->ifa_next) { ++ // Skip loopback interfaces, and ones which are down. ++ if (!(IFF_RUNNING & interface->ifa_flags)) ++ continue; ++ if (IFF_LOOPBACK & interface->ifa_flags) ++ continue; ++ // Skip interfaces with no address configured. ++ struct sockaddr* addr = interface->ifa_addr; ++ if (!addr) ++ continue; ++ ++ // Skip unspecified addresses (i.e. made of zeroes) and loopback addresses ++ // configured on non-loopback interfaces. ++ if (IsLoopbackOrUnspecifiedAddress(addr)) ++ continue; ++ ++ const std::string& name = interface->ifa_name; ++ // Filter out VMware interfaces, typically named vmnet1 and vmnet8. ++ if (ShouldIgnoreInterface(name, policy)) { ++ continue; ++ } ++ ++ NetworkChangeNotifier::ConnectionType connection_type = ++ NetworkChangeNotifier::CONNECTION_UNKNOWN; ++ ++ int ip_attributes = IP_ADDRESS_ATTRIBUTE_NONE; ++ ++ // Retrieve native ip attributes and convert to net version if a getter is ++ // given. ++ if (ip_attributes_getter && ip_attributes_getter->IsInitialized()) { ++ int native_attributes = 0; ++ if (addr->sa_family == AF_INET6 && ++ ip_attributes_getter->GetIPAttributes( ++ interface->ifa_name, interface->ifa_addr, &native_attributes)) { ++ if (!TryConvertNativeToNetIPAttributes(native_attributes, ++ &ip_attributes)) { ++ continue; ++ } ++ } ++ } ++ ++ connection_type = GetNetworkInterfaceType(addr->sa_family, name); ++ ++ IPEndPoint address; ++ ++ int addr_size = 0; ++ if (addr->sa_family == AF_INET6) { ++ addr_size = sizeof(sockaddr_in6); ++ } else if (addr->sa_family == AF_INET) { ++ addr_size = sizeof(sockaddr_in); ++ } ++ ++ if (address.FromSockAddr(addr, addr_size)) { ++ uint8_t prefix_length = 0; ++ if (interface->ifa_netmask) { ++ // If not otherwise set, assume the same sa_family as ifa_addr. ++ if (interface->ifa_netmask->sa_family == 0) { ++ interface->ifa_netmask->sa_family = addr->sa_family; ++ } ++ IPEndPoint netmask; ++ if (netmask.FromSockAddr(interface->ifa_netmask, addr_size)) { ++ prefix_length = MaskPrefixLength(netmask.address()); ++ } ++ } ++ networks->push_back(NetworkInterface( ++ name, name, if_nametoindex(name.c_str()), connection_type, ++ address.address(), prefix_length, ip_attributes)); ++ } ++ } ++ ++ return true; ++} ++ ++} // namespace internal ++ ++bool GetNetworkList(NetworkInterfaceList* networks, int policy) { ++ if (networks == NULL) ++ return false; ++ ++ // getifaddrs() may require IO operations. ++ base::ThreadRestrictions::AssertIOAllowed(); ++ ++ ifaddrs* interfaces; ++ if (getifaddrs(&interfaces) < 0) { ++ PLOG(ERROR) << "getifaddrs"; ++ return false; ++ } ++ ++ std::unique_ptr ip_attributes_getter; ++ ++ ip_attributes_getter.reset(new IPAttributesGetterFreeBSDImpl()); ++ ++ bool result = internal::GetNetworkListImpl(networks, policy, interfaces, ++ ip_attributes_getter.get()); ++ freeifaddrs(interfaces); ++ return result; ++} ++ ++std::string GetWifiSSID() { ++ NOTIMPLEMENTED(); ++ return ""; ++} ++ ++} // namespace net Property changes on: branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__freebsd.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__freebsd.h =================================================================== --- branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__freebsd.h (nonexistent) +++ branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__freebsd.h (revision 446399) @@ -0,0 +1,47 @@ +--- net/base/network_interfaces_freebsd.h.orig 2017-07-04 23:05:05.313339000 +0200 ++++ net/base/network_interfaces_freebsd.h 2017-07-04 23:04:51.039635000 +0200 +@@ -0,0 +1,44 @@ ++// Copyright (c) 2014 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef NET_BASE_NETWORK_INTERFACES_FREEBSD_H_ ++#define NET_BASE_NETWORK_INTERFACES_FREEBSD_H_ ++ ++// This file is only used to expose some of the internals ++// of network_interfaces_mac.cc to tests. ++ ++#include ++ ++#include "base/macros.h" ++#include "net/base/net_export.h" ++#include "net/base/network_interfaces.h" ++ ++struct ifaddrs; ++struct sockaddr; ++ ++namespace net { ++namespace internal { ++ ++class NET_EXPORT IPAttributesGetterFreeBSD { ++ public: ++ IPAttributesGetterFreeBSD() {} ++ virtual ~IPAttributesGetterFreeBSD() {} ++ virtual bool IsInitialized() const = 0; ++ virtual bool GetIPAttributes(const char* ifname, ++ const sockaddr* sock_addr, ++ int* native_attributes) = 0; ++ ++ private: ++ DISALLOW_COPY_AND_ASSIGN(IPAttributesGetterFreeBSD); ++}; ++ ++NET_EXPORT bool GetNetworkListImpl(NetworkInterfaceList* networks, ++ int policy, ++ const ifaddrs* interfaces, ++ IPAttributesGetterFreeBSD* ip_attributes_getter); ++ ++} // namespace internal ++} // namespace net ++ ++#endif // NET_BASE_NETWORK_INTERFACES_FREEBSD_H_ Property changes on: branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__freebsd.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__posix.h =================================================================== --- branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__posix.h (nonexistent) +++ branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__posix.h (revision 446399) @@ -0,0 +1,11 @@ +--- net/base/network_interfaces_posix.h.orig 2017-07-04 22:49:41.402276000 +0200 ++++ net/base/network_interfaces_posix.h 2017-07-04 22:49:59.456467000 +0200 +@@ -8,6 +8,8 @@ + // This file is only used to expose some of the internals of + // network_interfaces_posix.cc to network_interfaces_linux.cc and network_interfaces_mac.cc. + ++#include ++ + #include + + struct sockaddr; Property changes on: branches/2017Q3/www/iridium/files/patch-net_base_network__interfaces__posix.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2017Q3/www/iridium/files/patch-v8_src_log-utils.h =================================================================== --- branches/2017Q3/www/iridium/files/patch-v8_src_log-utils.h (nonexistent) +++ branches/2017Q3/www/iridium/files/patch-v8_src_log-utils.h (revision 446399) @@ -0,0 +1,11 @@ +--- v8/src/log-utils.h.orig 2017-07-04 22:40:30.657540000 +0200 ++++ v8/src/log-utils.h 2017-07-04 22:40:59.090730000 +0200 +@@ -14,6 +14,8 @@ + #include "src/base/platform/mutex.h" + #include "src/flags.h" + ++#include ++ + namespace v8 { + namespace internal { + Property changes on: branches/2017Q3/www/iridium/files/patch-v8_src_log-utils.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2017Q3 =================================================================== --- branches/2017Q3 (revision 446398) +++ branches/2017Q3 (revision 446399) Property changes on: branches/2017Q3 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r446308