pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import chromium-browser-54.0.2820.1 as wip/chromium-browser.



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Aug 6 10:25:44 2016 +0200
Changeset:	b6959f837159308f93e2a9686e78703ef1f8d83e

Added Files:
	chromium-browser/DESCR
	chromium-browser/Makefile
	chromium-browser/PLIST
	chromium-browser/TODO
	chromium-browser/distinfo
	chromium-browser/patches/patch-base_BUILD.gn
	chromium-browser/patches/patch-base_debug_debugger__posix.cc
	chromium-browser/patches/patch-base_debug_debugging__flags.h
	chromium-browser/patches/patch-base_message__loop_message__loop.cc
	chromium-browser/patches/patch-base_process_process__handle__netbsd.cc
	chromium-browser/patches/patch-base_process_process__iterator.h
	chromium-browser/patches/patch-base_process_process__iterator__netbsd.cc
	chromium-browser/patches/patch-base_process_process__metrics__netbsd.cc
	chromium-browser/patches/patch-base_process_process__metrics__posix.cc
	chromium-browser/patches/patch-base_process_process__posix.cc
	chromium-browser/patches/patch-base_sys__info__netbsd.cc
	chromium-browser/patches/patch-base_third__party_libevent_event-config.h
	chromium-browser/patches/patch-base_third__party_libevent_netbsd_config.h
	chromium-browser/patches/patch-base_third__party_libevent_netbsd_event-config.h
	chromium-browser/patches/patch-base_threading_platform__thread__netbsd.cc
	chromium-browser/patches/patch-base_trace__event_malloc__dump__provider.cc
	chromium-browser/patches/patch-base_trace__event_memory__dump__manager.cc
	chromium-browser/patches/patch-base_trace__event_process__memory__dump.cc
	chromium-browser/patches/patch-build_config_BUILDCONFIG.gn
	chromium-browser/patches/patch-build_config_compiler_BUILD.gn
	chromium-browser/patches/patch-build_toolchain_netbsd_BUILD.gn
	chromium-browser/patches/patch-chrome_common_extensions_docs_examples_api_nativeMessaging_host_install__host.sh
	chromium-browser/patches/patch-chrome_common_extensions_docs_examples_api_nativeMessaging_host_uninstall__host.sh
	chromium-browser/patches/patch-third__party_icu_android_patch__locale.sh
	chromium-browser/patches/patch-third__party_icu_source_configure
	chromium-browser/patches/patch-third__party_protobuf_post__process__dist.sh
	chromium-browser/patches/patch-tools_battor__agent_BUILD.gn
	chromium-browser/patches/patch-tools_gn_bootstrap_bootstrap.py
	chromium-browser/patches/patch-tools_gn_function__exec__script.cc
	chromium-browser/patches/patch-tools_gn_setup.cc
	chromium-browser/patches/patch-tools_gn_variables.cc
	chromium-browser/patches/patch-v8_tools_run-llprof.sh

Log Message:
Import chromium-browser-54.0.2820.1 as wip/chromium-browser.

Chromium is an open-source browser project that aims to build a safer,
faster and more stable way for Internet users to experience the web.

This repository is intended for work with the latest upstream tag and
prototype patches for upstreaming NetBSD support.

Right now it fetches the sources from a tag without submodules, it will be
addressed later.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b6959f837159308f93e2a9686e78703ef1f8d83e

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 chromium-browser/DESCR                             |   2 +
 chromium-browser/Makefile                          |  94 +++++++
 chromium-browser/PLIST                             | 232 +++++++++++++++++
 chromium-browser/TODO                              |  20 ++
 chromium-browser/distinfo                          |  38 +++
 chromium-browser/patches/patch-base_BUILD.gn       |  32 +++
 .../patches/patch-base_debug_debugger__posix.cc    |  65 +++++
 .../patches/patch-base_debug_debugging__flags.h    |   0
 .../patch-base_message__loop_message__loop.cc      |  13 +
 .../patch-base_process_process__handle__netbsd.cc  |  72 +++++
 .../patches/patch-base_process_process__iterator.h |  25 ++
 ...patch-base_process_process__iterator__netbsd.cc | 150 +++++++++++
 .../patch-base_process_process__metrics__netbsd.cc | 218 ++++++++++++++++
 .../patch-base_process_process__metrics__posix.cc  |  13 +
 .../patches/patch-base_process_process__posix.cc   |  41 +++
 .../patches/patch-base_sys__info__netbsd.cc        | 105 ++++++++
 ...patch-base_third__party_libevent_event-config.h |  13 +
 ...atch-base_third__party_libevent_netbsd_config.h | 271 +++++++++++++++++++
 ...ase_third__party_libevent_netbsd_event-config.h | 289 +++++++++++++++++++++
 ...atch-base_threading_platform__thread__netbsd.cc | 102 ++++++++
 ...tch-base_trace__event_malloc__dump__provider.cc |  44 ++++
 ...atch-base_trace__event_memory__dump__manager.cc |  13 +
 ...atch-base_trace__event_process__memory__dump.cc |  13 +
 .../patches/patch-build_config_BUILDCONFIG.gn      |  52 ++++
 .../patches/patch-build_config_compiler_BUILD.gn   |  15 ++
 .../patches/patch-build_toolchain_netbsd_BUILD.gn  | 121 +++++++++
 ...mples_api_nativeMessaging_host_install__host.sh |  22 ++
 ...les_api_nativeMessaging_host_uninstall__host.sh |  22 ++
 ...patch-third__party_icu_android_patch__locale.sh |  13 +
 .../patch-third__party_icu_source_configure        |  20 ++
 ...ch-third__party_protobuf_post__process__dist.sh |  13 +
 .../patches/patch-tools_battor__agent_BUILD.gn     |  13 +
 .../patches/patch-tools_gn_bootstrap_bootstrap.py  |  68 +++++
 .../patch-tools_gn_function__exec__script.cc       |   0
 chromium-browser/patches/patch-tools_gn_setup.cc   |  13 +
 .../patches/patch-tools_gn_variables.cc            |  14 +
 .../patches/patch-v8_tools_run-llprof.sh           |  13 +
 37 files changed, 2264 insertions(+)

