Index: head/www/iridium/Makefile =================================================================== --- head/www/iridium/Makefile (revision 443684) +++ head/www/iridium/Makefile (revision 443685) @@ -1,251 +1,248 @@ # Created by: Carlos J. Puga Medina # $FreeBSD$ PORTNAME= iridium PORTVERSION= 58.0 -PORTREVISION= 5 +PORTREVISION= 6 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= i386 amd64 -USES= compiler bison cpe desktop-file-utils execinfo jpeg \ +ONLY_FOR_ARCHS= amd64 i386 +USES= bison compiler cpe 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 glib20 gtk20 gtk30 dconf libxslt libxml2 +USE_GNOME= atk dconf glib20 gtk20 gtk30 libxml2 libxslt MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome INSTALLS_ICONS= yes # 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+= is_clang=true \ - clang_use_chrome_plugins=false \ +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 \ - treat_warnings_as_errors=false \ + 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 OPTIONS_DEFAULT= ALSA CODECS GCONF KERBEROS OPTIONS_SUB= yes GCONF_USE= GNOME=gconf2 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 PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio .include .if ${PORT_OPTIONS:MALSA} GN_ARGS+= use_alsa=true .else GN_ARGS+= use_alsa=false .endif .if ${PORT_OPTIONS:MCODECS} GN_ARGS+= ffmpeg_branding="Chrome" GN_ARGS+= proprietary_codecs=true GN_ARGS+= enable_hevc_demuxing=true .else GN_ARGS+= ffmpeg_branding="Chromium" GN_ARGS+= proprietary_codecs=false GN_ARGS+= enable_hevc_demuxing=false .endif -DEBUG_MAKE_ENV= V=1 .if ${PORT_OPTIONS:MDEBUG} BUILDTYPE= Debug GN_ARGS+= is_debug=true GN_BOOTSTRAP_FLAGS+= --debug -#GN_ARGS+= is_component_build=true +MAKE_ENV+= V=1 .else BUILDTYPE= Release -.if ${ARCH} == amd64 -GN_ARGS+= use_lld=true # harder, better, faster, stronger -.endif GN_ARGS+= is_debug=false GN_ARGS+= symbol_level=0 GN_ARGS+= remove_webcore_debug_symbols=true .endif .if ${PORT_OPTIONS:MGCONF} GN_ARGS+= use_gconf=true .else GN_ARGS+= use_gconf=false .endif .if ${PORT_OPTIONS:MKERBEROS} GN_ARGS+= use_kerberos=true .else GN_ARGS+= use_kerberos=false .endif .if ${PORT_OPTIONS:MPULSEAUDIO} GN_ARGS+= use_pulseaudio=true .else GN_ARGS+= use_pulseaudio=false .endif .include CC= clang40 CXX= clang++40 #optionally set AR, LD, NM, READELF ? # 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 # TODO: move this big extra to small ones EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang # 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," .if ${PORT_OPTIONS:MDEBUG} @${ECHO_MSG} "lots of free diskspace (~ 40GB)" @${ECHO_MSG} "and no less then 16GB of memory for linking." .else @${ECHO_MSG} "and a fair amount of free diskspace (~ 3.7GB)." .endif @${ECHO_MSG} 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 t in font_service test_ime_driver ui - ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${t}.service \ +.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: head/www/iridium/files/patch-base_process_memory__stubs.cc =================================================================== --- head/www/iridium/files/patch-base_process_memory__stubs.cc (revision 443684) +++ head/www/iridium/files/patch-base_process_memory__stubs.cc (nonexistent) @@ -1,18 +0,0 @@ ---- base/process/memory_stubs.cc.orig 2017-04-19 19:06:28 UTC -+++ base/process/memory_stubs.cc -@@ -31,6 +31,8 @@ void TerminateBecauseOutOfMemory(size_t - // their respective stdlib function since those functions will return null on a - // failure to allocate. - -+#if !defined(OS_FREEBSD) -+// FreeBSD brings it's own implementation in memory.cc -- cmt - bool UncheckedMalloc(size_t size, void** result) { - *result = malloc(size); - return *result != nullptr; -@@ -40,5 +42,6 @@ bool UncheckedCalloc(size_t num_items, s - *result = calloc(num_items, size); - return *result != nullptr; - } -+#endif - - } // namespace base Property changes on: head/www/iridium/files/patch-base_process_memory__stubs.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: head/www/iridium/files/patch-base_BUILD.gn =================================================================== --- head/www/iridium/files/patch-base_BUILD.gn (revision 443684) +++ head/www/iridium/files/patch-base_BUILD.gn (revision 443685) @@ -1,92 +1,91 @@ ---- base/BUILD.gn.orig 2017-04-19 19:06:28 UTC -+++ base/BUILD.gn -@@ -1156,6 +1156,9 @@ component("base") { +--- base/BUILD.gn.orig 2017-04-19 21:06:28.000000000 +0200 ++++ base/BUILD.gn 2017-06-15 22:17:54.935972000 +0200 +@@ -1156,6 +1156,9 @@ deps += [ "//base/allocator:tcmalloc" ] } else if (is_linux && use_allocator == "none") { sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ] + } else if (is_bsd && use_allocator == "none") { + # TODO move the code to "allocator_shim_default_dispatch_to_glibc.cc" + sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ] } else if (is_android && use_allocator == "none") { sources += [ "allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc", -@@ -1171,6 +1174,34 @@ component("base") { +@@ -1171,6 +1174,33 @@ } } + if (is_bsd) { + sources -= [ + "files/file_util_linux.cc", + "files/file_path_watcher_linux.cc", + "process/process_linux.cc", + "process/process_iterator_linux.cc", + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc", + "sys_info_linux.cc", + "trace_event/malloc_dump_provider.cc", + "trace_event/malloc_dump_provider.h", + ] + sources += [ + "files/file_path_watcher_stub.cc", -+ "process/memory_stubs.cc", + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", + "sys_info_freebsd.cc", + ] + libs = [ + "execinfo", # logging.cc + "kvm" # process_metrics_freebsd + ] + } + + + # Allow more direct string conversions on platforms with native utf8 # strings if (is_mac || is_ios || is_chromeos || is_chromecast) { -@@ -1467,7 +1498,7 @@ component("base") { +@@ -1467,7 +1497,7 @@ } # Linux. - if (is_linux) { + if (is_linux || is_bsd) { if (is_asan || is_lsan || is_msan || is_tsan) { # For llvm-sanitizer. data += [ "//third_party/llvm-build/Release+Asserts/lib/libstdc++.so.6" ] -@@ -1492,7 +1523,7 @@ component("base") { +@@ -1492,7 +1522,7 @@ "//base/third_party/xdg_user_dirs", ] } else { - # Non-Linux. + # Non-Linux/BSD. sources -= [ "nix/mime_util_xdg.cc", "nix/mime_util_xdg.h", -@@ -1508,6 +1539,13 @@ component("base") { +@@ -1508,6 +1538,13 @@ } } + if (is_bsd) { + sources -= [ + "threading/platform_thread_linux.cc", + ] + sources += [ "threading/platform_thread_freebsd.cc" ] + } + # iOS if (is_ios) { set_sources_assignment_filter([]) -@@ -2309,6 +2347,12 @@ test("base_unittests") { +@@ -2307,6 +2344,12 @@ + "trace_event/trace_event_android_unittest.cc", + ] set_sources_assignment_filter(sources_assignment_filter) - } - ++ } ++ + if (is_bsd) { + sources -= [ + "debug/proc_maps_linux_unittest.cc", + ] -+ } -+ + } + if (is_win) { - deps += [ "//base:scoped_handle_test_dll" ] - if (current_cpu == "x64") { Index: head/www/iridium/files/patch-build_config_compiler_BUILD.gn =================================================================== --- head/www/iridium/files/patch-build_config_compiler_BUILD.gn (revision 443684) +++ head/www/iridium/files/patch-build_config_compiler_BUILD.gn (revision 443685) @@ -1,100 +1,136 @@ ---- build/config/compiler/BUILD.gn.orig 2017-04-19 19:06:28 UTC -+++ build/config/compiler/BUILD.gn -@@ -158,7 +158,7 @@ config("compiler") { +--- build/config/compiler/BUILD.gn.orig 2017-04-19 21:06:28.000000000 +0200 ++++ build/config/compiler/BUILD.gn 2017-06-15 22:15:26.426452000 +0200 +@@ -36,7 +36,7 @@ + # only two architectures that are currently checked in). Turn this off when + # you are using a custom toolchain and need to control -B in cflags. + linux_use_bundled_binutils = +- linux_use_bundled_binutils_override && is_linux && ++ linux_use_bundled_binutils_override && (is_linux && !is_bsd) && + (current_cpu == "x64" || current_cpu == "x86") + binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", + root_build_dir) +@@ -158,7 +158,7 @@ configs += [ "//build/config/win:compiler" ] } else if (is_android) { configs += [ "//build/config/android:compiler" ] - } else if (is_linux) { + } else if (is_linux || is_bsd) { configs += [ "//build/config/linux:compiler" ] } else if (is_nacl) { configs += [ "//build/config/nacl:compiler" ] -@@ -301,7 +301,7 @@ config("compiler") { +@@ -214,7 +214,7 @@ + # Linker warnings. + if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && +- !(is_android && use_order_profiling) && !is_mac && !is_ios) { ++ !(is_android && use_order_profiling) && !is_mac && !is_ios && !is_bsd) { + # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 + # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 + # crbug.com/485542 +@@ -301,7 +301,7 @@ + # Linux/Android common flags setup. # --------------------------------- - if (is_linux || is_android) { + if (is_linux || is_bsd || is_android) { cflags += [ "-fPIC", "-pipe", # Use pipes for communicating between sub-processes. Faster. -@@ -428,14 +428,14 @@ config("compiler") { +@@ -314,7 +314,7 @@ + "-Wl,-z,relro", + ] + if (!using_sanitizer) { +- if (!use_cfi_diag) { ++ if (!use_cfi_diag && !is_bsd) { + ldflags += [ "-Wl,-z,defs" ] + } + +@@ -428,14 +428,14 @@ # clang-cl (used if is_win) doesn't expose this flag. # Currently disabled for nacl since its toolchain lacks this flag (too old). # TODO(zforman): Once nacl's toolchain is updated, remove check. - if (is_clang && is_linux && strip_absolute_paths_from_debug_symbols) { + if (is_clang && (is_linux || is_bsd) && strip_absolute_paths_from_debug_symbols) { absolute_path = rebase_path("//.") cflags += [ "-fdebug-prefix-map=$absolute_path=." ] } # C++11 compiler flags setup. # --------------------------- - if (is_linux || is_android || (is_nacl && is_clang)) { + if (is_linux || is_bsd || is_android || (is_nacl && is_clang)) { # gnu++11 instead of c++11 is needed because some code uses typeof() (a # GNU extension). # TODO(thakis): Eventually switch this to c++11 instead, -@@ -488,7 +488,7 @@ config("compiler") { +@@ -488,7 +488,7 @@ ] # Apply a lower LTO optimization level as the default is too slow. - if (is_linux) { + if (is_linux || is_bsd) { if (use_lld) { ldflags += [ "-Wl,--lto-O1" ] } else { -@@ -508,7 +508,7 @@ config("compiler") { +@@ -508,7 +508,7 @@ # targeting ARM, without this flag, LTO produces a .text section that is # larger than the maximum call displacement, preventing the linker from # relocating calls (http://llvm.org/PR22999). - if (is_linux) { + if (is_linux || is_bsd) { ldflags += [ "-Wl,-plugin-opt,-function-sections" ] } } -@@ -776,7 +776,7 @@ config("compiler_codegen") { +@@ -776,7 +776,7 @@ # configs -= [ "//build/config/compiler:clang_stackrealign" ] # See https://crbug.com/556393 for details of where it must be avoided. config("clang_stackrealign") { - if (is_clang && current_cpu == "x86" && is_linux) { + if (is_clang && current_cpu == "x86" && (is_linux || is_bsd)) { cflags = [ # Align the stack on 16-byte boundaries, http://crbug.com/418554. "-mstack-alignment=16", -@@ -830,7 +830,7 @@ config("runtime_library") { +@@ -830,7 +830,7 @@ # smaller. if (is_win) { configs += [ "//build/config/win:runtime_library" ] - } else if (is_linux) { + } else if (is_linux || is_bsd) { configs += [ "//build/config/linux:runtime_library" ] } else if (is_ios) { configs += [ "//build/config/ios:runtime_library" ] -@@ -1087,7 +1087,7 @@ config("default_warnings") { +@@ -1104,7 +1104,7 @@ + "-Wno-block-capture-autoreleasing", - # use_xcode_clang only refers to the iOS toolchain, host binaries use - # chromium's clang always. -- if (!is_nacl && (!use_xcode_clang || current_toolchain == host_toolchain)) { -+ if (!is_nacl && !is_bsd && (!use_xcode_clang || current_toolchain == host_toolchain)) { - # Flags NaCl (Clang 3.7) and Xcode 7.3 (Clang clang-703.0.31) do not - # recognize. - cflags += [ -@@ -1144,7 +1144,7 @@ config("chromium_code") { + # TODO(hans): https://crbug.com/681136 +- "-Wno-unused-lambda-capture", ++ # "-Wno-unused-lambda-capture", + + # TODO(thakis ): https://crbug.com/683349 + "-Wno-user-defined-warnings", +@@ -1144,7 +1144,7 @@ ] if (!is_debug && !using_sanitizer && - (!is_linux || !is_clang || is_official_build)) { + (!is_linux || !is_bsd || !is_clang || is_official_build)) { # _FORTIFY_SOURCE isn't really supported by Clang now, see # http://llvm.org/bugs/show_bug.cgi?id=16821. # It seems to work fine with Ubuntu 12 headers though, so use it in -@@ -1203,7 +1203,7 @@ config("no_chromium_code") { +@@ -1203,7 +1203,7 @@ ] } - if (is_linux || is_android) { + if (is_linux || is_bsd || is_android) { cflags_cc += [ # Don't warn about hash_map in third-party code. "-Wno-deprecated", +@@ -1647,7 +1647,7 @@ + "-g2", + ] + } else { +- cflags = [ "-g2" ] ++ cflags = [ "-g0" ] + } + if (use_debug_fission) { + cflags += [ "-gsplit-dwarf" ] Index: head/www/iridium/files/patch-gpu_config_gpu__info__collector.cc =================================================================== --- head/www/iridium/files/patch-gpu_config_gpu__info__collector.cc (revision 443684) +++ head/www/iridium/files/patch-gpu_config_gpu__info__collector.cc (revision 443685) @@ -1,13 +1,13 @@ --- gpu/config/gpu_info_collector.cc.orig 2017-04-19 19:06:34 UTC +++ gpu/config/gpu_info_collector.cc @@ -193,8 +193,10 @@ CollectInfoResult CollectGraphicsInfoGL( gpu_info->pixel_shader_version = glsl_version; gpu_info->vertex_shader_version = glsl_version; -+#ifndef __FreeBSD__ ++#if !defined(OS_BSD) IdentifyActiveGPU(gpu_info); return CollectDriverInfoGL(gpu_info); +#endif } void MergeGPUInfoGL(GPUInfo* basic_gpu_info, Index: head/www/iridium/files/patch-tools_gn_bootstrap_bootstrap.py =================================================================== --- head/www/iridium/files/patch-tools_gn_bootstrap_bootstrap.py (revision 443684) +++ head/www/iridium/files/patch-tools_gn_bootstrap_bootstrap.py (revision 443685) @@ -1,62 +1,61 @@ ---- tools/gn/bootstrap/bootstrap.py.orig 2017-04-24 14:40:24 UTC -+++ tools/gn/bootstrap/bootstrap.py -@@ -23,6 +23,7 @@ import os +--- tools/gn/bootstrap/bootstrap.py.orig 2017-04-24 16:40:24.605680492 +0200 ++++ tools/gn/bootstrap/bootstrap.py 2017-06-15 22:19:51.805806000 +0200 +@@ -23,6 +23,7 @@ import shutil import subprocess import sys +import platform import tempfile BOOTSTRAP_DIR = os.path.dirname(os.path.abspath(__file__)) -@@ -31,8 +32,9 @@ SRC_ROOT = os.path.dirname(os.path.dirna +@@ -31,8 +32,9 @@ is_win = sys.platform.startswith('win') is_linux = sys.platform.startswith('linux') +is_bsd = platform.system().lower().endswith('bsd') is_mac = sys.platform.startswith('darwin') -is_posix = is_linux or is_mac +is_posix = is_linux or is_mac or is_bsd def check_call(cmd, **kwargs): logging.debug('Running: %s', ' '.join(cmd)) -@@ -625,6 +627,40 @@ def write_gn_ninja(path, root_gen_dir, o +@@ -625,6 +627,39 @@ 'base/third_party/libevent/epoll.c', ]) + if is_bsd: + libs.extend(['-lexecinfo', '-lkvm']) + ldflags.extend(['-pthread']) + + static_libraries['xdg_user_dirs'] = { + 'sources': [ + 'base/third_party/xdg_user_dirs/xdg_user_dir_lookup.cc', + ], + 'tool': 'cxx', + } + static_libraries['base']['sources'].extend([ + 'base/allocator/allocator_shim.cc', + 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', + 'base/memory/shared_memory_posix.cc', + 'base/nix/xdg_util.cc', -+ 'base/process/memory_stubs.cc', -+ #'base/process/internal_linux.cc', ++ 'base/process/internal_linux.cc', + 'base/process/process_handle_' + platform.system().lower() + '.cc', + 'base/process/process_iterator_' + platform.system().lower() + '.cc', + # 'base/process/process_linux.cc', + 'base/process/process_metrics_'+ platform.system().lower() + '.cc', + 'base/strings/sys_string_conversions_posix.cc', + 'base/sys_info_' + platform.system().lower() + '.cc', + 'base/threading/platform_thread_' + platform.system().lower() + '.cc', + # 'base/trace_event/malloc_dump_provider.cc', + ]) + static_libraries['libevent']['include_dirs'].extend([ + os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'freebsd') + ]) + static_libraries['libevent']['sources'].extend([ + 'base/third_party/libevent/kqueue.c', + ]) + # Suppressing warnings + cflags.extend(['-Wno-deprecated-register', '-Wno-parentheses-equality']) if is_mac: static_libraries['base']['sources'].extend([