diffs:
diff --git a/chromium-browser/DESCR b/chromium-browser/DESCR
new file mode 100644
index 0000000..d5b7004
--- /dev/null
+++ b/chromium-browser/DESCR
@@ -0,0 +1,2 @@
+Chromium is an open-source browser project that aims to build a safer,
+faster and more stable way for Internet users to experience the web.
diff --git a/chromium-browser/Makefile b/chromium-browser/Makefile
new file mode 100644
index 0000000..1d6d12a
--- /dev/null
+++ b/chromium-browser/Makefile
@@ -0,0 +1,94 @@
+# $NetBSD: Makefile,v 1.14 2012/09/24 18:26:53 asau Exp $
+
+DISTNAME=	54.0.2820.1
+PKGNAME=	${DISTNAME:S/^/chromium-browser-/}
+DIST_SUBDIR=	${PKGBASE}
+CATEGORIES=	www
+MASTER_SITES=	https://chromium.googlesource.com/chromium/src.git/+archive/
+
+EXTRACT_DIR=	${WRKSRC}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://dev.chromium.org/Home
+COMMENT=	Open-source browser project
+LICENSE=	modified-bsd
+
+USE_TOOLS+=	bash bison flex gmake pax perl pkg-config
+USE_LANGUAGES=	c c++
+
+BUILD_DEPENDS+=	gperf-[0-9]*:../../devel/gperf
+BUILD_DEPENDS+=	yasm-[0-9]*:../../devel/yasm
+
+ONLY_FOR_PLATFORM=	*-*-arm *-*-i386 *-*-x86_64
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Linux" || ${OPSYS} == "DragonFly" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD"
+.include "../../audio/alsa-lib/buildlink3.mk"
+.endif
+
+REPLACE_PYTHON+=	*.py
+REPLACE_PYTHON+=	*/*.py
+REPLACE_PYTHON+=	*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*/*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*/*/*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*/*/*/*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*/*/*/*/*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*/*/*/*/*/*/*/*.py
+
+SUBST_CLASSES+=		python
+SUBST_MESSAGE.python=	Fixing PYTHON path.
+SUBST_SED.python=	-e "s|/usr/bin/python|${PYTHONBIN}|1"
+SUBST_FILES.python+=	testing/chromoting/browser_test_commands_linux.txt
+SUBST_FILES.python+=	testing/gtest/xcode/gtest.xcodeproj/project.pbxproj
+SUBST_FILES.python+=	third_party/WebKit/LayoutTests/media/track/opera/track/webvtt/rendering/reftest/build-manifest.py
+SUBST_FILES.python+=	third_party/WebKit/Tools/Scripts/generate-w3c-directory-owner-json
+SUBST_FILES.python+=	third_party/WebKit/Tools/Scripts/print-json-test-results
+SUBST_FILES.python+=	third_party/WebKit/Tools/Scripts/print-layout-test-times
+SUBST_FILES.python+=	third_party/WebKit/Tools/Scripts/print-layout-test-types
+SUBST_FILES.python+=	third_party/WebKit/Tools/Scripts/print-stale-test-expectations-entries
+SUBST_FILES.python+=	third_party/WebKit/Tools/Scripts/print-test-ordering
+SUBST_FILES.python+=	third_party/WebKit/Tools/Scripts/run-bindings-tests
+SUBST_FILES.python+=	third_party/WebKit/Tools/Scripts/update-test-expectations
+SUBST_FILES.python+=	third_party/WebKit/Tools/Scripts/update-w3c-deps
+SUBST_FILES.python+=	third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_unittest.py
+SUBST_FILES.python+=	third_party/libxslt/linux/Makefile
+SUBST_FILES.python+=	third_party/libxslt/linux/config.log
+SUBST_FILES.python+=	third_party/libxslt/linux/libexslt/Makefile
+SUBST_FILES.python+=	third_party/libxslt/linux/libxslt/Makefile
+SUBST_FILES.python+=	third_party/yasm/source/config/android/Makefile
+SUBST_FILES.python+=	third_party/yasm/source/config/ios/Makefile
+SUBST_FILES.python+=	third_party/yasm/source/config/linux/Makefile
+SUBST_FILES.python+=	third_party/yasm/source/config/mac/Makefile
+SUBST_FILES.python+=	third_party/yasm/source/config/openbsd/Makefile
+SUBST_FILES.python+=	third_party/yasm/source/config/win/Makefile
+SUBST_FILES.python+=	tools/gn/ninja_action_target_writer_unittest.cc
+SUBST_FILES.python+=	tools/mb/mb_unittest.py
+SUBST_FILES.python+=	tools/memory_inspector/memory_inspector_cli
+SUBST_FILES.python+=	tools/usb_gadget/server.py
+SUBST_STAGE.python=     pre-build
+
+# Fix building C++11 code
+CXXFLAGS+=		-std=gnu++11
+
+do-build:
+	${RUN} cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${PYTHONBIN} ./tools/gn/bootstrap/bootstrap.py
+
+.include "../../devel/GConf/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/libevent/buildlink3.mk"
+.include "../../devel/nss/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../lang/python/pyversion.mk"
+.include "../../lang/python/application.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../multimedia/libvpx/buildlink3.mk"
+.include "../../textproc/libxslt/buildlink3.mk"
+.include "../../x11/gtk2/buildlink3.mk"
+.include "../../x11/libXScrnSaver/buildlink3.mk"
+.include "../../x11/libXtst/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/chromium-browser/PLIST b/chromium-browser/PLIST
new file mode 100644
index 0000000..30b7082
--- /dev/null
+++ b/chromium-browser/PLIST
@@ -0,0 +1,232 @@
+@comment $NetBSD: PLIST,v 1.4 2011/04/28 03:09:01 rxg Exp $
+bin/chrome
+man/man1/chrome.1
+share/chromium/chrome
+share/chromium/chrome-wrapper
+share/chromium/chrome.pak
+share/chromium/ffmpegsumo_nolink
+share/chromium/libffmpegsumo.so
+share/chromium/locales/am.pak
+share/chromium/locales/ar.pak
+share/chromium/locales/bg.pak
+share/chromium/locales/bn.pak
+share/chromium/locales/ca.pak
+share/chromium/locales/cs.pak
+share/chromium/locales/da.pak
+share/chromium/locales/de.pak
+share/chromium/locales/el.pak
+share/chromium/locales/en-GB.pak
+share/chromium/locales/en-US.pak
+share/chromium/locales/es-419.pak
+share/chromium/locales/es.pak
+share/chromium/locales/et.pak
+share/chromium/locales/fa.pak
+share/chromium/locales/fi.pak
+share/chromium/locales/fil.pak
+share/chromium/locales/fr.pak
+share/chromium/locales/gu.pak
+share/chromium/locales/he.pak
+share/chromium/locales/hi.pak
+share/chromium/locales/hr.pak
+share/chromium/locales/hu.pak
+share/chromium/locales/id.pak
+share/chromium/locales/it.pak
+share/chromium/locales/ja.pak
+share/chromium/locales/kn.pak
+share/chromium/locales/ko.pak
+share/chromium/locales/lt.pak
+share/chromium/locales/lv.pak
+share/chromium/locales/ml.pak
+share/chromium/locales/mr.pak
+share/chromium/locales/nb.pak
+share/chromium/locales/nl.pak
+share/chromium/locales/pl.pak
+share/chromium/locales/pt-BR.pak
+share/chromium/locales/pt-PT.pak
+share/chromium/locales/ro.pak
+share/chromium/locales/ru.pak
+share/chromium/locales/sk.pak
+share/chromium/locales/sl.pak
+share/chromium/locales/sr.pak
+share/chromium/locales/sv.pak
+share/chromium/locales/sw.pak
+share/chromium/locales/ta.pak
+share/chromium/locales/te.pak
+share/chromium/locales/th.pak
+share/chromium/locales/tr.pak
+share/chromium/locales/uk.pak
+share/chromium/locales/vi.pak
+share/chromium/locales/zh-CN.pak
+share/chromium/locales/zh-TW.pak
+share/chromium/mksnapshot
+share/chromium/product_logo_48.png
+share/chromium/protoc
+share/chromium/resources.pak
+share/chromium/resources/inspector/DevTools.js
+share/chromium/resources/inspector/Images/applicationCache.png
+share/chromium/resources/inspector/Images/auditsIcon.png
+share/chromium/resources/inspector/Images/back.png
+share/chromium/resources/inspector/Images/breakpointBorder.png
+share/chromium/resources/inspector/Images/breakpointConditionalBorder.png
+share/chromium/resources/inspector/Images/breakpointConditionalCounterBorder.png
+share/chromium/resources/inspector/Images/breakpointCounterBorder.png
+share/chromium/resources/inspector/Images/breakpointsActivateButtonGlyph.png
+share/chromium/resources/inspector/Images/breakpointsDeactivateButtonGlyph.png
+share/chromium/resources/inspector/Images/checker.png
+share/chromium/resources/inspector/Images/clearConsoleButtonGlyph.png
+share/chromium/resources/inspector/Images/closeButtons.png
+share/chromium/resources/inspector/Images/consoleButtonGlyph.png
+share/chromium/resources/inspector/Images/consoleIcon.png
+share/chromium/resources/inspector/Images/cookie.png
+share/chromium/resources/inspector/Images/database.png
+share/chromium/resources/inspector/Images/databaseTable.png
+share/chromium/resources/inspector/Images/debuggerContinue.png
+share/chromium/resources/inspector/Images/debuggerPause.png
+share/chromium/resources/inspector/Images/debuggerStepInto.png
+share/chromium/resources/inspector/Images/debuggerStepOut.png
+share/chromium/resources/inspector/Images/debuggerStepOver.png
+share/chromium/resources/inspector/Images/disclosureTriangleSmallDown.png
+share/chromium/resources/inspector/Images/disclosureTriangleSmallDownBlack.png
+share/chromium/resources/inspector/Images/disclosureTriangleSmallDownWhite.png
+share/chromium/resources/inspector/Images/disclosureTriangleSmallRight.png
+share/chromium/resources/inspector/Images/disclosureTriangleSmallRightBlack.png
+share/chromium/resources/inspector/Images/disclosureTriangleSmallRightDown.png
+share/chromium/resources/inspector/Images/disclosureTriangleSmallRightDownBlack.png
+share/chromium/resources/inspector/Images/disclosureTriangleSmallRightDownWhite.png
+share/chromium/resources/inspector/Images/disclosureTriangleSmallRightWhite.png
+share/chromium/resources/inspector/Images/dockButtonGlyph.png
+share/chromium/resources/inspector/Images/elementsIcon.png
+share/chromium/resources/inspector/Images/enableOutlineButtonGlyph.png
+share/chromium/resources/inspector/Images/enableSolidButtonGlyph.png
+share/chromium/resources/inspector/Images/errorIcon.png
+share/chromium/resources/inspector/Images/errorMediumIcon.png
+share/chromium/resources/inspector/Images/errorRedDot.png
+share/chromium/resources/inspector/Images/excludeButtonGlyph.png
+share/chromium/resources/inspector/Images/focusButtonGlyph.png
+share/chromium/resources/inspector/Images/forward.png
+share/chromium/resources/inspector/Images/frame.png
+share/chromium/resources/inspector/Images/gearButtonGlyph.png
+share/chromium/resources/inspector/Images/glossyHeader.png
+share/chromium/resources/inspector/Images/glossyHeaderPressed.png
+share/chromium/resources/inspector/Images/glossyHeaderSelected.png
+share/chromium/resources/inspector/Images/glossyHeaderSelectedPressed.png
+share/chromium/resources/inspector/Images/goArrow.png
+share/chromium/resources/inspector/Images/graphLabelCalloutLeft.png
+share/chromium/resources/inspector/Images/graphLabelCalloutRight.png
+share/chromium/resources/inspector/Images/largerResourcesButtonGlyph.png
+share/chromium/resources/inspector/Images/localStorage.png
+share/chromium/resources/inspector/Images/networkIcon.png
+share/chromium/resources/inspector/Images/nodeSearchButtonGlyph.png
+share/chromium/resources/inspector/Images/paneAddButtons.png
+share/chromium/resources/inspector/Images/paneBottomGrow.png
+share/chromium/resources/inspector/Images/paneBottomGrowActive.png
+share/chromium/resources/inspector/Images/paneGrowHandleLine.png
+share/chromium/resources/inspector/Images/paneSettingsButtons.png
+share/chromium/resources/inspector/Images/pauseOnExceptionButtonGlyph.png
+share/chromium/resources/inspector/Images/percentButtonGlyph.png
+share/chromium/resources/inspector/Images/popoverArrows.png
+share/chromium/resources/inspector/Images/popoverBackground.png
+share/chromium/resources/inspector/Images/profileGroupIcon.png
+share/chromium/resources/inspector/Images/profileIcon.png
+share/chromium/resources/inspector/Images/profileSmallIcon.png
+share/chromium/resources/inspector/Images/profilesIcon.png
+share/chromium/resources/inspector/Images/profilesSilhouette.png
+share/chromium/resources/inspector/Images/programCounterBorder.png
+share/chromium/resources/inspector/Images/radioDot.png
+share/chromium/resources/inspector/Images/recordButtonGlyph.png
+share/chromium/resources/inspector/Images/recordToggledButtonGlyph.png
+share/chromium/resources/inspector/Images/reloadButtonGlyph.png
+share/chromium/resources/inspector/Images/resourceCSSIcon.png
+share/chromium/resources/inspector/Images/resourceDocumentIcon.png
+share/chromium/resources/inspector/Images/resourceDocumentIconSmall.png
+share/chromium/resources/inspector/Images/resourceJSIcon.png
+share/chromium/resources/inspector/Images/resourcePlainIcon.png
+share/chromium/resources/inspector/Images/resourcePlainIconSmall.png
+share/chromium/resources/inspector/Images/resourcesIcon.png
+share/chromium/resources/inspector/Images/resourcesSizeGraphIcon.png
+share/chromium/resources/inspector/Images/resourcesTimeGraphIcon.png
+share/chromium/resources/inspector/Images/scriptsIcon.png
+share/chromium/resources/inspector/Images/scriptsSilhouette.png
+share/chromium/resources/inspector/Images/searchSmallBlue.png
+share/chromium/resources/inspector/Images/searchSmallBrightBlue.png
+share/chromium/resources/inspector/Images/searchSmallGray.png
+share/chromium/resources/inspector/Images/searchSmallWhite.png
+share/chromium/resources/inspector/Images/segment.png
+share/chromium/resources/inspector/Images/segmentChromium.png
+share/chromium/resources/inspector/Images/segmentEnd.png
+share/chromium/resources/inspector/Images/segmentHover.png
+share/chromium/resources/inspector/Images/segmentHoverChromium.png
+share/chromium/resources/inspector/Images/segmentHoverEnd.png
+share/chromium/resources/inspector/Images/segmentHoverEndChromium.png
+share/chromium/resources/inspector/Images/segmentSelected.png
+share/chromium/resources/inspector/Images/segmentSelectedChromium.png
+share/chromium/resources/inspector/Images/segmentSelectedEnd.png
+share/chromium/resources/inspector/Images/segmentSelectedEndChromium.png
+share/chromium/resources/inspector/Images/sessionStorage.png
+share/chromium/resources/inspector/Images/spinner.gif
+share/chromium/resources/inspector/Images/splitviewDimple.png
+share/chromium/resources/inspector/Images/splitviewDividerBackground.png
+share/chromium/resources/inspector/Images/statusbarBackground.png
+share/chromium/resources/inspector/Images/statusbarBackgroundChromium.png
+share/chromium/resources/inspector/Images/statusbarBottomBackground.png
+share/chromium/resources/inspector/Images/statusbarBottomBackgroundChromium.png
+share/chromium/resources/inspector/Images/statusbarButtons.png
+share/chromium/resources/inspector/Images/statusbarButtonsChromium.png
+share/chromium/resources/inspector/Images/statusbarMenuButton.png
+share/chromium/resources/inspector/Images/statusbarMenuButtonChromium.png
+share/chromium/resources/inspector/Images/statusbarMenuButtonSelected.png
+share/chromium/resources/inspector/Images/statusbarMenuButtonSelectedChromium.png
+share/chromium/resources/inspector/Images/statusbarResizerHorizontal.png
+share/chromium/resources/inspector/Images/statusbarResizerVertical.png
+share/chromium/resources/inspector/Images/successGreenDot.png
+share/chromium/resources/inspector/Images/thumbActiveHoriz.png
+share/chromium/resources/inspector/Images/thumbActiveVert.png
+share/chromium/resources/inspector/Images/thumbHoriz.png
+share/chromium/resources/inspector/Images/thumbHoverHoriz.png
+share/chromium/resources/inspector/Images/thumbHoverVert.png
+share/chromium/resources/inspector/Images/thumbVert.png
+share/chromium/resources/inspector/Images/timelineBarBlue.png
+share/chromium/resources/inspector/Images/timelineBarGray.png
+share/chromium/resources/inspector/Images/timelineBarGreen.png
+share/chromium/resources/inspector/Images/timelineBarOrange.png
+share/chromium/resources/inspector/Images/timelineBarPurple.png
+share/chromium/resources/inspector/Images/timelineBarRed.png
+share/chromium/resources/inspector/Images/timelineBarYellow.png
+share/chromium/resources/inspector/Images/timelineCheckmarks.png
+share/chromium/resources/inspector/Images/timelineDots.png
+share/chromium/resources/inspector/Images/timelineHollowPillBlue.png
+share/chromium/resources/inspector/Images/timelineHollowPillGray.png
+share/chromium/resources/inspector/Images/timelineHollowPillGreen.png
+share/chromium/resources/inspector/Images/timelineHollowPillOrange.png
+share/chromium/resources/inspector/Images/timelineHollowPillPurple.png
+share/chromium/resources/inspector/Images/timelineHollowPillRed.png
+share/chromium/resources/inspector/Images/timelineHollowPillYellow.png
+share/chromium/resources/inspector/Images/timelineIcon.png
+share/chromium/resources/inspector/Images/timelinePillBlue.png
+share/chromium/resources/inspector/Images/timelinePillGray.png
+share/chromium/resources/inspector/Images/timelinePillGreen.png
+share/chromium/resources/inspector/Images/timelinePillOrange.png
+share/chromium/resources/inspector/Images/timelinePillPurple.png
+share/chromium/resources/inspector/Images/timelinePillRed.png
+share/chromium/resources/inspector/Images/timelinePillYellow.png
+share/chromium/resources/inspector/Images/toolbarItemSelected.png
+share/chromium/resources/inspector/Images/trackHoriz.png
+share/chromium/resources/inspector/Images/trackVert.png
+share/chromium/resources/inspector/Images/treeDownTriangleBlack.png
+share/chromium/resources/inspector/Images/treeDownTriangleWhite.png
+share/chromium/resources/inspector/Images/treeRightTriangleBlack.png
+share/chromium/resources/inspector/Images/treeRightTriangleWhite.png
+share/chromium/resources/inspector/Images/treeUpTriangleBlack.png
+share/chromium/resources/inspector/Images/treeUpTriangleWhite.png
+share/chromium/resources/inspector/Images/undockButtonGlyph.png
+share/chromium/resources/inspector/Images/userInputIcon.png
+share/chromium/resources/inspector/Images/userInputPreviousIcon.png
+share/chromium/resources/inspector/Images/userInputResultIcon.png
+share/chromium/resources/inspector/Images/warningIcon.png
+share/chromium/resources/inspector/Images/warningMediumIcon.png
+share/chromium/resources/inspector/Images/warningOrangeDot.png
+share/chromium/resources/inspector/Images/warningsErrors.png
+share/chromium/resources/inspector/devTools.css
+share/chromium/resources/inspector/devtools.html
+share/chromium/xdg-mime
+share/chromium/xdg-settings
diff --git a/chromium-browser/TODO b/chromium-browser/TODO
new file mode 100644
index 0000000..e5bc23d
--- /dev/null
+++ b/chromium-browser/TODO
@@ -0,0 +1,20 @@
+$NetBSD: TODO,v 1.12 2015/09/14 22:26:13 venture37 Exp $
+
+* debug
+* test on Linux/FreeBSD/OpenBSD
+* use libtool
+
+When updating this package, please have a look at:
+- http://secunia.com/advisories/46636/
+- http://secunia.com/advisories/47694/
+- http://www.secunia.com/advisories/62964/
+- http://secunia.com/advisories/63496/
+- http://googlechromereleases.blogspot.com/2015/04/stable-channel-update_28.html
+- http://googlechromereleases.blogspot.com/2015/09/stable-channel-update.html
+- https://www.debian.org/security/2015/dsa-3376
+- https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-6792
+- https://www.debian.org/security/2015/dsa-3418
+- http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-8664
+- http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-1643
+- http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-1644
+- http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-1645
diff --git a/chromium-browser/distinfo b/chromium-browser/distinfo
new file mode 100644
index 0000000..b5bf06f
--- /dev/null
+++ b/chromium-browser/distinfo
@@ -0,0 +1,38 @@
+$NetBSD: distinfo,v 1.11 2012/11/17 02:57:11 gduzan Exp $
+
+SHA1 (chromium-browser/54.0.2820.1.tar.gz) = e190966d1f71a722dbd502d08566432103924448
+RMD160 (chromium-browser/54.0.2820.1.tar.gz) = 20c76bd182bb529a927d479e12039bac57733a31
+SHA512 (chromium-browser/54.0.2820.1.tar.gz) = b8d8e5144964217a367ff672326de729db29e1cd1fb07b51e5d21d7343e2d7d37212b41843f74965f675e473e04b9a75c5115a814a73e8593a02e9684af493e2
+Size (chromium-browser/54.0.2820.1.tar.gz) = 777748332 bytes
+SHA1 (patch-base_BUILD.gn) = 86e371e11400408bb00efa0cd9950c3661a75241
+SHA1 (patch-base_debug_debugger__posix.cc) = d8e481b42d981d6a69c7bd4f48fc2b3a0e5fca3f
+SHA1 (patch-base_debug_debugging__flags.h) = da39a3ee5e6b4b0d3255bfef95601890afd80709
+SHA1 (patch-base_message__loop_message__loop.cc) = 134ab83da65cdba2bee7ea0f8aba58a9ae2a2934
+SHA1 (patch-base_process_process__handle__netbsd.cc) = ab7cfee4e3107edc8759fc8645570c9cbbe2f82b
+SHA1 (patch-base_process_process__iterator.h) = 5fd886e1cb2e514949a36d60bae7f81747199de2
+SHA1 (patch-base_process_process__iterator__netbsd.cc) = 3be0f12a62474bed005bda39b2516f51f24d6045
+SHA1 (patch-base_process_process__metrics__netbsd.cc) = a73867fbda45c71096de8c62db5717e2c1f96089
+SHA1 (patch-base_process_process__metrics__posix.cc) = 28a2984b0031cedffd5bf9f2ea1077d7db32a0dd
+SHA1 (patch-base_process_process__posix.cc) = 9c7b8b7a521a37bf4a82b23d5aca2a6600b40ad6
+SHA1 (patch-base_sys__info__netbsd.cc) = 3ec352d89cff08c54d64ba8f7cc55edd272a7b31
+SHA1 (patch-base_third__party_libevent_event-config.h) = 33db5372673f795e15bb05fae2ad20042dd08e0a
+SHA1 (patch-base_third__party_libevent_netbsd_config.h) = 24ac9717d058c80e11731fd8d537c0389f2df64e
+SHA1 (patch-base_third__party_libevent_netbsd_event-config.h) = 4bc1854a493403ebc893d5dddf74cd6ae666871e
+SHA1 (patch-base_threading_platform__thread__netbsd.cc) = d0b3d77d70431a89b2086400512ce4f8dea3b153
+SHA1 (patch-base_trace__event_malloc__dump__provider.cc) = ad65236630afb07a6c5e5826b61a62bc3a6b3e87
+SHA1 (patch-base_trace__event_memory__dump__manager.cc) = 417cb36c46c8a6c61129865b3d03196c12960ae8
+SHA1 (patch-base_trace__event_process__memory__dump.cc) = 93f2cbf50de0101fb96e682ba8bbaa4e8672129e
+SHA1 (patch-build_config_BUILDCONFIG.gn) = 8c4b8fc0ecb1f85a4fa496dc571c268a0dc0ce83
+SHA1 (patch-build_config_compiler_BUILD.gn) = 1fed5346671a1217fdcf24bfaa07dfee123ac5e1
+SHA1 (patch-build_toolchain_netbsd_BUILD.gn) = a725cd331e1da37a14f9d907ead139129fb096a8
+SHA1 (patch-chrome_common_extensions_docs_examples_api_nativeMessaging_host_install__host.sh) = f5ef66b075389663f6dbdce5dfb35643d15c6915
+SHA1 (patch-chrome_common_extensions_docs_examples_api_nativeMessaging_host_uninstall__host.sh) = 60e326221e112afa074eb9abdaf4c77024b5000c
+SHA1 (patch-third__party_icu_android_patch__locale.sh) = 136608a43c01d456f80e094c7d79a90dd5e35b76
+SHA1 (patch-third__party_icu_source_configure) = 288bb5fb8e0ad5320b1dd40463148b36943576a1
+SHA1 (patch-third__party_protobuf_post__process__dist.sh) = 37b9e9d045488d4363b004ac7622fc16ea1da377
+SHA1 (patch-tools_battor__agent_BUILD.gn) = 957316e0916dfc4063d6cea68a96d3154d0ade2a
+SHA1 (patch-tools_gn_bootstrap_bootstrap.py) = 5868d6842def588c3eaef5d69473543d8eff40d0
+SHA1 (patch-tools_gn_function__exec__script.cc) = da39a3ee5e6b4b0d3255bfef95601890afd80709
+SHA1 (patch-tools_gn_setup.cc) = aaa675ca5d96d981c6264e8332b26fc560d3101a
+SHA1 (patch-tools_gn_variables.cc) = f5b38601e616696f370e0a22b3dbbff7abb628f6
+SHA1 (patch-v8_tools_run-llprof.sh) = 8ea2932981ce8d89f0cc2cd8979bd5e07870645e
diff --git a/chromium-browser/patches/patch-base_BUILD.gn b/chromium-browser/patches/patch-base_BUILD.gn
new file mode 100644
index 0000000..2c89d39
--- /dev/null
+++ b/chromium-browser/patches/patch-base_BUILD.gn
@@ -0,0 +1,32 @@
+$NetBSD$
+
+--- base/BUILD.gn.orig	2016-08-05 17:13:37.000000000 +0000
++++ base/BUILD.gn
+@@ -636,16 +636,19 @@ component("base") {
+     "process/process_iterator.h",
+ 
+     #"process/process_iterator_freebsd.cc",  # Unused in Chromium build.
++    "process/process_iterator_netbsd.cc",
+     "process/process_iterator_linux.cc",
+     "process/process_iterator_mac.cc",
+ 
+     #"process/process_iterator_openbsd.cc",  # Unused in Chromium build.
++    "process/process_iterator_netbsd.cc",
+     "process/process_iterator_win.cc",
+     "process/process_linux.cc",
+     "process/process_metrics.cc",
+     "process/process_metrics.h",
+ 
+     #"process/process_metrics_freebsd.cc",  # Unused in Chromium build.
++    "process/process_metrics_netbsd.cc",
+     "process/process_metrics_ios.cc",
+     "process/process_metrics_linux.cc",
+     "process/process_metrics_mac.cc",
+@@ -759,6 +762,7 @@ component("base") {
+     "sys_info_chromeos.cc",
+ 
+     #"sys_info_freebsd.cc",  # Unused in Chromium build.
++    "sys_info_netbsd.cc",  # Unused in Chromium build.
+     "sys_info_ios.mm",
+     "sys_info_linux.cc",
+     "sys_info_mac.mm",
diff --git a/chromium-browser/patches/patch-base_debug_debugger__posix.cc b/chromium-browser/patches/patch-base_debug_debugger__posix.cc
new file mode 100644
index 0000000..3a3ffd3
--- /dev/null
+++ b/chromium-browser/patches/patch-base_debug_debugger__posix.cc
@@ -0,0 +1,65 @@
+$NetBSD$
+
+--- base/debug/debugger_posix.cc.orig	2016-08-05 17:13:37.000000000 +0000
++++ base/debug/debugger_posix.cc
+@@ -54,7 +54,47 @@
+ namespace base {
+ namespace debug {
+ 
+-#if defined(OS_MACOSX) || defined(OS_BSD)
++#if defined(OS_NETBSD)
++bool BeingDebugged() {
++  static bool is_set = false;
++  static bool being_debugged = false;
++  int ret;
++
++  if (is_set)
++    return being_debugged;
++
++  int mib[6];
++  size_t size;
++  struct kinfo_proc2 kproc;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = getpid();
++  mib[4] = sizeof(kinfo_proc2);
++  mib[5] = 1;
++
++  ret = sysctl((int *)mib, 6, NULL, &size, NULL, 0);
++  if (ret == -1) {
++    return -1;
++  }
++
++  mib[5] = (size / sizeof(kinfo_proc2));
++
++  ret = sysctl((int *)mib, 6, &kproc, &size, NULL, 0);
++  if (ret == -1) {
++    return -1;
++    is_set = true;
++    being_debugged = false;
++    return being_debugged;
++  }
++
++  is_set = true;
++  being_debugged = (kproc.p_flag & P_TRACED) != 0;
++  return being_debugged;
++
++}
++#elif defined(OS_MACOSX) || defined(OS_BSD)
+ 
+ // Based on Apple's recommended method as described in
+ // http://developer.apple.com/qa/qa2004/qa1361.html
+@@ -90,7 +130,11 @@ bool BeingDebugged() {
+ 
+   // Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE.  The source and
+   // binary interfaces may change.
++#if defined(OS_NETBSD)
++  struct kinfo_proc2 info;
++#else
+   struct kinfo_proc info;
++#endif
+   size_t info_size = sizeof(info);
+ 
+ #if defined(OS_OPENBSD)
diff --git a/chromium-browser/patches/patch-base_debug_debugging__flags.h b/chromium-browser/patches/patch-base_debug_debugging__flags.h
new file mode 100644
index 0000000..e69de29
diff --git a/chromium-browser/patches/patch-base_message__loop_message__loop.cc b/chromium-browser/patches/patch-base_message__loop_message__loop.cc
new file mode 100644
index 0000000..63b1615
--- /dev/null
+++ b/chromium-browser/patches/patch-base_message__loop_message__loop.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/message_loop/message_loop.cc.orig	2016-08-05 17:13:37.000000000 +0000
++++ base/message_loop/message_loop.cc
+@@ -214,7 +214,7 @@ std::unique_ptr<MessagePump> MessageLoop
+ // TODO(rvargas): Get rid of the OS guards.
+ #if defined(USE_GLIB) && !defined(OS_NACL)
+   typedef MessagePumpGlib MessagePumpForUI;
+-#elif defined(OS_LINUX) && !defined(OS_NACL)
++#elif (defined(OS_LINUX) && !defined(OS_NACL)) || defined(OS_BSD)
+   typedef MessagePumpLibevent MessagePumpForUI;
+ #endif
+ 
diff --git a/chromium-browser/patches/patch-base_process_process__handle__netbsd.cc b/chromium-browser/patches/patch-base_process_process__handle__netbsd.cc
new file mode 100644
index 0000000..2eade4e
--- /dev/null
+++ b/chromium-browser/patches/patch-base_process_process__handle__netbsd.cc
@@ -0,0 +1,72 @@
+$NetBSD$
+
+--- base/process/process_handle_netbsd.cc.orig	2016-08-05 20:43:29.878159383 +0000
++++ base/process/process_handle_netbsd.cc
+@@ -0,0 +1,67 @@
++// Copyright (c) 2011 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 "base/macros.h"
++#include "base/process/process_handle.h"
++
++#include <stddef.h>
++#include <sys/sysctl.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++namespace base {
++
++ProcessId GetParentProcessId(ProcessHandle process) {
++  struct kinfo_proc2 info;
++  size_t info_size = sizeof(struct kinfo_proc2);
++  int mib[6];
++  int ret;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = process;
++  mib[4] = info_size;
++  mib[5] = 1;
++
++  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
++  if (ret == -1) {
++    return -1;
++  }
++  if (info_size == 0) {
++    return -1;
++  }
++  
++  return info.p_ppid;
++}
++
++FilePath GetProcessExecutablePath(ProcessHandle process) {
++  struct kinfo_proc2 info;
++  size_t size = sizeof(struct kinfo_proc2);
++  int mib[4];
++  int ret;
++  char pathname[MAXPATHLEN];
++  
++  mib[0] = CTL_KERN; 
++  mib[1] = KERN_PROC_ARGS;
++  mib[2] = process;
++  mib[3] = KERN_PROC_PATHNAME;
++  
++  ret = sysctl(mib, 4, NULL, &size, NULL, 0);
++  if (ret == -1) {
++    return FilePath();
++  }
++
++  ret = sysctl(mib, 4, pathname, &size, NULL, 0);
++  if (ret == -1) {
++    return FilePath();
++  }
++  if (size == 0 || strlen(pathname) == 0) {
++    return FilePath();
++  }
++
++  return FilePath(pathname);
++}
++
++}  // namespace base
diff --git a/chromium-browser/patches/patch-base_process_process__iterator.h b/chromium-browser/patches/patch-base_process_process__iterator.h
new file mode 100644
index 0000000..97430b6
--- /dev/null
+++ b/chromium-browser/patches/patch-base_process_process__iterator.h
@@ -0,0 +1,25 @@
+$NetBSD$
+
+--- base/process/process_iterator.h.orig	2016-08-05 17:13:37.000000000 +0000
++++ base/process/process_iterator.h
+@@ -22,7 +22,7 @@
+ #if defined(OS_WIN)
+ #include <windows.h>
+ #include <tlhelp32.h>
+-#elif defined(OS_MACOSX) || defined(OS_OPENBSD)
++#elif defined(OS_MACOSX) || defined(OS_NETBSD) || defined(OS_OPENBSD)
+ #include <sys/sysctl.h>
+ #elif defined(OS_FREEBSD)
+ #include <sys/user.h>
+@@ -110,7 +110,11 @@ class BASE_EXPORT ProcessIterator {
+   HANDLE snapshot_;
+   bool started_iteration_;
+ #elif defined(OS_MACOSX) || defined(OS_BSD)
++#if defined(OS_NETBSD)
++  std::vector<kinfo_proc2> kinfo_procs_;
++#else
+   std::vector<kinfo_proc> kinfo_procs_;
++#endif
+   size_t index_of_kinfo_proc_;
+ #elif defined(OS_POSIX)
+   DIR* procfs_dir_;
diff --git a/chromium-browser/patches/patch-base_process_process__iterator__netbsd.cc b/chromium-browser/patches/patch-base_process_process__iterator__netbsd.cc
new file mode 100644
index 0000000..0d5cdf9
--- /dev/null
+++ b/chromium-browser/patches/patch-base_process_process__iterator__netbsd.cc
@@ -0,0 +1,150 @@
+$NetBSD$
+
+--- base/process/process_iterator_netbsd.cc.orig	2016-08-05 20:43:29.887677322 +0000
++++ base/process/process_iterator_netbsd.cc
+@@ -0,0 +1,145 @@
++// Copyright (c) 2013 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 "base/process/process_iterator.h"
++
++#include <errno.h>
++#include <sys/types.h>  
++#include <stddef.h>
++#include <sys/sysctl.h>
++#include <unistd.h>
++
++/* getuid() */
++#include <unistd.h>
++#include <sys/types.h>
++
++#include "base/logging.h"
++#include "base/macros.h"
++#include "base/strings/string_split.h"
++#include "base/strings/string_util.h"
++
++namespace base {
++
++ProcessIterator::ProcessIterator(const ProcessFilter* filter)
++    : index_of_kinfo_proc_(),
++      filter_(filter) {
++
++  int mib[6];
++
++  printf("%s\n", __PRETTY_FUNCTION__);
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_UID;
++  mib[3] = getuid();
++  mib[4] = sizeof(struct kinfo_proc2);
++  mib[5] = 0;
++  
++  bool done = false;
++  int try_num = 1;
++  const int max_tries = 10;
++  
++  do {
++    size_t len = 0;
++    if (sysctl(mib, 6, NULL, &len, NULL, 0) <0 ){
++      LOG(ERROR) << "failed to get the size needed for the process list";
++      kinfo_procs_.resize(0);
++      done = true;
++    } else {
++      size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc2);
++      // Leave some spare room for process table growth (more could show up
++      // between when we check and now)
++      num_of_kinfo_proc += 16;
++      kinfo_procs_.resize(num_of_kinfo_proc);
++      len = num_of_kinfo_proc * sizeof(struct kinfo_proc2);
++      if (sysctl(mib, 6, &kinfo_procs_[0], &len, NULL, 0) <0) {                                                                                             
++        // If we get a mem error, it just means we need a bigger buffer, so
++        // loop around again.  Anything else is a real error and give up.
++        if (errno != ENOMEM) {
++          LOG(ERROR) << "failed to get the process list";
++          kinfo_procs_.resize(0);
++          done = true;
++        }
++      } else {
++        // Got the list, just make sure we're sized exactly right
++        size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc2);                                                                                        
++        kinfo_procs_.resize(num_of_kinfo_proc);
++        done = true;
++      }
++    }
++  } while (!done && (try_num++ < max_tries));
++
++  if (!done) {
++    LOG(ERROR) << "failed to collect the process list in a few tries";
++    kinfo_procs_.resize(0);
++ }
++}
++
++ProcessIterator::~ProcessIterator() {
++}
++
++bool ProcessIterator::CheckForNextProcess() {
++  std::string data;
++  for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
++    kinfo_proc2& kinfo = kinfo_procs_[index_of_kinfo_proc_];
++
++    // Skip processes just awaiting collection
++    if ((kinfo.p_pid > 0) && (kinfo.p_stat == SZOMB))
++      continue;
++
++    int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.p_pid };
++
++    // Find out what size buffer we need.
++    size_t data_len = 0;
++    if (sysctl(mib, arraysize(mib), NULL, &data_len, NULL, 0) < 0) {
++      DVPLOG(1) << "failed to figure out the buffer size for a commandline";                                                                                
++      continue;
++    }
++
++    data.resize(data_len);
++    if (sysctl(mib, arraysize(mib), &data[0], &data_len, NULL, 0) < 0) {
++      DVPLOG(1) << "failed to fetch a commandline";
++      continue;
++    }
++    // |data| contains all the command line parameters of the process, separated                                                                            
++    // by blocks of one or more null characters. We tokenize |data| into a
++    // vector of strings using '\0' as a delimiter and populate
++    // |entry_.cmd_line_args_|.
++    std::string delimiters;
++    delimiters.push_back('\0');
++    entry_.cmd_line_args_ = SplitString(data, delimiters, KEEP_WHITESPACE,
++                                        SPLIT_WANT_NONEMPTY);
++     
++    // |data| starts with the full executable path followed by a null character.
++    // We search for the first instance of '\0' and extract everything before it                                                                            
++    // to populate |entry_.exe_file_|.
++    size_t exec_name_end = data.find('\0');
++    if (exec_name_end == std::string::npos) {
++      DLOG(ERROR) << "command line data didn't match expected format";
++      continue;
++    }
++
++    entry_.pid_ = kinfo.p_pid;
++    entry_.ppid_ = kinfo.p_ppid;
++    entry_.gid_ = kinfo.p__pgid;                                                                                                                            
++    size_t last_slash = data.rfind('/', exec_name_end);
++    if (last_slash == std::string::npos)
++      entry_.exe_file_.assign(data, 0, exec_name_end);
++    else
++      entry_.exe_file_.assign(data, last_slash + 1,
++                              exec_name_end - last_slash - 1);
++    // Start w/ the next entry next time through
++    ++index_of_kinfo_proc_;
++    // Done
++    return true;                                                                                                                                            
++  }
++  return false;
++}
++
++bool NamedProcessIterator::IncludeEntry() {
++  return (executable_name_ == entry().exe_file() &&
++          ProcessIterator::IncludeEntry());
++}
++
++}  // namespace base
diff --git a/chromium-browser/patches/patch-base_process_process__metrics__netbsd.cc b/chromium-browser/patches/patch-base_process_process__metrics__netbsd.cc
new file mode 100644
index 0000000..521ed35
--- /dev/null
+++ b/chromium-browser/patches/patch-base_process_process__metrics__netbsd.cc
@@ -0,0 +1,218 @@
+$NetBSD$
+
+--- base/process/process_metrics_netbsd.cc.orig	2016-08-05 20:43:29.892467804 +0000
++++ base/process/process_metrics_netbsd.cc
+@@ -0,0 +1,213 @@
++// Copyright (c) 2013 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 "base/process/process_metrics.h"
++
++#include <stddef.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <unistd.h>
++
++#include "base/macros.h"
++#include "base/sys_info.h"
++
++#include <unistd.h> /* getpagesize() */
++#include <fcntl.h>  /* O_RDONLY */
++
++#include <uvm/uvm_extern.h> /* struct vmtotal */
++
++#include "base/files/dir_reader_posix.h"
++#include "base/files/file_util.h"
++#include "base/logging.h"
++#include "base/memory/ptr_util.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/strings/string_split.h"
++#include "base/strings/string_tokenizer.h"
++#include "base/strings/string_util.h"
++#include "base/sys_info.h"
++#include "base/threading/thread_restrictions.h"
++#include "build/build_config.h"
++
++namespace base {
++
++ProcessMetrics::ProcessMetrics(ProcessHandle process)
++    : process_(process),
++      last_system_time_(0),
++      last_cpu_(0) {
++  processor_count_ = base::SysInfo::NumberOfProcessors();
++}
++
++// static
++std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(ProcessHandle process) {
++  return WrapUnique(new ProcessMetrics(process));
++}
++
++size_t ProcessMetrics::GetPagefileUsage() const {
++  struct kinfo_proc2 info;
++  int mib[6];
++  size_t info_size = sizeof(info);
++  int ret;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = process_;
++  mib[4] = info_size;
++  mib[5] = 1;
++
++  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  if (info_size == 0) {
++    return 0;
++  }
++
++  return (info.p_vm_tsize + info.p_vm_dsize + info.p_vm_ssize);
++}
++
++size_t ProcessMetrics::GetPeakPagefileUsage() const {
++  printf("%s\n", __PRETTY_FUNCTION__);
++  return 0;
++}
++
++size_t ProcessMetrics::GetWorkingSetSize() const {
++  struct kinfo_proc2 info;
++  int mib[6];
++  size_t info_size = sizeof(info);
++  int ret;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = process_;
++  mib[4] = info_size;
++  mib[5] = 1;
++
++  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  if (info_size == 0) {
++    return 0;
++  }
++
++  return info.p_vm_rssize * getpagesize();
++}
++
++size_t ProcessMetrics::GetPeakWorkingSetSize() const {
++  return 0;
++}
++
++bool ProcessMetrics::GetMemoryBytes(size_t* private_bytes,
++                                    size_t* shared_bytes) {
++  WorkingSetKBytes ws_usage;
++  if (!GetWorkingSetKBytes(&ws_usage))
++    return false;
++
++  if (private_bytes)
++    *private_bytes = ws_usage.priv << 10;
++
++  if (shared_bytes)
++    *shared_bytes = ws_usage.shared * 1024;
++
++  return true;
++}
++
++bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const {
++// TODO(bapt) be sure we can't be precise
++  size_t priv = GetWorkingSetSize();
++  if (!priv)
++    return false;
++  ws_usage->priv = priv / 1024;
++  ws_usage->shareable = 0;
++  ws_usage->shared = 0;
++
++  return true;
++}
++
++double ProcessMetrics::GetCPUUsage() {
++  struct kinfo_proc2 info;
++  int mib[6];
++  size_t info_size = sizeof(info);
++  int ret;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = process_;
++  mib[4] = info_size;
++  mib[5] = 1;
++
++  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  if (info_size == 0) {
++    return 0;
++  }
++
++  return (info.p_pctcpu / FSCALE) * 100.0;
++}
++
++bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
++/* ryoon: should be written */
++  return false;
++}
++
++size_t GetSystemCommitCharge() {
++  int mib[2], pagesize;
++  struct vmtotal vmtotal;
++  unsigned long mem_total, mem_free, mem_inactive;
++  size_t len = sizeof(vmtotal);
++  int ret;
++
++  printf("%s\n", __PRETTY_FUNCTION__);
++
++  mib[0] = CTL_VM;
++  mib[1] = VM_METER;
++
++  ret = sysctl(mib, 2, &vmtotal, &len, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  mem_total = vmtotal.t_vm;
++  mem_free = vmtotal.t_free;
++  mem_inactive = vmtotal.t_vm - vmtotal.t_avm;
++
++  pagesize = getpagesize();
++
++  return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
++}
++
++int GetNumberOfThreads(ProcessHandle process) {
++  int ret;
++  int mib[6];
++  struct kinfo_proc2 info;
++  size_t info_size = sizeof(info);
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = process;
++  mib[4] = info_size;
++  mib[5] = 1;
++
++  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  if (info_size == 0) {
++    return 0;
++  }
++
++  return info.p_nlwps;
++}
++
++}  // namespace base
diff --git a/chromium-browser/patches/patch-base_process_process__metrics__posix.cc b/chromium-browser/patches/patch-base_process_process__metrics__posix.cc
new file mode 100644
index 0000000..276f301
--- /dev/null
+++ b/chromium-browser/patches/patch-base_process_process__metrics__posix.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/process/process_metrics_posix.cc.orig	2016-08-05 17:13:37.000000000 +0000
++++ base/process/process_metrics_posix.cc
+@@ -33,6 +33,8 @@ static const rlim_t kSystemDefaultMaxFds
+ static const rlim_t kSystemDefaultMaxFds = 8192;
+ #elif defined(OS_FREEBSD)
+ static const rlim_t kSystemDefaultMaxFds = 8192;
++#elif defined(OS_NETBSD)
++static const rlim_t kSystemDefaultMaxFds = 1024;
+ #elif defined(OS_OPENBSD)
+ static const rlim_t kSystemDefaultMaxFds = 256;
+ #elif defined(OS_ANDROID)
diff --git a/chromium-browser/patches/patch-base_process_process__posix.cc b/chromium-browser/patches/patch-base_process_process__posix.cc
new file mode 100644
index 0000000..000445a
--- /dev/null
+++ b/chromium-browser/patches/patch-base_process_process__posix.cc
@@ -0,0 +1,41 @@
+$NetBSD$
+
+--- base/process/process_posix.cc.orig	2016-08-05 17:13:37.000000000 +0000
++++ base/process/process_posix.cc
+@@ -8,6 +8,9 @@
+ #include <stdint.h>
+ #include <sys/resource.h>
+ #include <sys/wait.h>
++#if defined(OS_POSIX)
++#include <signal.h>
++#endif
+ 
+ #include "base/files/scoped_file.h"
+ #include "base/logging.h"
+@@ -16,7 +19,7 @@
+ #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
+ #include "build/build_config.h"
+ 
+-#if defined(OS_MACOSX)
++#if defined(OS_MACOSX) || defined(OS_BSD)
+ #include <sys/event.h>
+ #endif
+ 
+@@ -86,7 +89,7 @@ bool WaitpidWithTimeout(base::ProcessHan
+   return ret_pid > 0;
+ }
+ 
+-#if defined(OS_MACOSX)
++#if defined(OS_MACOSX) || defined(OS_BSD)
+ // Using kqueue on Mac so that we can wait on non-child processes.
+ // We can't use kqueues on child processes because we need to reap
+ // our own children using wait.
+@@ -183,7 +186,7 @@ bool WaitForExitWithTimeoutImpl(base::Pr
+   base::ProcessHandle parent_pid = base::GetParentProcessId(handle);
+   base::ProcessHandle our_pid = base::GetCurrentProcessHandle();
+   if (parent_pid != our_pid) {
+-#if defined(OS_MACOSX)
++#if defined(OS_MACOSX) || defined(OS_BSD)
+     // On Mac we can wait on non child processes.
+     return WaitForSingleNonChildProcess(handle, timeout);
+ #else
diff --git a/chromium-browser/patches/patch-base_sys__info__netbsd.cc b/chromium-browser/patches/patch-base_sys__info__netbsd.cc
new file mode 100644
index 0000000..17a1364
--- /dev/null
+++ b/chromium-browser/patches/patch-base_sys__info__netbsd.cc
@@ -0,0 +1,105 @@
+$NetBSD$
+
+--- base/sys_info_netbsd.cc.orig	2016-08-05 20:43:29.897148024 +0000
++++ base/sys_info_netbsd.cc
+@@ -0,0 +1,100 @@
++// Copyright (c) 2011 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 "base/sys_info.h"
++
++#include <stddef.h>
++#include <stdint.h>
++#include <sys/param.h>
++#include <sys/shm.h>
++#include <sys/sysctl.h>
++
++#include "base/logging.h"
++#include "base/macros.h"
++
++namespace {
++
++int64_t AmountOfMemory(int pages_name) {
++  long pages = sysconf(pages_name);
++  long page_size = sysconf(_SC_PAGESIZE);
++  if (pages == -1 || page_size == -1) {
++    NOTREACHED();
++    return 0;
++  }
++  return static_cast<int64_t>(pages) * page_size;
++}
++
++}  // namespace
++
++namespace base {
++
++// static
++int SysInfo::NumberOfProcessors() {
++  int mib[] = { CTL_HW, HW_NCPU };
++  int ncpu;
++  size_t size = sizeof(ncpu);
++  if (sysctl(mib, arraysize(mib), &ncpu, &size, NULL, 0) < 0) {
++    NOTREACHED();
++    return 1;
++  }
++  return ncpu;
++}
++
++// static
++int64_t SysInfo::AmountOfPhysicalMemory() {
++  return AmountOfMemory(_SC_PHYS_PAGES);
++}
++
++// static
++int64_t SysInfo::AmountOfAvailablePhysicalMemory() {
++  int ret;
++  int mib[2];
++  int64_t memsize;
++  unsigned long size = sizeof(memsize);
++
++  mib[0] = CTL_HW;
++  mib[1] = HW_PHYSMEM64;
++
++  ret = sysctl(mib, 2, &memsize, &size, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++  
++  return memsize;
++}
++
++#if 0
++// static
++uint64_t SysInfo::MaxSharedMemorySize() {
++  int mib[3];
++  size_t limit;
++  size_t size = sizeof(limit);
++  int ret;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_SYSVIPC;
++  mib[2] = KERN_SYSVIPC_SHMMAX;
++
++  ret = sysctl(mib, 3, &limit, &size, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  return static_cast<uint64_t>(limit);
++}
++#endif
++
++// static
++std::string SysInfo::CPUModelName() {
++  int mib[] = { CTL_HW, HW_MODEL };
++  char name[256];
++  size_t len = arraysize(name);
++  if (sysctl(mib, arraysize(mib), name, &len, NULL, 0) < 0) {
++    NOTREACHED();
++    return std::string();
++  }
++  return name;
++}
++
++}  // namespace base
diff --git a/chromium-browser/patches/patch-base_third__party_libevent_event-config.h b/chromium-browser/patches/patch-base_third__party_libevent_event-config.h
new file mode 100644
index 0000000..84067f5
--- /dev/null
+++ b/chromium-browser/patches/patch-base_third__party_libevent_event-config.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/third_party/libevent/event-config.h.orig	2016-08-05 17:13:37.000000000 +0000
++++ base/third_party/libevent/event-config.h
+@@ -15,6 +15,8 @@
+ #include "base/third_party/libevent/linux/event-config.h"
+ #elif defined(__FreeBSD__)
+ #include "base/third_party/libevent/freebsd/event-config.h"
++#elif defined(__NetBSD__)
++#include "base/third_party/libevent/netbsd/event-config.h"
+ #elif defined(__sun)
+ #include "base/third_party/libevent/solaris/event-config.h"
+ #else
diff --git a/chromium-browser/patches/patch-base_third__party_libevent_netbsd_config.h b/chromium-browser/patches/patch-base_third__party_libevent_netbsd_config.h
new file mode 100644
index 0000000..def4636
--- /dev/null
+++ b/chromium-browser/patches/patch-base_third__party_libevent_netbsd_config.h
@@ -0,0 +1,271 @@
+$NetBSD$
+
+--- base/third_party/libevent/netbsd/config.h.orig	2016-08-05 20:46:52.478304126 +0000
++++ base/third_party/libevent/netbsd/config.h
+@@ -0,0 +1,266 @@
++/* config.h.  Generated from config.h.in by configure.  */
++/* config.h.in.  Generated from configure.in by autoheader.  */
++
++/* Define if clock_gettime is available in libc */
++#define DNS_USE_CPU_CLOCK_FOR_ID 1
++
++/* Define is no secure id variant is available */
++/* #undef DNS_USE_GETTIMEOFDAY_FOR_ID */
++
++/* Define to 1 if you have the `clock_gettime' function. */
++#define HAVE_CLOCK_GETTIME 1
++
++/* Define if /dev/poll is available */
++/* #undef HAVE_DEVPOLL */
++
++/* Define to 1 if you have the <dlfcn.h> header file. */
++#define HAVE_DLFCN_H 1
++
++/* Define if your system supports the epoll system calls */
++/* #undef HAVE_EPOLL */
++
++/* Define to 1 if you have the `epoll_ctl' function. */
++/* #undef HAVE_EPOLL_CTL */
++
++/* Define if your system supports event ports */
++/* #undef HAVE_EVENT_PORTS */
++
++/* Define to 1 if you have the `fcntl' function. */
++#define HAVE_FCNTL 1
++
++/* Define to 1 if you have the <fcntl.h> header file. */
++#define HAVE_FCNTL_H 1
++
++/* Define to 1 if the system has the type `fd_mask'. */
++#define HAVE_FD_MASK 1
++
++/* Define to 1 if you have the `getaddrinfo' function. */
++#define HAVE_GETADDRINFO 1
++
++/* Define to 1 if you have the `getegid' function. */
++#define HAVE_GETEGID 1
++
++/* Define to 1 if you have the `geteuid' function. */
++#define HAVE_GETEUID 1
++
++/* Define to 1 if you have the `getnameinfo' function. */
++#define HAVE_GETNAMEINFO 1
++
++/* Define to 1 if you have the `gettimeofday' function. */
++#define HAVE_GETTIMEOFDAY 1
++
++/* Define to 1 if you have the `inet_ntop' function. */
++#define HAVE_INET_NTOP 1
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#define HAVE_INTTYPES_H 1
++
++/* Define to 1 if you have the `issetugid' function. */
++#define HAVE_ISSETUGID 1
++
++/* Define to 1 if you have the `kqueue' function. */
++#define HAVE_KQUEUE 1
++
++/* Define to 1 if you have the `nsl' library (-lnsl). */
++/* #undef HAVE_LIBNSL */
++
++/* Define to 1 if you have the `resolv' library (-lresolv). */
++/* #undef HAVE_LIBRESOLV */
++
++/* Define to 1 if you have the `rt' library (-lrt). */
++#define HAVE_LIBRT 1
++
++/* Define to 1 if you have the `socket' library (-lsocket). */
++/* #undef HAVE_LIBSOCKET */
++
++/* Define to 1 if you have the <memory.h> header file. */
++#define HAVE_MEMORY_H 1
++
++/* Define to 1 if you have the <netinet/in6.h> header file. */
++/* #undef HAVE_NETINET_IN6_H */
++
++/* Define to 1 if you have the `poll' function. */
++#define HAVE_POLL 1
++
++/* Define to 1 if you have the <poll.h> header file. */
++#define HAVE_POLL_H 1
++
++/* Define to 1 if you have the `port_create' function. */
++/* #undef HAVE_PORT_CREATE */
++
++/* Define to 1 if you have the <port.h> header file. */
++/* #undef HAVE_PORT_H */
++
++/* Define to 1 if you have the `select' function. */
++#define HAVE_SELECT 1
++
++/* Define if F_SETFD is defined in <fcntl.h> */
++#define HAVE_SETFD 1
++
++/* Define to 1 if you have the `sigaction' function. */
++#define HAVE_SIGACTION 1
++
++/* Define to 1 if you have the `signal' function. */
++#define HAVE_SIGNAL 1
++
++/* Define to 1 if you have the <signal.h> header file. */
++#define HAVE_SIGNAL_H 1
++
++/* Define to 1 if you have the <stdarg.h> header file. */
++#define HAVE_STDARG_H 1
++
++/* Define to 1 if you have the <stdint.h> header file. */
++#define HAVE_STDINT_H 1
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++#define HAVE_STDLIB_H 1
++
++/* Define to 1 if you have the <strings.h> header file. */
++#define HAVE_STRINGS_H 1
++
++/* Define to 1 if you have the <string.h> header file. */
++#define HAVE_STRING_H 1
++
++/* Define to 1 if you have the `strlcpy' function. */
++#define HAVE_STRLCPY 1
++
++/* Define to 1 if you have the `strsep' function. */
++#define HAVE_STRSEP 1
++
++/* Define to 1 if you have the `strtok_r' function. */
++#define HAVE_STRTOK_R 1
++
++/* Define to 1 if you have the `strtoll' function. */
++#define HAVE_STRTOLL 1
++
++/* Define to 1 if the system has the type `struct in6_addr'. */
++#define HAVE_STRUCT_IN6_ADDR 1
++
++/* Define to 1 if you have the <sys/devpoll.h> header file. */
++/* #undef HAVE_SYS_DEVPOLL_H */
++
++/* Define to 1 if you have the <sys/epoll.h> header file. */
++/* #undef HAVE_SYS_EPOLL_H */
++
++/* Define to 1 if you have the <sys/event.h> header file. */
++#define HAVE_SYS_EVENT_H 1
++
++/* Define to 1 if you have the <sys/ioctl.h> header file. */
++#define HAVE_SYS_IOCTL_H 1
++
++/* Define to 1 if you have the <sys/param.h> header file. */
++#define HAVE_SYS_PARAM_H 1
++
++/* Define to 1 if you have the <sys/queue.h> header file. */
++#define HAVE_SYS_QUEUE_H 1
++
++/* Define to 1 if you have the <sys/select.h> header file. */
++#define HAVE_SYS_SELECT_H 1
++
++/* Define to 1 if you have the <sys/socket.h> header file. */
++#define HAVE_SYS_SOCKET_H 1
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#define HAVE_SYS_STAT_H 1
++
++/* Define to 1 if you have the <sys/time.h> header file. */
++#define HAVE_SYS_TIME_H 1
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#define HAVE_SYS_TYPES_H 1
++
++/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
++#define HAVE_TAILQFOREACH 1
++
++/* Define if timeradd is defined in <sys/time.h> */
++#define HAVE_TIMERADD 1
++
++/* Define if timerclear is defined in <sys/time.h> */
++#define HAVE_TIMERCLEAR 1
++
++/* Define if timercmp is defined in <sys/time.h> */
++#define HAVE_TIMERCMP 1
++
++/* Define if timerisset is defined in <sys/time.h> */
++#define HAVE_TIMERISSET 1
++
++/* Define to 1 if the system has the type `uint16_t'. */
++#define HAVE_UINT16_T 1
++
++/* Define to 1 if the system has the type `uint32_t'. */
++#define HAVE_UINT32_T 1
++
++/* Define to 1 if the system has the type `uint64_t'. */
++#define HAVE_UINT64_T 1
++
++/* Define to 1 if the system has the type `uint8_t'. */
++#define HAVE_UINT8_T 1
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#define HAVE_UNISTD_H 1
++
++/* Define to 1 if you have the `vasprintf' function. */
++#define HAVE_VASPRINTF 1
++
++/* Define if kqueue works correctly with pipes */
++#define HAVE_WORKING_KQUEUE 1
++
++/* Name of package */
++#define PACKAGE "libevent"
++
++/* Define to the address where bug reports for this package should be sent. */
++#define PACKAGE_BUGREPORT ""
++
++/* Define to the full name of this package. */
++#define PACKAGE_NAME ""
++
++/* Define to the full name and version of this package. */
++#define PACKAGE_STRING ""
++
++/* Define to the one symbol short name of this package. */
++#define PACKAGE_TARNAME ""
++
++/* Define to the version of this package. */
++#define PACKAGE_VERSION ""
++
++/* The size of `int', as computed by sizeof. */
++#define SIZEOF_INT 4
++
++/* The size of `long', as computed by sizeof. */
++#define SIZEOF_LONG 8
++
++/* The size of `long long', as computed by sizeof. */
++#define SIZEOF_LONG_LONG 8
++
++/* The size of `short', as computed by sizeof. */
++#define SIZEOF_SHORT 2
++
++/* Define to 1 if you have the ANSI C header files. */
++#define STDC_HEADERS 1
++
++/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
++#define TIME_WITH_SYS_TIME 1
++
++/* Version number of package */
++#define VERSION "1.4.13-stable"
++
++/* Define to appropriate substitue if compiler doesnt have __func__ */
++/* #undef __func__ */
++
++/* Define to empty if `const' does not conform to ANSI C. */
++/* #undef const */
++
++/* Define to `__inline__' or `__inline' if that's what the C compiler
++   calls it, or to nothing if 'inline' is not supported under any name.  */
++#ifndef __cplusplus
++/* #undef inline */
++#endif
++
++/* Define to `int' if <sys/types.h> does not define. */
++/* #undef pid_t */
++
++/* Define to `unsigned int' if <sys/types.h> does not define. */
++/* #undef size_t */
++
++/* Define to unsigned int if you dont have it */
++/* #undef socklen_t */
diff --git a/chromium-browser/patches/patch-base_third__party_libevent_netbsd_event-config.h b/chromium-browser/patches/patch-base_third__party_libevent_netbsd_event-config.h
new file mode 100644
index 0000000..4655c46
--- /dev/null
+++ b/chromium-browser/patches/patch-base_third__party_libevent_netbsd_event-config.h
@@ -0,0 +1,289 @@
+$NetBSD$
+
+--- base/third_party/libevent/netbsd/event-config.h.orig	2016-08-05 20:46:55.312962384 +0000
++++ base/third_party/libevent/netbsd/event-config.h
+@@ -0,0 +1,284 @@
++/* event-config.h
++ * Generated by autoconf; post-processed by libevent.
++ * Do not edit this file.
++ * Do not rely on macros in this file existing in later versions.
++ */
++#ifndef _EVENT_CONFIG_H_
++#define _EVENT_CONFIG_H_
++/* config.h.  Generated from config.h.in by configure.  */
++/* config.h.in.  Generated from configure.in by autoheader.  */
++
++/* Define if clock_gettime is available in libc */
++#define _EVENT_DNS_USE_CPU_CLOCK_FOR_ID 1
++
++/* Define is no secure id variant is available */
++/* #undef _EVENT_DNS_USE_GETTIMEOFDAY_FOR_ID */
++
++/* Define to 1 if you have the `clock_gettime' function. */
++#define _EVENT_HAVE_CLOCK_GETTIME 1
++
++/* Define if /dev/poll is available */
++/* #undef _EVENT_HAVE_DEVPOLL */
++
++/* Define to 1 if you have the <dlfcn.h> header file. */
++#define _EVENT_HAVE_DLFCN_H 1
++
++/* Define if your system supports the epoll system calls */
++/* #undef _EVENT_HAVE_EPOLL */
++
++/* Define to 1 if you have the `epoll_ctl' function. */
++/* #undef _EVENT_HAVE_EPOLL_CTL */
++
++/* Define if your system supports event ports */
++/* #undef _EVENT_HAVE_EVENT_PORTS */
++
++/* Define to 1 if you have the `fcntl' function. */
++#define _EVENT_HAVE_FCNTL 1
++
++/* Define to 1 if you have the <fcntl.h> header file. */
++#define _EVENT_HAVE_FCNTL_H 1
++
++/* Define to 1 if the system has the type `fd_mask'. */
++#define _EVENT_HAVE_FD_MASK 1
++
++/* Define to 1 if you have the `getaddrinfo' function. */
++#define _EVENT_HAVE_GETADDRINFO 1
++
++/* Define to 1 if you have the `getegid' function. */
++#define _EVENT_HAVE_GETEGID 1
++
++/* Define to 1 if you have the `geteuid' function. */
++#define _EVENT_HAVE_GETEUID 1
++
++/* Define to 1 if you have the `getnameinfo' function. */
++#define _EVENT_HAVE_GETNAMEINFO 1
++
++/* Define to 1 if you have the `gettimeofday' function. */
++#define _EVENT_HAVE_GETTIMEOFDAY 1
++
++/* Define to 1 if you have the `inet_ntop' function. */
++#define _EVENT_HAVE_INET_NTOP 1
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#define _EVENT_HAVE_INTTYPES_H 1
++
++/* Define to 1 if you have the `issetugid' function. */
++#define _EVENT_HAVE_ISSETUGID 1
++
++/* Define to 1 if you have the `kqueue' function. */
++#define _EVENT_HAVE_KQUEUE 1
++
++/* Define to 1 if you have the `nsl' library (-lnsl). */
++/* #undef _EVENT_HAVE_LIBNSL */
++
++/* Define to 1 if you have the `resolv' library (-lresolv). */
++/* #undef _EVENT_HAVE_LIBRESOLV */
++
++/* Define to 1 if you have the `rt' library (-lrt). */
++#define _EVENT_HAVE_LIBRT 1
++
++/* Define to 1 if you have the `socket' library (-lsocket). */
++/* #undef _EVENT_HAVE_LIBSOCKET */
++
++/* Define to 1 if you have the <memory.h> header file. */
++#define _EVENT_HAVE_MEMORY_H 1
++
++/* Define to 1 if you have the <netinet/in6.h> header file. */
++/* #undef _EVENT_HAVE_NETINET_IN6_H */
++
++/* Define to 1 if you have the `poll' function. */
++#define _EVENT_HAVE_POLL 1
++
++/* Define to 1 if you have the <poll.h> header file. */
++#define _EVENT_HAVE_POLL_H 1
++
++/* Define to 1 if you have the `port_create' function. */
++/* #undef _EVENT_HAVE_PORT_CREATE */
++
++/* Define to 1 if you have the <port.h> header file. */
++/* #undef _EVENT_HAVE_PORT_H */
++
++/* Define to 1 if you have the `select' function. */
++#define _EVENT_HAVE_SELECT 1
++
++/* Define if F_SETFD is defined in <fcntl.h> */
++#define _EVENT_HAVE_SETFD 1
++
++/* Define to 1 if you have the `sigaction' function. */
++#define _EVENT_HAVE_SIGACTION 1
++
++/* Define to 1 if you have the `signal' function. */
++#define _EVENT_HAVE_SIGNAL 1
++
++/* Define to 1 if you have the <signal.h> header file. */
++#define _EVENT_HAVE_SIGNAL_H 1
++
++/* Define to 1 if you have the <stdarg.h> header file. */
++#define _EVENT_HAVE_STDARG_H 1
++
++/* Define to 1 if you have the <stdint.h> header file. */
++#define _EVENT_HAVE_STDINT_H 1
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++#define _EVENT_HAVE_STDLIB_H 1
++
++/* Define to 1 if you have the <strings.h> header file. */
++#define _EVENT_HAVE_STRINGS_H 1
++
++/* Define to 1 if you have the <string.h> header file. */
++#define _EVENT_HAVE_STRING_H 1
++
++/* Define to 1 if you have the `strlcpy' function. */
++#define _EVENT_HAVE_STRLCPY 1
++
++/* Define to 1 if you have the `strsep' function. */
++#define _EVENT_HAVE_STRSEP 1
++
++/* Define to 1 if you have the `strtok_r' function. */
++#define _EVENT_HAVE_STRTOK_R 1
++
++/* Define to 1 if you have the `strtoll' function. */
++#define _EVENT_HAVE_STRTOLL 1
++
++/* Define to 1 if the system has the type `struct in6_addr'. */
++#define _EVENT_HAVE_STRUCT_IN6_ADDR 1
++
++/* Define to 1 if you have the <sys/devpoll.h> header file. */
++/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */
++
++/* Define to 1 if you have the <sys/epoll.h> header file. */
++/* #undef _EVENT_HAVE_SYS_EPOLL_H */
++
++/* Define to 1 if you have the <sys/event.h> header file. */
++#define _EVENT_HAVE_SYS_EVENT_H 1
++
++/* Define to 1 if you have the <sys/ioctl.h> header file. */
++#define _EVENT_HAVE_SYS_IOCTL_H 1
++
++/* Define to 1 if you have the <sys/param.h> header file. */
++#define _EVENT_HAVE_SYS_PARAM_H 1
++
++/* Define to 1 if you have the <sys/queue.h> header file. */
++#define _EVENT_HAVE_SYS_QUEUE_H 1
++
++/* Define to 1 if you have the <sys/select.h> header file. */
++#define _EVENT_HAVE_SYS_SELECT_H 1
++
++/* Define to 1 if you have the <sys/socket.h> header file. */
++#define _EVENT_HAVE_SYS_SOCKET_H 1
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#define _EVENT_HAVE_SYS_STAT_H 1
++
++/* Define to 1 if you have the <sys/time.h> header file. */
++#define _EVENT_HAVE_SYS_TIME_H 1
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#define _EVENT_HAVE_SYS_TYPES_H 1
++
++/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
++#define _EVENT_HAVE_TAILQFOREACH 1
++
++/* Define if timeradd is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERADD 1
++
++/* Define if timerclear is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERCLEAR 1
++
++/* Define if timercmp is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERCMP 1
++
++/* Define if timerisset is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERISSET 1
++
++/* Define to 1 if the system has the type `uint16_t'. */
++#define _EVENT_HAVE_UINT16_T 1
++
++/* Define to 1 if the system has the type `uint32_t'. */
++#define _EVENT_HAVE_UINT32_T 1
++
++/* Define to 1 if the system has the type `uint64_t'. */
++#define _EVENT_HAVE_UINT64_T 1
++
++/* Define to 1 if the system has the type `uint8_t'. */
++#define _EVENT_HAVE_UINT8_T 1
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#define _EVENT_HAVE_UNISTD_H 1
++
++/* Define to 1 if you have the `vasprintf' function. */
++#define _EVENT_HAVE_VASPRINTF 1
++
++/* Define if kqueue works correctly with pipes */
++#define _EVENT_HAVE_WORKING_KQUEUE 1
++
++/* Define to the sub-directory in which libtool stores uninstalled libraries.
++   */
++#define _EVENT_LT_OBJDIR ".libs/"
++
++/* Numeric representation of the version */
++#define _EVENT_NUMERIC_VERSION 0x01040f00
++
++/* Name of package */
++#define _EVENT_PACKAGE "libevent"
++
++/* Define to the address where bug reports for this package should be sent. */
++#define _EVENT_PACKAGE_BUGREPORT ""
++
++/* Define to the full name of this package. */
++#define _EVENT_PACKAGE_NAME ""
++
++/* Define to the full name and version of this package. */
++#define _EVENT_PACKAGE_STRING ""
++
++/* Define to the one symbol short name of this package. */
++#define _EVENT_PACKAGE_TARNAME ""
++
++/* Define to the home page for this package. */
++#define _EVENT_PACKAGE_URL ""
++
++/* Define to the version of this package. */
++#define _EVENT_PACKAGE_VERSION ""
++
++/* The size of `int', as computed by sizeof. */
++#define _EVENT_SIZEOF_INT 4
++
++/* The size of `long', as computed by sizeof. */
++#define _EVENT_SIZEOF_LONG 8
++
++/* The size of `long long', as computed by sizeof. */
++#define _EVENT_SIZEOF_LONG_LONG 8
++
++/* The size of `short', as computed by sizeof. */
++#define _EVENT_SIZEOF_SHORT 2
++
++/* Define to 1 if you have the ANSI C header files. */
++#define _EVENT_STDC_HEADERS 1
++
++/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
++#define _EVENT_TIME_WITH_SYS_TIME 1
++
++/* Version number of package */
++#define _EVENT_VERSION "1.4.15"
++
++/* Define to appropriate substitue if compiler doesnt have __func__ */
++/* #undef _EVENT___func__ */
++
++/* Define to empty if `const' does not conform to ANSI C. */
++/* #undef _EVENT_const */
++
++/* Define to `__inline__' or `__inline' if that's what the C compiler
++   calls it, or to nothing if 'inline' is not supported under any name.  */
++#ifndef _EVENT___cplusplus
++/* #undef _EVENT_inline */
++#endif
++
++/* Define to `int' if <sys/types.h> does not define. */
++/* #undef _EVENT_pid_t */
++
++/* Define to `unsigned int' if <sys/types.h> does not define. */
++/* #undef _EVENT_size_t */
++
++/* Define to unsigned int if you dont have it */
++/* #undef _EVENT_socklen_t */
++#endif
diff --git a/chromium-browser/patches/patch-base_threading_platform__thread__netbsd.cc b/chromium-browser/patches/patch-base_threading_platform__thread__netbsd.cc
new file mode 100644
index 0000000..1ed4545
--- /dev/null
+++ b/chromium-browser/patches/patch-base_threading_platform__thread__netbsd.cc
@@ -0,0 +1,102 @@
+$NetBSD$
+
+--- base/threading/platform_thread_netbsd.cc.orig	2016-08-05 20:43:29.901953051 +0000
++++ base/threading/platform_thread_netbsd.cc
+@@ -0,0 +1,97 @@
++// Copyright 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 "base/threading/platform_thread.h"
++
++#include <errno.h>
++#include <sched.h>
++#include <stddef.h>
++
++#include "base/lazy_instance.h"
++#include "base/logging.h"
++#include "base/threading/platform_thread_internal_posix.h"
++#include "base/threading/thread_id_name_manager.h"
++#include "base/tracked_objects.h"
++#include "build/build_config.h"
++
++#if !defined(OS_NACL)
++#include <pthread.h>
++#include <sys/types.h>
++#include <unistd.h>
++#endif
++
++namespace base {
++
++namespace internal {
++
++namespace {
++#if !defined(OS_NACL)
++const struct sched_param kRealTimePrio = {8};
++#endif
++}  // namespace
++
++const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4] = {
++    {ThreadPriority::BACKGROUND, 10},
++    {ThreadPriority::NORMAL, 0},
++    {ThreadPriority::DISPLAY, -6},
++    {ThreadPriority::REALTIME_AUDIO, -10},
++};
++
++bool SetCurrentThreadPriorityForPlatform(ThreadPriority priority) {
++#if !defined(OS_NACL)
++  return priority == ThreadPriority::REALTIME_AUDIO &&
++         pthread_setschedparam(pthread_self(), SCHED_RR, &kRealTimePrio) == 0;
++#else
++  return false;
++#endif
++}
++
++bool GetCurrentThreadPriorityForPlatform(ThreadPriority* priority) {
++#if !defined(OS_NACL)
++  int maybe_sched_rr = 0;
++  struct sched_param maybe_realtime_prio = {0};
++  if (pthread_getschedparam(pthread_self(), &maybe_sched_rr,
++                            &maybe_realtime_prio) == 0 &&
++      maybe_sched_rr == SCHED_RR &&
++      maybe_realtime_prio.sched_priority == kRealTimePrio.sched_priority) {
++    *priority = ThreadPriority::REALTIME_AUDIO;
++    return true;
++  }
++#endif
++  return false;
++}
++
++}  // namespace internal
++
++// static
++void PlatformThread::SetName(const std::string& name) {
++  ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
++  tracked_objects::ThreadData::InitializeThreadContext(name);
++
++#if !defined(OS_NACL)
++  // On FreeBSD we can get the thread names to show up in the debugger by
++  // setting the process name for the LWP.  We don't want to do this for the
++  // main thread because that would rename the process, causing tools like
++  // killall to stop working.
++  if (PlatformThread::CurrentId() == getpid())
++    return;
++  setproctitle("%s", name.c_str());
++#endif  //  !defined(OS_NACL)
++}
++
++void InitThreading() {}
++
++void TerminateOnThread() {}
++
++size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
++#if !defined(THREAD_SANITIZER)
++  return 0;
++#else
++  // ThreadSanitizer bloats the stack heavily. Evidence has been that the
++  // default stack size isn't enough for some browser tests.
++  return 2 * (1 << 23);  // 2 times 8192K (the default stack size on Linux).
++#endif
++}
++
++}  // namespace base
diff --git a/chromium-browser/patches/patch-base_trace__event_malloc__dump__provider.cc b/chromium-browser/patches/patch-base_trace__event_malloc__dump__provider.cc
new file mode 100644
index 0000000..84e8276
--- /dev/null
+++ b/chromium-browser/patches/patch-base_trace__event_malloc__dump__provider.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+--- base/trace_event/malloc_dump_provider.cc.orig	2016-08-05 17:13:37.000000000 +0000
++++ base/trace_event/malloc_dump_provider.cc
+@@ -19,6 +19,8 @@
+ 
+ #if defined(OS_MACOSX)
+ #include <malloc/malloc.h>
++#elif defined(OS_NETBSD)
++#include <stdlib.h>
+ #else
+ #include <malloc.h>
+ #endif
+@@ -26,7 +28,7 @@
+ namespace base {
+ namespace trace_event {
+ 
+-#if BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
++#if 0 // BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
+ namespace {
+ 
+ using allocator::AllocatorDispatch;
+@@ -103,6 +105,8 @@ MallocDumpProvider::~MallocDumpProvider(
+ // the current process.
+ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
+                                       ProcessMemoryDump* pmd) {
++  return 0;
++#if 0
+   size_t total_virtual_size = 0;
+   size_t resident_size = 0;
+   size_t allocated_objects_size = 0;
+@@ -197,10 +201,11 @@ bool MallocDumpProvider::OnMemoryDump(co
+   tid_dumping_heap_ = kInvalidThreadId;
+ 
+   return true;
++#endif
+ }
+ 
+ void MallocDumpProvider::OnHeapProfilingEnabled(bool enabled) {
+-#if BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
++#if 0 // BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
+   if (enabled) {
+     {
+       AutoLock lock(allocation_register_lock_);
diff --git a/chromium-browser/patches/patch-base_trace__event_memory__dump__manager.cc b/chromium-browser/patches/patch-base_trace__event_memory__dump__manager.cc
new file mode 100644
index 0000000..4d154de
--- /dev/null
+++ b/chromium-browser/patches/patch-base_trace__event_memory__dump__manager.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/trace_event/memory_dump_manager.cc.orig	2016-08-05 17:13:37.000000000 +0000
++++ base/trace_event/memory_dump_manager.cc
+@@ -165,7 +165,7 @@ void MemoryDumpManager::EnableHeapProfil
+   }
+   else if (profiling_mode == switches::kEnableHeapProfilingModeNative) {
+ #if HAVE_TRACE_STACK_FRAME_POINTERS && \
+-    (BUILDFLAG(ENABLE_PROFILING) || !defined(NDEBUG))
++    (!defined(NDEBUG))
+     // We need frame pointers for native tracing to work, and they are
+     // enabled in profiling and debug builds.
+     AllocationContextTracker::SetCaptureMode(
diff --git a/chromium-browser/patches/patch-base_trace__event_process__memory__dump.cc b/chromium-browser/patches/patch-base_trace__event_process__memory__dump.cc
new file mode 100644
index 0000000..d823e7f
--- /dev/null
+++ b/chromium-browser/patches/patch-base_trace__event_process__memory__dump.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/trace_event/process_memory_dump.cc.orig	2016-08-05 17:13:37.000000000 +0000
++++ base/trace_event/process_memory_dump.cc
+@@ -89,7 +89,7 @@ size_t ProcessMemoryDump::CountResidentB
+   const size_t kMaxChunkSize = 8 * 1024 * 1024;
+   size_t max_vec_size =
+       GetSystemPageCount(std::min(mapped_size, kMaxChunkSize), page_size);
+-#if defined(OS_MACOSX) || defined(OS_IOS)
++#if defined(OS_MACOSX) || defined(OS_IOS) || defined(OS_NETBSD)
+   std::unique_ptr<char[]> vec(new char[max_vec_size]);
+ #elif defined(OS_WIN)
+   std::unique_ptr<PSAPI_WORKING_SET_EX_INFORMATION[]> vec(
diff --git a/chromium-browser/patches/patch-build_config_BUILDCONFIG.gn b/chromium-browser/patches/patch-build_config_BUILDCONFIG.gn
new file mode 100644
index 0000000..9b9ff24
--- /dev/null
+++ b/chromium-browser/patches/patch-build_config_BUILDCONFIG.gn
@@ -0,0 +1,52 @@
+$NetBSD$
+
+--- build/config/BUILDCONFIG.gn.orig	2016-08-05 17:13:38.000000000 +0000
++++ build/config/BUILDCONFIG.gn
+@@ -193,6 +193,18 @@ if (host_toolchain == "") {
+     } else {
+       host_toolchain = "//build/toolchain/win:$target_cpu"
+     }
++  } else if (host_os == "netbsd") {
++    if (target_os != "netbsd") {
++      # TODO(dpranke) - is_clang normally applies only to the target
++      # build, and there is no way to indicate that you want to override
++      # it for both the target build *and* the host build. Do we need to
++      # support this?
++      host_toolchain = "//build/toolchain/netbsd:clang_$host_cpu"
++    } else if (is_clang) {
++      host_toolchain = "//build/toolchain/netbsd:clang_$host_cpu"
++    } else {
++      host_toolchain = "//build/toolchain/netbsd:$host_cpu"
++    }
+   } else {
+     assert(false, "Unsupported host_os: $host_os")
+   }
+@@ -231,6 +243,12 @@ if (target_os == "android") {
+ } else if (target_os == "winrt_81" || target_os == "winrt_81_phone" ||
+            target_os == "winrt_10") {
+   _default_toolchain = "//build/toolchain/win:winrt_$target_cpu"
++} else if (target_os == "netbsd") {
++  if (is_clang) {
++    _default_toolchain = "//build/toolchain/netbsd:clang_$target_cpu"
++  } else {
++    _default_toolchain = "//build/toolchain/netbsd:$target_cpu"
++  }
+ } else {
+   assert(false, "Unsupported target_os: $target_os")
+ }
+@@ -328,6 +346,15 @@ if (current_os == "win" || current_os ==
+   is_nacl = false
+   is_posix = true
+   is_win = false
++} else if (current_os == "netbsd") {
++  is_android = false
++  is_chromeos = false
++  is_ios = false
++  is_linux = false
++  is_mac = false
++  is_nacl = false
++  is_posix = true
++  is_win = false
+ }
+ 
+ # =============================================================================
diff --git a/chromium-browser/patches/patch-build_config_compiler_BUILD.gn b/chromium-browser/patches/patch-build_config_compiler_BUILD.gn
new file mode 100644
index 0000000..129fcce
--- /dev/null
+++ b/chromium-browser/patches/patch-build_config_compiler_BUILD.gn
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- build/config/compiler/BUILD.gn.orig	2016-08-05 17:13:38.000000000 +0000
++++ build/config/compiler/BUILD.gn
+@@ -437,8 +437,8 @@ config("compiler") {
+   # TODO(pcc): Make this conditional on is_official_build rather than on gn
+   # flags for specific features.
+   if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) {
+-    cflags += [ "-flto" ]
+-    ldflags += [ "-flto" ]
++#    cflags += [ "-flto" ]
++#    ldflags += [ "-flto" ]
+ 
+     # Apply a lower LTO optimization level as the default is too slow.
+     if (is_linux) {
diff --git a/chromium-browser/patches/patch-build_toolchain_netbsd_BUILD.gn b/chromium-browser/patches/patch-build_toolchain_netbsd_BUILD.gn
new file mode 100644
index 0000000..85c814d
--- /dev/null
+++ b/chromium-browser/patches/patch-build_toolchain_netbsd_BUILD.gn
@@ -0,0 +1,121 @@
+$NetBSD$
+
+--- build/toolchain/netbsd/BUILD.gn.orig	2016-08-05 22:49:56.586392139 +0000
++++ build/toolchain/netbsd/BUILD.gn
+@@ -0,0 +1,116 @@
++# Copyright 2013 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.
++
++import("//build/config/sysroot.gni")
++import("//build/toolchain/gcc_toolchain.gni")
++
++clang_toolchain("clang_arm") {
++  toolchain_cpu = "arm"
++  toolchain_os = "netbsd"
++  toolprefix = "arm-netbsd-gnueabihf-"
++}
++
++clang_toolchain("clang_arm64") {
++  toolchain_cpu = "arm64"
++  toolchain_os = "netbsd"
++  toolprefix = "aarch64-netbsd-gnu-"
++}
++
++gcc_toolchain("arm") {
++  toolprefix = "arm-netbsd-gnueabihf-"
++
++  cc = "${toolprefix}gcc"
++  cxx = "${toolprefix}g++"
++
++  ar = "${toolprefix}ar"
++  ld = cxx
++  readelf = "${toolprefix}readelf"
++  nm = "${toolprefix}nm"
++
++  toolchain_cpu = "arm"
++  toolchain_os = "netbsd"
++  is_clang = false
++}
++
++clang_toolchain("clang_x86") {
++  toolchain_cpu = "x86"
++  toolchain_os = "netbsd"
++}
++
++clang_toolchain("clang_x86_v8_arm") {
++  toolchain_cpu = "x86"
++  v8_toolchain_cpu = "arm"
++  toolchain_os = "netbsd"
++}
++
++clang_toolchain("clang_x86_v8_mipsel") {
++  toolchain_cpu = "x86"
++  v8_toolchain_cpu = "mipsel"
++  toolchain_os = "netbsd"
++}
++
++gcc_toolchain("x86") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_cpu = "x86"
++  toolchain_os = "netbsd"
++  is_clang = false
++}
++
++clang_toolchain("clang_x64") {
++  toolchain_cpu = "x64"
++  toolchain_os = "netbsd"
++}
++
++clang_toolchain("clang_x64_v8_arm64") {
++  toolchain_cpu = "x64"
++  v8_toolchain_cpu = "arm64"
++  toolchain_os = "netbsd"
++}
++
++clang_toolchain("clang_x64_v8_mips64el") {
++  toolchain_cpu = "x64"
++  v8_toolchain_cpu = "mips64el"
++  toolchain_os = "netbsd"
++}
++
++gcc_toolchain("x64") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_cpu = "x64"
++  toolchain_os = "netbsd"
++  is_clang = false
++}
++
++clang_toolchain("clang_mipsel") {
++  toolchain_cpu = "mipsel"
++  toolchain_os = "netbsd"
++}
++
++gcc_toolchain("mipsel") {
++  cc = "mipsel-netbsd-gnu-gcc"
++  cxx = "mipsel-netbsd-gnu-g++"
++  ar = "mipsel-netbsd-gnu-ar"
++  ld = cxx
++  readelf = "mipsel-netbsd-gnu-readelf"
++  nm = "mipsel-netbsd-gnu-nm"
++
++  toolchain_cpu = "mipsel"
++  toolchain_os = "netbsd"
++  is_clang = false
++  cc_wrapper = ""
++  use_goma = false
++}
diff --git a/chromium-browser/patches/patch-chrome_common_extensions_docs_examples_api_nativeMessaging_host_install__host.sh b/chromium-browser/patches/patch-chrome_common_extensions_docs_examples_api_nativeMessaging_host_install__host.sh
new file mode 100644
index 0000000..81a7f491
--- /dev/null
+++ b/chromium-browser/patches/patch-chrome_common_extensions_docs_examples_api_nativeMessaging_host_install__host.sh
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/common/extensions/docs/examples/api/nativeMessaging/host/install_host.sh.orig	2016-08-05 17:14:49.000000000 +0000
++++ chrome/common/extensions/docs/examples/api/nativeMessaging/host/install_host.sh
+@@ -6,14 +6,14 @@
+ set -e
+ 
+ DIR="$( cd "$( dirname "$0" )" && pwd )"
+-if [ "$(uname -s)" == "Darwin" ]; then
+-  if [ "$(whoami)" == "root" ]; then
++if [ "$(uname -s)" = "Darwin" ]; then
++  if [ "$(whoami)" = "root" ]; then
+     TARGET_DIR="/Library/Google/Chrome/NativeMessagingHosts"
+   else
+     TARGET_DIR="$HOME/Library/Application Support/Google/Chrome/NativeMessagingHosts"
+   fi
+ else
+-  if [ "$(whoami)" == "root" ]; then
++  if [ "$(whoami)" = "root" ]; then
+     TARGET_DIR="/etc/opt/chrome/native-messaging-hosts"
+   else
+     TARGET_DIR="$HOME/.config/google-chrome/NativeMessagingHosts"
diff --git a/chromium-browser/patches/patch-chrome_common_extensions_docs_examples_api_nativeMessaging_host_uninstall__host.sh b/chromium-browser/patches/patch-chrome_common_extensions_docs_examples_api_nativeMessaging_host_uninstall__host.sh
new file mode 100644
index 0000000..b11cf33
--- /dev/null
+++ b/chromium-browser/patches/patch-chrome_common_extensions_docs_examples_api_nativeMessaging_host_uninstall__host.sh
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/common/extensions/docs/examples/api/nativeMessaging/host/uninstall_host.sh.orig	2016-08-05 17:14:49.000000000 +0000
++++ chrome/common/extensions/docs/examples/api/nativeMessaging/host/uninstall_host.sh
+@@ -5,14 +5,14 @@
+ 
+ set -e
+ 
+-if [ "$(uname -s)" == "Darwin" ]; then
+-  if [ "$(whoami)" == "root" ]; then
++if [ "$(uname -s)" = "Darwin" ]; then
++  if [ "$(whoami)" = "root" ]; then
+     TARGET_DIR="/Library/Google/Chrome/NativeMessagingHosts"
+   else
+     TARGET_DIR="$HOME/Library/Application Support/Google/Chrome/NativeMessagingHosts"
+   fi
+ else
+-  if [ "$(whoami)" == "root" ]; then
++  if [ "$(whoami)" = "root" ]; then
+     TARGET_DIR="/etc/opt/chrome/native-messaging-hosts"
+   else
+     TARGET_DIR="$HOME/.config/google-chrome/NativeMessagingHosts"
diff --git a/chromium-browser/patches/patch-third__party_icu_android_patch__locale.sh b/chromium-browser/patches/patch-third__party_icu_android_patch__locale.sh
new file mode 100644
index 0000000..5bc4bcb
--- /dev/null
+++ b/chromium-browser/patches/patch-third__party_icu_android_patch__locale.sh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/icu/android/patch_locale.sh.orig	2016-08-05 23:25:39.830507748 +0000
++++ third_party/icu/android/patch_locale.sh
+@@ -26,7 +26,7 @@ cd source/data
+ for i in curr/*.txt
+ do
+   locale=$(basename $i .txt)
+-  [ $locale == 'supplementalData' ] && continue;
++  [ $locale = 'supplementalData' ] && continue;
+   echo "Overwriting $i for $locale"
+   sed -n -r -i \
+     '1, /^'${locale}'\{$/ p
diff --git a/chromium-browser/patches/patch-third__party_icu_source_configure b/chromium-browser/patches/patch-third__party_icu_source_configure
new file mode 100644
index 0000000..e154617
--- /dev/null
+++ b/chromium-browser/patches/patch-third__party_icu_source_configure
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- third_party/icu/source/configure.orig	2016-08-05 23:25:42.572753427 +0000
++++ third_party/icu/source/configure
+@@ -7765,13 +7765,13 @@ fi
+ # Now that we're done using CPPFLAGS etc. for tests, we can change it
+ # for build.
+ 
+-if test "${CC}" == "clang"; then
++if test "${CC}" = "clang"; then
+    CLANGCFLAGS="-Qunused-arguments -Wno-parentheses-equality"
+ else
+    CLANGCFLAGS=""
+ fi
+ 
+-if test "${CXX}" == "clang++"; then
++if test "${CXX}" = "clang++"; then
+    CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality"
+ else
+    CLANGCXXFLAGS=""
diff --git a/chromium-browser/patches/patch-third__party_protobuf_post__process__dist.sh b/chromium-browser/patches/patch-third__party_protobuf_post__process__dist.sh
new file mode 100644
index 0000000..4594ac0
--- /dev/null
+++ b/chromium-browser/patches/patch-third__party_protobuf_post__process__dist.sh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/protobuf/post_process_dist.sh.orig	2016-08-05 17:35:08.000000000 +0000
++++ third_party/protobuf/post_process_dist.sh
+@@ -15,7 +15,7 @@
+ #    non-testdata .txt files are converted to Windows-style line endings.
+ # 5) Cleans up after itself.
+ 
+-if [ "$1" == "" ]; then
++if [ "$1" = "" ]; then
+   echo "USAGE:  $0 DISTFILE" >&2
+   exit 1
+ fi
diff --git a/chromium-browser/patches/patch-tools_battor__agent_BUILD.gn b/chromium-browser/patches/patch-tools_battor__agent_BUILD.gn
new file mode 100644
index 0000000..6f695e4
--- /dev/null
+++ b/chromium-browser/patches/patch-tools_battor__agent_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- tools/battor_agent/BUILD.gn.orig	2016-08-05 17:36:02.000000000 +0000
++++ tools/battor_agent/BUILD.gn
+@@ -5,7 +5,7 @@
+ import("//testing/test.gni")
+ 
+ # Works only on desktop platforms.
+-assert(is_win || is_linux || is_mac)
++assert(is_win || is_linux || is_mac || host_os == "netbsd")
+ 
+ executable("battor_agent") {
+   sources = [
diff --git a/chromium-browser/patches/patch-tools_gn_bootstrap_bootstrap.py b/chromium-browser/patches/patch-tools_gn_bootstrap_bootstrap.py
new file mode 100644
index 0000000..b2ba2ac
--- /dev/null
+++ b/chromium-browser/patches/patch-tools_gn_bootstrap_bootstrap.py
@@ -0,0 +1,68 @@
+$NetBSD$
+
+--- tools/gn/bootstrap/bootstrap.py.orig	2016-08-05 17:36:04.000000000 +0000
++++ tools/gn/bootstrap/bootstrap.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/pkg/bin/python2.7
+ # Copyright 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.
+@@ -31,8 +31,9 @@ SRC_ROOT = os.path.dirname(os.path.dirna
+ 
+ is_win = sys.platform.startswith('win')
+ is_linux = sys.platform.startswith('linux')
++is_netbsd = sys.platform.startswith('netbsd')
+ is_mac = sys.platform.startswith('darwin')
+-is_posix = is_linux or is_mac
++is_posix = is_linux or is_mac or is_netbsd
+ 
+ def check_call(cmd, **kwargs):
+   logging.debug('Running: %s', ' '.join(cmd))
+@@ -183,7 +184,7 @@ def build_gn_with_ninja_manually(tempdir
+ 
+   write_gn_ninja(os.path.join(tempdir, 'build.ninja'),
+                  root_gen_dir, options)
+-  cmd = ['ninja', '-C', tempdir]
++  cmd = ['ninja', '-C', tempdir, '-v']
+   if options.verbose:
+     cmd.append('-v')
+ 
+@@ -620,6 +621,37 @@ def write_gn_ninja(path, root_gen_dir, o
+         '-framework', 'Security',
+     ])
+ 
++  if is_netbsd:
++    libs.extend(['-lrt', '-lexecinfo'])
++    ldflags.extend(['-lpthread'])
++
++    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/process_handle_netbsd.cc',
++        'base/process/process_iterator_netbsd.cc',
++        'base/process/process_posix.cc',
++        'base/process/process_metrics_netbsd.cc',
++        'base/strings/sys_string_conversions_posix.cc',
++        'base/sys_info_netbsd.cc',
++        'base/threading/platform_thread_netbsd.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',
++    ])
++
+   if is_win:
+     static_libraries['base']['sources'].extend([
+         'base/base_paths_win.cc',
diff --git a/chromium-browser/patches/patch-tools_gn_function__exec__script.cc b/chromium-browser/patches/patch-tools_gn_function__exec__script.cc
new file mode 100644
index 0000000..e69de29
diff --git a/chromium-browser/patches/patch-tools_gn_setup.cc b/chromium-browser/patches/patch-tools_gn_setup.cc
new file mode 100644
index 0000000..4bd4a90
--- /dev/null
+++ b/chromium-browser/patches/patch-tools_gn_setup.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- tools/gn/setup.cc.orig	2016-08-05 17:36:04.000000000 +0000
++++ tools/gn/setup.cc
+@@ -616,7 +616,7 @@ void Setup::FillPythonPath(const base::C
+     }
+     build_settings_.set_python_path(python_path.NormalizePathSeparatorsTo('/'));
+ #else
+-    build_settings_.set_python_path(base::FilePath("python"));
++    build_settings_.set_python_path(base::FilePath("/usr/pkg/bin/python2.7"));
+ #endif
+   }
+ }
diff --git a/chromium-browser/patches/patch-tools_gn_variables.cc b/chromium-browser/patches/patch-tools_gn_variables.cc
new file mode 100644
index 0000000..6535960
--- /dev/null
+++ b/chromium-browser/patches/patch-tools_gn_variables.cc
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- tools/gn/variables.cc.orig	2016-08-05 17:36:04.000000000 +0000
++++ tools/gn/variables.cc
+@@ -191,7 +191,8 @@ const char kTargetOs_Help[] =
+     "  - \"linux\"\n"
+     "  - \"nacl\"\n"
+     "  - \"mac\"\n"
+-    "  - \"win\"\n";
++    "  - \"win\"\n"
++    "  - \"netbsd\"\n";
+ 
+ const char kCurrentCpu[] = "current_cpu";
+ const char kCurrentCpu_HelpShort[] =
diff --git a/chromium-browser/patches/patch-v8_tools_run-llprof.sh b/chromium-browser/patches/patch-v8_tools_run-llprof.sh
new file mode 100644
index 0000000..e2c0f43
--- /dev/null
+++ b/chromium-browser/patches/patch-v8_tools_run-llprof.sh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- v8/tools/run-llprof.sh.orig	2016-08-05 23:21:39.233511300 +0000
++++ v8/tools/run-llprof.sh
+@@ -46,7 +46,7 @@ framework, then calls the low level tick
+ EOF
+ }
+ 
+-if [ $# -eq 0 ] || [ "$1" == "-h" ]  || [ "$1" == "--help" ] ; then
++if [ $# -eq 0 ] || [ "$1" = "-h" ]  || [ "$1" = "--help" ] ; then
+   usage
+   exit 1
+ fi



Home | Main Index | Thread Index | Old Index