diff --git a/biology/vsearch/Makefile b/biology/vsearch/Makefile index 57d2800ca9f..79e8b07cc80 100644 --- a/biology/vsearch/Makefile +++ b/biology/vsearch/Makefile @@ -1,6 +1,7 @@ PORTNAME= vsearch DISTVERSIONPREFIX= v DISTVERSION= 2.24.0 +PORTREVISION= 1 CATEGORIES= biology MAINTAINER= jwb@FreeBSD.org diff --git a/cad/xcircuit/Makefile b/cad/xcircuit/Makefile index 7f5fb5f81b2..796c01afc38 100644 --- a/cad/xcircuit/Makefile +++ b/cad/xcircuit/Makefile @@ -1,5 +1,6 @@ PORTNAME= xcircuit PORTVERSION= 3.10.30 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= cad MASTER_SITES= http://opencircuitdesign.com/xcircuit/archive/ \ diff --git a/chinese/enscript/Makefile b/chinese/enscript/Makefile index 3213fce6ef5..5164020dd6f 100644 --- a/chinese/enscript/Makefile +++ b/chinese/enscript/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= chinese MAINTAINER= ports@FreeBSD.org diff --git a/comms/fldigi/Makefile b/comms/fldigi/Makefile index 8b588d8edf7..945dbe72e89 100644 --- a/comms/fldigi/Makefile +++ b/comms/fldigi/Makefile @@ -1,5 +1,5 @@ PORTNAME= fldigi -DISTVERSION= 4.2.02 +DISTVERSION= 4.2.03 CATEGORIES= comms hamradio MASTER_SITES= SF/fldigi/${PORTNAME} \ http://www.w1hkj.com/files/fldigi/ @@ -8,6 +8,8 @@ MAINTAINER= hamradio@FreeBSD.org COMMENT= Digital decoder for psk, cw, psk31, olivia WWW= http://www.w1hkj.com +BROKEN_FreeBSD_12= no hid support + LICENSE= GPLv3 BUILD_DEPENDS= asciidoc:textproc/asciidoc \ @@ -19,7 +21,8 @@ LIB_DEPENDS= libboost_system.so:devel/boost-libs \ libpng.so:graphics/png \ libportaudio.so:audio/portaudio \ libsamplerate.so:audio/libsamplerate \ - libsndfile.so:audio/libsndfile + libsndfile.so:audio/libsndfile \ + libudev.so:devel/libudev-devd USES= autoreconf compiler:c++11-lib desktop-file-utils gmake jpeg \ perl5 pkgconfig shebangfix xorg diff --git a/comms/fldigi/distinfo b/comms/fldigi/distinfo index 730e92e75b8..ba819b95159 100644 --- a/comms/fldigi/distinfo +++ b/comms/fldigi/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1698762993 -SHA256 (fldigi-4.2.02.tar.gz) = f50386f3c3bd063b4c34d01ac439ff8d41ec1b7c12e3c2c252f307ef3a5a6b9e -SIZE (fldigi-4.2.02.tar.gz) = 4979638 +TIMESTAMP = 1698927901 +SHA256 (fldigi-4.2.03.tar.gz) = b5c258a487858280be8d721dbdcd62c7effabfda0f71c7f18106cbd3020829a6 +SIZE (fldigi-4.2.03.tar.gz) = 4979861 diff --git a/comms/fldigi/files/patch-configure.ac b/comms/fldigi/files/patch-configure.ac deleted file mode 100644 index 316670368d4..00000000000 --- a/comms/fldigi/files/patch-configure.ac +++ /dev/null @@ -1,14 +0,0 @@ ---- configure.ac.orig 2021-07-01 20:36:20 UTC -+++ configure.ac -@@ -309,11 +309,6 @@ AC_FLDIGI_INTL - # Set ac_cv_udev to yes/no - # Define USE_LIBHID in config.h - # Substitute LIBHID_CFLAGS and LIBHID_LIBS in Makefile --#if test "x$ac_cv_want_fldigi" = "xyes"; then --#AC_FLDIGI_PKG_CHECK([libhid], [libhid], [no], [no], --# [use udev libraries @<:@autodetect@:>@], --# [ENABLE_LIBHID]) --#fi - - ### asciidoc - # substitute ASCIIDOC and A2X in doc/Makefile diff --git a/comms/fldigi/files/patch-m4_build.m4 b/comms/fldigi/files/patch-m4_build.m4 deleted file mode 100644 index 291239106a7..00000000000 --- a/comms/fldigi/files/patch-m4_build.m4 +++ /dev/null @@ -1,11 +0,0 @@ ---- m4/build.m4.orig 2021-07-01 21:41:53 UTC -+++ m4/build.m4 -@@ -94,7 +94,7 @@ $BFD_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBU - else if test "x$target_mingw32" = "xyes"; then - FLDIGI_BUILD_LDADD="$FLDIGI_BUILD_LDADD -lsetupapi -lhid" - else -- FLDIGI_BUILD_LDADD="$FLDIGI_BUILD_LDADD -ludev" -+ FLDIGI_BUILD_LDADD="$FLDIGI_BUILD_LDADD" - fi - fi - diff --git a/comms/fldigi/files/patch-src_Makefile.am b/comms/fldigi/files/patch-src_Makefile.am deleted file mode 100644 index 93ec2bb71c0..00000000000 --- a/comms/fldigi/files/patch-src_Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ ---- src/Makefile.am.orig 2022-03-18 02:06:06 UTC -+++ src/Makefile.am -@@ -503,8 +503,6 @@ fldigi_SOURCES += \ - - # Sources that we build. It is OK to have headers here. - fldigi_SOURCES += \ -- cmedia/cmedia.cxx \ -- cmedia/hid.cxx \ - combo/combo.cxx \ - config_script/create_default_script.cxx \ - config_script/run_script.h \ -@@ -709,9 +707,6 @@ EXTRA_fldigi_SOURCES += \ - EXTRA_fldigi_SOURCES += \ - blank/blank.cxx \ - blank/blank.h \ -- cmedia/hid_lin.cxx \ -- cmedia/hid_mac.cxx \ -- cmedia/hid_win.cxx \ - dialogs/fl_digi_main.cxx \ - dxcluster/arc-help.cxx \ - dxcluster/CCC_Commands.cxx \ -@@ -764,7 +759,6 @@ EXTRA_fldigi_SOURCES += \ - include/calendar.h \ - include/charsetdistiller.h \ - include/charsetlist.h \ -- include/cmedia.h \ - include/colorbox.h \ - include/combo.h \ - include/complex.h \ diff --git a/comms/fldigi/files/patch-src_cmedia_hid__lin.cxx b/comms/fldigi/files/patch-src_cmedia_hid__lin.cxx new file mode 100644 index 00000000000..5ba53c2386b --- /dev/null +++ b/comms/fldigi/files/patch-src_cmedia_hid__lin.cxx @@ -0,0 +1,23 @@ +--- src/cmedia/hid_lin.cxx.orig 2023-08-04 01:13:37 UTC ++++ src/cmedia/hid_lin.cxx +@@ -35,10 +35,20 @@ + #include + #include + ++#ifdef __FreeBSD__ ++typedef unsigned short uint16_t; ++typedef unsigned char __u8; ++typedef unsigned long __u32; ++#include ++/* These are from linux */ ++#define BUS_USB 0x03 ++#define BUS_BLUETOOTH 0x05 ++#else + /* Linux */ + #include + #include + #include ++#endif + #include + + #include "hidapi.h" diff --git a/comms/fldigi/files/patch-src_dialogs_confdialog.cxx b/comms/fldigi/files/patch-src_dialogs_confdialog.cxx deleted file mode 100644 index 2dea6c6b233..00000000000 --- a/comms/fldigi/files/patch-src_dialogs_confdialog.cxx +++ /dev/null @@ -1,29 +0,0 @@ ---- src/dialogs/confdialog.cxx.orig 2023-08-31 22:56:35 UTC -+++ src/dialogs/confdialog.cxx -@@ -7790,7 +7790,7 @@ progdefaults.cmedia_ptt = false; - btn_init_cmedia_PTT->redraw(); - } else { - progdefaults.cmedia_ptt = false; --close_cmedia(); -+//close_cmedia(); - } - progdefaults.changed = true; - } -@@ -7798,7 +7798,7 @@ static void cb_inp_cmedia_dev(Fl_ComboBox* o, void*) { - Fl_ComboBox *inp_cmedia_dev=(Fl_ComboBox *)0; - - static void cb_inp_cmedia_dev(Fl_ComboBox* o, void*) { -- close_cmedia(); -+// close_cmedia(); - progdefaults.cmedia_device = o->value(); - btn_init_cmedia_PTT->labelcolor(FL_RED); - btn_init_cmedia_PTT->redraw(); -@@ -7822,7 +7822,7 @@ static void cb_btn_test_cmedia(Fl_Button*, void*) { - Fl_Button *btn_test_cmedia=(Fl_Button *)0; - - static void cb_btn_test_cmedia(Fl_Button*, void*) { -- test_hid_ptt(); -+// test_hid_ptt(); - } - - Fl_File_Input *inp_wav_fname_regex=(Fl_File_Input *)0; diff --git a/comms/fldigi/files/patch-src_main.cxx b/comms/fldigi/files/patch-src_main.cxx deleted file mode 100644 index e0bd90a1d52..00000000000 --- a/comms/fldigi/files/patch-src_main.cxx +++ /dev/null @@ -1,11 +0,0 @@ ---- src/main.cxx.orig 2023-08-24 15:22:40 UTC -+++ src/main.cxx -@@ -1182,7 +1182,7 @@ int main (int argc, char *argv[]) - setTabColors(); - - progdefaults.testCommPorts(); -- init_hids(); -+ //init_hids(); - - #if USE_HAMLIB - xcvr = new Rig(); diff --git a/comms/fldigi/files/patch-src_rigcontrol_ptt.cxx b/comms/fldigi/files/patch-src_rigcontrol_ptt.cxx deleted file mode 100644 index 027e74f580f..00000000000 --- a/comms/fldigi/files/patch-src_rigcontrol_ptt.cxx +++ /dev/null @@ -1,39 +0,0 @@ ---- src/rigcontrol/ptt.cxx.orig 2023-08-31 22:56:35 UTC -+++ src/rigcontrol/ptt.cxx -@@ -69,7 +69,7 @@ - - #include "n3fjp_logger.h" - --#include "cmedia.h" -+//#include "cmedia.h" - - LOG_FILE_SOURCE(debug::LOG_RIGCONTROL); - -@@ -114,9 +114,11 @@ void PTT::reset(ptt_t dev) - case PTT_TTY: - open_tty(); - break; -+#if 0 - case PTT_CMEDIA: - cmedia_fd = open_cmedia(progdefaults.cmedia_device); - break; -+#endif - default: - break; // nothing to open - } -@@ -178,6 +180,7 @@ void PTT::set(bool ptt) - set_uhrouter(ptt); - break; - #endif -+#if 0 - case PTT_CMEDIA: - if (cmedia_fd != -1) { - int bitnbr = 2; -@@ -188,6 +191,7 @@ void PTT::set(bool ptt) - set_cmedia(bitnbr, ptt); - } - break; -+#endif - default: - break; - } diff --git a/comms/iwmbt-firmware/Makefile b/comms/iwmbt-firmware/Makefile index 05e91cc00ae..fdb51b5b652 100644 --- a/comms/iwmbt-firmware/Makefile +++ b/comms/iwmbt-firmware/Makefile @@ -1,8 +1,8 @@ PORTNAME= iwmbt-firmware -PORTVERSION= 20221109 -DEB_REVISION= 2 +DISTVERSION= 20230515 +DEB_REVISION= 3 CATEGORIES= comms -MASTER_SITES= DEBIAN/pool/non-free/f/firmware-nonfree/:main \ +MASTER_SITES= DEBIAN/pool/non-free-firmware/f/firmware-nonfree/:main \ https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/intel/:old DISTFILES= ${MAINFW_FILE}:main \ ${OLDFW_FILE}${OLDFW_SUFX}:old @@ -20,7 +20,7 @@ LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept NO_BUILD= yes NO_ARCH= yes -MAINFW_FILE= firmware-iwlwifi_${PORTVERSION}-${DEB_REVISION}_all.deb +MAINFW_FILE= firmware-iwlwifi_${DISTVERSION}-${DEB_REVISION}_all.deb OLDFW_FILE= ibt-hw-37.8.10-fw-22.50.19.14.f.bseq OLDFW_SUFX= ?id=6be4747ea1d731f661c5320acf3f1273a459d6da diff --git a/comms/iwmbt-firmware/distinfo b/comms/iwmbt-firmware/distinfo index f4a1130c9e0..442598f0b0e 100644 --- a/comms/iwmbt-firmware/distinfo +++ b/comms/iwmbt-firmware/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1669462817 -SHA256 (firmware-iwlwifi_20221109-2_all.deb) = 593f01beec59fd4de2f76a907a32798bac4f4658ff5b22624f4eb8528e8c2370 -SIZE (firmware-iwlwifi_20221109-2_all.deb) = 20085936 +TIMESTAMP = 1693140290 +SHA256 (firmware-iwlwifi_20230515-3_all.deb) = bd6071baa22b43271958be577ed886032a96c6a2552cc5e476d8b960e20cc0fd +SIZE (firmware-iwlwifi_20230515-3_all.deb) = 9445988 SHA256 (ibt-hw-37.8.10-fw-22.50.19.14.f.bseq?id=6be4747ea1d731f661c5320acf3f1273a459d6da) = d1d25082ee30e971454e512e6a07af9c093bb8086f3b56f6afcc22de8e63d59a SIZE (ibt-hw-37.8.10-fw-22.50.19.14.f.bseq?id=6be4747ea1d731f661c5320acf3f1273a459d6da) = 47463 diff --git a/comms/iwmbt-firmware/pkg-plist b/comms/iwmbt-firmware/pkg-plist index 18b7bf471cd..8652c477ab8 100644 --- a/comms/iwmbt-firmware/pkg-plist +++ b/comms/iwmbt-firmware/pkg-plist @@ -1,7 +1,13 @@ %%DATADIR%%/ibt-0040-0041.ddc %%DATADIR%%/ibt-0040-0041.sfi +%%DATADIR%%/ibt-0040-4150.ddc +%%DATADIR%%/ibt-0040-4150.sfi %%DATADIR%%/ibt-0041-0041.ddc %%DATADIR%%/ibt-0041-0041.sfi +%%DATADIR%%/ibt-1040-0041.ddc +%%DATADIR%%/ibt-1040-0041.sfi +%%DATADIR%%/ibt-1040-4150.ddc +%%DATADIR%%/ibt-1040-4150.sfi %%DATADIR%%/ibt-11-5.ddc %%DATADIR%%/ibt-11-5.sfi %%DATADIR%%/ibt-12-16.ddc @@ -18,6 +24,8 @@ %%DATADIR%%/ibt-19-0-0.sfi %%DATADIR%%/ibt-19-0-1.ddc %%DATADIR%%/ibt-19-0-1.sfi +%%DATADIR%%/ibt-19-0-3.ddc +%%DATADIR%%/ibt-19-0-3.sfi %%DATADIR%%/ibt-19-0-4.ddc %%DATADIR%%/ibt-19-0-4.sfi %%DATADIR%%/ibt-19-16-4.ddc diff --git a/comms/opencbm/Makefile b/comms/opencbm/Makefile index d01d86da481..60a41c46b2f 100644 --- a/comms/opencbm/Makefile +++ b/comms/opencbm/Makefile @@ -1,5 +1,6 @@ PORTNAME= opencbm PORTVERSION= ${OCBM_VERSION} +PORTREVISION= 1 CATEGORIES= comms archivers MAINTAINER= zirias@FreeBSD.org diff --git a/databases/keydb/Makefile b/databases/keydb/Makefile index 95561180b69..d70c0f33afb 100644 --- a/databases/keydb/Makefile +++ b/databases/keydb/Makefile @@ -1,6 +1,6 @@ PORTNAME= keydb DISTVERSIONPREFIX= v -DISTVERSION= 6.3.3 +DISTVERSION= 6.3.4 CATEGORIES= databases MAINTAINER= zi@FreeBSD.org @@ -15,7 +15,7 @@ LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid \ libsnappy.so:archivers/snappy \ libzstd.so:archivers/zstd -USES= compiler:c11 cpe gmake pkgconfig:build tcl:test +USES= compiler:c11 cpe gmake localbase:ldflags pkgconfig:build USE_GITHUB= yes GH_ACCOUNT= Snapchat @@ -25,8 +25,7 @@ USE_RC_SUBR= keydb keydb_sentinel MAKE_ENV= OPTIMIZATION= \ V=yo -CFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -lpthread -lm -lexecinfo -L${LOCALBASE}/lib +LDFLAGS+= -lpthread -lm -lexecinfo SUB_FILES= pkg-message SUB_LIST= PORTNAME=${PORTNAME} \ @@ -44,13 +43,13 @@ PLIST_SUB= KEYDB_DBDIR=${KEYDB_DBDIR} \ KEYDB_RUNDIR=${KEYDB_RUNDIR} \ KEYDB_USER=${USERS} -OPTIONS_DEFINE= TLS -OPTIONS_DEFAULT= TLS +OPTIONS_DEFINE= TLS +OPTIONS_DEFAULT=TLS TLS_DESC= Use TLS (openssl req.) -TLS_USES= ssl -TLS_MAKE_ENV= BUILD_TLS=yes +TLS_USES= ssl +TLS_MAKE_ENV= BUILD_TLS=yes BIN_FILES= keydb-benchmark keydb-check-aof keydb-check-rdb keydb-cli \ keydb-sentinel keydb-server @@ -87,7 +86,4 @@ do-install: ${STAGEDIR}${KEYDB_DBDIR} \ ${STAGEDIR}${KEYDB_RUNDIR} -do-test: - @cd ${WRKSRC} && ${TCLSH} tests/test_helper.tcl - .include diff --git a/databases/keydb/distinfo b/databases/keydb/distinfo index b858103764f..afd69f927fc 100644 --- a/databases/keydb/distinfo +++ b/databases/keydb/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1698245036 -SHA256 (Snapchat-KeyDB-v6.3.3_GH0.tar.gz) = c6798cea3fe4ba4d1b42eea6ca2cfaee261786d12bf30aef1a53211d25ab66d9 -SIZE (Snapchat-KeyDB-v6.3.3_GH0.tar.gz) = 11541110 +TIMESTAMP = 1698955833 +SHA256 (Snapchat-KeyDB-v6.3.4_GH0.tar.gz) = 229190b251f921e05aff7b0d2f04b5676c198131e2abbec1e2cfb2e61215e2f3 +SIZE (Snapchat-KeyDB-v6.3.4_GH0.tar.gz) = 5942328 diff --git a/databases/keydb/files/patch-src-Makefile b/databases/keydb/files/patch-src-Makefile index 4703d6eb6da..c88dc47461f 100644 --- a/databases/keydb/files/patch-src-Makefile +++ b/databases/keydb/files/patch-src-Makefile @@ -1,6 +1,6 @@ ---- src/Makefile.orig 2023-10-25 15:47:51 UTC +--- src/Makefile.orig 2023-11-02 20:13:44 UTC +++ src/Makefile -@@ -138,21 +138,11 @@ endif +@@ -138,7 +138,6 @@ endif # Override default settings if possible -include .make-settings @@ -8,41 +8,26 @@ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(KEYDB_CFLAGS) $(REDIS_CFLAGS) FINAL_CXXFLAGS=$(CXX_STD) $(WARN) $(OPT) $(DEBUG) $(CXXFLAGS) $(KEYDB_CFLAGS) $(REDIS_CFLAGS) FINAL_LDFLAGS=$(LDFLAGS) $(KEYDB_LDFLAGS) $(DEBUG) - FINAL_LIBS+=-lm -lz -lcrypto -lbz2 -lzstd -llz4 -lsnappy - --ifneq ($(uname_S),Darwin) -- FINAL_LIBS+=-latomic --endif --# Linux ARM32 needs -latomic at linking time --ifneq (,$(findstring armv,$(uname_M))) -- FINAL_LIBS+=-latomic --endif -- -- - ifeq ($(uname_S),SunOS) - # SunOS - ifeq ($(findstring -m32,$(FINAL_CFLAGS)),) -@@ -211,7 +201,9 @@ ifeq ($(uname_S),NetBSD) - else +@@ -214,9 +213,6 @@ else ifeq ($(uname_S),FreeBSD) # FreeBSD -- FINAL_LIBS+= -lpthread -lexecinfo -+ FINAL_LIBS+= -lpthread -lexecinfo -luuid -+ FINAL_CFLAGS?= $(CFLAGS) $(REDIS_CFLAGS) -I${PREFIX}/include -+ FINAL_LDFLAGS= $(LDFLAGS) -pthread - else - ifeq ($(uname_S),DragonFly) - # DragonFly -@@ -347,7 +339,7 @@ else + FINAL_LIBS+= -lpthread -luuid -lexecinfo +- FINAL_CFLAGS+= -I/usr/local/include +- FINAL_CXXFLAGS+= -I/usr/local/include +- FINAL_LDFLAGS+= -L/usr/local/lib + ifeq ($(USE_BACKTRACE),yes) + FINAL_CFLAGS+= -DUSE_BACKTRACE + endif +@@ -355,7 +351,7 @@ else endif # Alpine OS doesn't have support for the execinfo backtrace library we use for debug, so we provide an alternate implementation using libwunwind. -OS := $(shell cat /etc/os-release | grep ID= | head -n 1 | cut -d'=' -f2) +OS := $(shell uname -r) ifeq ($(OS),alpine) - FINAL_CXXFLAGS+=-DUNW_LOCAL_ONLY -DALPINE - FINAL_LIBS += -lunwind -@@ -417,7 +409,6 @@ persist-settings: distclean + FINAL_CXXFLAGS+=-DUNW_LOCAL_ONLY + FINAL_CXXFLAGS+=-DALPINE +@@ -426,7 +422,6 @@ persist-settings: distclean echo PREV_FINAL_CFLAGS=$(FINAL_CFLAGS) >> .make-settings echo PREV_FINAL_CXXFLAGS=$(FINAL_CXXFLAGS) >> .make-settings echo PREV_FINAL_LDFLAGS=$(FINAL_LDFLAGS) >> .make-settings diff --git a/devel/Makefile b/devel/Makefile index 4d3b509a4ad..06dabbe0215 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -606,7 +606,6 @@ SUBDIR += efl SUBDIR += egypt SUBDIR += eiffelstudio - SUBDIR += electron22 SUBDIR += electron24 SUBDIR += electron25 SUBDIR += electron26 @@ -7863,7 +7862,6 @@ SUBDIR += xtensa-esp32-elf SUBDIR += xtl SUBDIR += xtl-quant-stack - SUBDIR += xtoolchain-llvm-devel SUBDIR += xwpe SUBDIR += xxgdb SUBDIR += xxhash diff --git a/devel/RStudio/Makefile b/devel/RStudio/Makefile index 49a2ab454bd..4f792815381 100644 --- a/devel/RStudio/Makefile +++ b/devel/RStudio/Makefile @@ -4,7 +4,7 @@ PORTNAME= RStudio DISTVERSIONPREFIX= v DISTVERSION= 2022.12.0+353 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= devel math java MASTER_SITES= https://s3.amazonaws.com/rstudio-buildtools/dictionaries/:dictionaries \ https://s3.amazonaws.com/rstudio-buildtools/:buildtools @@ -20,9 +20,6 @@ WWW= https://rstudio.com/ LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/COPYING -DEPRECATED= Depends on deprecated www/qt5-webkit -EXPIRATION_DATE= 2023-11-26 - BROKEN_i386= [ERROR] Line 101: Failed to resolve 'org.rstudio.studio.client.workbench.views.vcs.common.diff.LineActionButtonRenderer.GrayResources' via deferred binding BUILD_DEPENDS= ant:devel/apache-ant \ @@ -74,7 +71,7 @@ GIN_VERSION= 2.1.2 COMMENT+= (desktop UI version) USES+= desktop-file-utils qt:5 shared-mime-info USE_QT= core dbus declarative gui location network opengl printsupport quickcontrols sensors \ - sql svg webchannel webengine webkit widgets xml xmlpatterns buildtools:build qmake:build + sql svg webchannel webengine widgets xml xmlpatterns buildtools:build qmake:build CMAKE_ARGS+= -DRSTUDIO_TARGET=Desktop INSTALL_SUBDIR= ${PORTNAME:tl} EXECUTABLE= ${PORTNAME:tl} diff --git a/devel/aegis/Makefile b/devel/aegis/Makefile index 2edfa0dc601..2d82676d429 100644 --- a/devel/aegis/Makefile +++ b/devel/aegis/Makefile @@ -1,5 +1,6 @@ PORTNAME= aegis PORTVERSION= 4.25 +PORTREVISION= 1 DISTVERSIONSUFFIX= .D510 PORTREVISION= 14 CATEGORIES= devel diff --git a/devel/apache-log4j2/Makefile b/devel/apache-log4j2/Makefile index 3384c83c229..1518b978037 100644 --- a/devel/apache-log4j2/Makefile +++ b/devel/apache-log4j2/Makefile @@ -1,5 +1,5 @@ PORTNAME= log4j2 -PORTVERSION= 2.21.0 +PORTVERSION= 2.21.1 CATEGORIES= devel java MASTER_SITES= APACHE/logging/log4j/${PORTVERSION} PKGNAMEPREFIX= apache- diff --git a/devel/apache-log4j2/distinfo b/devel/apache-log4j2/distinfo index 10bbd74e0ad..6eeb1ccafad 100644 --- a/devel/apache-log4j2/distinfo +++ b/devel/apache-log4j2/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1697971857 -SHA256 (apache-log4j-2.21.0-bin.zip) = 574c32c8756d774515271c06f5d64a53e2d90844fbe9c14c3489cc7d3a69a62f -SIZE (apache-log4j-2.21.0-bin.zip) = 3200893 +TIMESTAMP = 1698942395 +SHA256 (apache-log4j-2.21.1-bin.zip) = b24b8209454129ccbf1b0947b67305e88f8f1ea25f5f31d84dc8ce54229509f8 +SIZE (apache-log4j-2.21.1-bin.zip) = 3198627 diff --git a/devel/clojure-cider/Makefile b/devel/clojure-cider/Makefile index cbbcba5e706..6d8685d291a 100644 --- a/devel/clojure-cider/Makefile +++ b/devel/clojure-cider/Makefile @@ -1,5 +1,5 @@ PORTNAME= clojure-cider -PORTVERSION= 1.9.0 +PORTVERSION= 1.10.0 DISTVERSIONPREFIX= v CATEGORIES= devel elisp PKGNAMESUFFIX= ${EMACS_PKGNAMESUFFIX} diff --git a/devel/clojure-cider/distinfo b/devel/clojure-cider/distinfo index 37bceadfdbf..100f2687c2b 100644 --- a/devel/clojure-cider/distinfo +++ b/devel/clojure-cider/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1698237672 -SHA256 (clojure-emacs-cider-v1.9.0_GH0.tar.gz) = 3bc5a477bdc24d41014cb881f828adf24cae32991bcbaa511483f3e18fa5131b -SIZE (clojure-emacs-cider-v1.9.0_GH0.tar.gz) = 7285662 +TIMESTAMP = 1698933788 +SHA256 (clojure-emacs-cider-v1.10.0_GH0.tar.gz) = 019b3d63e5f406fd92ba322fec95cbf87b363d14d3047dafbebf5c83ccd036a2 +SIZE (clojure-emacs-cider-v1.10.0_GH0.tar.gz) = 7287469 diff --git a/devel/electron22/Makefile b/devel/electron22/Makefile deleted file mode 100644 index 139cf35ae1f..00000000000 --- a/devel/electron22/Makefile +++ /dev/null @@ -1,416 +0,0 @@ -PORTNAME= electron -DISTVERSIONPREFIX= v -DISTVERSION= ${ELECTRON_VER:S/-beta./.b/} -CATEGORIES= devel -MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v22.2.0/:chromium \ - https://commondatastorage.googleapis.com/chromium-nodejs/:chromium_node \ - https://commondatastorage.googleapis.com/chromium-fonts/:chromium_testfonts -PKGNAMESUFFIX= ${ELECTRON_VER_MAJOR} -DISTFILES= chromium-${CHROMIUM_VER}${EXTRACT_SUFX}:chromium \ - ${CHROMIUM_NODE_MODULES_HASH}:chromium_node \ - ${CHROMIUM_TEST_FONTS_HASH}:chromium_testfonts \ - electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX}:prefetch -DIST_SUBDIR= ${PORTNAME} - -MAINTAINER= tagattie@FreeBSD.org -COMMENT= Build cross-platform desktop apps with JavaScript, HTML, and CSS -WWW= https://electronjs.org/ - -LICENSE= BSD3CLAUSE LGPL21 MPL11 MIT -LICENSE_COMB= multi -LICENSE_FILE= ${WRKSRC}/electron/LICENSE - -DEPRECATED= Depends on EOL NodeJS 16 -EXPIRATION_DATE= 2023-10-30 - -ONLY_FOR_ARCHS= aarch64 amd64 i386 - -FETCH_DEPENDS= yarn-node16>0:www/yarn-node16 -EXTRACT_DEPENDS=yarn-node16>0:www/yarn-node16 -PATCH_DEPENDS= git:devel/git -BUILD_DEPENDS= gperf:devel/gperf \ - yasm:devel/yasm \ - ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ - ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ - node16>0:www/node16 \ - npm-node16>0:www/npm-node16 -LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ - libatspi.so:accessibility/at-spi2-core \ - libsnappy.so:archivers/snappy \ - libFLAC.so:audio/flac \ - libopus.so:audio/opus \ - libdbus-1.so:devel/dbus \ - libicuuc.so:devel/icu \ - libevent.so:devel/libevent \ - libnotify.so:devel/libnotify \ - libpci.so:devel/libpci \ - libnspr4.so:devel/nspr \ - libre2.so:devel/re2 \ - libdrm.so:graphics/libdrm \ - libpng.so:graphics/png \ - libwayland-client.so:graphics/wayland \ - libwebp.so:graphics/webp \ - libva.so:multimedia/libva \ - libopenh264.so:multimedia/openh264 \ - libfreetype.so:print/freetype2 \ - libharfbuzz.so:print/harfbuzz \ - libsecret-1.so:security/libsecret \ - libnss3.so:security/nss \ - libexpat.so:textproc/expat2 \ - libxkbcommon.so:x11/libxkbcommon \ - libxshmfence.so:x11/libxshmfence \ - libfontconfig.so:x11-fonts/fontconfig -RUN_DEPENDS= xdg-open:devel/xdg-utils -TEST_DEPENDS= git:devel/git \ - ${PYTHON_PKGNAMEPREFIX}python-dbusmock>0:devel/py-python-dbusmock@${PY_FLAVOR} \ - npm-node16>0:www/npm-node16 - -USES= bison compiler:c++17-lang cpe gettext-tools gl gnome \ - iconv:wchar_t jpeg localbase:ldflags ninja pkgconfig \ - python:build,test shebangfix tar:xz xorg - -CPE_VENDOR= electronjs -USE_GITHUB= yes -GH_TAGNAME= ${DISTVERSIONPREFIX}${ELECTRON_VER} -GH_TUPLE= nodejs:node:v${NODE_VER}:node \ - nodejs:nan:${NAN_VER}:nan \ - Squirrel:Squirrel.Mac:${SQUIRREL_MAC_VER}:squirrel_mac \ - ReactiveCocoa:ReactiveObjC:${REACTIVEOBJC_VER}:reactiveobjc \ - Mantle:Mantle:${MANTLE_VER}:mantle -USE_GL= gbm gl glesv2 -USE_GNOME= atk cairo gdkpixbuf2 gtk30 libxml2 libxslt pango -USE_LDCONFIG= ${DATADIR} -USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xrandr \ - xrender xscrnsaver xtst - -SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format - -MAKE_ARGS= -C out/${BUILDTYPE} -MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ - CPLUS_INCLUDE_PATH=${LOCALBASE}/include -ALL_TARGET= electron third_party/electron_node:headers -POST_BUILD_TARGETS= licenses version -POST_BUILD_DIST_TARGETS=electron_dist_zip electron_chromedriver_zip \ - electron_mksnapshot_zip - -DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX} -BINARY_ALIAS= python3=${PYTHON_CMD} - -NO_WRKSUBDIR= yes -WRKSRC_SUBDIR= src - -GN_ARGS+= clang_use_chrome_plugins=false \ - enable_hangout_services_extension=true \ - enable_js_type_check=false \ - enable_nacl=false \ - enable_remoting=false \ - fatal_linker_warnings=false \ - icu_use_data_file=false \ - is_clang=true \ - optimize_webui=true \ - toolkit_views=true \ - treat_warnings_as_errors=false \ - use_allocator="none" \ - use_allocator_shim=false \ - use_aura=true \ - use_custom_libcxx=false \ - use_gnome_keyring=false \ - use_lld=true \ - use_partition_alloc=true \ - use_partition_alloc_as_malloc=false \ - use_sysroot=false \ - use_system_freetype=false \ - use_system_harfbuzz=true \ - use_system_libjpeg=true \ - use_system_libwayland=true \ - use_system_wayland_scanner=true \ - use_udev=false \ - chrome_pgo_phase=0 \ - extra_cxxflags="${CXXFLAGS}" \ - extra_ldflags="${LDFLAGS}" - -# TODO: investigate building with these options: -# use_system_minigbm -GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles - -PLIST_SUB= ELECTRON_VER=${ELECTRON_VER} \ - ELECTRON_VER_MAJOR=${ELECTRON_VER_MAJOR} - -OPTIONS_DEFINE= CODECS CUPS DEBUG DIST DRIVER KERBEROS LTO -OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS SNDIO -OPTIONS_EXCLUDE_aarch64=LTO -OPTIONS_GROUP= AUDIO -OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO -OPTIONS_RADIO= KERBEROS -OPTIONS_RADIO_KERBEROS= HEIMDAL HEIMDAL_BASE MIT -OPTIONS_SUB= yes -CODECS_DESC= Compile and enable patented codecs like H.264 -DIST_DESC= Build distribution zip files -DRIVER_DESC= Install chromedriver -HEIMDAL_BASE_DESC= Heimdal Kerberos (base) -HEIMDAL_DESC= Heimdal Kerberos (security/heimdal) -MIT_DESC= MIT Kerberos (security/krb5) - -ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib -ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ - alsa-lib>=1.1.1_1:audio/alsa-lib -ALSA_VARS= GN_ARGS+=use_alsa=true -ALSA_VARS_OFF= GN_ARGS+=use_alsa=false - -CODECS_VARS= GN_ARGS+=ffmpeg_branding="Chrome" \ - GN_ARGS+=proprietary_codecs=true -CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ - GN_ARGS+=proprietary_codecs=false - -CUPS_LIB_DEPENDS= libcups.so:print/cups -CUPS_VARS= GN_ARGS+=use_cups=true -CUPS_VARS_OFF= GN_ARGS+=use_cups=false - -DEBUG_BUILD_DEPENDS= esbuild:devel/esbuild -DEBUG_VARS= BUILDTYPE=Debug \ - GN_FILE=testing.gn \ - GN_ARGS+=is_debug=true \ - GN_ARGS+=is_component_build=false \ - GN_ARGS+=symbol_level=1 \ - GN_BOOTSTRAP_FLAGS+=--debug \ - WANTSPACE="21 GB" -DEBUG_VARS_OFF= BUILDTYPE=Release \ - GN_FILE=release.gn \ - GN_ARGS+=blink_symbol_level=0 \ - GN_ARGS+=is_debug=false \ - GN_ARGS+=is_official_build=true \ - GN_ARGS+=symbol_level=0 \ - WANTSPACE="14 GB" - -DIST_IMPLIES= DRIVER -DRIVER_MAKE_ARGS= chromedriver - -HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal -KERBEROS_VARS= GN_ARGS+=use_kerberos=true -KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false - -LTO_VARS= GN_ARGS+=use_thin_lto=true \ - GN_ARGS+=thin_lto_enable_optimizations=true \ - WANTSPACE="14 GB" -LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false - -MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 -PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio -PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true -PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false - -# With SNDIO=on we exclude audio_manager_linux from the build (see -# media/audio/BUILD.gn) and use audio_manager_openbsd which does not -# support falling back to ALSA or PulseAudio. -SNDIO_PREVENTS= ALSA PULSEAUDIO -SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio -SNDIO_VARS= GN_ARGS+=use_sndio=true -SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false - -# See ${WRKSRC}/electron/DEPS for CHROMIUM_VER -CHROMIUM_VER= 108.0.5359.215 -# See ${WRKSRC}/third_party/node/node_modules.tar.gz.sha1 for CHROMIUM_NODE_MODULES_HASH -CHROMIUM_NODE_MODULES_HASH= f8b5da24d33317766d3933fb6711b0603fc4fb6f -# See ${WRKSRC}/third_party/test_fonts/test_fonts.tar.gz.sha1 for CHROMIUM_TEST_FONTS_HASH -CHROMIUM_TEST_FONTS_HASH= 336e775eec536b2d785cc80eff6ac39051931286 -# See ${WRKSRC}/electron/DEPS for NODE_VER -NODE_VER= 16.17.1 -# See ${WRKSRC}/electron/DEPS for NAN_VER -NAN_VER= 16fa32231e2ccd89d2804b3f765319128b20c4ac -# See ${WRKSRC}/electron/DEPS for SQUIRREL_MAC_VER -SQUIRREL_MAC_VER= 0e5d146ba13101a1302d59ea6e6e0b3cace4ae38 -# See ${WRKSRC}/electron/DEPS for REACTIVEOBJC_VER -REACTIVEOBJC_VER= 74ab5baccc6f7202c8ac69a8d1e152c29dc1ea76 -# See ${WRKSRC}/electron/DEPS for MANTLE_VER -MANTLE_VER= 78d3966b3c331292ea29ec38661b25df0a245948 - -YARN_TIMESTAMP= 1696924632 - -.include "Makefile.version" -.include # required for COMPILER_VERSION - -.if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) -IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base -.endif - -.if ${COMPILER_VERSION} != 130 -LLVM_DEFAULT= 13 -BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} -BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} \ - cc=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ - c++=${LOCALBASE}/bin/clang++${LLVM_DEFAULT} \ - ar=${LOCALBASE}/bin/llvm-ar${LLVM_DEFAULT} \ - nm=${LOCALBASE}/bin/llvm-nm${LLVM_DEFAULT} \ - ld=${LOCALBASE}/bin/ld.lld${LLVM_DEFAULT} -.else -BINARY_ALIAS+= ar=/usr/bin/llvm-ar \ - nm=/usr/bin/llvm-nm -.endif - -.if ${ARCH} == "amd64" -PLIST_SUB+= AMD64="" -.else -PLIST_SUB+= AMD64="@comment " -.endif - -.if ${ARCH} == "i386" -PLIST_SUB+= I386="" -.else -PLIST_SUB+= I386="@comment " -.endif - -# Allow relocations against read-only segments (override lld default) -LDFLAGS_i386= -Wl,-znotext - -# TODO: -isystem, would be just as ugly as this approach, but more reliably -# build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. -MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ - CPLUS_INCLUDE_PATH=${LOCALBASE}/include - -pre-everything:: - @${ECHO_MSG} - @${ECHO_MSG} "To build electron, you should have around 2GB of memory" - @${ECHO_MSG} "and around ${WANTSPACE} of free disk space." - @${ECHO_MSG} - -pre-fetch: - @${MKDIR} ${DISTDIR}/${DIST_SUBDIR} - if [ ! -f ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} ]; \ - then ${MKDIR} ${WRKDIR}; \ - ${ECHO_CMD} 'yarn-offline-mirror "./yarn-offline-cache"' >> \ - ${WRKDIR}/.yarnrc; \ - ${CP} ${FILESDIR}/package.json ${FILESDIR}/yarn.lock ${WRKDIR}; \ - cd ${WRKDIR} && ${SETENV} HOME=${WRKDIR} XDG_CACHE_HOME=${WRKDIR}/.cache \ - yarn --frozen-lockfile --ignore-scripts; \ - ${MTREE_CMD} -cbnSp yarn-offline-cache | ${MTREE_CMD} -C | ${SED} \ - -e 's:time=[0-9.]*:time=${YARN_TIMESTAMP}.000000000:' \ - -e 's:\([gu]id\)=[0-9]*:\1=0:g' \ - -e 's:mode=\([0-9]\)7[0-9][0-9]:mode=\1755:' \ - -e 's:mode=\([0-9]\)6[0-9][0-9]:mode=\1644:' \ - -e 's:flags=.*:flags=none:' \ - -e 's:^\.:./yarn-offline-cache:' > yarn-offline-cache.mtree; \ - ${TAR} cJf ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} \ - @yarn-offline-cache.mtree; \ - ${RM} -r ${WRKDIR}; \ - fi - -post-extract: -# Move extracted sources to appropriate locations - ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/chromium-${CHROMIUM_VER} ${WRKSRC} - ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${PORTNAME}-${ELECTRON_VER} ${WRKSRC}/electron - ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_nan}-${NAN_VER} \ - ${WRKSRC}/third_party/nan - ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_node}-${NODE_VER} \ - ${WRKSRC}/third_party/electron_node - ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_squirrel_mac}-${SQUIRREL_MAC_VER} \ - ${WRKSRC}/third_party/squirrel.mac - ${MKDIR} ${WRKSRC}/third_party/squirrel.mac/vendor - ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_reactiveobjc}-${REACTIVEOBJC_VER} \ - ${WRKSRC}/third_party/squirrel.mac/vendor/ReactiveObjC - ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_mantle}-${MANTLE_VER} \ - ${WRKSRC}/third_party/squirrel.mac/vendor/Mantle - ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/node_modules ${WRKSRC}/third_party/node - ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/test_fonts ${WRKSRC}/third_party/test_fonts -# Install node modules for electron - ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/yarn-offline-cache ${WRKDIR} - ${ECHO_CMD} 'yarn-offline-mirror "../../../yarn-offline-cache"' >> ${WRKSRC}/electron/.yarnrc - ${MV} ${WRKSRC}/electron/package.json ${WRKSRC}/electron/package.json.bak - ${CP} ${FILESDIR}/package.json ${WRKSRC}/electron - cd ${WRKSRC}/electron && \ - ${SETENV} HOME=${WRKDIR} XDG_CACHE_HOME=${WRKDIR}/.cache yarn --frozen-lockfile --offline - -pre-patch: - ${SH} ${FILESDIR}/apply-electron-patches.sh ${WRKSRC} - # ${FIND} ${WRKSRC} -type f -name '*.orig' -print -delete - # ${FIND} ${WRKSRC} -type f -name '*~' -print -delete - -pre-configure: - # We used to remove bundled libraries to be sure that chromium uses - # system libraries and not shipped ones. - # cd ${WRKSRC} && ${PYTHON_CMD} \ - #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] - cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ - ./build/linux/unbundle/replace_gn_files.py --system-libraries \ - flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ - libusb libwebp libxml libxslt openh264 opus snappy || ${FALSE} - # Chromium uses an unreleased version of FFmpeg, so configure it -.for brand in Chrome Chromium - ${CP} -R \ - ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/linux/ \ - ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/freebsd -.endfor - -do-configure: - # GN generator bootstrapping and generating ninja files - cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ - READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ - ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} - cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn gen out/${BUILDTYPE} \ - --args='import("//electron/build/args/${GN_FILE}") ${GN_ARGS}' - - # Setup nodejs dependency - @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin - ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node - - # Setup buildtools/freebsd - @${MKDIR} ${WRKSRC}/buildtools/freebsd - ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd - ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd - ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip - -post-build: - cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ - ${MAKE_CMD} ${MAKE_ARGS} ${POST_BUILD_TARGETS} - -post-build-DIST-on: - cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ - ${MAKE_CMD} ${MAKE_ARGS} ${POST_BUILD_DIST_TARGETS} - cd ${WRKSRC}/out/${BUILDTYPE} && \ - ${CP} chromedriver.zip chromedriver-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \ - ${CP} dist.zip electron-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \ - ${CP} mksnapshot.zip mksnapshot-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \ - ${SHA256} -r *-v${ELECTRON_VER}-freebsd-*.zip | ${SED} -e 's/ / */' > SHASUMS256.txt - -do-install: - ${MKDIR} ${STAGEDIR}${DATADIR} -.for f in electron mksnapshot v8_context_snapshot_generator - ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} -.endfor -.for f in libEGL.so libGLESv2.so libffmpeg.so libvk_swiftshader.so - ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} -.endfor - ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvulkan.so.1 ${STAGEDIR}${DATADIR}/libvulkan.so -.for f in LICENSE LICENSES.chromium.html snapshot_blob.bin v8_context_snapshot.bin version vk_swiftshader_icd.json - ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} -.endfor -.for f in chrome_100_percent.pak chrome_200_percent.pak resources.pak - ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} -.endfor - ${MKDIR} ${STAGEDIR}${DATADIR}/locales - ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/locales/*.pak ${STAGEDIR}${DATADIR}/locales - ${MKDIR} ${STAGEDIR}${DATADIR}/resources -.for f in default_app.asar - ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/resources/${f} ${STAGEDIR}${DATADIR}/resources -.endfor - cd ${WRKSRC}/out/${BUILDTYPE}/gen && ${COPYTREE_SHARE} node_headers ${STAGEDIR}${DATADIR} - cd ${WRKSRC}/out/${BUILDTYPE} && ${COPYTREE_SHARE} gen/electron/buildflags ${STAGEDIR}${DATADIR} - cd ${WRKSRC}/out/${BUILDTYPE} && ${COPYTREE_SHARE} gen/v8/embedded.S ${STAGEDIR}${DATADIR} - ${RLN} ${STAGEDIR}${DATADIR}/electron ${STAGEDIR}${PREFIX}/bin/electron${PKGNAMESUFFIX} - -post-install-DIST-on: - ${MKDIR} ${STAGEDIR}${DATADIR}/releases - ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/SHASUMS256.txt ${STAGEDIR}${DATADIR}/releases - ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*-v${ELECTRON_VER}-freebsd-*.zip ${STAGEDIR}${DATADIR}/releases - -post-install-DRIVER-on: - ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver.unstripped \ - ${STAGEDIR}${DATADIR}/chromedriver - -do-test: -# Note 1: "npm install" will run before actual tests are executed -# Note 2: Xvfb or something similar is necessary for headless testing - cd ${WRKSRC}/electron && \ - ${SETENV} ${TEST_ENV} ELECTRON_OUT_DIR=${BUILDTYPE} LOCAL_GIT_DIRECTORY=${LOCALBASE} \ - npm run test -- --ci - -.include diff --git a/devel/electron22/Makefile.version b/devel/electron22/Makefile.version deleted file mode 100644 index be39b9f6105..00000000000 --- a/devel/electron22/Makefile.version +++ /dev/null @@ -1,2 +0,0 @@ -ELECTRON_VER= 22.3.27 -ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//} diff --git a/devel/electron22/distinfo b/devel/electron22/distinfo deleted file mode 100644 index bf6ad87e4b6..00000000000 --- a/devel/electron22/distinfo +++ /dev/null @@ -1,21 +0,0 @@ -TIMESTAMP = 1696925306 -SHA256 (electron/chromium-108.0.5359.215.tar.xz) = aba0730b347269efda217affe804f6fced296aa02f810c8c9a6fd7d46cd7bf9a -SIZE (electron/chromium-108.0.5359.215.tar.xz) = 1584734880 -SHA256 (electron/f8b5da24d33317766d3933fb6711b0603fc4fb6f) = 63706737ca75e0e5c97885186b2a7ab019ca71d1315ee08870193bbfa7486bfc -SIZE (electron/f8b5da24d33317766d3933fb6711b0603fc4fb6f) = 9900677 -SHA256 (electron/336e775eec536b2d785cc80eff6ac39051931286) = a2ca2962daf482a8f943163541e1c73ba4b2694fabcd2510981f2db4eda493c8 -SIZE (electron/336e775eec536b2d785cc80eff6ac39051931286) = 32624734 -SHA256 (electron/electron-yarn-cache-22.3.27.tar.xz) = 6e7f0e963e6fdd14152cdb381688a0b12a3cef81f126d5246d2f4bc58d19ef9f -SIZE (electron/electron-yarn-cache-22.3.27.tar.xz) = 38838404 -SHA256 (electron/electron-electron-v22.3.27_GH0.tar.gz) = d71d9b18fca40cc1cf8f60dedb255f4ceed570e39421b006b7d3ca7021cfab3d -SIZE (electron/electron-electron-v22.3.27_GH0.tar.gz) = 10668381 -SHA256 (electron/nodejs-node-v16.17.1_GH0.tar.gz) = e63378aa6aa18b9e05486e46eaca6c6e09904366e5100d7e04c6dbd344a42f60 -SIZE (electron/nodejs-node-v16.17.1_GH0.tar.gz) = 90485310 -SHA256 (electron/nodejs-nan-16fa32231e2ccd89d2804b3f765319128b20c4ac_GH0.tar.gz) = 3807ae6a1e451a29f068540472f100f9718d457c60ac62f2f8469d1d57475d39 -SIZE (electron/nodejs-nan-16fa32231e2ccd89d2804b3f765319128b20c4ac_GH0.tar.gz) = 179355 -SHA256 (electron/Squirrel-Squirrel.Mac-0e5d146ba13101a1302d59ea6e6e0b3cace4ae38_GH0.tar.gz) = f4ebb40a8d85dbb7ef02aa0571b2f8e22182c6d73b6992484a53c90047779d01 -SIZE (electron/Squirrel-Squirrel.Mac-0e5d146ba13101a1302d59ea6e6e0b3cace4ae38_GH0.tar.gz) = 2112918 -SHA256 (electron/ReactiveCocoa-ReactiveObjC-74ab5baccc6f7202c8ac69a8d1e152c29dc1ea76_GH0.tar.gz) = 88e65f116c7a06fccedb43970fba63080a57a4e5dc29147d2cdfe1ee58dd0546 -SIZE (electron/ReactiveCocoa-ReactiveObjC-74ab5baccc6f7202c8ac69a8d1e152c29dc1ea76_GH0.tar.gz) = 1136238 -SHA256 (electron/Mantle-Mantle-78d3966b3c331292ea29ec38661b25df0a245948_GH0.tar.gz) = a365df6d83e0be3cc000b70bd39734d80c28f0d9983ebe44698337a2ca464bb1 -SIZE (electron/Mantle-Mantle-78d3966b3c331292ea29ec38661b25df0a245948_GH0.tar.gz) = 62962 diff --git a/devel/electron22/files/apply-electron-patches.sh b/devel/electron22/files/apply-electron-patches.sh deleted file mode 100644 index 9d974b53605..00000000000 --- a/devel/electron22/files/apply-electron-patches.sh +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh - -PATH=/bin:/usr/bin:/usr/local/bin - -GIT_CMD="git" -PATCH_CMD="${GIT_CMD} apply" -#PATCH_FLAGS="--numstat --check" # for debugging -PATCH_FLAGS="--verbose --reject" - -WRKSRC=$1 -PATCH_CONF=${WRKSRC}/electron/patches/config.json - -${GIT_CMD} status "${WRKSRC}" > /dev/null 2>&1 && IS_GIT_REPO=1 - -PATCHD_REPOD_PAIRS=$(sed -e '1d; $d; /^$/d; s/[",]//g; s/: */:/' "${PATCH_CONF}") -for prp in ${PATCHD_REPOD_PAIRS}; do - pd=$(echo "${prp}" | awk -F: '{print $1}' | sed -e 's/src/./') - rd=$(echo "${prp}" | awk -F: '{print $2}' | sed -e 's/src/./') - (cd "${WRKSRC}/${rd}" && \ - if [ -n "${IS_GIT_REPO}" ]; then - PATCH_FLAGS="${PATCH_FLAGS} --directory=$(${GIT_CMD} rev-parse --show-prefix)" - fi && \ - while read -r p; do - ${PATCH_CMD} ${PATCH_FLAGS} "${WRKSRC}/${pd}/${p}" - done < "${WRKSRC}/${pd}/.patches") -done diff --git a/devel/electron22/files/package.json b/devel/electron22/files/package.json deleted file mode 100644 index 9ef9c6c50c0..00000000000 --- a/devel/electron22/files/package.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "name": "electron", - "version": "0.0.0-development", - "repository": "https://github.com/electron/electron", - "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", - "devDependencies": { - "@azure/storage-blob": "^12.9.0", - "@electron/docs-parser": "^1.0.0", - "@electron/fiddle-core": "^1.0.4", - "@electron/github-app-auth": "^2.0.0", - "@electron/typescript-definitions": "^8.10.0", - "@octokit/rest": "^19.0.7", - "@primer/octicons": "^10.0.0", - "@types/basic-auth": "^1.1.3", - "@types/busboy": "^0.2.3", - "@types/chai": "^4.2.12", - "@types/chai-as-promised": "^7.1.3", - "@types/dirty-chai": "^2.0.2", - "@types/express": "^4.17.13", - "@types/fs-extra": "^9.0.1", - "@types/klaw": "^3.0.1", - "@types/minimist": "^1.2.0", - "@types/mocha": "^7.0.2", - "@types/node": "^16.11.26", - "@types/semver": "^7.3.3", - "@types/send": "^0.14.5", - "@types/split": "^1.0.0", - "@types/stream-json": "^1.5.1", - "@types/temp": "^0.8.34", - "@types/uuid": "^3.4.6", - "@types/webpack": "^5.28.0", - "@types/webpack-env": "^1.17.0", - "@typescript-eslint/eslint-plugin": "^4.4.1", - "@typescript-eslint/parser": "^4.4.1", - "asar": "^3.1.0", - "aws-sdk": "^2.814.0", - "buffer": "^6.0.3", - "check-for-leaks": "^1.2.1", - "colors": "1.4.0", - "dotenv-safe": "^4.0.4", - "dugite": "^1.103.0", - "eslint": "^7.4.0", - "eslint-config-standard": "^14.1.1", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-mocha": "^7.0.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-standard": "^4.0.1", - "eslint-plugin-typescript": "^0.14.0", - "events": "^3.2.0", - "express": "^4.16.4", - "folder-hash": "^2.1.1", - "fs-extra": "^9.0.1", - "got": "^11.8.5", - "husky": "^8.0.1", - "klaw": "^3.0.0", - "lint": "^1.1.2", - "lint-staged": "^10.2.11", - "markdownlint": "^0.21.1", - "markdownlint-cli": "^0.25.0", - "minimist": "^1.2.6", - "null-loader": "^4.0.0", - "pre-flight": "^1.1.0", - "process": "^0.11.10", - "remark-cli": "^10.0.0", - "remark-preset-lint-markdown-style-guide": "^4.0.0", - "semver": "^5.6.0", - "shx": "^0.3.2", - "standard-markdown": "^6.0.0", - "stream-json": "^1.7.1", - "tap-xunit": "^2.4.1", - "temp": "^0.8.3", - "timers-browserify": "1.4.2", - "ts-loader": "^8.0.2", - "ts-node": "6.2.0", - "typescript": "^4.5.5", - "webpack": "^5.73.0", - "webpack-cli": "^4.10.0", - "wrapper-webpack-plugin": "^2.2.0" - }, - "private": true, - "scripts": { - "asar": "asar", - "generate-version-json": "node script/generate-version-json.js", - "lint": "node ./script/lint.js && npm run lint:docs", - "lint:js": "node ./script/lint.js --js", - "lint:clang-format": "python3 script/run-clang-format.py -r -c shell/ || (echo \"\\nCode not formatted correctly.\" && exit 1)", - "lint:clang-tidy": "ts-node ./script/run-clang-tidy.ts", - "lint:cpp": "node ./script/lint.js --cc", - "lint:objc": "node ./script/lint.js --objc", - "lint:py": "node ./script/lint.js --py", - "lint:gn": "node ./script/lint.js --gn", - "lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:docs-relative-links && npm run lint:markdownlint", - "lint:docs-relative-links": "python3 ./script/check-relative-doc-links.py", - "lint:markdownlint": "markdownlint \"*.md\" \"docs/**/*.md\"", - "lint:js-in-markdown": "standard-markdown docs", - "create-api-json": "node script/create-api-json.js", - "create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --api=electron-api.json && node spec/ts-smoke/runner.js", - "gn-typescript-definitions": "npm run create-typescript-definitions && shx cp electron.d.ts", - "pre-flight": "pre-flight", - "gn-check": "node ./script/gn-check.js", - "gn-format": "python3 script/run-gn-format.py", - "precommit": "lint-staged", - "preinstall": "node -e 'process.exit(0)'", - "prepack": "check-for-leaks", - "repl": "node ./script/start.js --interactive", - "start": "node ./script/start.js", - "test": "node ./script/spec-runner.js", - "tsc": "tsc", - "webpack": "webpack" - }, - "license": "MIT", - "author": "Electron Community", - "keywords": [ - "electron" - ], - "lint-staged": { - "*.{js,ts}": [ - "node script/lint.js --js --fix --only --" - ], - "*.{js,ts,d.ts}": [ - "ts-node script/gen-filenames.ts" - ], - "*.{cc,mm,c,h}": [ - "python3 script/run-clang-format.py -r -c --fix" - ], - "*.md": [ - "npm run lint:docs" - ], - "*.{gn,gni}": [ - "npm run gn-check", - "npm run gn-format" - ], - "*.py": [ - "node script/lint.js --py --fix --only --" - ], - "docs/api/**/*.md": [ - "ts-node script/gen-filenames.ts", - "markdownlint --config .markdownlint.autofix.json --fix", - "git add filenames.auto.gni" - ], - "{*.patch,.patches}": [ - "node script/lint.js --patches --only --", - "ts-node script/check-patch-diff.ts" - ], - "DEPS": [ - "node script/gen-hunspell-filenames.js", - "node script/gen-libc++-filenames.js" - ] - }, - "resolutions": { - "nan": "nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac" - } -} diff --git a/devel/electron22/files/patch-BUILD.gn b/devel/electron22/files/patch-BUILD.gn deleted file mode 100644 index 838261c7b36..00000000000 --- a/devel/electron22/files/patch-BUILD.gn +++ /dev/null @@ -1,89 +0,0 @@ ---- BUILD.gn.orig 2023-01-30 07:58:58 UTC -+++ BUILD.gn -@@ -59,7 +59,7 @@ declare_args() { - root_extra_deps = [] - } - --if (is_official_build) { -+if (is_official_build && !is_bsd) { - # An official (maximally optimized!) component (optimized for build times) - # build doesn't make sense and usually doesn't work. - assert(!is_component_build) -@@ -89,7 +89,6 @@ group("gn_all") { - "//codelabs", - "//components:components_unittests", - "//components/gwp_asan:gwp_asan_unittests", -- "//infra/orchestrator:orchestrator_all", - "//net:net_unittests", - "//sandbox:sandbox_unittests", - "//services:services_unittests", -@@ -430,7 +429,7 @@ group("gn_all") { - ] - } - -- if (is_linux || is_chromeos || is_android) { -+ if ((is_linux && !is_bsd) || is_chromeos || is_android) { - deps += [ - "//third_party/breakpad:breakpad_unittests", - "//third_party/breakpad:core-2-minidump", -@@ -632,6 +631,15 @@ group("gn_all") { - deps += [ "//gpu/tools/compositor_model_bench" ] - } - -+ if (is_bsd) { -+ deps -= [ -+ "//third_party/breakpad:dump_syms($host_toolchain)", -+ "//third_party/breakpad:microdump_stackwalk($host_toolchain)", -+ "//third_party/breakpad:minidump_dump($host_toolchain)", -+ "//third_party/breakpad:minidump_stackwalk($host_toolchain)", -+ ] -+ } -+ - if (is_mac) { - deps += [ - "//third_party/breakpad:crash_inspector", -@@ -680,7 +688,7 @@ group("gn_all") { - host_os == "win") { - deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] - } -- } else if (!is_android && !is_ios && !is_fuchsia) { -+ } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) { - deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] - } - -@@ -1110,7 +1118,7 @@ if (!is_ios) { - ] - } - -- if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { -+ if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { - # WPT Webdriver tests runner - # chrome/test/chromedriver/test/run_webdriver_tests.py - script_test("webdriver_wpt_tests") { -@@ -1205,7 +1213,7 @@ if (!is_ios) { - data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] - } - -- if (!is_win && !is_android) { -+ if (!is_win && !is_android && !is_bsd) { - data_deps += - [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] - } -@@ -1214,7 +1222,7 @@ if (!is_ios) { - data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] - } - -- if (is_linux || is_chromeos) { -+ if ((is_linux && !is_bsd) || is_chromeos) { - data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] - } - -@@ -1658,7 +1666,7 @@ group("chromium_builder_perf") { - data_deps += [ "//chrome/test:performance_browser_tests" ] - } - -- if (!is_win) { -+ if (!is_win && !is_bsd) { - data_deps += - [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] - } diff --git a/devel/electron22/files/patch-apps_ui_views_app__window__frame__view.cc b/devel/electron22/files/patch-apps_ui_views_app__window__frame__view.cc deleted file mode 100644 index 2ac2dff2a8b..00000000000 --- a/devel/electron22/files/patch-apps_ui_views_app__window__frame__view.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- apps/ui/views/app_window_frame_view.cc.orig 2022-07-22 17:30:31 UTC -+++ apps/ui/views/app_window_frame_view.cc -@@ -137,7 +137,7 @@ gfx::Rect AppWindowFrameView::GetWindowBoundsForClient - gfx::Rect window_bounds = client_bounds; - // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is - // complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - // Get the difference between the widget's client area bounds and window - // bounds, and grow |window_bounds| by that amount. - gfx::Insets native_frame_insets = diff --git a/devel/electron22/files/patch-ash_display_mirror__window__controller.cc b/devel/electron22/files/patch-ash_display_mirror__window__controller.cc deleted file mode 100644 index d0bcf31e3bf..00000000000 --- a/devel/electron22/files/patch-ash_display_mirror__window__controller.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- ash/display/mirror_window_controller.cc.orig 2022-10-24 13:33:33 UTC -+++ ash/display/mirror_window_controller.cc -@@ -295,7 +295,11 @@ void MirrorWindowController::UpdateWindow( - if (!base::Contains(display_info_list, iter->first, - &display::ManagedDisplayInfo::id)) { - CloseAndDeleteHost(iter->second, true); -+#if defined(__llvm__) -+ mirroring_host_info_map_.erase(iter++); -+#else - iter = mirroring_host_info_map_.erase(iter); -+#endif - } else { - ++iter; - } diff --git a/devel/electron22/files/patch-base_BUILD.gn b/devel/electron22/files/patch-base_BUILD.gn deleted file mode 100644 index a30dfc0456a..00000000000 --- a/devel/electron22/files/patch-base_BUILD.gn +++ /dev/null @@ -1,166 +0,0 @@ ---- base/BUILD.gn.orig 2022-11-30 08:12:58 UTC -+++ base/BUILD.gn -@@ -163,7 +163,7 @@ buildflag_header("ios_cronet_buildflags") { - flags = [ "CRONET_BUILD=$is_cronet_build" ] - } - --enable_message_pump_epoll = is_linux || is_chromeos || is_android -+enable_message_pump_epoll = (is_linux || is_chromeos || is_android) && !is_bsd - buildflag_header("message_pump_buildflags") { - header = "message_pump_buildflags.h" - header_dir = "base/message_loop" -@@ -1048,7 +1048,7 @@ mixed_component("base") { - "timer/hi_res_timer_manager_posix.cc", - ] - -- if (!is_nacl && !is_apple) { -+ if (!is_nacl && !is_apple && !is_bsd) { - sources += [ - "profiler/stack_base_address_posix.cc", - "profiler/stack_base_address_posix.h", -@@ -1059,6 +1059,14 @@ mixed_component("base") { - "profiler/thread_delegate_posix.h", - ] - } -+ -+ if (is_bsd) { -+ sources += [ -+ "profiler/stack_base_address_posix.cc", -+ "profiler/stack_base_address_posix.h", -+ "profiler/stack_sampler_posix.cc", -+ ] -+ } - } - - if (is_win) { -@@ -1559,11 +1567,23 @@ mixed_component("base") { - # Needed for if using newer C++ library than sysroot, except if - # building inside the cros_sdk environment - use host_toolchain as a - # more robust check for this. -- if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && -+ if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) && - host_toolchain != "//build/toolchain/cros:host") { - libs += [ "atomic" ] - } - -+ # *BSD needs libkvm -+ if (is_bsd) { -+ libs += [ "kvm" ] -+ } -+ -+ if (is_freebsd) { -+ libs += [ -+ "execinfo", -+ "util", -+ ] -+ } -+ - if (use_allocator_shim) { - sources += [ - "allocator/partition_allocator/shim/allocator_shim.cc", -@@ -1591,7 +1611,7 @@ mixed_component("base") { - ] - configs += [ "//base/allocator:mac_no_default_new_delete_symbols" ] - } -- if (is_chromeos || is_linux) { -+ if (is_chromeos || (is_linux && !is_bsd)) { - sources += [ - "allocator/partition_allocator/shim/allocator_shim_override_cpp_symbols.h", - "allocator/partition_allocator/shim/allocator_shim_override_glibc_weak_symbols.h", -@@ -1645,7 +1665,7 @@ mixed_component("base") { - - # Allow more direct string conversions on platforms with native utf8 - # strings -- if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) { -+ if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) { - defines += [ "SYSTEM_NATIVE_UTF8" ] - } - -@@ -2218,6 +2238,42 @@ mixed_component("base") { - } - } - -+ if (is_bsd) { -+ sources -= [ -+ "files/file_path_watcher_inotify.cc", -+ "files/file_util_linux.cc", -+ "files/scoped_file_linux.cc", -+ "process/memory_linux.cc", -+ "process/process_linux.cc", -+ "system/sys_info_linux.cc", -+ "process/process_iterator_linux.cc", -+ "process/process_metrics_linux.cc", -+ "process/process_handle_linux.cc" -+ ] -+ sources += [ -+ "process/memory_stubs.cc", -+ "files/file_path_watcher_kqueue.cc", -+ "files/file_path_watcher_kqueue.h", -+ "files/file_path_watcher_bsd.cc", -+ ] -+ } -+ -+ if (is_openbsd) { -+ sources += [ -+ "process/process_handle_openbsd.cc", -+ "process/process_iterator_openbsd.cc", -+ "process/process_metrics_openbsd.cc", -+ "system/sys_info_openbsd.cc", -+ ] -+ } else if (is_freebsd) { -+ sources += [ -+ "process/process_handle_freebsd.cc", -+ "process/process_iterator_freebsd.cc", -+ "process/process_metrics_freebsd.cc", -+ "system/sys_info_freebsd.cc", -+ ] -+ } -+ - # iOS - if (is_ios) { - sources -= [ -@@ -2315,7 +2371,7 @@ mixed_component("base") { - } - - if (dep_libevent) { -- deps += [ "//third_party/libevent" ] -+ public_deps += [ "//third_party/libevent" ] - } - - if (use_libevent) { -@@ -3583,7 +3639,7 @@ test("base_unittests") { - } - } - -- if (is_linux || is_chromeos) { -+ if ((is_linux || is_chromeos) && !is_bsd) { - sources += [ - "debug/proc_maps_linux_unittest.cc", - "files/scoped_file_linux_unittest.cc", -@@ -3629,7 +3685,7 @@ test("base_unittests") { - "posix/file_descriptor_shuffle_unittest.cc", - "posix/unix_domain_socket_unittest.cc", - ] -- if (!is_nacl && !is_apple) { -+ if (!is_nacl && !is_apple && !is_bsd) { - sources += [ - "profiler/stack_base_address_posix_unittest.cc", - "profiler/stack_copier_signal_unittest.cc", -@@ -3640,7 +3696,7 @@ test("base_unittests") { - - # Allow more direct string conversions on platforms with native utf8 - # strings -- if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) { -+ if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) { - defines += [ "SYSTEM_NATIVE_UTF8" ] - } - -@@ -3832,7 +3888,7 @@ test("base_unittests") { - } - } - -- if (is_fuchsia || is_linux || is_chromeos) { -+ if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) { - sources += [ - "debug/elf_reader_unittest.cc", - "debug/test_elf_image_builder.cc", diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_address__space__randomization.h b/devel/electron22/files/patch-base_allocator_partition__allocator_address__space__randomization.h deleted file mode 100644 index f16c9802cfb..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_address__space__randomization.h +++ /dev/null @@ -1,20 +0,0 @@ ---- base/allocator/partition_allocator/address_space_randomization.h.orig 2022-06-17 14:20:10 UTC -+++ base/allocator/partition_allocator/address_space_randomization.h -@@ -38,7 +38,7 @@ AslrMask(uintptr_t bits) { - - #if defined(ARCH_CPU_64_BITS) - -- #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) -+ #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !defined(OS_BSD) - - // We shouldn't allocate system pages at all for sanitizer builds. However, - // we do, and if random hint addresses interfere with address ranges -@@ -128,7 +128,7 @@ AslrMask(uintptr_t bits) { - return AslrAddress(0x20000000ULL); - } - -- #elif BUILDFLAG(IS_LINUX) -+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - // Linux on arm64 can use 39, 42, 48, or 52-bit user space, depending on - // page size and number of levels of translation pages used. We use diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_page__allocator.h b/devel/electron22/files/patch-base_allocator_partition__allocator_page__allocator.h deleted file mode 100644 index e67310662bc..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_page__allocator.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/allocator/partition_allocator/page_allocator.h.orig 2022-11-30 08:12:58 UTC -+++ base/allocator/partition_allocator/page_allocator.h -@@ -231,7 +231,7 @@ void DecommitAndZeroSystemPages(void* address, size_t - // recommitted. Do not assume that this will not change over time. - constexpr PA_COMPONENT_EXPORT( - PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() { --#if BUILDFLAG(IS_APPLE) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) - return false; - #else - return true; diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_page__allocator__constants.h b/devel/electron22/files/patch-base_allocator_partition__allocator_page__allocator__constants.h deleted file mode 100644 index 39bacb51860..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_page__allocator__constants.h +++ /dev/null @@ -1,38 +0,0 @@ ---- base/allocator/partition_allocator/page_allocator_constants.h.orig 2022-09-24 10:57:32 UTC -+++ base/allocator/partition_allocator/page_allocator_constants.h -@@ -25,7 +25,7 @@ - // elimination. - #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) - --#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) - // This should work for all POSIX (if needed), but currently all other - // supported OS/architecture combinations use either hard-coded values - // (such as x86) or have means to determine these values without needing -@@ -81,7 +81,7 @@ PageAllocationGranularityShift() { - return 14; // 16kB - #elif BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS) - return static_cast(vm_page_shift); --#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) - // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) - // page sizes. Retrieve from or initialize cache. - size_t shift = page_characteristics.shift.load(std::memory_order_relaxed); -@@ -102,7 +102,7 @@ PageAllocationGranularity() { - // This is literally equivalent to |1 << PageAllocationGranularityShift()| - // below, but was separated out for IS_APPLE to avoid << on a non-constexpr. - return vm_page_size; --#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) - // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or - // initialize cache. - size_t size = page_characteristics.size.load(std::memory_order_relaxed); -@@ -141,7 +141,7 @@ SystemPageShift() { - PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t - SystemPageSize() { - #if (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ -- (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) -+ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) - // This is literally equivalent to |1 << SystemPageShift()| below, but was - // separated out for 64-bit IS_APPLE and arm64 on Linux to avoid << on a - // non-constexpr. diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h b/devel/electron22/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h deleted file mode 100644 index a199eaa6b70..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h +++ /dev/null @@ -1,16 +0,0 @@ ---- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2022-11-30 08:12:58 UTC -+++ base/allocator/partition_allocator/page_allocator_internals_posix.h -@@ -356,8 +356,12 @@ bool TryRecommitSystemPagesInternal( - - void DiscardSystemPagesInternal(uintptr_t address, size_t length) { - void* ptr = reinterpret_cast(address); --#if BUILDFLAG(IS_APPLE) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) -+#if BUILDFLAG(IS_BSD) -+ int ret = madvise(ptr, length, MADV_FREE); -+#else - int ret = madvise(ptr, length, MADV_FREE_REUSABLE); -+#endif - if (ret) { - // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. - ret = madvise(ptr, length, MADV_DONTNEED); diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__address__space.cc b/devel/electron22/files/patch-base_allocator_partition__allocator_partition__address__space.cc deleted file mode 100644 index 4141606a92b..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__address__space.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/allocator/partition_allocator/partition_address_space.cc.orig 2022-11-30 08:12:58 UTC -+++ base/allocator/partition_allocator/partition_address_space.cc -@@ -294,7 +294,7 @@ void PartitionAddressSpace::UninitConfigurablePoolForT - setup_.configurable_pool_base_mask_ = 0; - } - --#if BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) - - PageCharacteristics page_characteristics; - diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc b/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc deleted file mode 100644 index 5b35ab10061..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc +++ /dev/null @@ -1,13 +0,0 @@ ---- base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc.orig 2022-07-22 17:30:31 UTC -+++ base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc -@@ -86,6 +86,10 @@ void RandBytes(void* output, size_t output_length) { - if (getentropy(output, output_length) == 0) { - return; - } -+#elif BUILDFLAG(IS_BSD) -+ if (getentropy(output, output_length) == 0) { -+ return; -+ } - #endif - - // If the OS-specific mechanisms didn't work, fall through to reading from diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__internal__posix.h b/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__internal__posix.h deleted file mode 100644 index dfe57178caa..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__internal__posix.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_internal_posix.h.orig 2022-07-22 17:30:31 UTC -+++ base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_internal_posix.h -@@ -10,7 +10,7 @@ - - namespace partition_alloc::internal::base::internal { - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Current thread id is cached in thread local storage for performance reasons. - // In some rare cases it's important to invalidate that cache explicitly (e.g. - // after going through clone() syscall which does not call pthread_atfork() diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc b/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc deleted file mode 100644 index 16c4bd4b327..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc.orig 2022-07-22 17:30:31 UTC -+++ base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc -@@ -17,7 +17,7 @@ - #include "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_internal_posix.h" - #include "build/build_config.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include - #include - #endif diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__config.h b/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__config.h deleted file mode 100644 index eb35f8ecd16..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__config.h +++ /dev/null @@ -1,29 +0,0 @@ ---- base/allocator/partition_allocator/partition_alloc_config.h.orig 2022-10-24 13:33:33 UTC -+++ base/allocator/partition_allocator/partition_alloc_config.h -@@ -76,7 +76,7 @@ static_assert(sizeof(void*) != 8, ""); - - // POSIX is not only UNIX, e.g. macOS and other OSes. We do use Linux-specific - // features such as futex(2). --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - #define PA_HAS_LINUX_KERNEL - #endif - -@@ -197,7 +197,7 @@ constexpr bool kUseLazyCommit = false; - - // On these platforms, lock all the partitions before fork(), and unlock after. - // This may be required on more platforms in the future. --#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #define PA_HAS_ATFORK_HANDLER - #endif - -@@ -238,7 +238,7 @@ constexpr bool kUseLazyCommit = false; - // - // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to - // larger slot spans. --#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) -+#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD) - #define PA_PREFER_SMALLER_SLOT_SPANS - #endif // BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) - diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h b/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h deleted file mode 100644 index 161be695ad5..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h +++ /dev/null @@ -1,20 +0,0 @@ ---- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2022-11-30 08:12:58 UTC -+++ base/allocator/partition_allocator/partition_alloc_constants.h -@@ -91,7 +91,7 @@ PartitionPageShift() { - return 18; // 256 KiB - } - #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ -- (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) -+ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) - PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t - PartitionPageShift() { - return PageAllocationGranularityShift() + 2; -@@ -270,7 +270,7 @@ constexpr size_t kNumPools = 3; - // Special-case Android and iOS, which incur test failures with larger - // pools. Regardless, allocating >8GiB with malloc() on these platforms is - // unrealistic as of 2022. --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) - constexpr size_t kPoolMaxSize = 8 * kGiB; - #else - constexpr size_t kPoolMaxSize = 16 * kGiB; diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h b/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h deleted file mode 100644 index fbaa149594d..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h +++ /dev/null @@ -1,16 +0,0 @@ ---- base/allocator/partition_allocator/partition_alloc_forward.h.orig 2022-11-06 16:08:29 UTC -+++ base/allocator/partition_allocator/partition_alloc_forward.h -@@ -25,9 +25,13 @@ namespace internal { - // the second one 16. We could technically return something different for - // malloc() and operator new(), but this would complicate things, and most of - // our allocations are presumably coming from operator new() anyway. -+#if defined(__i386__) && defined(OS_FREEBSD) -+constexpr size_t kAlignment = 8; -+#else - constexpr size_t kAlignment = - std::max(alignof(max_align_t), - static_cast(__STDCPP_DEFAULT_NEW_ALIGNMENT__)); -+#endif - static_assert(kAlignment <= 16, - "PartitionAlloc doesn't support a fundamental alignment larger " - "than 16 bytes."); diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__page.h b/devel/electron22/files/patch-base_allocator_partition__allocator_partition__page.h deleted file mode 100644 index 434b393a3b0..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__page.h +++ /dev/null @@ -1,18 +0,0 @@ ---- base/allocator/partition_allocator/partition_page.h.orig 2022-11-30 08:12:58 UTC -+++ base/allocator/partition_allocator/partition_page.h -@@ -138,13 +138,13 @@ struct SlotSpanMetadata { - PartitionBucket* const bucket = nullptr; - - // CHECK()ed in AllocNewSlotSpan(). --#if defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE) -+#if (defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE)) - // System page size is not a constant on Apple OSes, but is either 4 or 16kiB - // (1 << 12 or 1 << 14), as checked in PartitionRoot::Init(). And - // PartitionPageSize() is 4 times the OS page size. - static constexpr size_t kMaxSlotsPerSlotSpan = - 4 * (1 << 14) / kSmallestBucket; --#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) - // System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is - // currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code, - // so we use the 16 kiB maximum (64 kiB will crash). diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__root.cc b/devel/electron22/files/patch-base_allocator_partition__allocator_partition__root.cc deleted file mode 100644 index affbe80cc25..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_partition__root.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- base/allocator/partition_allocator/partition_root.cc.orig 2022-10-24 13:33:33 UTC -+++ base/allocator/partition_allocator/partition_root.cc -@@ -41,7 +41,7 @@ - #include "wow64apiset.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include - #endif - -@@ -238,7 +238,7 @@ void PartitionAllocMallocInitOnce() { - if (!g_global_init_called.compare_exchange_strong(expected, true)) - return; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // When fork() is called, only the current thread continues to execute in the - // child process. If the lock is held, but *not* by this thread when fork() is - // called, we have a deadlock. -@@ -331,7 +331,7 @@ static size_t PartitionPurgeSlotSpan( - constexpr size_t kMaxSlotCount = - (PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) / - MinPurgeableSlotSize(); --#elif BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) -+#elif BUILDFLAG(IS_APPLE) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) - // It's better for slot_usage to be stack-allocated and fixed-size, which - // demands that its size be constexpr. On IS_APPLE and Linux on arm64, - // PartitionPageSize() is always SystemPageSize() << 2, so regardless of -@@ -734,7 +734,7 @@ void PartitionRoot::Init(PartitionOptions - // apple OSes. - PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || - (internal::SystemPageSize() == (size_t{1} << 14))); --#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) - // Check runtime pagesize. Though the code is currently the same, it is - // not merged with the IS_APPLE case above as a 1 << 16 case needs to be - // added here in the future, to allow 64 kiB pagesize. That is only diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_spinning__mutex.cc b/devel/electron22/files/patch-base_allocator_partition__allocator_spinning__mutex.cc deleted file mode 100644 index 4d89110c740..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_spinning__mutex.cc +++ /dev/null @@ -1,47 +0,0 @@ ---- base/allocator/partition_allocator/spinning_mutex.cc.orig 2022-07-22 17:30:31 UTC -+++ base/allocator/partition_allocator/spinning_mutex.cc -@@ -18,7 +18,15 @@ - - #if defined(PA_HAS_LINUX_KERNEL) - #include -+#if defined(OS_OPENBSD) -+#include -+#elif defined(OS_FREEBSD) -+#include -+#include -+#include -+#else - #include -+#endif - #include - #include - #endif // defined(PA_HAS_LINUX_KERNEL) -@@ -107,8 +115,13 @@ void SpinningMutex::FutexWait() { - // |kLockedContended| anymore. Note that even without spurious wakeups, the - // value of |state_| is not guaranteed when this returns, as another thread - // may get the lock before we get to run. -+#if defined(OS_FREEBSD) -+ int err = _umtx_op(&state_, UMTX_OP_WAIT_UINT_PRIVATE, -+ kLockedContended, nullptr, nullptr); -+#else - int err = syscall(SYS_futex, &state_, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, - kLockedContended, nullptr, nullptr, 0); -+#endif - - if (err) { - // These are programming error, check them. -@@ -120,8 +133,14 @@ void SpinningMutex::FutexWait() { - - void SpinningMutex::FutexWake() { - int saved_errno = errno; -+#if defined(OS_FREEBSD) -+ long retval = _umtx_op(&state_, UMTX_OP_WAKE_PRIVATE, -+ 1 /* wake up a single waiter */, nullptr, nullptr); -+#else - long retval = syscall(SYS_futex, &state_, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, - 1 /* wake up a single waiter */, nullptr, nullptr, 0); -+#endif -+ - PA_CHECK(retval != -1); - errno = saved_errno; - } diff --git a/devel/electron22/files/patch-base_allocator_partition__allocator_starscan_stack_stack.cc b/devel/electron22/files/patch-base_allocator_partition__allocator_starscan_stack_stack.cc deleted file mode 100644 index 33a9abe6307..00000000000 --- a/devel/electron22/files/patch-base_allocator_partition__allocator_starscan_stack_stack.cc +++ /dev/null @@ -1,50 +0,0 @@ ---- base/allocator/partition_allocator/starscan/stack/stack.cc.orig 2022-05-19 14:06:27 UTC -+++ base/allocator/partition_allocator/starscan/stack/stack.cc -@@ -17,6 +17,10 @@ - #include - #endif - -+#if defined(OS_BSD) -+#include -+#endif -+ - #if defined(LIBC_GLIBC) - extern "C" void* __libc_stack_end; - #endif -@@ -47,6 +51,36 @@ void* GetStackTop() { - - void* GetStackTop() { - return pthread_get_stackaddr_np(pthread_self()); -+} -+ -+#elif defined(OS_OPENBSD) -+ -+void* GetStackTop() { -+ stack_t ss; -+ if (pthread_stackseg_np(pthread_self(), &ss) != 0) -+ return nullptr; -+ return reinterpret_cast(ss.ss_sp); -+} -+ -+#elif defined(OS_FREEBSD) -+ -+void* GetStackTop() { -+ pthread_attr_t attr; -+ int error = pthread_attr_init(&attr); -+ if (error) { -+ return nullptr; -+ } -+ error = pthread_attr_get_np(pthread_self(), &attr); -+ if (!error) { -+ void* base; -+ size_t size; -+ error = pthread_attr_getstack(&attr, &base, &size); -+ PA_CHECK(!error); -+ pthread_attr_destroy(&attr); -+ return reinterpret_cast(base) + size; -+ } -+ pthread_attr_destroy(&attr); -+ return nullptr; - } - - #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) diff --git a/devel/electron22/files/patch-base_atomicops.h b/devel/electron22/files/patch-base_atomicops.h deleted file mode 100644 index 2f8478b40e8..00000000000 --- a/devel/electron22/files/patch-base_atomicops.h +++ /dev/null @@ -1,14 +0,0 @@ ---- base/atomicops.h.orig 2022-05-19 14:06:27 UTC -+++ base/atomicops.h -@@ -56,7 +56,11 @@ typedef intptr_t Atomic64; - - // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or - // Atomic64 routines below, depending on your architecture. -+#if !defined(OS_OPENBSD) && defined(__i386__) -+typedef Atomic32 AtomicWord; -+#else - typedef intptr_t AtomicWord; -+#endif - - // Atomically execute: - // result = *ptr; diff --git a/devel/electron22/files/patch-base_base__paths__posix.cc b/devel/electron22/files/patch-base_base__paths__posix.cc deleted file mode 100644 index 9b6827056e0..00000000000 --- a/devel/electron22/files/patch-base_base__paths__posix.cc +++ /dev/null @@ -1,98 +0,0 @@ ---- base/base_paths_posix.cc.orig 2022-02-28 16:54:41 UTC -+++ base/base_paths_posix.cc -@@ -15,6 +15,7 @@ - #include - #include - -+#include "base/command_line.h" - #include "base/environment.h" - #include "base/files/file_path.h" - #include "base/files/file_util.h" -@@ -25,9 +26,13 @@ - #include "base/process/process_metrics.h" - #include "build/build_config.h" - --#if BUILDFLAG(IS_FREEBSD) -+#if BUILDFLAG(IS_BSD) - #include - #include -+#if BUILDFLAG(IS_OPENBSD) -+#include -+#define MAXTOKENS 2 -+#endif - #elif BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_AIX) - #include - #endif -@@ -68,13 +73,65 @@ bool PathProviderPosix(int key, FilePath* result) { - *result = FilePath(bin_dir); - return true; - #elif BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_AIX) -- // There is currently no way to get the executable path on OpenBSD -- char* cpath; -- if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) -- *result = FilePath(cpath); -- else -- *result = FilePath("/usr/local/chrome/chrome"); -- return true; -+ char *cpath; -+#if !BUILDFLAG(IS_AIX) -+ struct kinfo_file *files; -+ kvm_t *kd = NULL; -+ char errbuf[_POSIX2_LINE_MAX]; -+ static char retval[PATH_MAX]; -+ int cnt; -+ struct stat sb; -+ pid_t cpid = getpid(); -+ bool ret = false; -+ -+ const base::CommandLine* command_line = -+ base::CommandLine::ForCurrentProcess(); -+ -+ VLOG(1) << "PathProviderPosix argv: " << command_line->argv()[0]; -+ -+ if (realpath(command_line->argv()[0].c_str(), retval) == NULL) -+ goto out; -+ -+ if (stat(command_line->argv()[0].c_str(), &sb) < 0) -+ goto out; -+ -+ if (!command_line->HasSwitch("no-sandbox")) { -+ ret = true; -+ *result = FilePath(retval); -+ VLOG(1) << "PathProviderPosix (sandbox) result: " << retval; -+ goto out; -+ } -+ -+ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) -+ goto out; -+ -+ if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, cpid, -+ sizeof(struct kinfo_file), &cnt)) == NULL) -+ goto out; -+ -+ for (int i = 0; i < cnt; i++) { -+ if (files[i].fd_fd == KERN_FILE_TEXT && -+ files[i].va_fsid == static_cast(sb.st_dev) && -+ files[i].va_fileid == sb.st_ino) { -+ ret = true; -+ *result = FilePath(retval); -+ VLOG(1) << "PathProviderPosix result: " << retval; -+ } -+ } -+out: -+ if (kd) -+ kvm_close(kd); -+ if (!ret) { -+#endif -+ if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) -+ *result = FilePath(cpath); -+ else -+ *result = FilePath("/usr/local/chrome/chrome"); -+ return true; -+#if !BUILDFLAG(IS_AIX) -+ } -+ return ret; -+#endif - #endif - } - case DIR_SRC_TEST_DATA_ROOT: { diff --git a/devel/electron22/files/patch-base_base__switches.cc b/devel/electron22/files/patch-base_base__switches.cc deleted file mode 100644 index 8e449113ec6..00000000000 --- a/devel/electron22/files/patch-base_base__switches.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/base_switches.cc.orig 2022-08-31 12:19:35 UTC -+++ base/base_switches.cc -@@ -170,7 +170,7 @@ const char kForceFieldTrialParams[] = "force-fieldtria - - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1176772): Remove kEnableCrashpad and IsCrashpadEnabled() when - // Crashpad is fully enabled on Linux. Indicates that Crashpad should be - // enabled. diff --git a/devel/electron22/files/patch-base_base__switches.h b/devel/electron22/files/patch-base_base__switches.h deleted file mode 100644 index a2effa2e495..00000000000 --- a/devel/electron22/files/patch-base_base__switches.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/base_switches.h.orig 2022-08-31 12:19:35 UTC -+++ base/base_switches.h -@@ -60,7 +60,7 @@ extern const char kEnableIdleTracing[]; - extern const char kForceFieldTrialParams[]; - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1176772): Remove kEnableCrashpad and IsCrashpadEnabled() when - // Crashpad is fully enabled on Linux. - extern const char kEnableCrashpad[]; diff --git a/devel/electron22/files/patch-base_cpu.h b/devel/electron22/files/patch-base_cpu.h deleted file mode 100644 index 824dfe3e0dc..00000000000 --- a/devel/electron22/files/patch-base_cpu.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/cpu.h.orig 2022-11-30 08:12:58 UTC -+++ base/cpu.h -@@ -115,7 +115,7 @@ class BASE_EXPORT CPU final { - const std::string& cpu_brand() const { return cpu_brand_; } - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - enum class CoreType { - kUnknown = 0, - kOther, diff --git a/devel/electron22/files/patch-base_debug_debugger__posix.cc b/devel/electron22/files/patch-base_debug_debugger__posix.cc deleted file mode 100644 index 447811370c9..00000000000 --- a/devel/electron22/files/patch-base_debug_debugger__posix.cc +++ /dev/null @@ -1,68 +0,0 @@ ---- base/debug/debugger_posix.cc.orig 2022-04-21 18:48:31 UTC -+++ base/debug/debugger_posix.cc -@@ -35,6 +35,10 @@ - #include - #endif - -+#if BUILDFLAG(IS_OPENBSD) -+#include -+#endif -+ - #if BUILDFLAG(IS_FREEBSD) - #include - #endif -@@ -95,32 +99,51 @@ bool BeingDebugged() { - - // Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE. The source and - // binary interfaces may change. -+#if BUILDFLAG(IS_OPENBSD) -+ struct kinfo_proc *info; -+ size_t info_size; -+#else - struct kinfo_proc info; - size_t info_size = sizeof(info); -+#endif - - #if BUILDFLAG(IS_OPENBSD) - if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0) - return -1; - - mib[5] = (info_size / sizeof(struct kinfo_proc)); -+ if ((info = reinterpret_cast(malloc(info_size))) == NULL) { -+ is_set = true; -+ being_debugged = false; -+ return being_debugged; -+ } -+ -+ int sysctl_result = sysctl(mib, std::size(mib), info, &info_size, NULL, 0); - #endif - -+#if !BUILDFLAG(IS_OPENBSD) - int sysctl_result = sysctl(mib, std::size(mib), &info, &info_size, NULL, 0); -+#endif - DCHECK_EQ(sysctl_result, 0); - if (sysctl_result != 0) { - is_set = true; - being_debugged = false; -- return being_debugged; -+ goto out; - } - - // This process is being debugged if the P_TRACED flag is set. - is_set = true; - #if BUILDFLAG(IS_FREEBSD) - being_debugged = (info.ki_flag & P_TRACED) != 0; --#elif BUILDFLAG(IS_BSD) -- being_debugged = (info.p_flag & P_TRACED) != 0; -+#elif BUILDFLAG(IS_OPENBSD) -+ being_debugged = (info->p_psflags & PS_TRACED) != 0; - #else - being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; -+#endif -+ -+out: -+#if BUILDFLAG(IS_OPENBSD) -+ free(info); - #endif - return being_debugged; - } diff --git a/devel/electron22/files/patch-base_debug_elf__reader.cc b/devel/electron22/files/patch-base_debug_elf__reader.cc deleted file mode 100644 index d6476318679..00000000000 --- a/devel/electron22/files/patch-base_debug_elf__reader.cc +++ /dev/null @@ -1,18 +0,0 @@ ---- base/debug/elf_reader.cc.orig 2022-08-31 12:19:35 UTC -+++ base/debug/elf_reader.cc -@@ -78,6 +78,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, - bool found = false; - while (current_section < section_end) { - current_note = reinterpret_cast(current_section); -+#if !defined(OS_BSD) - if (current_note->n_type == NT_GNU_BUILD_ID) { - StringPiece note_name(current_section + sizeof(Nhdr), - current_note->n_namesz); -@@ -87,6 +88,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, - break; - } - } -+#endif - - size_t section_size = bits::AlignUp(current_note->n_namesz, 4u) + - bits::AlignUp(current_note->n_descsz, 4u) + diff --git a/devel/electron22/files/patch-base_debug_proc__maps__linux.cc b/devel/electron22/files/patch-base_debug_proc__maps__linux.cc deleted file mode 100644 index 4ed7cb701ed..00000000000 --- a/devel/electron22/files/patch-base_debug_proc__maps__linux.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/debug/proc_maps_linux.cc.orig 2022-02-28 16:54:41 UTC -+++ base/debug/proc_maps_linux.cc -@@ -13,7 +13,7 @@ - #include "base/strings/string_split.h" - #include "build/build_config.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - #include - #endif - diff --git a/devel/electron22/files/patch-base_debug_stack__trace__posix.cc b/devel/electron22/files/patch-base_debug_stack__trace__posix.cc deleted file mode 100644 index f6c9f92d187..00000000000 --- a/devel/electron22/files/patch-base_debug_stack__trace__posix.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- base/debug/stack_trace_posix.cc.orig 2022-10-24 13:33:33 UTC -+++ base/debug/stack_trace_posix.cc -@@ -39,7 +39,7 @@ - #include - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "base/debug/proc_maps_linux.h" - #endif - -@@ -699,6 +699,9 @@ class SandboxSymbolizeHelper { - // for the modules that are loaded in the current process. - // Returns true on success. - bool CacheMemoryRegions() { -+#if BUILDFLAG(IS_BSD) -+ return false; -+#else - // Reads /proc/self/maps. - std::string contents; - if (!ReadProcMaps(&contents)) { -@@ -716,6 +719,7 @@ class SandboxSymbolizeHelper { - - is_initialized_ = true; - return true; -+#endif - } - - // Opens all object files and caches their file descriptors. -@@ -872,7 +876,7 @@ size_t CollectStackTrace(void** trace, size_t count) { - // If we do not have unwind tables, then try tracing using frame pointers. - return base::debug::TraceStackFramePointers(const_cast(trace), - count, 0); --#elif !defined(__UCLIBC__) && !defined(_AIX) -+#elif !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD) - // Though the backtrace API man page does not list any possible negative - // return values, we take no chance. - return base::saturated_cast( diff --git a/devel/electron22/files/patch-base_files_dir__reader__linux.h b/devel/electron22/files/patch-base_files_dir__reader__linux.h deleted file mode 100644 index 91bc1897532..00000000000 --- a/devel/electron22/files/patch-base_files_dir__reader__linux.h +++ /dev/null @@ -1,39 +0,0 @@ ---- base/files/dir_reader_linux.h.orig 2022-08-31 12:19:35 UTC -+++ base/files/dir_reader_linux.h -@@ -16,10 +16,16 @@ - #include "base/logging.h" - #include "base/posix/eintr_wrapper.h" - -+#include "build/build_config.h" -+ - // See the comments in dir_reader_posix.h about this. - - namespace base { - -+#if BUILDFLAG(IS_BSD) -+#include -+typedef struct dirent linux_dirent; -+#else - struct linux_dirent { - uint64_t d_ino; - int64_t d_off; -@@ -27,6 +33,7 @@ struct linux_dirent { - unsigned char d_type; - char d_name[0]; - }; -+#endif - - class DirReaderLinux { - public: -@@ -61,7 +68,11 @@ class DirReaderLinux { - if (offset_ != size_) - return true; - -+#if BUILDFLAG(IS_BSD) -+ const int r = getdents(fd_, reinterpret_cast(buf_), sizeof(buf_)); -+#else - const long r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_)); -+#endif - if (r == 0) - return false; - if (r < 0) { diff --git a/devel/electron22/files/patch-base_files_dir__reader__posix.h b/devel/electron22/files/patch-base_files_dir__reader__posix.h deleted file mode 100644 index 2285fb726f8..00000000000 --- a/devel/electron22/files/patch-base_files_dir__reader__posix.h +++ /dev/null @@ -1,20 +0,0 @@ ---- base/files/dir_reader_posix.h.orig 2022-06-17 14:20:10 UTC -+++ base/files/dir_reader_posix.h -@@ -17,7 +17,7 @@ - // seems worse than falling back to enumerating all file descriptors so we will - // probably never implement this on the Mac. - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - #include "base/files/dir_reader_linux.h" - #else - #include "base/files/dir_reader_fallback.h" -@@ -25,7 +25,7 @@ - - namespace base { - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - typedef DirReaderLinux DirReaderPosix; - #else - typedef DirReaderFallback DirReaderPosix; diff --git a/devel/electron22/files/patch-base_files_file__path__watcher__bsd.cc b/devel/electron22/files/patch-base_files_file__path__watcher__bsd.cc deleted file mode 100644 index 5bac3095f9f..00000000000 --- a/devel/electron22/files/patch-base_files_file__path__watcher__bsd.cc +++ /dev/null @@ -1,57 +0,0 @@ ---- base/files/file_path_watcher_bsd.cc.orig 2022-10-24 13:33:33 UTC -+++ base/files/file_path_watcher_bsd.cc -@@ -0,0 +1,54 @@ -+// Copyright 2021 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 -+ -+#include "base/files/file_path_watcher.h" -+#include "base/files/file_path_watcher_kqueue.h" -+#include "base/memory/ptr_util.h" -+#include "build/build_config.h" -+ -+namespace base { -+ -+namespace { -+ -+class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate { -+ public: -+ FilePathWatcherImpl() = default; -+ FilePathWatcherImpl(const FilePathWatcherImpl&) = delete; -+ FilePathWatcherImpl& operator=(const FilePathWatcherImpl&) = delete; -+ ~FilePathWatcherImpl() override = default; -+ -+ bool Watch(const FilePath& path, -+ Type type, -+ const FilePathWatcher::Callback& callback) override { -+ DCHECK(!impl_.get()); -+ if (type == Type::kRecursive) { -+ if (!FilePathWatcher::RecursiveWatchAvailable()) -+ return false; -+ } else { -+ impl_ = std::make_unique(); -+ } -+ DCHECK(impl_.get()); -+ return impl_->Watch(path, type, callback); -+ } -+ -+ void Cancel() override { -+ if (impl_.get()) -+ impl_->Cancel(); -+ set_cancelled(); -+ } -+ -+ private: -+ std::unique_ptr impl_; -+}; -+ -+} // namespace -+ -+FilePathWatcher::FilePathWatcher() { -+ DETACH_FROM_SEQUENCE(sequence_checker_); -+ impl_ = std::make_unique(); -+} -+ -+} // namespace base diff --git a/devel/electron22/files/patch-base_files_file__path__watcher__kqueue.h b/devel/electron22/files/patch-base_files_file__path__watcher__kqueue.h deleted file mode 100644 index 821858b7571..00000000000 --- a/devel/electron22/files/patch-base_files_file__path__watcher__kqueue.h +++ /dev/null @@ -1,10 +0,0 @@ ---- base/files/file_path_watcher_kqueue.h.orig 2022-02-07 13:39:41 UTC -+++ base/files/file_path_watcher_kqueue.h -@@ -5,6 +5,7 @@ - #ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ - #define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ - -+#include - #include - - #include diff --git a/devel/electron22/files/patch-base_files_file__path__watcher__unittest.cc b/devel/electron22/files/patch-base_files_file__path__watcher__unittest.cc deleted file mode 100644 index 04f15603fea..00000000000 --- a/devel/electron22/files/patch-base_files_file__path__watcher__unittest.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- base/files/file_path_watcher_unittest.cc.orig 2022-09-24 10:57:32 UTC -+++ base/files/file_path_watcher_unittest.cc -@@ -498,7 +498,7 @@ TEST_F(FilePathWatcherTest, MAYBE_WatchDirectory) { - VLOG(1) << "Waiting for file1 creation"; - ASSERT_TRUE(WaitForEvents()); - --#if !BUILDFLAG(IS_APPLE) -+#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) - // Mac implementation does not detect files modified in a directory. - ASSERT_TRUE(WriteFile(file1, "content v2")); - VLOG(1) << "Waiting for file1 modification"; -@@ -1118,7 +1118,7 @@ enum Permission { - Execute - }; - --#if BUILDFLAG(IS_APPLE) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) - bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) { - struct stat stat_buf; - -@@ -1149,7 +1149,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi - } - #endif // BUILDFLAG(IS_APPLE) - --#if BUILDFLAG(IS_APPLE) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) - // Linux implementation of FilePathWatcher doesn't catch attribute changes. - // http://crbug.com/78043 - // Windows implementation of FilePathWatcher catches attribute changes that diff --git a/devel/electron22/files/patch-base_files_file__util__posix.cc b/devel/electron22/files/patch-base_files_file__util__posix.cc deleted file mode 100644 index b932d5c3169..00000000000 --- a/devel/electron22/files/patch-base_files_file__util__posix.cc +++ /dev/null @@ -1,52 +0,0 @@ ---- base/files/file_util_posix.cc.orig 2022-08-31 12:19:35 UTC -+++ base/files/file_util_posix.cc -@@ -700,32 +700,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p - File::Error* error) { - ScopedBlockingCall scoped_blocking_call( - FROM_HERE, BlockingType::MAY_BLOCK); // For call to mkdir(). -+ const FilePath kFileSystemRoot("/"); - std::vector subpaths; - - // Collect a list of all parent directories. - FilePath last_path = full_path; -- subpaths.push_back(full_path); -+ if (full_path != kFileSystemRoot) -+ subpaths.push_back(full_path); - for (FilePath path = full_path.DirName(); -- path.value() != last_path.value(); path = path.DirName()) { -+ (path.value() != last_path.value() && -+ (path != kFileSystemRoot)); path = path.DirName()) { - subpaths.push_back(path); - last_path = path; - } - - // Iterate through the parents and create the missing ones. - for (const FilePath& subpath : base::Reversed(subpaths)) { -- if (DirectoryExists(subpath)) -- continue; -- if (mkdir(subpath.value().c_str(), 0700) == 0) -- continue; -- // Mkdir failed, but it might have failed with EEXIST, or some other error -- // due to the directory appearing out of thin air. This can occur if -- // two processes are trying to create the same file system tree at the same -- // time. Check to see if it exists and make sure it is a directory. -- int saved_errno = errno; -- if (!DirectoryExists(subpath)) { -- if (error) -- *error = File::OSErrorToFileError(saved_errno); -- return false; -+ if (!PathExists(subpath)) { -+ if ((mkdir(subpath.value().c_str(), 0700) == -1) && -+ ((full_path != subpath) ? (errno != ENOENT) : (-1))) { -+ int saved_errno = errno; -+ if (error) -+ *error = File::OSErrorToFileError(saved_errno); -+ return false; -+ } -+ } else if (!DirectoryExists(subpath)) { -+ if (error) -+ *error = File::OSErrorToFileError(ENOTDIR); -+ return false; - } - } - return true; diff --git a/devel/electron22/files/patch-base_files_file__util__unittest.cc b/devel/electron22/files/patch-base_files_file__util__unittest.cc deleted file mode 100644 index 3b2321846e3..00000000000 --- a/devel/electron22/files/patch-base_files_file__util__unittest.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- base/files/file_util_unittest.cc.orig 2022-10-24 13:33:33 UTC -+++ base/files/file_util_unittest.cc -@@ -3549,7 +3549,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { - } - #endif // BUILDFLAG(IS_WIN) - --#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) -+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) - TEST_F(FileUtilTest, ReadFileToStringWithProcFileSystem) { - FilePath file_path("/proc/cpuinfo"); - std::string data = "temp"; -@@ -4272,7 +4272,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles - NULL); - #else - size_t bytes_written = -- ::write(::fileno(output_file.get()), content.c_str(), content.length()); -+ ::write(fileno(output_file.get()), content.c_str(), content.length()); - #endif - EXPECT_EQ(content.length(), bytes_written); - ::fflush(output_file.get()); diff --git a/devel/electron22/files/patch-base_files_important__file__writer__cleaner.cc b/devel/electron22/files/patch-base_files_important__file__writer__cleaner.cc deleted file mode 100644 index 80f08d51a81..00000000000 --- a/devel/electron22/files/patch-base_files_important__file__writer__cleaner.cc +++ /dev/null @@ -1,12 +0,0 @@ ---- base/files/important_file_writer_cleaner.cc.orig 2022-02-28 16:54:41 UTC -+++ base/files/important_file_writer_cleaner.cc -@@ -25,7 +25,8 @@ namespace base { - namespace { - - base::Time GetUpperBoundTime() { --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) -+// needed because of .CreationTime() pledge -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // If process creation time is not available then use instance creation - // time as the upper-bound for old files. Modification times may be - // rounded-down to coarse-grained increments, e.g. FAT has 2s granularity, diff --git a/devel/electron22/files/patch-base_files_scoped__file.cc b/devel/electron22/files/patch-base_files_scoped__file.cc deleted file mode 100644 index 350c73cc76e..00000000000 --- a/devel/electron22/files/patch-base_files_scoped__file.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/files/scoped_file.cc.orig 2022-02-28 16:54:41 UTC -+++ base/files/scoped_file.cc -@@ -31,7 +31,7 @@ void ScopedFDCloseTraits::Free(int fd) { - int ret = IGNORE_EINTR(close(fd)); - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ -- BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - // NB: Some file descriptors can return errors from close() e.g. network - // filesystems such as NFS and Linux input devices. On Linux, macOS, and - // Fuchsia's POSIX layer, errors from close other than EBADF do not indicate diff --git a/devel/electron22/files/patch-base_i18n_icu__util.cc b/devel/electron22/files/patch-base_i18n_icu__util.cc deleted file mode 100644 index a6c32d7b258..00000000000 --- a/devel/electron22/files/patch-base_i18n_icu__util.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- base/i18n/icu_util.cc.orig 2022-11-30 08:12:58 UTC -+++ base/i18n/icu_util.cc -@@ -52,7 +52,7 @@ - #include "third_party/icu/source/common/unicode/unistr.h" - #endif - --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \ - BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) - #include "third_party/icu/source/i18n/unicode/timezone.h" - #endif -@@ -343,7 +343,7 @@ void InitializeIcuTimeZone() { - FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization(); - icu::TimeZone::adoptDefault( - icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id))); --#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) -+#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) - // To respond to the time zone change properly, the default time zone - // cache in ICU has to be populated on starting up. - // See TimeZoneMonitorLinux::NotifyClientsFromImpl(). diff --git a/devel/electron22/files/patch-base_linux__util.cc b/devel/electron22/files/patch-base_linux__util.cc deleted file mode 100644 index c4b5ebcf639..00000000000 --- a/devel/electron22/files/patch-base_linux__util.cc +++ /dev/null @@ -1,28 +0,0 @@ ---- base/linux_util.cc.orig 2022-08-31 12:19:35 UTC -+++ base/linux_util.cc -@@ -15,6 +15,7 @@ - - #include - #include -+#include - - #include "base/base_export.h" - #include "base/files/dir_reader_posix.h" -@@ -135,6 +136,9 @@ void SetLinuxDistro(const std::string& distro) { - } - - bool GetThreadsForProcess(pid_t pid, std::vector* tids) { -+#if defined(OS_BSD) -+ return false; -+#else - // 25 > strlen("/proc//task") + strlen(std::to_string(INT_MAX)) + 1 = 22 - char buf[25]; - strings::SafeSPrintf(buf, "/proc/%d/task", pid); -@@ -152,6 +156,7 @@ bool GetThreadsForProcess(pid_t pid, std::vector - #endif - -@@ -574,14 +574,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo - // need the arch-specific boilerplate below, which is inspired by breakpad. - // At the same time, on OSX, ucontext.h is deprecated but si_addr works fine. - uintptr_t crash_addr = 0; --#if BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FREEBSD) - crash_addr = reinterpret_cast(info->si_addr); - #else // OS_* - ucontext_t* context = reinterpret_cast(context_ptr); - #if defined(ARCH_CPU_X86) - crash_addr = static_cast(context->uc_mcontext.gregs[REG_EIP]); - #elif defined(ARCH_CPU_X86_64) -+#if BUILDFLAG(IS_OPENBSD) -+ crash_addr = static_cast(context->sc_rip); -+#else - crash_addr = static_cast(context->uc_mcontext.gregs[REG_RIP]); -+#endif - #elif defined(ARCH_CPU_ARMEL) - crash_addr = static_cast(context->uc_mcontext.arm_pc); - #elif defined(ARCH_CPU_ARM64) diff --git a/devel/electron22/files/patch-base_memory_discardable__memory.cc b/devel/electron22/files/patch-base_memory_discardable__memory.cc deleted file mode 100644 index bd043476fc9..00000000000 --- a/devel/electron22/files/patch-base_memory_discardable__memory.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- base/memory/discardable_memory.cc.orig 2022-11-30 08:12:58 UTC -+++ base/memory/discardable_memory.cc -@@ -26,7 +26,7 @@ BASE_FEATURE(kMadvFreeDiscardableMemory, - base::FEATURE_DISABLED_BY_DEFAULT); - #endif // BUILDFLAG(IS_POSIX) - --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - BASE_FEATURE(kDiscardableMemoryBackingTrial, - "DiscardableMemoryBackingTrial", - base::FEATURE_DISABLED_BY_DEFAULT); -@@ -52,7 +52,7 @@ const base::FeatureParam - - namespace { - --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - - DiscardableMemoryBacking GetBackingForFieldTrial() { - DiscardableMemoryTrialGroup trial_group = -@@ -71,7 +71,7 @@ DiscardableMemoryBacking GetBackingForFieldTrial() { - - } // namespace - --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - - // Probe capabilities of this device to determine whether we should participate - // in the discardable memory backing trial. -@@ -101,7 +101,7 @@ DiscardableMemory::DiscardableMemory() = default; - DiscardableMemory::~DiscardableMemory() = default; - - DiscardableMemoryBacking GetDiscardableMemoryBacking() { --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (DiscardableMemoryBackingFieldTrialIsEnabled()) { - return GetBackingForFieldTrial(); - } diff --git a/devel/electron22/files/patch-base_memory_discardable__memory__internal.h b/devel/electron22/files/patch-base_memory_discardable__memory__internal.h deleted file mode 100644 index 13bef721043..00000000000 --- a/devel/electron22/files/patch-base_memory_discardable__memory__internal.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/memory/discardable_memory_internal.h.orig 2022-02-28 16:54:41 UTC -+++ base/memory/discardable_memory_internal.h -@@ -10,7 +10,7 @@ - #include "base/metrics/field_trial_params.h" - #include "build/build_config.h" - --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - - namespace base { - diff --git a/devel/electron22/files/patch-base_memory_madv__free__discardable__memory__posix.cc b/devel/electron22/files/patch-base_memory_madv__free__discardable__memory__posix.cc deleted file mode 100644 index ead3fe5472b..00000000000 --- a/devel/electron22/files/patch-base_memory_madv__free__discardable__memory__posix.cc +++ /dev/null @@ -1,21 +0,0 @@ ---- base/memory/madv_free_discardable_memory_posix.cc.orig 2022-05-19 14:06:27 UTC -+++ base/memory/madv_free_discardable_memory_posix.cc -@@ -295,6 +295,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT - - bool MadvFreeDiscardableMemoryPosix::IsResident() const { - DFAKE_SCOPED_RECURSIVE_LOCK(thread_collision_warner_); -+// XXX mincore -+#if BUILDFLAG(IS_BSD) -+ return false; -+#else - #if BUILDFLAG(IS_APPLE) - std::vector vec(allocated_pages_); - #else -@@ -310,6 +314,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons - return false; - } - return true; -+#endif - } - - bool MadvFreeDiscardableMemoryPosix::IsDiscarded() const { diff --git a/devel/electron22/files/patch-base_memory_platform__shared__memory__region.h b/devel/electron22/files/patch-base_memory_platform__shared__memory__region.h deleted file mode 100644 index 852cc726f37..00000000000 --- a/devel/electron22/files/patch-base_memory_platform__shared__memory__region.h +++ /dev/null @@ -1,29 +0,0 @@ ---- base/memory/platform_shared_memory_region.h.orig 2022-06-17 14:20:10 UTC -+++ base/memory/platform_shared_memory_region.h -@@ -16,7 +16,7 @@ - - #include - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - namespace content { - class SandboxIPCHandler; - } -@@ -83,7 +83,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { - kMaxValue = GET_SHMEM_TEMP_DIR_FAILURE - }; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Structure to limit access to executable region creation. - struct ExecutableRegion { - private: -@@ -211,7 +211,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { - CheckPlatformHandlePermissionsCorrespondToMode); - static PlatformSharedMemoryRegion Create(Mode mode, - size_t size --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - , - bool executable = false - #endif diff --git a/devel/electron22/files/patch-base_memory_platform__shared__memory__region__posix.cc b/devel/electron22/files/patch-base_memory_platform__shared__memory__region__posix.cc deleted file mode 100644 index 558d0e7c7b1..00000000000 --- a/devel/electron22/files/patch-base_memory_platform__shared__memory__region__posix.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- base/memory/platform_shared_memory_region_posix.cc.orig 2022-05-19 14:06:27 UTC -+++ base/memory/platform_shared_memory_region_posix.cc -@@ -55,7 +55,7 @@ bool CheckFDAccessMode(int fd, int expected_mode) { - - } // namespace - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // static - ScopedFD PlatformSharedMemoryRegion::ExecutableRegion::CreateFD(size_t size) { - PlatformSharedMemoryRegion region = -@@ -171,7 +171,7 @@ bool PlatformSharedMemoryRegion::ConvertToUnsafe() { - // static - PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Create(Mode mode, - size_t size --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - , - bool executable - #endif -@@ -200,7 +200,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion: - // flag. - FilePath directory; - if (!GetShmemTempDir( --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - executable, - #else - false /* executable */, diff --git a/devel/electron22/files/patch-base_message__loop_message__pump__glib.cc b/devel/electron22/files/patch-base_message__loop_message__pump__glib.cc deleted file mode 100644 index 6734d01e8bf..00000000000 --- a/devel/electron22/files/patch-base_message__loop_message__pump__glib.cc +++ /dev/null @@ -1,28 +0,0 @@ ---- base/message_loop/message_pump_glib.cc.orig 2022-08-31 12:19:35 UTC -+++ base/message_loop/message_pump_glib.cc -@@ -8,6 +8,11 @@ - #include - #include - -+#if BUILDFLAG(IS_BSD) -+#include -+#include -+#endif -+ - #include "base/logging.h" - #include "base/memory/raw_ptr.h" - #include "base/notreached.h" -@@ -51,9 +56,13 @@ int GetTimeIntervalMilliseconds(TimeTicks next_task_ti - } - - bool RunningOnMainThread() { -+#if BUILDFLAG(IS_BSD) -+ return pthread_main_np(); -+#else - auto pid = getpid(); - auto tid = PlatformThread::CurrentId(); - return pid > 0 && tid > 0 && pid == tid; -+#endif - } - - // A brief refresher on GLib: diff --git a/devel/electron22/files/patch-base_native__library__posix.cc b/devel/electron22/files/patch-base_native__library__posix.cc deleted file mode 100644 index c2b8d0e5e97..00000000000 --- a/devel/electron22/files/patch-base_native__library__posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/native_library_posix.cc.orig 2022-05-19 14:06:27 UTC -+++ base/native_library_posix.cc -@@ -33,7 +33,7 @@ NativeLibrary LoadNativeLibraryWithOptions(const FileP - // http://crbug.com/17943, http://crbug.com/17557, http://crbug.com/36892, - // and http://crbug.com/40794. - int flags = RTLD_LAZY; --#if BUILDFLAG(IS_ANDROID) || !defined(RTLD_DEEPBIND) -+#if BUILDFLAG(IS_ANDROID) || !defined(RTLD_DEEPBIND) || BUILDFLAG(IS_BSD) - // Certain platforms don't define RTLD_DEEPBIND. Android dlopen() requires - // further investigation, as it might vary across versions. Crash here to - // warn developers that they're trying to rely on uncertain behavior. diff --git a/devel/electron22/files/patch-base_native__library__unittest.cc b/devel/electron22/files/patch-base_native__library__unittest.cc deleted file mode 100644 index ef693487703..00000000000 --- a/devel/electron22/files/patch-base_native__library__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/native_library_unittest.cc.orig 2022-10-24 13:33:33 UTC -+++ base/native_library_unittest.cc -@@ -134,7 +134,7 @@ TEST(NativeLibraryTest, LoadLibrary) { - // versions with respect to symbol resolution scope. - // TSan and MSan error out on RTLD_DEEPBIND, https://crbug.com/705255 - #if !BUILDFLAG(IS_ANDROID) && !defined(THREAD_SANITIZER) && \ -- !defined(MEMORY_SANITIZER) -+ !defined(MEMORY_SANITIZER) && !BUILDFLAG(IS_BSD) - - // Verifies that the |prefer_own_symbols| option satisfies its guarantee that - // a loaded library will always prefer local symbol resolution before diff --git a/devel/electron22/files/patch-base_posix_can__lower__nice__to.cc b/devel/electron22/files/patch-base_posix_can__lower__nice__to.cc deleted file mode 100644 index 67a5d35808a..00000000000 --- a/devel/electron22/files/patch-base_posix_can__lower__nice__to.cc +++ /dev/null @@ -1,16 +0,0 @@ ---- base/posix/can_lower_nice_to.cc.orig 2022-02-28 16:54:41 UTC -+++ base/posix/can_lower_nice_to.cc -@@ -11,8 +11,12 @@ - - #include "build/build_config.h" - -+#if BUILDFLAG(IS_FREEBSD) -+#include -+#endif -+ - // Not defined on AIX by default. --#if BUILDFLAG(IS_AIX) -+#if BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - #if defined(RLIMIT_NICE) - #error Assumption about OS_AIX is incorrect - #endif diff --git a/devel/electron22/files/patch-base_posix_unix__domain__socket.cc b/devel/electron22/files/patch-base_posix_unix__domain__socket.cc deleted file mode 100644 index 1ae00278ecd..00000000000 --- a/devel/electron22/files/patch-base_posix_unix__domain__socket.cc +++ /dev/null @@ -1,39 +0,0 @@ ---- base/posix/unix_domain_socket.cc.orig 2022-08-31 12:19:35 UTC -+++ base/posix/unix_domain_socket.cc -@@ -51,7 +51,7 @@ bool CreateSocketPair(ScopedFD* one, ScopedFD* two) { - - // static - bool UnixDomainSocket::EnableReceiveProcessId(int fd) { --#if !BUILDFLAG(IS_APPLE) -+#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) - const int enable = 1; - return setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable)) == 0; - #else -@@ -149,7 +149,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, - - const size_t kControlBufferSize = - CMSG_SPACE(sizeof(int) * kMaxFileDescriptors) --#if !BUILDFLAG(IS_APPLE) -+#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) - // macOS does not support ucred. - // macOS supports xucred, but this structure is insufficient. - + CMSG_SPACE(sizeof(struct ucred)) -@@ -177,7 +177,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, - wire_fds = reinterpret_cast(CMSG_DATA(cmsg)); - wire_fds_len = payload_len / sizeof(int); - } --#if !BUILDFLAG(IS_APPLE) -+#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) - // macOS does not support SCM_CREDENTIALS. - if (cmsg->cmsg_level == SOL_SOCKET && - cmsg->cmsg_type == SCM_CREDENTIALS) { -@@ -211,6 +211,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, - socklen_t pid_size = sizeof(pid); - if (getsockopt(fd, SOL_LOCAL, LOCAL_PEERPID, &pid, &pid_size) != 0) - pid = -1; -+#elif BUILDFLAG(IS_BSD) -+ NOTIMPLEMENTED(); -+ pid = -1; - #else - // |pid| will legitimately be -1 if we read EOF, so only DCHECK if we - // actually received a message. Unfortunately, Linux allows sending zero diff --git a/devel/electron22/files/patch-base_posix_unix__domain__socket__unittest.cc b/devel/electron22/files/patch-base_posix_unix__domain__socket__unittest.cc deleted file mode 100644 index b2744d4abb5..00000000000 --- a/devel/electron22/files/patch-base_posix_unix__domain__socket__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/posix/unix_domain_socket_unittest.cc.orig 2022-02-28 16:54:41 UTC -+++ base/posix/unix_domain_socket_unittest.cc -@@ -10,6 +10,8 @@ - #include - #include - -+#include -+ - #include "base/bind.h" - #include "base/callback_helpers.h" - #include "base/files/file_util.h" diff --git a/devel/electron22/files/patch-base_process_kill.h b/devel/electron22/files/patch-base_process_kill.h deleted file mode 100644 index 1463ba9ed81..00000000000 --- a/devel/electron22/files/patch-base_process_kill.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/process/kill.h.orig 2022-05-19 14:06:27 UTC -+++ base/process/kill.h -@@ -113,7 +113,7 @@ BASE_EXPORT TerminationStatus GetTerminationStatus(Pro - BASE_EXPORT TerminationStatus GetKnownDeadTerminationStatus( - ProcessHandle handle, int* exit_code); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Spawns a thread to wait asynchronously for the child |process| to exit - // and then reaps it. - BASE_EXPORT void EnsureProcessGetsReaped(Process process); diff --git a/devel/electron22/files/patch-base_process_kill__posix.cc b/devel/electron22/files/patch-base_process_kill__posix.cc deleted file mode 100644 index e9446679c97..00000000000 --- a/devel/electron22/files/patch-base_process_kill__posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/process/kill_posix.cc.orig 2022-05-19 14:06:27 UTC -+++ base/process/kill_posix.cc -@@ -158,7 +158,7 @@ void EnsureProcessTerminated(Process process) { - 0, new BackgroundReaper(std::move(process), Seconds(2))); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void EnsureProcessGetsReaped(Process process) { - DCHECK(!process.is_current()); - diff --git a/devel/electron22/files/patch-base_process_launch.h b/devel/electron22/files/patch-base_process_launch.h deleted file mode 100644 index 2a8f0819982..00000000000 --- a/devel/electron22/files/patch-base_process_launch.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/process/launch.h.orig 2022-06-17 14:20:10 UTC -+++ base/process/launch.h -@@ -198,7 +198,7 @@ struct BASE_EXPORT LaunchOptions { - bool clear_environment = false; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // If non-zero, start the process using clone(), using flags as provided. - // Unlike in clone, clone_flags may not contain a custom termination signal - // that is sent to the parent when the child dies. The termination signal will diff --git a/devel/electron22/files/patch-base_process_launch__posix.cc b/devel/electron22/files/patch-base_process_launch__posix.cc deleted file mode 100644 index 656ff7be03d..00000000000 --- a/devel/electron22/files/patch-base_process_launch__posix.cc +++ /dev/null @@ -1,12 +0,0 @@ ---- base/process/launch_posix.cc.orig 2022-08-31 12:19:35 UTC -+++ base/process/launch_posix.cc -@@ -64,6 +64,9 @@ - #error "macOS should use launch_mac.cc" - #endif - -+#if defined(OS_FREEBSD) -+#pragma weak environ -+#endif - extern char** environ; - - namespace base { diff --git a/devel/electron22/files/patch-base_process_memory.cc b/devel/electron22/files/patch-base_process_memory.cc deleted file mode 100644 index 788825cf6b5..00000000000 --- a/devel/electron22/files/patch-base_process_memory.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/process/memory.cc.orig 2022-10-24 13:33:33 UTC -+++ base/process/memory.cc -@@ -28,7 +28,7 @@ namespace base { - // Defined in memory_mac.mm for macOS + use_allocator="none". In case of - // USE_PARTITION_ALLOC_AS_MALLOC, no need to route the call to the system - // default calloc of macOS. --#if !BUILDFLAG(IS_APPLE) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -+#if (!BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) - - bool UncheckedCalloc(size_t num_items, size_t size, void** result) { - const size_t alloc_size = num_items * size; diff --git a/devel/electron22/files/patch-base_process_process__handle.cc b/devel/electron22/files/patch-base_process_process__handle.cc deleted file mode 100644 index efb95e7c3b5..00000000000 --- a/devel/electron22/files/patch-base_process_process__handle.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/process/process_handle.cc.orig 2022-02-28 16:54:41 UTC -+++ base/process/process_handle.cc -@@ -30,7 +30,7 @@ UniqueProcId GetUniqueIdForProcess() { - : UniqueProcId(GetCurrentProcId()); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - - void InitUniqueIdForProcessInPidNamespace(ProcessId pid_outside_of_namespace) { - DCHECK(pid_outside_of_namespace != kNullProcessId); diff --git a/devel/electron22/files/patch-base_process_process__handle.h b/devel/electron22/files/patch-base_process_process__handle.h deleted file mode 100644 index 5e25e86d099..00000000000 --- a/devel/electron22/files/patch-base_process_process__handle.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/process/process_handle.h.orig 2022-02-28 16:54:41 UTC -+++ base/process/process_handle.h -@@ -106,7 +106,7 @@ BASE_EXPORT ProcessId GetCurrentProcId(); - // processes may be reused. - BASE_EXPORT UniqueProcId GetUniqueIdForProcess(); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // When a process is started in a different PID namespace from the browser - // process, this function must be called with the process's PID in the browser's - // PID namespace in order to initialize its unique ID. Not thread safe. diff --git a/devel/electron22/files/patch-base_process_process__handle__freebsd.cc b/devel/electron22/files/patch-base_process_process__handle__freebsd.cc deleted file mode 100644 index 5cc930471ce..00000000000 --- a/devel/electron22/files/patch-base_process_process__handle__freebsd.cc +++ /dev/null @@ -1,25 +0,0 @@ ---- base/process/process_handle_freebsd.cc.orig 2022-04-21 18:48:31 UTC -+++ base/process/process_handle_freebsd.cc -@@ -3,6 +3,7 @@ - // found in the LICENSE file. - - #include "base/process/process_handle.h" -+#include "base/files/file_util.h" - - #include - #include -@@ -15,10 +16,13 @@ namespace base { - - ProcessId GetParentProcessId(ProcessHandle process) { - struct kinfo_proc info; -- size_t length; -+ size_t length = sizeof(struct kinfo_proc); - int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process }; - - if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) -+ return -1; -+ -+ if (length < sizeof(struct kinfo_proc)) - return -1; - - return info.ki_ppid; diff --git a/devel/electron22/files/patch-base_process_process__handle__openbsd.cc b/devel/electron22/files/patch-base_process_process__handle__openbsd.cc deleted file mode 100644 index f8e318565de..00000000000 --- a/devel/electron22/files/patch-base_process_process__handle__openbsd.cc +++ /dev/null @@ -1,89 +0,0 @@ ---- base/process/process_handle_openbsd.cc.orig 2022-04-21 18:48:31 UTC -+++ base/process/process_handle_openbsd.cc -@@ -3,8 +3,11 @@ - // found in the LICENSE file. - - #include "base/process/process_handle.h" -+#include "base/files/file_util.h" - - #include -+#include -+#include - #include - #include - #include -@@ -12,39 +15,59 @@ - namespace base { - - ProcessId GetParentProcessId(ProcessHandle process) { -- struct kinfo_proc info; -+ struct kinfo_proc *info; - size_t length; -+ pid_t ppid; - int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process, - sizeof(struct kinfo_proc), 0 }; - - if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) - return -1; - -+ info = (struct kinfo_proc *)malloc(length); -+ - mib[5] = (length / sizeof(struct kinfo_proc)); - -- if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) -- return -1; -+ if (sysctl(mib, std::size(mib), info, &length, NULL, 0) < 0) { -+ ppid = -1; -+ goto out; -+ } - -- return info.p_ppid; -+ ppid = info->p_ppid; -+ -+out: -+ free(info); -+ return ppid; - } - - FilePath GetProcessExecutablePath(ProcessHandle process) { -- struct kinfo_proc kp; -- size_t len; -+ struct kinfo_proc *info; -+ size_t length; -+ char *path = NULL; - int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process, - sizeof(struct kinfo_proc), 0 }; - -- if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) == -1) -+ if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) == -1) - return FilePath(); -- mib[5] = (len / sizeof(struct kinfo_proc)); -- if (sysctl(mib, std::size(mib), &kp, &len, NULL, 0) < 0) -- return FilePath(); -- if ((kp.p_flag & P_SYSTEM) != 0) -- return FilePath(); -- if (strcmp(kp.p_comm, "chrome") == 0) -- return FilePath(kp.p_comm); - -- return FilePath(); -+ info = (struct kinfo_proc *)malloc(length); -+ -+ mib[5] = (length / sizeof(struct kinfo_proc)); -+ -+ if (sysctl(mib, std::size(mib), info, &length, NULL, 0) < 0) -+ goto out; -+ -+ if ((info->p_flag & P_SYSTEM) != 0) -+ goto out; -+ -+ if (strcmp(info->p_comm, "chrome") == 0) { -+ path = info->p_comm; -+ goto out; -+ } -+ -+out: -+ free(info); -+ return FilePath(path); - } - - } // namespace base diff --git a/devel/electron22/files/patch-base_process_process__iterator__freebsd.cc b/devel/electron22/files/patch-base_process_process__iterator__freebsd.cc deleted file mode 100644 index 88715effc73..00000000000 --- a/devel/electron22/files/patch-base_process_process__iterator__freebsd.cc +++ /dev/null @@ -1,51 +0,0 @@ ---- base/process/process_iterator_freebsd.cc.orig 2022-04-21 18:48:31 UTC -+++ base/process/process_iterator_freebsd.cc -@@ -20,7 +20,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* - : index_of_kinfo_proc_(), - filter_(filter) { - -- int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid() }; -+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, (int) getuid() }; - - bool done = false; - int try_num = 1; -@@ -39,7 +39,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* - num_of_kinfo_proc += 16; - kinfo_procs_.resize(num_of_kinfo_proc); - len = num_of_kinfo_proc * sizeof(struct kinfo_proc); -- if (sysctl(mib, std::size(mib), &kinfo_procs_[0], &len, NULL, 0) < 0) { -+ if (sysctl(mib, std::size(mib), kinfo_procs_.data(), &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) { -@@ -49,7 +49,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* - } - } else { - // Got the list, just make sure we're sized exactly right -- size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc); -+ num_of_kinfo_proc = len / sizeof(struct kinfo_proc); - kinfo_procs_.resize(num_of_kinfo_proc); - done = true; - } -@@ -71,18 +71,13 @@ bool ProcessIterator::CheckForNextProcess() { - for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) { - size_t length; - struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_]; -- int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.ki_pid }; -+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ARGS, kinfo.ki_pid }; - - if ((kinfo.ki_pid > 0) && (kinfo.ki_stat == SZOMB)) - continue; - -- length = 0; -- if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) { -- LOG(ERROR) << "failed to figure out the buffer size for a command line"; -- continue; -- } -- -- data.resize(length); -+ data.resize(ARG_MAX); -+ length = ARG_MAX; - - if (sysctl(mib, std::size(mib), &data[0], &length, NULL, 0) < 0) { - LOG(ERROR) << "failed to fetch a commandline"; diff --git a/devel/electron22/files/patch-base_process_process__iterator__openbsd.cc b/devel/electron22/files/patch-base_process_process__iterator__openbsd.cc deleted file mode 100644 index 5b63c8ddba9..00000000000 --- a/devel/electron22/files/patch-base_process_process__iterator__openbsd.cc +++ /dev/null @@ -1,45 +0,0 @@ ---- base/process/process_iterator_openbsd.cc.orig 2022-04-21 18:48:31 UTC -+++ base/process/process_iterator_openbsd.cc -@@ -6,6 +6,9 @@ - - #include - #include -+#include -+#include -+#include - #include - - #include "base/logging.h" -@@ -18,12 +21,13 @@ ProcessIterator::ProcessIterator(const ProcessFilter* - : index_of_kinfo_proc_(), - filter_(filter) { - -- int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid(), -+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, static_cast(getuid()), - sizeof(struct kinfo_proc), 0 }; - - bool done = false; - int try_num = 1; - const int max_tries = 10; -+ size_t num_of_kinfo_proc; - - do { - size_t len = 0; -@@ -32,7 +36,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* - kinfo_procs_.resize(0); - done = true; - } else { -- size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc); -+ num_of_kinfo_proc = len / sizeof(struct kinfo_proc); - // Leave some spare room for process table growth (more could show up - // between when we check and now) - num_of_kinfo_proc += 16; -@@ -48,7 +52,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* - } - } else { - // Got the list, just make sure we're sized exactly right -- size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc); -+ num_of_kinfo_proc = len / sizeof(struct kinfo_proc); - kinfo_procs_.resize(num_of_kinfo_proc); - done = true; - } diff --git a/devel/electron22/files/patch-base_process_process__metrics.cc b/devel/electron22/files/patch-base_process_process__metrics.cc deleted file mode 100644 index 8ca9f419a7f..00000000000 --- a/devel/electron22/files/patch-base_process_process__metrics.cc +++ /dev/null @@ -1,54 +0,0 @@ ---- base/process/process_metrics.cc.orig 2022-10-25 08:25:05 UTC -+++ base/process/process_metrics.cc -@@ -17,7 +17,7 @@ namespace base { - namespace { - - #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - int CalculateEventsPerSecond(uint64_t event_count, - uint64_t* last_event_count, - base::TimeTicks* last_calculated) { -@@ -54,7 +54,7 @@ SystemMetrics SystemMetrics::Sample() { - SystemMetrics system_metrics; - - system_metrics.committed_memory_ = GetSystemCommitCharge(); --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - GetSystemMemoryInfo(&system_metrics.memory_info_); - GetVmStatInfo(&system_metrics.vmstat_info_); - GetSystemDiskInfo(&system_metrics.disk_info_); -@@ -73,7 +73,7 @@ Value SystemMetrics::ToValue() const { - Value res(Value::Type::DICTIONARY); - - res.SetIntKey("committed_memory", static_cast(committed_memory_)); --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - Value meminfo = memory_info_.ToValue(); - Value vmstat = vmstat_info_.ToValue(); - meminfo.MergeDictionary(&vmstat); -@@ -99,7 +99,6 @@ std::unique_ptr ProcessMetrics::Create - #endif // !BUILDFLAG(IS_MAC) - } - --#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) - double ProcessMetrics::GetPlatformIndependentCPUUsage( - TimeDelta cumulative_cpu) { - TimeTicks time = TimeTicks::Now(); -@@ -126,7 +125,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( - double ProcessMetrics::GetPlatformIndependentCPUUsage() { - return GetPlatformIndependentCPUUsage(GetCumulativeCPUUsage()); - } --#endif - - #if BUILDFLAG(IS_WIN) - double ProcessMetrics::GetPreciseCPUUsage(TimeDelta cumulative_cpu) { -@@ -157,7 +155,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { - #endif // BUILDFLAG(IS_WIN) - - #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - int ProcessMetrics::CalculateIdleWakeupsPerSecond( - uint64_t absolute_idle_wakeups) { - return CalculateEventsPerSecond(absolute_idle_wakeups, diff --git a/devel/electron22/files/patch-base_process_process__metrics.h b/devel/electron22/files/patch-base_process_process__metrics.h deleted file mode 100644 index 318ef7cd21b..00000000000 --- a/devel/electron22/files/patch-base_process_process__metrics.h +++ /dev/null @@ -1,129 +0,0 @@ ---- base/process/process_metrics.h.orig 2022-11-30 08:12:58 UTC -+++ base/process/process_metrics.h -@@ -36,7 +36,7 @@ - #endif - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - #include - #include - #include -@@ -52,7 +52,7 @@ class Value; - // Full declaration is in process_metrics_iocounters.h. - struct IoCounters; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - // Minor and major page fault counts since the process creation. - // Both counts are process-wide, and exclude child processes. - // -@@ -107,7 +107,7 @@ class BASE_EXPORT ProcessMetrics { - // convenience wrapper for CreateProcessMetrics(). - static std::unique_ptr CreateCurrentProcessMetrics(); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - // Resident Set Size is a Linux/Android specific memory concept. Do not - // attempt to extend this to other platforms. - BASE_EXPORT size_t GetResidentSetSize() const; -@@ -165,7 +165,7 @@ class BASE_EXPORT ProcessMetrics { - #endif // BUILDFLAG(IS_WIN) - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - // Emits the cumulative CPU usage for all currently active threads since they - // were started into the output parameter (replacing its current contents). - // Threads that have already terminated will not be reported. Thus, the sum of -@@ -248,7 +248,7 @@ class BASE_EXPORT ProcessMetrics { - int GetOpenFdSoftLimit() const; - #endif // BUILDFLAG(IS_POSIX) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - // Bytes of swap as reported by /proc/[pid]/status. - uint64_t GetVmSwapBytes() const; - -@@ -269,7 +269,7 @@ class BASE_EXPORT ProcessMetrics { - #endif // !BUILDFLAG(IS_MAC) - - #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); - #endif - #if BUILDFLAG(IS_APPLE) -@@ -280,7 +280,7 @@ class BASE_EXPORT ProcessMetrics { - #endif - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - CPU::CoreType GetCoreType(uint32_t core_index); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || - // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) -@@ -294,9 +294,7 @@ class BASE_EXPORT ProcessMetrics { - // Used to store the previous times and CPU usage counts so we can - // compute the CPU usage between calls. - TimeTicks last_cpu_time_; --#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) - TimeDelta last_cumulative_cpu_; --#endif - - #if BUILDFLAG(IS_WIN) - TimeTicks last_cpu_time_for_precise_cpu_usage_; -@@ -304,7 +302,7 @@ class BASE_EXPORT ProcessMetrics { - #endif - - #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - // Same thing for idle wakeups. - TimeTicks last_idle_wakeups_time_; - uint64_t last_absolute_idle_wakeups_; -@@ -347,7 +345,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // Data about system-wide memory consumption. Values are in KB. Available on - // Windows, Mac, Linux, Android and Chrome OS. - // -@@ -382,7 +380,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { - #endif - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - // This provides an estimate of available memory as described here: - // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 - // NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always -@@ -397,7 +395,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { - #endif - - #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - int buffers = 0; - int cached = 0; - int active_anon = 0; -@@ -434,7 +432,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK - // BUILDFLAG(IS_FUCHSIA) - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - // Parse the data found in /proc//stat and return the sum of the - // CPU-related ticks. Returns -1 on parse error. - // Exposed for testing. -@@ -622,7 +620,7 @@ class BASE_EXPORT SystemMetrics { - FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics); - - size_t committed_memory_; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - SystemMemoryInfoKB memory_info_; - VmStatInfo vmstat_info_; - SystemDiskInfo disk_info_; diff --git a/devel/electron22/files/patch-base_process_process__metrics__freebsd.cc b/devel/electron22/files/patch-base_process_process__metrics__freebsd.cc deleted file mode 100644 index 395dc9eafc4..00000000000 --- a/devel/electron22/files/patch-base_process_process__metrics__freebsd.cc +++ /dev/null @@ -1,296 +0,0 @@ ---- base/process/process_metrics_freebsd.cc.orig 2022-10-25 08:25:05 UTC -+++ base/process/process_metrics_freebsd.cc -@@ -3,20 +3,39 @@ - // found in the LICENSE file. - - #include "base/process/process_metrics.h" -+#include "base/notreached.h" - - #include -+#include - #include - #include - #include - -+#include /* O_RDONLY */ -+#include -+#include -+ - #include "base/memory/ptr_util.h" - #include "base/process/process_metrics_iocounters.h" -+#include "base/values.h" - - namespace base { -+namespace { -+int GetPageShift() { -+ int pagesize = getpagesize(); -+ int pageshift = 0; - -+ while (pagesize > 1) { -+ pageshift++; -+ pagesize >>= 1; -+ } -+ -+ return pageshift; -+} -+} -+ - ProcessMetrics::ProcessMetrics(ProcessHandle process) -- : process_(process), -- last_cpu_(0) {} -+ : process_(process) {} - - // static - std::unique_ptr ProcessMetrics::CreateProcessMetrics( -@@ -24,22 +43,19 @@ std::unique_ptr ProcessMetrics::Create - return WrapUnique(new ProcessMetrics(process)); - } - --double ProcessMetrics::GetPlatformIndependentCPUUsage() { -+TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { - struct kinfo_proc info; -- int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process_}; -- size_t length = sizeof(info); -+ size_t length = sizeof(struct kinfo_proc); -+ struct timeval tv; - -+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_ }; -+ - if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) -- return 0; -+ return TimeDelta(); - -- return (info.ki_pctcpu / FSCALE) * 100.0; -+ return Microseconds(info.ki_runtime); - } - --TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { -- NOTREACHED(); -- return TimeDelta(); --} -- - bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { - return false; - } -@@ -67,4 +83,221 @@ size_t GetSystemCommitCharge() { - return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); - } - -+int64_t GetNumberOfThreads(ProcessHandle process) { -+ // Taken from FreeBSD top (usr.bin/top/machine.c) -+ -+ kvm_t* kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open"); -+ if (kd == NULL) -+ return 0; -+ -+ struct kinfo_proc* pbase; -+ int nproc; -+ pbase = kvm_getprocs(kd, KERN_PROC_PID, process, &nproc); -+ if (pbase == NULL) -+ return 0; -+ -+ if (kvm_close(kd) == -1) -+ return 0; -+ -+ return nproc; -+} -+ -+bool GetSystemMemoryInfo(SystemMemoryInfoKB *meminfo) { -+ unsigned int mem_total, mem_free, swap_total, swap_used; -+ size_t length; -+ int pagesizeKB; -+ -+ pagesizeKB = getpagesize() / 1024; -+ -+ length = sizeof(mem_total); -+ if (sysctlbyname("vm.stats.vm.v_page_count", &mem_total, -+ &length, NULL, 0) != 0 || length != sizeof(mem_total)) -+ return false; -+ -+ length = sizeof(mem_free); -+ if (sysctlbyname("vm.stats.vm.v_free_count", &mem_free, &length, NULL, 0) -+ != 0 || length != sizeof(mem_free)) -+ return false; -+ -+ length = sizeof(swap_total); -+ if (sysctlbyname("vm.swap_size", &swap_total, &length, NULL, 0) -+ != 0 || length != sizeof(swap_total)) -+ return false; -+ -+ length = sizeof(swap_used); -+ if (sysctlbyname("vm.swap_anon_use", &swap_used, &length, NULL, 0) -+ != 0 || length != sizeof(swap_used)) -+ return false; -+ -+ meminfo->total = mem_total * pagesizeKB; -+ meminfo->free = mem_free * pagesizeKB; -+ meminfo->swap_total = swap_total * pagesizeKB; -+ meminfo->swap_free = (swap_total - swap_used) * pagesizeKB; -+ -+ return true; -+} -+ -+int ProcessMetrics::GetOpenFdCount() const { -+ struct kinfo_file * kif; -+ int cnt; -+ -+ if ((kif = kinfo_getfile(process_, &cnt)) == NULL) -+ return -1; -+ -+ free(kif); -+ -+ return cnt; -+} -+ -+int ProcessMetrics::GetOpenFdSoftLimit() const { -+ size_t length; -+ int total_count = 0; -+ int mib[] = { CTL_KERN, KERN_MAXFILESPERPROC }; -+ -+ length = sizeof(total_count); -+ -+ if (sysctl(mib, std::size(mib), &total_count, &length, NULL, 0) < 0) { -+ total_count = -1; -+ } -+ -+ return total_count; -+} -+ -+size_t ProcessMetrics::GetResidentSetSize() const { -+ kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open"); -+ -+ if (kd == nullptr) -+ return 0; -+ -+ struct kinfo_proc *pp; -+ int nproc; -+ -+ if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) { -+ kvm_close(kd); -+ return 0; -+ } -+ -+ size_t rss; -+ -+ if (nproc > 0) { -+ rss = pp->ki_rssize << GetPageShift(); -+ } else { -+ rss = 0; -+ } -+ -+ kvm_close(kd); -+ return rss; -+} -+ -+uint64_t ProcessMetrics::GetVmSwapBytes() const { -+ kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open"); -+ -+ if (kd == nullptr) -+ return 0; -+ -+ struct kinfo_proc *pp; -+ int nproc; -+ -+ if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) { -+ kvm_close(kd); -+ return 0; -+ } -+ -+ size_t swrss; -+ -+ if (nproc > 0) { -+ swrss = pp->ki_swrss > pp->ki_rssize -+ ? (pp->ki_swrss - pp->ki_rssize) << GetPageShift() -+ : 0; -+ } else { -+ swrss = 0; -+ } -+ -+ kvm_close(kd); -+ return swrss; -+} -+ -+int ProcessMetrics::GetIdleWakeupsPerSecond() { -+ NOTIMPLEMENTED(); -+ return 0; -+} -+ -+bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { -+ NOTIMPLEMENTED(); -+ return false; -+} -+ -+bool GetVmStatInfo(VmStatInfo* vmstat) { -+ NOTIMPLEMENTED(); -+ return false; -+} -+ -+SystemDiskInfo::SystemDiskInfo() { -+ reads = 0; -+ reads_merged = 0; -+ sectors_read = 0; -+ read_time = 0; -+ writes = 0; -+ writes_merged = 0; -+ sectors_written = 0; -+ write_time = 0; -+ io = 0; -+ io_time = 0; -+ weighted_io_time = 0; -+} -+ -+SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo& other) = default; -+ -+SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default; -+ -+Value SystemDiskInfo::ToValue() const { -+ Value res(Value::Type::DICTIONARY); -+ -+ // Write out uint64_t variables as doubles. -+ // Note: this may discard some precision, but for JS there's no other option. -+ res.SetDoubleKey("reads", static_cast(reads)); -+ res.SetDoubleKey("reads_merged", static_cast(reads_merged)); -+ res.SetDoubleKey("sectors_read", static_cast(sectors_read)); -+ res.SetDoubleKey("read_time", static_cast(read_time)); -+ res.SetDoubleKey("writes", static_cast(writes)); -+ res.SetDoubleKey("writes_merged", static_cast(writes_merged)); -+ res.SetDoubleKey("sectors_written", static_cast(sectors_written)); -+ res.SetDoubleKey("write_time", static_cast(write_time)); -+ res.SetDoubleKey("io", static_cast(io)); -+ res.SetDoubleKey("io_time", static_cast(io_time)); -+ res.SetDoubleKey("weighted_io_time", static_cast(weighted_io_time)); -+ -+ return res; -+} -+ -+Value SystemMemoryInfoKB::ToValue() const { -+ Value res(Value::Type::DICTIONARY); -+ -+ res.SetIntKey("total", total); -+ res.SetIntKey("free", free); -+ res.SetIntKey("available", available); -+ res.SetIntKey("buffers", buffers); -+ res.SetIntKey("cached", cached); -+ res.SetIntKey("active_anon", active_anon); -+ res.SetIntKey("inactive_anon", inactive_anon); -+ res.SetIntKey("active_file", active_file); -+ res.SetIntKey("inactive_file", inactive_file); -+ res.SetIntKey("swap_total", swap_total); -+ res.SetIntKey("swap_free", swap_free); -+ res.SetIntKey("swap_used", swap_total - swap_free); -+ res.SetIntKey("dirty", dirty); -+ res.SetIntKey("reclaimable", reclaimable); -+ -+ return res; -+} -+ -+Value VmStatInfo::ToValue() const { -+ Value res(Value::Type::DICTIONARY); -+ -+ res.SetIntKey("pswpin", pswpin); -+ res.SetIntKey("pswpout", pswpout); -+ res.SetIntKey("pgmajfault", pgmajfault); -+ -+ return res; -+} - } // namespace base diff --git a/devel/electron22/files/patch-base_process_process__metrics__openbsd.cc b/devel/electron22/files/patch-base_process_process__metrics__openbsd.cc deleted file mode 100644 index 70b2aa744c6..00000000000 --- a/devel/electron22/files/patch-base_process_process__metrics__openbsd.cc +++ /dev/null @@ -1,215 +0,0 @@ ---- base/process/process_metrics_openbsd.cc.orig 2022-09-24 10:57:32 UTC -+++ base/process/process_metrics_openbsd.cc -@@ -6,14 +6,23 @@ - - #include - #include -+#include - #include - #include -+#include - -+#include -+ - #include "base/memory/ptr_util.h" - #include "base/process/process_metrics_iocounters.h" -+#include "base/values.h" -+#include "base/notreached.h" - - namespace base { - -+ProcessMetrics::ProcessMetrics(ProcessHandle process) -+ : process_(process) {} -+ - // static - std::unique_ptr ProcessMetrics::CreateProcessMetrics( - ProcessHandle process) { -@@ -24,49 +33,23 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_coun - return false; - } - --static int GetProcessCPU(pid_t pid) { -+TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { - struct kinfo_proc info; -- size_t length; -- int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid, -- sizeof(struct kinfo_proc), 0 }; -+ size_t length = sizeof(struct kinfo_proc); -+ struct timeval tv; - -- if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) -- return -1; -+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_, -+ sizeof(struct kinfo_proc), 1 }; - -- mib[5] = (length / sizeof(struct kinfo_proc)); -- - if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) -- return 0; -+ return TimeDelta(); - -- return info.p_pctcpu; --} -+ tv.tv_sec = info.p_rtime_sec; -+ tv.tv_usec = info.p_rtime_usec; - --double ProcessMetrics::GetPlatformIndependentCPUUsage() { -- TimeTicks time = TimeTicks::Now(); -- -- if (last_cpu_time_.is_zero()) { -- // First call, just set the last values. -- last_cpu_time_ = time; -- return 0; -- } -- -- int cpu = GetProcessCPU(process_); -- -- last_cpu_time_ = time; -- double percentage = static_cast((cpu * 100.0) / FSCALE); -- -- return percentage; -+ return Microseconds(TimeValToMicroseconds(tv)); - } - --TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { -- NOTREACHED(); -- return TimeDelta(); --} -- --ProcessMetrics::ProcessMetrics(ProcessHandle process) -- : process_(process), -- last_cpu_(0) {} -- - size_t GetSystemCommitCharge() { - int mib[] = { CTL_VM, VM_METER }; - int pagesize; -@@ -84,6 +67,129 @@ size_t GetSystemCommitCharge() { - pagesize = getpagesize(); - - return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); -+} -+ -+int ProcessMetrics::GetOpenFdCount() const { -+ struct kinfo_file *files; -+ kvm_t *kd = NULL; -+ int total_count = 0; -+ char errbuf[_POSIX2_LINE_MAX]; -+ -+ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) -+ goto out; -+ -+ if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process_, -+ sizeof(struct kinfo_file), &total_count)) == NULL) { -+ total_count = 0; -+ goto out; -+ } -+ -+ kvm_close(kd); -+ -+out: -+ return total_count; -+} -+ -+int ProcessMetrics::GetOpenFdSoftLimit() const { -+ return GetMaxFds(); -+} -+ -+uint64_t ProcessMetrics::GetVmSwapBytes() const { -+ NOTIMPLEMENTED(); -+ return 0; -+} -+ -+bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) { -+ NOTIMPLEMENTED_LOG_ONCE(); -+ return false; -+} -+ -+SystemDiskInfo::SystemDiskInfo() { -+ reads = 0; -+ reads_merged = 0; -+ sectors_read = 0; -+ read_time = 0; -+ writes = 0; -+ writes_merged = 0; -+ sectors_written = 0; -+ write_time = 0; -+ io = 0; -+ io_time = 0; -+ weighted_io_time = 0; -+} -+ -+SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo& other) = default; -+ -+bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { -+ NOTIMPLEMENTED(); -+ return false; -+} -+ -+bool GetVmStatInfo(VmStatInfo* vmstat) { -+ NOTIMPLEMENTED(); -+ return false; -+} -+ -+int ProcessMetrics::GetIdleWakeupsPerSecond() { -+ NOTIMPLEMENTED(); -+ return 0; -+} -+ -+Value SystemMemoryInfoKB::ToValue() const { -+ Value res(Value::Type::DICTIONARY); -+ res.SetIntKey("total", total); -+ res.SetIntKey("free", free); -+ res.SetIntKey("available", available); -+ res.SetIntKey("buffers", buffers); -+ res.SetIntKey("cached", cached); -+ res.SetIntKey("active_anon", active_anon); -+ res.SetIntKey("inactive_anon", inactive_anon); -+ res.SetIntKey("active_file", active_file); -+ res.SetIntKey("inactive_file", inactive_file); -+ res.SetIntKey("swap_total", swap_total); -+ res.SetIntKey("swap_free", swap_free); -+ res.SetIntKey("swap_used", swap_total - swap_free); -+ res.SetIntKey("dirty", dirty); -+ res.SetIntKey("reclaimable", reclaimable); -+ -+ NOTIMPLEMENTED(); -+ -+ return res; -+} -+ -+Value VmStatInfo::ToValue() const { -+ Value res(Value::Type::DICTIONARY); -+ res.SetIntKey("pswpin", pswpin); -+ res.SetIntKey("pswpout", pswpout); -+ res.SetIntKey("pgmajfault", pgmajfault); -+ -+ NOTIMPLEMENTED(); -+ -+ return res; -+} -+ -+SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default; -+ -+Value SystemDiskInfo::ToValue() const { -+ Value res(Value::Type::DICTIONARY); -+ -+ // Write out uint64_t variables as doubles. -+ // Note: this may discard some precision, but for JS there's no other option. -+ res.SetDoubleKey("reads", static_cast(reads)); -+ res.SetDoubleKey("reads_merged", static_cast(reads_merged)); -+ res.SetDoubleKey("sectors_read", static_cast(sectors_read)); -+ res.SetDoubleKey("read_time", static_cast(read_time)); -+ res.SetDoubleKey("writes", static_cast(writes)); -+ res.SetDoubleKey("writes_merged", static_cast(writes_merged)); -+ res.SetDoubleKey("sectors_written", static_cast(sectors_written)); -+ res.SetDoubleKey("write_time", static_cast(write_time)); -+ res.SetDoubleKey("io", static_cast(io)); -+ res.SetDoubleKey("io_time", static_cast(io_time)); -+ res.SetDoubleKey("weighted_io_time", static_cast(weighted_io_time)); -+ -+ NOTIMPLEMENTED(); -+ -+ return res; - } - - } // namespace base diff --git a/devel/electron22/files/patch-base_process_process__metrics__posix.cc b/devel/electron22/files/patch-base_process_process__metrics__posix.cc deleted file mode 100644 index 9cd1a72c8e2..00000000000 --- a/devel/electron22/files/patch-base_process_process__metrics__posix.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- base/process/process_metrics_posix.cc.orig 2022-08-31 12:19:35 UTC -+++ base/process/process_metrics_posix.cc -@@ -20,6 +20,8 @@ - - #if BUILDFLAG(IS_APPLE) - #include -+#elif BUILDFLAG(IS_OPENBSD) -+#include - #else - #include - #endif -@@ -135,7 +137,7 @@ size_t ProcessMetrics::GetMallocUsage() { - return stats.size_in_use; - #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) - return GetMallocUsageMallinfo(); --#elif BUILDFLAG(IS_FUCHSIA) -+#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. - return 0; - #endif diff --git a/devel/electron22/files/patch-base_process_process__metrics__unittest.cc b/devel/electron22/files/patch-base_process_process__metrics__unittest.cc deleted file mode 100644 index 1e4ff008705..00000000000 --- a/devel/electron22/files/patch-base_process_process__metrics__unittest.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- base/process/process_metrics_unittest.cc.orig 2022-09-24 10:57:32 UTC -+++ base/process/process_metrics_unittest.cc -@@ -44,7 +44,7 @@ namespace debug { - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - - namespace { - -@@ -347,7 +347,7 @@ TEST_F(SystemMetricsTest, ParseVmstat) { - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - - // Test that ProcessMetrics::GetPlatformIndependentCPUUsage() doesn't return - // negative values when the number of threads running on the process decreases diff --git a/devel/electron22/files/patch-base_process_process__posix.cc b/devel/electron22/files/patch-base_process_process__posix.cc deleted file mode 100644 index 9872810a9d9..00000000000 --- a/devel/electron22/files/patch-base_process_process__posix.cc +++ /dev/null @@ -1,93 +0,0 @@ ---- base/process/process_posix.cc.orig 2022-08-31 12:19:35 UTC -+++ base/process/process_posix.cc -@@ -25,10 +25,15 @@ - #include "build/build_config.h" - #include "third_party/abseil-cpp/absl/types/optional.h" - --#if BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - #include - #endif - -+#if defined(OS_BSD) -+#include -+#include -+#endif -+ - #if BUILDFLAG(CLANG_PROFILING) - #include "base/test/clang_profiling.h" - #endif -@@ -95,7 +100,7 @@ bool WaitpidWithTimeout(base::ProcessHandle handle, - return ret_pid > 0; - } - --#if BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_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. -@@ -200,7 +205,7 @@ bool WaitForExitWithTimeoutImpl(base::ProcessHandle ha - const bool exited = (parent_pid < 0); - - if (!exited && parent_pid != our_pid) { --#if BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - // On Mac we can wait on non child processes. - return WaitForSingleNonChildProcess(handle, timeout); - #else -@@ -392,7 +397,55 @@ void Process::Exited(int exit_code) const { - - int Process::GetPriority() const { - DCHECK(IsValid()); -+// avoid pledge(2) violation -+#if defined(OS_BSD) -+ return 0; -+#else - return getpriority(PRIO_PROCESS, static_cast(process_)); -+#endif -+} -+ -+Time Process::CreationTime() const { -+// avoid ps pledge in the network process -+#if !defined(OS_BSD) -+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(), -+ sizeof(struct kinfo_proc), 0 }; -+ struct kinfo_proc *info = nullptr; -+ size_t info_size; -+#endif -+ Time ct = Time(); -+ -+#if !defined(OS_BSD) -+ if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0) -+ goto out; -+ -+ mib[5] = (info_size / sizeof(struct kinfo_proc)); -+ if ((info = reinterpret_cast(malloc(info_size))) == NULL) -+ goto out; -+ -+ if (sysctl(mib, std::size(mib), info, &info_size, NULL, 0) < 0) -+ goto out; -+ -+ ct = Time::FromTimeT(info->p_ustart_sec); -+ -+out: -+ if (info) -+ free(info); -+#endif -+ return ct; -+} -+ -+bool Process::IsProcessBackgrounded() const { -+ return false; -+} -+ -+bool Process::SetProcessBackgrounded(bool value) { -+ return false; -+} -+ -+// static -+bool Process::CanBackgroundProcesses() { -+ return false; - } - - } // namespace base diff --git a/devel/electron22/files/patch-base_process_process__unittest.cc b/devel/electron22/files/patch-base_process_process__unittest.cc deleted file mode 100644 index 7c23a1ea488..00000000000 --- a/devel/electron22/files/patch-base_process_process__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/process/process_unittest.cc.orig 2022-07-22 17:30:31 UTC -+++ base/process/process_unittest.cc -@@ -193,7 +193,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { - // was spawned and a time recorded after it was spawned. However, since the - // base::Time and process creation clocks don't match, tolerate some error. - constexpr base::TimeDelta kTolerance = --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // On Linux, process creation time is relative to boot time which has a - // 1-second resolution. Tolerate 1 second for the imprecise boot time and - // 100 ms for the imprecise clock. diff --git a/devel/electron22/files/patch-base_profiler_module__cache.cc b/devel/electron22/files/patch-base_profiler_module__cache.cc deleted file mode 100644 index 49e9bebdb59..00000000000 --- a/devel/electron22/files/patch-base_profiler_module__cache.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/profiler/module_cache.cc.orig 2022-08-31 12:19:35 UTC -+++ base/profiler/module_cache.cc -@@ -34,7 +34,7 @@ struct ModuleAddressCompare { - - std::string TransformModuleIDToBreakpadFormat(StringPiece module_id) { - std::string mangled_id(module_id); --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Linux ELF module IDs are 160bit integers, which we need to mangle - // down to 128bit integers to match the id that Breakpad outputs. - // Example on version '66.0.3359.170' x64: diff --git a/devel/electron22/files/patch-base_profiler_sampling__profiler__thread__token.cc b/devel/electron22/files/patch-base_profiler_sampling__profiler__thread__token.cc deleted file mode 100644 index 7b890f85feb..00000000000 --- a/devel/electron22/files/patch-base_profiler_sampling__profiler__thread__token.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- base/profiler/sampling_profiler_thread_token.cc.orig 2022-10-24 13:33:33 UTC -+++ base/profiler/sampling_profiler_thread_token.cc -@@ -6,7 +6,7 @@ - - #include "build/build_config.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include - - #include "base/profiler/stack_base_address_posix.h" -@@ -19,7 +19,7 @@ SamplingProfilerThreadToken GetSamplingProfilerCurrent - PlatformThreadId id = PlatformThread::CurrentId(); - #if BUILDFLAG(IS_ANDROID) - return {id, pthread_self()}; --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - absl::optional maybe_stack_base = - GetThreadStackBaseAddress(id, pthread_self()); - // GetThreadStackBaseAddress should only return nullopt on Android, so diff --git a/devel/electron22/files/patch-base_profiler_sampling__profiler__thread__token.h b/devel/electron22/files/patch-base_profiler_sampling__profiler__thread__token.h deleted file mode 100644 index f4cb4f520ac..00000000000 --- a/devel/electron22/files/patch-base_profiler_sampling__profiler__thread__token.h +++ /dev/null @@ -1,20 +0,0 @@ ---- base/profiler/sampling_profiler_thread_token.h.orig 2022-10-24 13:33:33 UTC -+++ base/profiler/sampling_profiler_thread_token.h -@@ -11,7 +11,7 @@ - - #if BUILDFLAG(IS_ANDROID) - #include --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include - #endif - -@@ -25,7 +25,7 @@ struct SamplingProfilerThreadToken { - PlatformThreadId id; - #if BUILDFLAG(IS_ANDROID) - pthread_t pthread_id; --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Due to the sandbox, we can only retrieve the stack base address for the - // current thread. We must grab it during - // GetSamplingProfilerCurrentThreadToken() and not try to get it later. diff --git a/devel/electron22/files/patch-base_profiler_stack__base__address__posix.cc b/devel/electron22/files/patch-base_profiler_stack__base__address__posix.cc deleted file mode 100644 index 4f4bab6868b..00000000000 --- a/devel/electron22/files/patch-base_profiler_stack__base__address__posix.cc +++ /dev/null @@ -1,44 +0,0 @@ ---- base/profiler/stack_base_address_posix.cc.orig 2022-10-24 17:59:26 UTC -+++ base/profiler/stack_base_address_posix.cc -@@ -15,6 +15,10 @@ - #include "base/files/scoped_file.h" - #endif - -+#if BUILDFLAG(IS_BSD) -+#include -+#endif -+ - #if BUILDFLAG(IS_CHROMEOS) - extern "C" void* __libc_stack_end; - #endif -@@ -42,15 +46,30 @@ absl::optional GetAndroidMainThreadStackBas - #endif - - uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthread_id) { -+#if BUILDFLAG(IS_OPENBSD) -+ stack_t ss; -+ void *address; -+ size_t size; -+ if (pthread_stackseg_np(pthread_id, &ss) != 0) -+ return 0; -+ size = ss.ss_size; -+ address = (void*)((size_t) ss.ss_sp - ss.ss_size); -+#else - pthread_attr_t attr; -+#if BUILDFLAG(IS_FREEBSD) -+ pthread_attr_init(&attr); -+ pthread_attr_get_np(pthread_id, &attr); -+#else - // This will crash on ChromeOS & Linux if we are in the sandbox and pthread_id - // refers to a different thread, due to the use of sched_getaffinity(). - pthread_getattr_np(pthread_id, &attr); - // See crbug.com/617730 for limitations of this approach on Linux. -+#endif - void* address; - size_t size; - pthread_attr_getstack(&attr, &address, &size); - pthread_attr_destroy(&attr); -+#endif - const uintptr_t base_address = reinterpret_cast(address) + size; - return base_address; - } diff --git a/devel/electron22/files/patch-base_profiler_stack__sampling__profiler__test__util.cc b/devel/electron22/files/patch-base_profiler_stack__sampling__profiler__test__util.cc deleted file mode 100644 index 9b71690b5fa..00000000000 --- a/devel/electron22/files/patch-base_profiler_stack__sampling__profiler__test__util.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/profiler/stack_sampling_profiler_test_util.cc.orig 2022-05-19 14:06:27 UTC -+++ base/profiler/stack_sampling_profiler_test_util.cc -@@ -39,7 +39,7 @@ - // Fortunately, it provides _alloca, which functions identically. - #include - #define alloca _alloca --#else -+#elif !BUILDFLAG(IS_BSD) - #include - #endif - diff --git a/devel/electron22/files/patch-base_profiler_stack__sampling__profiler__unittest.cc b/devel/electron22/files/patch-base_profiler_stack__sampling__profiler__unittest.cc deleted file mode 100644 index d739c9137c7..00000000000 --- a/devel/electron22/files/patch-base_profiler_stack__sampling__profiler__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/profiler/stack_sampling_profiler_unittest.cc.orig 2022-02-28 16:54:41 UTC -+++ base/profiler/stack_sampling_profiler_unittest.cc -@@ -41,7 +41,7 @@ - #include - #include - #include --#else -+#elif !BUILDFLAG(IS_BSD) - #include - #endif - diff --git a/devel/electron22/files/patch-base_profiler_thread__delegate__posix.cc b/devel/electron22/files/patch-base_profiler_thread__delegate__posix.cc deleted file mode 100644 index 568e6236f39..00000000000 --- a/devel/electron22/files/patch-base_profiler_thread__delegate__posix.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- base/profiler/thread_delegate_posix.cc.orig 2022-10-24 13:33:33 UTC -+++ base/profiler/thread_delegate_posix.cc -@@ -13,7 +13,7 @@ - #include "build/build_config.h" - #include "third_party/abseil-cpp/absl/types/optional.h" - --#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) - #include "base/profiler/stack_base_address_posix.h" - #endif - -@@ -22,7 +22,7 @@ namespace base { - std::unique_ptr ThreadDelegatePosix::Create( - SamplingProfilerThreadToken thread_token) { - absl::optional base_address; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - base_address = thread_token.stack_base_address; - #else - base_address = diff --git a/devel/electron22/files/patch-base_rand__util.h b/devel/electron22/files/patch-base_rand__util.h deleted file mode 100644 index 63ac19b0268..00000000000 --- a/devel/electron22/files/patch-base_rand__util.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/rand_util.h.orig 2022-11-30 08:12:58 UTC -+++ base/rand_util.h -@@ -117,7 +117,7 @@ void RandomShuffle(Itr first, Itr last) { - std::shuffle(first, last, RandomBitGenerator()); - } - --#if BUILDFLAG(IS_POSIX) -+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_BSD) - BASE_EXPORT int GetUrandomFD(); - #endif - diff --git a/devel/electron22/files/patch-base_rand__util__posix.cc b/devel/electron22/files/patch-base_rand__util__posix.cc deleted file mode 100644 index b6df31cda06..00000000000 --- a/devel/electron22/files/patch-base_rand__util__posix.cc +++ /dev/null @@ -1,62 +0,0 @@ ---- base/rand_util_posix.cc.orig 2022-11-30 08:12:58 UTC -+++ base/rand_util_posix.cc -@@ -22,7 +22,7 @@ - #include "base/time/time.h" - #include "build/build_config.h" - --#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - #include "third_party/lss/linux_syscall_support.h" - #elif BUILDFLAG(IS_MAC) - // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK. -@@ -46,6 +46,7 @@ static constexpr int kOpenFlags = O_RDONLY; - static constexpr int kOpenFlags = O_RDONLY | O_CLOEXEC; - #endif - -+#if !BUILDFLAG(IS_BSD) - // We keep the file descriptor for /dev/urandom around so we don't need to - // reopen it (which is expensive), and since we may not even be able to reopen - // it if we are later put in a sandbox. This class wraps the file descriptor so -@@ -63,10 +64,11 @@ class URandomFd { - private: - const int fd_; - }; -+#endif - - #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID)) && \ -- !BUILDFLAG(IS_NACL) -+ !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - // TODO(pasko): Unify reading kernel version numbers in: - // mojo/core/channel_linux.cc - // chrome/browser/android/seccomp_support_detector.cc -@@ -176,6 +178,7 @@ bool UseBoringSSLForRandBytes() { - namespace { - - void RandBytes(void* output, size_t output_length, bool avoid_allocation) { -+#if !BUILDFLAG(IS_BSD) - #if !BUILDFLAG(IS_NACL) - // The BoringSSL experiment takes priority over everything else. - if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { -@@ -214,6 +217,9 @@ void RandBytes(void* output, size_t output_length, boo - const bool success = - ReadFromFD(urandom_fd, static_cast(output), output_length); - CHECK(success); -+#else -+ arc4random_buf(static_cast(output), output_length); -+#endif - } - - } // namespace -@@ -233,9 +239,11 @@ void RandBytes(void* output, size_t output_length) { - RandBytes(output, output_length, /*avoid_allocation=*/false); - } - -+#if !BUILDFLAG(IS_BSD) - int GetUrandomFD() { - static NoDestructor urandom_fd; - return urandom_fd->fd(); - } -+#endif - - } // namespace base diff --git a/devel/electron22/files/patch-base_strings_safe__sprintf__unittest.cc b/devel/electron22/files/patch-base_strings_safe__sprintf__unittest.cc deleted file mode 100644 index 83ee1706519..00000000000 --- a/devel/electron22/files/patch-base_strings_safe__sprintf__unittest.cc +++ /dev/null @@ -1,18 +0,0 @@ ---- base/strings/safe_sprintf_unittest.cc.orig 2022-11-30 08:12:58 UTC -+++ base/strings/safe_sprintf_unittest.cc -@@ -740,6 +740,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) { - #endif - } - -+#if !BUILDFLAG(IS_BSD) - TEST(SafeSPrintfTest, EmitNULL) { - char buf[40]; - #if defined(__GNUC__) -@@ -756,6 +757,7 @@ TEST(SafeSPrintfTest, EmitNULL) { - #pragma GCC diagnostic pop - #endif - } -+#endif - - TEST(SafeSPrintfTest, PointerSize) { - // The internal data representation is a 64bit value, independent of the diff --git a/devel/electron22/files/patch-base_synchronization_lock__impl.h b/devel/electron22/files/patch-base_synchronization_lock__impl.h deleted file mode 100644 index baac846e9d7..00000000000 --- a/devel/electron22/files/patch-base_synchronization_lock__impl.h +++ /dev/null @@ -1,23 +0,0 @@ ---- base/synchronization/lock_impl.h.orig 2022-06-17 14:20:10 UTC -+++ base/synchronization/lock_impl.h -@@ -107,6 +107,10 @@ void LockImpl::Unlock() { - } - - #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -+#if BUILDFLAG(IS_FREEBSD) -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wthread-safety-analysis" -+#endif - - #if DCHECK_IS_ON() - BASE_EXPORT void dcheck_trylock_result(int rv); -@@ -127,6 +131,9 @@ void LockImpl::Unlock() { - dcheck_unlock_result(rv); - #endif - } -+#if BUILDFLAG(IS_FREEBSD) -+#pragma GCC diagnostic pop -+#endif - #endif - - // This is an implementation used for AutoLock templated on the lock type. diff --git a/devel/electron22/files/patch-base_syslog__logging.cc b/devel/electron22/files/patch-base_syslog__logging.cc deleted file mode 100644 index 5c1921e82d4..00000000000 --- a/devel/electron22/files/patch-base_syslog__logging.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- base/syslog_logging.cc.orig 2022-02-28 16:54:41 UTC -+++ base/syslog_logging.cc -@@ -15,7 +15,7 @@ - #include "base/strings/string_util.h" - #include "base/win/scoped_handle.h" - #include "base/win/win_util.h" --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // defines LOG_INFO, LOG_WARNING macros that could conflict with - // base::LOG_INFO, base::LOG_WARNING. - #include -@@ -147,7 +147,7 @@ EventLogMessage::~EventLogMessage() { - - if (user_sid != nullptr) - ::LocalFree(user_sid); --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const char kEventSource[] = "chrome"; - openlog(kEventSource, LOG_NOWAIT | LOG_PID, LOG_USER); - // We can't use the defined names for the logging severity from syslog.h diff --git a/devel/electron22/files/patch-base_system_sys__info.cc b/devel/electron22/files/patch-base_system_sys__info.cc deleted file mode 100644 index 84cc358951e..00000000000 --- a/devel/electron22/files/patch-base_system_sys__info.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/system/sys_info.cc.orig 2022-08-31 12:19:35 UTC -+++ base/system/sys_info.cc -@@ -101,7 +101,7 @@ std::string SysInfo::HardwareModelName() { - #endif - - void SysInfo::GetHardwareInfo(base::OnceCallback callback) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - constexpr base::TaskTraits kTraits = {base::MayBlock()}; - #else - constexpr base::TaskTraits kTraits = {}; diff --git a/devel/electron22/files/patch-base_system_sys__info.h b/devel/electron22/files/patch-base_system_sys__info.h deleted file mode 100644 index f53d8dbc58b..00000000000 --- a/devel/electron22/files/patch-base_system_sys__info.h +++ /dev/null @@ -1,20 +0,0 @@ ---- base/system/sys_info.h.orig 2022-11-30 08:12:58 UTC -+++ base/system/sys_info.h -@@ -233,6 +233,8 @@ class BASE_EXPORT SysInfo { - static void SetIsCpuSecurityMitigationsEnabled(bool is_enabled); - #endif - -+ static uint64_t MaxSharedMemorySize(); -+ - private: - FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); - FRIEND_TEST_ALL_PREFIXES(debug::SystemMetricsTest, ParseMeminfo); -@@ -243,7 +245,7 @@ class BASE_EXPORT SysInfo { - static HardwareInfo GetHardwareInfoSync(); - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - static uint64_t AmountOfAvailablePhysicalMemory( - const SystemMemoryInfoKB& meminfo); - #endif diff --git a/devel/electron22/files/patch-base_system_sys__info__freebsd.cc b/devel/electron22/files/patch-base_system_sys__info__freebsd.cc deleted file mode 100644 index 81e02610027..00000000000 --- a/devel/electron22/files/patch-base_system_sys__info__freebsd.cc +++ /dev/null @@ -1,115 +0,0 @@ ---- base/system/sys_info_freebsd.cc.orig 2022-09-01 17:22:07 UTC -+++ base/system/sys_info_freebsd.cc -@@ -9,30 +9,106 @@ - #include - - #include "base/notreached.h" -+#include "base/process/process_metrics.h" -+#include "base/strings/string_util.h" - - namespace base { - --int64_t SysInfo::AmountOfPhysicalMemoryImpl() { -- int pages, page_size; -+int SysInfo::NumberOfProcessors() { -+ int mib[] = {CTL_HW, HW_NCPU}; -+ int ncpu; -+ size_t size = sizeof(ncpu); -+ if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) { -+ NOTREACHED(); -+ return 1; -+ } -+ return ncpu; -+} -+ -+uint64_t SysInfo::AmountOfPhysicalMemoryImpl() { -+ int pages, page_size, r = 0; - size_t size = sizeof(pages); -- sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); -- sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -- if (pages == -1 || page_size == -1) { -+ -+ if (r == 0) -+ r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); -+ if (r == 0) -+ r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -+ -+ if (r == -1) { - NOTREACHED(); - return 0; - } -- return static_cast(pages) * page_size; -+ -+ return static_cast(pages) * page_size; - } - -+uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { -+ int page_size, r = 0; -+ unsigned int pgfree, pginact, pgcache; -+ size_t size = sizeof(page_size); -+ size_t szpg = sizeof(pgfree); -+ -+ if (r == 0) -+ r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -+ if (r == 0) -+ r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0); -+ if (r == 0) -+ r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0); -+ if (r == 0) -+ r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0); -+ -+ if (r == -1) { -+ NOTREACHED(); -+ return 0; -+ } -+ -+ return static_cast((pgfree + pginact + pgcache) * page_size); -+} -+ - // static -+uint64_t SysInfo::AmountOfAvailablePhysicalMemory(const SystemMemoryInfoKB& info) { -+ uint64_t res_kb = info.available != 0 -+ ? info.available - info.active_file -+ : info.free + info.reclaimable + info.inactive_file; -+ return res_kb * 1024; -+} -+ -+// static -+std::string SysInfo::CPUModelName() { -+ int mib[] = { CTL_HW, HW_MODEL }; -+ char name[256]; -+ size_t size = std::size(name); -+ -+ if (sysctl(mib, std::size(mib), &name, &size, NULL, 0) == 0) { -+ return name; -+ } -+ -+ return std::string(); -+} -+ -+// static - uint64_t SysInfo::MaxSharedMemorySize() { - size_t limit; - size_t size = sizeof(limit); -+ - if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) { - NOTREACHED(); - return 0; - } -+ - return static_cast(limit); -+} -+ -+SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() { -+ HardwareInfo info; -+ -+ info.manufacturer = "FreeBSD"; -+ info.model = HardwareModelName(); -+ -+ DCHECK(IsStringUTF8(info.manufacturer)); -+ DCHECK(IsStringUTF8(info.model)); -+ -+ return info; - } - - } // namespace base diff --git a/devel/electron22/files/patch-base_system_sys__info__openbsd.cc b/devel/electron22/files/patch-base_system_sys__info__openbsd.cc deleted file mode 100644 index 4e999782382..00000000000 --- a/devel/electron22/files/patch-base_system_sys__info__openbsd.cc +++ /dev/null @@ -1,94 +0,0 @@ ---- base/system/sys_info_openbsd.cc.orig 2022-08-31 12:19:35 UTC -+++ base/system/sys_info_openbsd.cc -@@ -11,6 +11,7 @@ - #include - - #include "base/notreached.h" -+#include "base/strings/string_util.h" - - namespace { - -@@ -26,9 +27,15 @@ uint64_t AmountOfMemory(int pages_name) { - - namespace base { - -+// pledge(2) -+int64_t aofpmem = 0; -+int64_t aofapmem = 0; -+int64_t shmmax = 0; -+char cpumodel[256]; -+ - // static - int SysInfo::NumberOfProcessors() { -- int mib[] = {CTL_HW, HW_NCPU}; -+ int mib[] = {CTL_HW, HW_NCPUONLINE}; - int ncpu; - size_t size = sizeof(ncpu); - if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) { -@@ -40,10 +47,26 @@ int SysInfo::NumberOfProcessors() { - - // static - uint64_t SysInfo::AmountOfPhysicalMemoryImpl() { -- return AmountOfMemory(_SC_PHYS_PAGES); -+ // pledge(2) -+ if (!aofpmem) -+ aofpmem = AmountOfMemory(_SC_PHYS_PAGES); -+ return aofpmem; - } - - // static -+std::string SysInfo::CPUModelName() { -+ int mib[] = {CTL_HW, HW_MODEL}; -+ size_t len = std::size(cpumodel); -+ -+ if (cpumodel[0] == '\0') { -+ if (sysctl(mib, std::size(mib), cpumodel, &len, NULL, 0) < 0) -+ return std::string(); -+ } -+ -+ return std::string(cpumodel, len - 1); -+} -+ -+// static - uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { - // We should add inactive file-backed memory also but there is no such - // information from OpenBSD unfortunately. -@@ -55,23 +78,28 @@ uint64_t SysInfo::MaxSharedMemorySize() { - int mib[] = {CTL_KERN, KERN_SHMINFO, KERN_SHMINFO_SHMMAX}; - size_t limit; - size_t size = sizeof(limit); -+ // pledge(2) -+ if (shmmax) -+ goto out; - if (sysctl(mib, std::size(mib), &limit, &size, NULL, 0) < 0) { - NOTREACHED(); - return 0; - } -- return static_cast(limit); -+ shmmax = static_cast(limit); -+out: -+ return shmmax; - } - - // static --std::string SysInfo::CPUModelName() { -- int mib[] = {CTL_HW, HW_MODEL}; -- char name[256]; -- size_t len = std::size(name); -- if (sysctl(mib, std::size(mib), name, &len, NULL, 0) < 0) { -- NOTREACHED(); -- return std::string(); -- } -- return name; -+SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() { -+ HardwareInfo info; -+ // Set the manufacturer to "OpenBSD" and the model to -+ // an empty string. -+ info.manufacturer = "OpenBSD"; -+ info.model = HardwareModelName(); -+ DCHECK(IsStringUTF8(info.manufacturer)); -+ DCHECK(IsStringUTF8(info.model)); -+ return info; - } - - } // namespace base diff --git a/devel/electron22/files/patch-base_system_sys__info__posix.cc b/devel/electron22/files/patch-base_system_sys__info__posix.cc deleted file mode 100644 index edf8278d84e..00000000000 --- a/devel/electron22/files/patch-base_system_sys__info__posix.cc +++ /dev/null @@ -1,33 +0,0 @@ ---- base/system/sys_info_posix.cc.orig 2022-11-30 08:12:58 UTC -+++ base/system/sys_info_posix.cc -@@ -182,12 +182,12 @@ absl::optional NumberOfPhysicalProcessors() { - - } // namespace internal - --#if !BUILDFLAG(IS_OPENBSD) -+#if !BUILDFLAG(IS_BSD) - int SysInfo::NumberOfProcessors() { - static int number_of_processors = internal::NumberOfProcessors(); - return number_of_processors; - } --#endif // !BUILDFLAG(IS_OPENBSD) -+#endif // !BUILDFLAG(IS_BSD) - - // static - uint64_t SysInfo::AmountOfVirtualMemory() { -@@ -277,6 +277,8 @@ std::string SysInfo::OperatingSystemArchitecture() { - arch = "x86"; - } else if (arch == "amd64") { - arch = "x86_64"; -+ } else if (arch == "arm64") { -+ arch = "aarch64"; - } else if (std::string(info.sysname) == "AIX") { - arch = "ppc64"; - } -@@ -300,4 +302,4 @@ void SysInfo::SetIsCpuSecurityMitigationsEnabled(bool - - #endif // BUILDFLAG(IS_MAC) - --} // namespace base -\ No newline at end of file -+} // namespace base diff --git a/devel/electron22/files/patch-base_system_sys__info__unittest.cc b/devel/electron22/files/patch-base_system_sys__info__unittest.cc deleted file mode 100644 index 7aea7a207fa..00000000000 --- a/devel/electron22/files/patch-base_system_sys__info__unittest.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- base/system/sys_info_unittest.cc.orig 2022-11-30 08:12:58 UTC -+++ base/system/sys_info_unittest.cc -@@ -255,12 +255,16 @@ TEST_F(SysInfoTest, GetHardwareInfo) { - EXPECT_TRUE(IsStringUTF8(hardware_info->model)); - bool empty_result_expected = - #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \ -+ BUILDFLAG(IS_BSD) - false; - #else - true; - #endif - EXPECT_EQ(hardware_info->manufacturer.empty(), empty_result_expected); -+#if BUILDFLAG(IS_BSD) -+ empty_result_expected = true; -+#endif - EXPECT_EQ(hardware_info->model.empty(), empty_result_expected); - } - diff --git a/devel/electron22/files/patch-base_task_thread__pool_environment__config__unittest.cc b/devel/electron22/files/patch-base_task_thread__pool_environment__config__unittest.cc deleted file mode 100644 index abb639bc986..00000000000 --- a/devel/electron22/files/patch-base_task_thread__pool_environment__config__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/task/thread_pool/environment_config_unittest.cc.orig 2022-08-31 12:19:35 UTC -+++ base/task/thread_pool/environment_config_unittest.cc -@@ -15,7 +15,7 @@ TEST(ThreadPoolEnvironmentConfig, CanUseBackgroundPrio - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) - EXPECT_TRUE(CanUseBackgroundThreadTypeForWorkerThread()); - #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) - EXPECT_FALSE(CanUseBackgroundThreadTypeForWorkerThread()); - #else - #error Platform doesn't match any block diff --git a/devel/electron22/files/patch-base_test_launcher_test__launcher.cc b/devel/electron22/files/patch-base_test_launcher_test__launcher.cc deleted file mode 100644 index f5f436141cb..00000000000 --- a/devel/electron22/files/patch-base_test_launcher_test__launcher.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- base/test/launcher/test_launcher.cc.orig 2022-09-24 10:57:32 UTC -+++ base/test/launcher/test_launcher.cc -@@ -65,6 +65,7 @@ - #include "third_party/libxml/chromium/libxml_utils.h" - - #if BUILDFLAG(IS_POSIX) -+#include - #include - - #include "base/files/file_descriptor_watcher_posix.h" diff --git a/devel/electron22/files/patch-base_test_test__file__util__linux.cc b/devel/electron22/files/patch-base_test_test__file__util__linux.cc deleted file mode 100644 index 21b4b25775a..00000000000 --- a/devel/electron22/files/patch-base_test_test__file__util__linux.cc +++ /dev/null @@ -1,13 +0,0 @@ ---- base/test/test_file_util_linux.cc.orig 2022-02-28 16:54:41 UTC -+++ base/test/test_file_util_linux.cc -@@ -54,8 +54,10 @@ bool EvictFileFromSystemCache(const FilePath& file) { - return false; - if (fdatasync(fd.get()) != 0) - return false; -+#if !defined(OS_BSD) - if (posix_fadvise(fd.get(), 0, 0, POSIX_FADV_DONTNEED) != 0) - return false; -+#endif - return true; - } - diff --git a/devel/electron22/files/patch-base_test_test__file__util__posix.cc b/devel/electron22/files/patch-base_test_test__file__util__posix.cc deleted file mode 100644 index 37c9bbbb70e..00000000000 --- a/devel/electron22/files/patch-base_test_test__file__util__posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/test/test_file_util_posix.cc.orig 2022-02-28 16:54:41 UTC -+++ base/test/test_file_util_posix.cc -@@ -88,7 +88,7 @@ void SyncPageCacheToDisk() { - } - - #if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \ -- !BUILDFLAG(IS_ANDROID) -+ !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) - bool EvictFileFromSystemCache(const FilePath& file) { - // There doesn't seem to be a POSIX way to cool the disk cache. - NOTIMPLEMENTED(); diff --git a/devel/electron22/files/patch-base_threading_platform__thread.h b/devel/electron22/files/patch-base_threading_platform__thread.h deleted file mode 100644 index 6f887f6c8c6..00000000000 --- a/devel/electron22/files/patch-base_threading_platform__thread.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/threading/platform_thread.h.orig 2022-09-24 10:57:32 UTC -+++ base/threading/platform_thread.h -@@ -253,7 +253,7 @@ class BASE_EXPORT PlatformThread { - // Returns a realtime period provided by `delegate`. - static TimeDelta GetRealtimePeriod(Delegate* delegate); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Toggles a specific thread's type at runtime. This can be used to - // change the priority of a thread in a different process and will fail - // if the calling process does not have proper permissions. The diff --git a/devel/electron22/files/patch-base_threading_platform__thread__linux.cc b/devel/electron22/files/patch-base_threading_platform__thread__linux.cc deleted file mode 100644 index 4e765fd7f72..00000000000 --- a/devel/electron22/files/patch-base_threading_platform__thread__linux.cc +++ /dev/null @@ -1,77 +0,0 @@ ---- base/threading/platform_thread_linux.cc.orig 2022-11-30 08:12:58 UTC -+++ base/threading/platform_thread_linux.cc -@@ -29,7 +29,9 @@ - - #if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) - #include -+#if !BUILDFLAG(IS_BSD) - #include -+#endif - #include - #include - #include -@@ -134,7 +136,7 @@ long sched_setattr(pid_t pid, - #endif // !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) - #endif // BUILDFLAG(IS_CHROMEOS) - --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - const FilePath::CharType kCgroupDirectory[] = - FILE_PATH_LITERAL("/sys/fs/cgroup"); - -@@ -306,7 +308,7 @@ void SetThreadCgroupsForThreadType(PlatformThreadId th - namespace internal { - - namespace { --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - const struct sched_param kRealTimePrio = {8}; - #endif - } // namespace -@@ -332,7 +334,7 @@ const ThreadTypeToNiceValuePair kThreadTypeToNiceValue - }; - - bool CanSetThreadTypeToRealtimeAudio() { --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - // A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke - // pthread_setschedparam in SetCurrentThreadTypeForPlatform(). - struct rlimit rlim; -@@ -344,7 +346,7 @@ bool CanSetThreadTypeToRealtimeAudio() { - - bool SetCurrentThreadTypeForPlatform(ThreadType thread_type, - MessagePumpType pump_type_hint) { --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - // For legacy schedtune interface - SetThreadCgroupsForThreadType(PlatformThread::CurrentId(), thread_type); - -@@ -363,7 +365,7 @@ bool SetCurrentThreadTypeForPlatform(ThreadType thread - - absl::optional - GetCurrentThreadPriorityForPlatformForTest() { --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - int maybe_sched_rr = 0; - struct sched_param maybe_realtime_prio = {0}; - if (pthread_getschedparam(pthread_self(), &maybe_sched_rr, -@@ -382,7 +384,7 @@ GetCurrentThreadPriorityForPlatformForTest() { - void PlatformThread::SetName(const std::string& name) { - ThreadIdNameManager::GetInstance()->SetName(name); - --#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) && !BUILDFLAG(IS_BSD) - // On linux 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 -@@ -412,8 +414,10 @@ void PlatformThread::SetThreadType(ProcessId process_i - // priority. - CHECK_NE(thread_id, process_id); - -+#if !BUILDFLAG(IS_BSD) - // For legacy schedtune interface - SetThreadCgroupsForThreadType(thread_id, thread_type); -+#endif - - #if BUILDFLAG(IS_CHROMEOS) - // For upstream uclamp interface. We try both legacy (schedtune, as done diff --git a/devel/electron22/files/patch-base_threading_platform__thread__posix.cc b/devel/electron22/files/patch-base_threading_platform__thread__posix.cc deleted file mode 100644 index 0d4b2c3c5e7..00000000000 --- a/devel/electron22/files/patch-base_threading_platform__thread__posix.cc +++ /dev/null @@ -1,21 +0,0 @@ ---- base/threading/platform_thread_posix.cc.orig 2022-11-30 08:12:58 UTC -+++ base/threading/platform_thread_posix.cc -@@ -78,7 +78,7 @@ void* ThreadFunc(void* params) { - if (!thread_params->joinable) - base::DisallowSingleton(); - --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(STARSCAN) - partition_alloc::internal::PCScan::NotifyThreadCreated( - partition_alloc::internal::GetStackPointer()); -@@ -380,6 +380,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, - MessagePumpType pump_type_hint) { - #if BUILDFLAG(IS_NACL) - NOTIMPLEMENTED(); -+// avoid pledge(2) violation -+#elif BUILDFLAG(IS_BSD) -+ NOTIMPLEMENTED(); - #else - if (internal::SetCurrentThreadTypeForPlatform(thread_type, pump_type_hint)) - return; diff --git a/devel/electron22/files/patch-base_threading_platform__thread__unittest.cc b/devel/electron22/files/patch-base_threading_platform__thread__unittest.cc deleted file mode 100644 index 6f79a34db48..00000000000 --- a/devel/electron22/files/patch-base_threading_platform__thread__unittest.cc +++ /dev/null @@ -1,47 +0,0 @@ ---- base/threading/platform_thread_unittest.cc.orig 2022-09-24 10:57:32 UTC -+++ base/threading/platform_thread_unittest.cc -@@ -31,7 +31,7 @@ - #include "base/time/time.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include - #include - #include -@@ -417,7 +417,7 @@ TEST(PlatformThreadTest, - // and hardcodes what we know. Please inform scheduler-dev@chromium.org if this - // proprerty changes for a given platform. - TEST(PlatformThreadTest, CanChangeThreadType) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // On Ubuntu, RLIMIT_NICE and RLIMIT_RTPRIO are 0 by default, so we won't be - // able to increase priority to any level. - constexpr bool kCanIncreasePriority = false; -@@ -523,7 +523,7 @@ TEST(PlatformThreadTest, SetHugeThreadName) { - TEST(PlatformThreadTest, GetDefaultThreadStackSize) { - size_t stack_size = PlatformThread::GetDefaultThreadStackSize(); - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || \ -- ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ -+ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ - !defined(THREAD_SANITIZER)) || \ - (BUILDFLAG(IS_ANDROID) && !defined(ADDRESS_SANITIZER)) - EXPECT_EQ(0u, stack_size); -@@ -684,12 +684,16 @@ INSTANTIATE_TEST_SUITE_P( - - #endif // BUILDFLAG(IS_APPLE) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - - namespace { - - bool IsTidCacheCorrect() { -+#if BUILDFLAG(IS_BSD) -+ return PlatformThread::CurrentId() == reinterpret_cast(pthread_self()); -+#else - return PlatformThread::CurrentId() == syscall(__NR_gettid); -+#endif - } - - void* CheckTidCacheCorrectWrapper(void*) { diff --git a/devel/electron22/files/patch-base_trace__event_malloc__dump__provider.cc b/devel/electron22/files/patch-base_trace__event_malloc__dump__provider.cc deleted file mode 100644 index c0d85d4aa27..00000000000 --- a/devel/electron22/files/patch-base_trace__event_malloc__dump__provider.cc +++ /dev/null @@ -1,30 +0,0 @@ ---- base/trace_event/malloc_dump_provider.cc.orig 2022-10-24 13:33:33 UTC -+++ base/trace_event/malloc_dump_provider.cc -@@ -24,6 +24,8 @@ - - #if BUILDFLAG(IS_APPLE) - #include -+#elif defined(OS_BSD) -+#include - #else - #include - #endif -@@ -186,7 +188,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, - - #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \ - (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) && \ -- !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA)) -+ !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD)) - void ReportMallinfoStats(ProcessMemoryDump* pmd, - size_t* total_virtual_size, - size_t* resident_size, -@@ -357,6 +359,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump - &allocated_objects_count); - #elif BUILDFLAG(IS_FUCHSIA) - // TODO(fuchsia): Port, see https://crbug.com/706592. -+#elif defined(OS_BSD) -+ total_virtual_size = 0; -+ allocated_objects_size = 0; - #else - ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, - &allocated_objects_size, &allocated_objects_count); diff --git a/devel/electron22/files/patch-base_trace__event_memory__dump__manager.cc b/devel/electron22/files/patch-base_trace__event_memory__dump__manager.cc deleted file mode 100644 index f1f228e38e7..00000000000 --- a/devel/electron22/files/patch-base_trace__event_memory__dump__manager.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/trace_event/memory_dump_manager.cc.orig 2022-03-25 21:59:56 UTC -+++ base/trace_event/memory_dump_manager.cc -@@ -82,7 +82,7 @@ const char* const MemoryDumpManager::kSystemAllocatorP - #if defined(MALLOC_MEMORY_TRACING_SUPPORTED) - MallocDumpProvider::kAllocatedObjects; - #else -- nullptr; -+ ""; - #endif - - // static diff --git a/devel/electron22/files/patch-base_trace__event_process__memory__dump.cc b/devel/electron22/files/patch-base_trace__event_process__memory__dump.cc deleted file mode 100644 index 4a938cc94c3..00000000000 --- a/devel/electron22/files/patch-base_trace__event_process__memory__dump.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- base/trace_event/process_memory_dump.cc.orig 2022-09-24 10:57:32 UTC -+++ base/trace_event/process_memory_dump.cc -@@ -112,7 +112,7 @@ absl::optional ProcessMemoryDump::CountResiden - #if BUILDFLAG(IS_WIN) - std::unique_ptr vec( - new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]); --#elif BUILDFLAG(IS_APPLE) -+#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) - std::unique_ptr vec(new char[max_vec_size]); - #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) - std::unique_ptr vec(new unsigned char[max_vec_size]); -@@ -134,7 +134,7 @@ absl::optional ProcessMemoryDump::CountResiden - - for (size_t i = 0; i < page_count; i++) - resident_page_count += vec[i].VirtualAttributes.Valid; --#elif BUILDFLAG(IS_FUCHSIA) -+#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/851760): Implement counting resident bytes. - // For now, log and avoid unused variable warnings. - NOTIMPLEMENTED_LOG_ONCE(); diff --git a/devel/electron22/files/patch-base_tracing_trace__time.cc b/devel/electron22/files/patch-base_tracing_trace__time.cc deleted file mode 100644 index 36c6113518f..00000000000 --- a/devel/electron22/files/patch-base_tracing_trace__time.cc +++ /dev/null @@ -1,28 +0,0 @@ ---- base/tracing/trace_time.cc.orig 2022-02-28 16:54:41 UTC -+++ base/tracing/trace_time.cc -@@ -8,13 +8,17 @@ - #include "build/build_config.h" - #include "third_party/perfetto/include/perfetto/base/time.h" - -+#if BUILDFLAG(IS_FREEBSD) -+#define CLOCK_BOOTTIME CLOCK_UPTIME -+#endif -+ - namespace base { - namespace tracing { - - int64_t TraceBootTicksNow() { - // On Windows and Mac, TRACE_TIME_TICKS_NOW() behaves like boottime already. - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - struct timespec ts; - int res = clock_gettime(CLOCK_BOOTTIME, &ts); - if (res != -1) -@@ -24,4 +28,4 @@ int64_t TraceBootTicksNow() { - } - - } // namespace tracing --} // namespace base -\ No newline at end of file -+} // namespace base diff --git a/devel/electron22/files/patch-base_tracing_trace__time.h b/devel/electron22/files/patch-base_tracing_trace__time.h deleted file mode 100644 index 0394e382ee6..00000000000 --- a/devel/electron22/files/patch-base_tracing_trace__time.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/tracing/trace_time.h.orig 2022-02-28 16:54:41 UTC -+++ base/tracing/trace_time.h -@@ -12,7 +12,7 @@ namespace base { - namespace tracing { - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // Linux, Android, and Fuchsia all use CLOCK_MONOTONIC. See crbug.com/166153 - // about efforts to unify base::TimeTicks across all platforms. - constexpr perfetto::protos::pbzero::BuiltinClock kTraceClockId = diff --git a/devel/electron22/files/patch-build_config_BUILD.gn b/devel/electron22/files/patch-build_config_BUILD.gn deleted file mode 100644 index 36a12d51c8b..00000000000 --- a/devel/electron22/files/patch-build_config_BUILD.gn +++ /dev/null @@ -1,22 +0,0 @@ ---- build/config/BUILD.gn.orig 2022-09-24 10:57:32 UTC -+++ build/config/BUILD.gn -@@ -215,13 +215,17 @@ config("default_libs") { - "CoreText.framework", - "Foundation.framework", - ] -- } else if (is_linux || is_chromeos) { -+ } else if ((is_linux && !is_bsd) || is_chromeos) { - libs = [ - "dl", - "pthread", - "rt", - ] -- } -+ } else if (is_bsd) { -+ libs = [ -+ "pthread", -+ ] -+ } - } - - group("common_deps") { diff --git a/devel/electron22/files/patch-build_config_BUILDCONFIG.gn b/devel/electron22/files/patch-build_config_BUILDCONFIG.gn deleted file mode 100644 index 30174f1a37a..00000000000 --- a/devel/electron22/files/patch-build_config_BUILDCONFIG.gn +++ /dev/null @@ -1,45 +0,0 @@ ---- build/config/BUILDCONFIG.gn.orig 2023-01-30 07:58:58 UTC -+++ build/config/BUILDCONFIG.gn -@@ -139,7 +139,8 @@ declare_args() { - is_official_build = false - - # Set to true when compiling with the Clang compiler. -- is_clang = current_os != "linux" || -+ is_clang = current_os != "linux" || current_os == "openbsd" || -+ current_os == "freebsd" || - (current_cpu != "s390x" && current_cpu != "s390" && - current_cpu != "ppc64" && current_cpu != "ppc" && - current_cpu != "mips" && current_cpu != "mips64" && -@@ -223,6 +224,10 @@ if (host_toolchain == "") { - host_toolchain = "//build/toolchain/aix:$host_cpu" - } else if (host_os == "zos") { - host_toolchain = "//build/toolchain/zos:$host_cpu" -+ } else if (host_os == "openbsd") { -+ host_toolchain = "//build/toolchain/openbsd:clang_$host_cpu" -+ } else if (host_os == "freebsd") { -+ host_toolchain = "//build/toolchain/freebsd:clang_$host_cpu" - } else { - assert(false, "Unsupported host_os: $host_os") - } -@@ -267,6 +272,8 @@ if (target_os == "android") { - _default_toolchain = "//build/toolchain/aix:$target_cpu" - } else if (target_os == "zos") { - _default_toolchain = "//build/toolchain/zos:$target_cpu" -+} else if (target_os == "openbsd" || target_os == "freebsd") { -+ _default_toolchain = host_toolchain - } else { - assert(false, "Unsupported target_os: $target_os") - } -@@ -301,7 +308,11 @@ is_android = current_os == "android" - is_chromeos = current_os == "chromeos" - is_fuchsia = current_os == "fuchsia" - is_ios = current_os == "ios" --is_linux = current_os == "linux" -+is_linux = current_os == "linux" || current_os == "openbsd" || -+ current_os == "freebsd" -+is_openbsd = current_os == "openbsd" -+is_freebsd = current_os == "freebsd" -+is_bsd = current_os == "openbsd" || current_os == "freebsd" - is_mac = current_os == "mac" - is_nacl = current_os == "nacl" - is_win = current_os == "win" || current_os == "winuwp" diff --git a/devel/electron22/files/patch-build_config_compiler_BUILD.gn b/devel/electron22/files/patch-build_config_compiler_BUILD.gn deleted file mode 100644 index 8d51d073c33..00000000000 --- a/devel/electron22/files/patch-build_config_compiler_BUILD.gn +++ /dev/null @@ -1,122 +0,0 @@ ---- build/config/compiler/BUILD.gn.orig 2022-11-30 08:12:58 UTC -+++ build/config/compiler/BUILD.gn -@@ -219,13 +219,16 @@ config("default_include_dirs") { - # Compiler instrumentation can introduce dependencies in DSOs to symbols in - # the executable they are loaded into, so they are unresolved at link-time. - config("no_unresolved_symbols") { -- if (!using_sanitizer && -+ if (!using_sanitizer && !is_bsd && - (is_linux || is_chromeos || is_android || is_fuchsia)) { - ldflags = [ - "-Wl,-z,defs", - "-Wl,--as-needed", - ] - } -+ if (current_cpu == "x86" && is_openbsd) { -+ ldflags = [ "-Wl,-z,notext" ] -+ } - } - - # compiler --------------------------------------------------------------------- -@@ -449,6 +452,10 @@ config("compiler") { - } - } - -+ if (is_openbsd) { -+ ldflags += [ "-Wl,-z,wxneeded" ] -+ } -+ - # Linux-specific compiler flags setup. - # ------------------------------------ - if (use_gold) { -@@ -524,7 +531,7 @@ config("compiler") { - ldflags += [ "-Wl,-z,keep-text-section-prefix" ] - } - -- if (is_clang && !is_nacl && current_os != "zos") { -+ if (is_clang && !is_nacl && current_os != "zos" && !is_bsd) { - cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] - - # TODO(hans): Remove this once Clang generates better optimized debug info -@@ -924,7 +931,7 @@ config("compiler_cpu_abi") { - ] - } - } else if (current_cpu == "arm") { -- if (is_clang && !is_android && !is_nacl && -+ if (is_clang && !is_android && !is_nacl && !is_bsd && - !(is_chromeos_lacros && is_chromeos_device)) { - cflags += [ "--target=arm-linux-gnueabihf" ] - ldflags += [ "--target=arm-linux-gnueabihf" ] -@@ -939,7 +946,7 @@ config("compiler_cpu_abi") { - cflags += [ "-mtune=$arm_tune" ] - } - } else if (current_cpu == "arm64") { -- if (is_clang && !is_android && !is_nacl && !is_fuchsia && -+ if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd && - !(is_chromeos_lacros && is_chromeos_device)) { - cflags += [ "--target=aarch64-linux-gnu" ] - ldflags += [ "--target=aarch64-linux-gnu" ] -@@ -1277,7 +1284,7 @@ config("compiler_deterministic") { - # different build directory like "out/feature_a" and "out/feature_b" if - # we build same files with same compile flag. - # Other paths are already given in relative, no need to normalize them. -- if (is_nacl) { -+ if (is_nacl || is_bsd) { - # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here. - cflags += [ - "-Xclang", -@@ -1329,7 +1336,7 @@ config("compiler_deterministic") { - } - - config("clang_revision") { -- if (is_clang && clang_base_path == default_clang_base_path) { -+ if (is_clang && !is_bsd && clang_base_path == default_clang_base_path) { - update_args = [ - "--print-revision", - "--verify-version=$clang_version", -@@ -1570,7 +1577,7 @@ config("default_warnings") { - "-Wno-ignored-pragma-optimize", - ] - -- if (!is_nacl) { -+ if (!is_nacl && !is_bsd) { - cflags += [ - # TODO(crbug.com/1343975) Evaluate and possibly enable. - "-Wno-deprecated-builtins", -@@ -1749,7 +1756,7 @@ config("no_chromium_code") { - # third-party libraries. - "-Wno-c++11-narrowing", - ] -- if (!is_nacl) { -+ if (!is_nacl && !is_freebsd) { - cflags += [ - # Disabled for similar reasons as -Wunused-variable. - "-Wno-unused-but-set-variable", -@@ -2271,7 +2278,7 @@ config("afdo_optimize_size") { - # There are some targeted places that AFDO regresses, so we provide a separate - # config to allow AFDO to be disabled per-target. - config("afdo") { -- if (is_clang) { -+ if (is_clang && !is_bsd) { - cflags = [] - if (clang_emit_debug_info_for_profiling) { - # Add the following flags to generate debug info for profiling. -@@ -2287,7 +2294,7 @@ config("afdo") { - cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ] - inputs = [ _clang_sample_profile ] - } -- } else if (auto_profile_path != "" && is_a_target_toolchain) { -+ } else if (auto_profile_path != "" && is_a_target_toolchain && !is_bsd) { - cflags = [ "-fauto-profile=${auto_profile_path}" ] - inputs = [ auto_profile_path ] - } -@@ -2436,7 +2443,8 @@ config("symbols") { - configs += [ "//build/config:compress_debug_sections" ] - } - -- if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") { -+ if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos" && -+ !is_bsd) { - if (is_apple) { - # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. - # Make sure we don't use constructor homing on mac. diff --git a/devel/electron22/files/patch-build_config_linux_BUILD.gn b/devel/electron22/files/patch-build_config_linux_BUILD.gn deleted file mode 100644 index 2e93980f3e5..00000000000 --- a/devel/electron22/files/patch-build_config_linux_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- build/config/linux/BUILD.gn.orig 2022-05-19 14:06:27 UTC -+++ build/config/linux/BUILD.gn -@@ -41,7 +41,7 @@ config("runtime_library") { - } - - if ((!is_chromeos || default_toolchain != "//build/toolchain/cros:target") && -- (!use_custom_libcxx || current_cpu == "mipsel")) { -+ (!use_custom_libcxx || current_cpu == "mipsel") && !is_bsd) { - libs = [ "atomic" ] - } - } diff --git a/devel/electron22/files/patch-build_config_linux_pkg-config.py b/devel/electron22/files/patch-build_config_linux_pkg-config.py deleted file mode 100644 index e48b205448b..00000000000 --- a/devel/electron22/files/patch-build_config_linux_pkg-config.py +++ /dev/null @@ -1,11 +0,0 @@ ---- build/config/linux/pkg-config.py.orig 2022-02-07 13:39:41 UTC -+++ build/config/linux/pkg-config.py -@@ -109,7 +109,7 @@ def main(): - # If this is run on non-Linux platforms, just return nothing and indicate - # success. This allows us to "kind of emulate" a Linux build from other - # platforms. -- if "linux" not in sys.platform: -+ if not sys.platform.startswith(tuple(['linux', 'openbsd', 'freebsd'])): - print("[[],[],[],[],[]]") - return 0 - diff --git a/devel/electron22/files/patch-build_config_ozone.gni b/devel/electron22/files/patch-build_config_ozone.gni deleted file mode 100644 index 739797e1962..00000000000 --- a/devel/electron22/files/patch-build_config_ozone.gni +++ /dev/null @@ -1,19 +0,0 @@ ---- build/config/ozone.gni.orig 2022-08-31 12:19:35 UTC -+++ build/config/ozone.gni -@@ -87,7 +87,15 @@ declare_args() { - } else if (is_chromeos_lacros) { - ozone_platform = "wayland" - ozone_platform_wayland = true -- } else if (is_linux) { -+ } else if (is_linux && !is_bsd) { -+ ozone_platform = "x11" -+ ozone_platform_wayland = true -+ ozone_platform_x11 = true -+ } else if (is_openbsd) { -+ ozone_platform = "x11" -+ ozone_platform_wayland = false -+ ozone_platform_x11 = true -+ } else if (is_freebsd) { - ozone_platform = "x11" - ozone_platform_wayland = true - ozone_platform_x11 = true diff --git a/devel/electron22/files/patch-build_config_rust.gni b/devel/electron22/files/patch-build_config_rust.gni deleted file mode 100644 index 724cec8e074..00000000000 --- a/devel/electron22/files/patch-build_config_rust.gni +++ /dev/null @@ -1,11 +0,0 @@ ---- build/config/rust.gni.orig 2022-06-17 14:20:10 UTC -+++ build/config/rust.gni -@@ -124,7 +124,7 @@ if (enable_rust) { - rust_sysroot = "//third_party/rust-toolchain" - use_unverified_rust_toolchain = false - } else { -- if (host_os != "linux") { -+ if (host_os != "linux" && host_os != "openbsd" && host_os != "freebsd") { - assert(false, - "Attempt to use Android Rust toolchain on an unsupported platform") - } diff --git a/devel/electron22/files/patch-build_config_v8__target__cpu.gni b/devel/electron22/files/patch-build_config_v8__target__cpu.gni deleted file mode 100644 index 40fa8f6348e..00000000000 --- a/devel/electron22/files/patch-build_config_v8__target__cpu.gni +++ /dev/null @@ -1,13 +0,0 @@ ---- build/config/v8_target_cpu.gni.orig 2022-02-07 13:39:41 UTC -+++ build/config/v8_target_cpu.gni -@@ -36,6 +36,10 @@ declare_args() { - if (v8_target_cpu == "") { - if (current_toolchain == "//build/toolchain/linux:clang_x64_v8_arm64") { - v8_target_cpu = "arm64" -+ } else if (current_toolchain == "//build/toolchain/openbsd:clang_arm64") { -+ v8_target_cpu = "arm64" -+ } else if (current_toolchain == "//build/toolchain/freebsd:clang_arm64") { -+ v8_target_cpu = "arm64" - } else if (current_toolchain == "//build/toolchain/linux:clang_x86_v8_arm") { - v8_target_cpu = "arm" - } else if (current_toolchain == diff --git a/devel/electron22/files/patch-build_detect__host__arch.py b/devel/electron22/files/patch-build_detect__host__arch.py deleted file mode 100644 index 9d8ad2c44d2..00000000000 --- a/devel/electron22/files/patch-build_detect__host__arch.py +++ /dev/null @@ -1,11 +0,0 @@ ---- build/detect_host_arch.py.orig 2021-04-14 18:40:48 UTC -+++ build/detect_host_arch.py -@@ -21,6 +21,8 @@ def HostArch(): - host_arch = 'ia32' - elif host_arch in ['x86_64', 'amd64']: - host_arch = 'x64' -+ elif host_arch.startswith('arm64'): -+ host_arch = 'arm64' - elif host_arch.startswith('arm'): - host_arch = 'arm' - elif host_arch.startswith('aarch64'): diff --git a/devel/electron22/files/patch-build_gn__run__binary.py b/devel/electron22/files/patch-build_gn__run__binary.py deleted file mode 100644 index cf65b6532d6..00000000000 --- a/devel/electron22/files/patch-build_gn__run__binary.py +++ /dev/null @@ -1,11 +0,0 @@ ---- build/gn_run_binary.py.orig 2022-02-07 13:39:41 UTC -+++ build/gn_run_binary.py -@@ -24,7 +24,7 @@ if not os.path.isabs(path): - # The rest of the arguments are passed directly to the executable. - args = [path] + sys.argv[2:] - --ret = subprocess.call(args) -+ret = subprocess.call(args, env={"CHROME_EXE_PATH":"${WRKSRC}/out/Release/chrome","LD_LIBRARY_PATH":"${WRKSRC}/out/Release"}) - if ret != 0: - if ret <= -100: - # Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to diff --git a/devel/electron22/files/patch-build_linux_chrome.map b/devel/electron22/files/patch-build_linux_chrome.map deleted file mode 100644 index 992585036b7..00000000000 --- a/devel/electron22/files/patch-build_linux_chrome.map +++ /dev/null @@ -1,13 +0,0 @@ ---- build/linux/chrome.map.orig 2022-02-28 16:54:41 UTC -+++ build/linux/chrome.map -@@ -20,6 +20,10 @@ global: - # Program entry point. - _start; - -+ # FreeBSD specific variables. -+ __progname; -+ environ; -+ - # Memory allocation symbols. We want chrome and any libraries to - # share the same heap, so it is correct to export these symbols. - aligned_alloc; diff --git a/devel/electron22/files/patch-build_linux_strip__binary.py b/devel/electron22/files/patch-build_linux_strip__binary.py deleted file mode 100644 index 9dd3c051630..00000000000 --- a/devel/electron22/files/patch-build_linux_strip__binary.py +++ /dev/null @@ -1,10 +0,0 @@ ---- build/linux/strip_binary.py.orig 2022-02-07 13:39:41 UTC -+++ build/linux/strip_binary.py -@@ -10,6 +10,7 @@ import sys - - - def main(): -+ return 0 - argparser = argparse.ArgumentParser(description='eu-strip binary.') - - argparser.add_argument('--eu-strip-binary-path', help='eu-strip path.') diff --git a/devel/electron22/files/patch-build_linux_unbundle_icu.gn b/devel/electron22/files/patch-build_linux_unbundle_icu.gn deleted file mode 100644 index 88780c5460f..00000000000 --- a/devel/electron22/files/patch-build_linux_unbundle_icu.gn +++ /dev/null @@ -1,18 +0,0 @@ ---- build/linux/unbundle/icu.gn.orig 2023-02-05 22:30:04 UTC -+++ build/linux/unbundle/icu.gn -@@ -17,6 +17,15 @@ config("icu_config") { - "USING_SYSTEM_ICU=1", - "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC", - -+ # As of icu 73 C++ nullptr, char16_t, override, final and noexcept are used -+ # instead of defines. These definitions can be removed when the bundled icu -+ # gets updated to 73. For more details, see: -+ # https://unicode-org.atlassian.net/browse/ICU-21833 and -+ # https://github.com/unicode-org/icu/commit/28643799377ecf654564f6f31854b02788cebe33 -+ "U_FINAL=final", -+ "U_NOEXCEPT=noexcept", -+ "U_OVERRIDE=override", -+ - # U_EXPORT (defined in unicode/platform.h) is used to set public visibility - # on classes through the U_COMMON_API and U_I18N_API macros (among others). - # When linking against the system ICU library, we want its symbols to have diff --git a/devel/electron22/files/patch-build_linux_unbundle_libevent.gn b/devel/electron22/files/patch-build_linux_unbundle_libevent.gn deleted file mode 100644 index d5f276de574..00000000000 --- a/devel/electron22/files/patch-build_linux_unbundle_libevent.gn +++ /dev/null @@ -1,15 +0,0 @@ ---- build/linux/unbundle/libevent.gn.orig 2022-05-28 07:21:18 UTC -+++ build/linux/unbundle/libevent.gn -@@ -9,7 +9,12 @@ shim_headers("libevent_shim") { - headers = [ "event.h" ] - } - -+config("system_libevent") { -+ defines = [ "USE_SYSTEM_LIBEVENT=1" ] -+} -+ - source_set("libevent") { - deps = [ ":libevent_shim" ] - libs = [ "event" ] -+ public_configs = [ ":system_libevent" ] - } diff --git a/devel/electron22/files/patch-build_linux_unbundle_libusb.gn b/devel/electron22/files/patch-build_linux_unbundle_libusb.gn deleted file mode 100644 index db96d613cad..00000000000 --- a/devel/electron22/files/patch-build_linux_unbundle_libusb.gn +++ /dev/null @@ -1,27 +0,0 @@ ---- build/linux/unbundle/libusb.gn.orig 2021-04-15 08:12:30 UTC -+++ build/linux/unbundle/libusb.gn -@@ -0,0 +1,24 @@ -+# Copyright 2016 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/linux/pkg_config.gni") -+import("//build/shim_headers.gni") -+ -+pkg_config("system_libusb") { -+ packages = [ "libusb-1.0" ] -+} -+ -+shim_headers("libusb_shim") { -+ root_path = "src/libusb" -+ headers = [ -+ "libusb.h", -+ ] -+} -+ -+source_set("libusb") { -+ deps = [ -+ ":libusb_shim", -+ ] -+ public_configs = [ ":system_libusb" ] -+} diff --git a/devel/electron22/files/patch-build_linux_unbundle_replace__gn__files.py b/devel/electron22/files/patch-build_linux_unbundle_replace__gn__files.py deleted file mode 100644 index 9aa5e6df3c7..00000000000 --- a/devel/electron22/files/patch-build_linux_unbundle_replace__gn__files.py +++ /dev/null @@ -1,10 +0,0 @@ ---- build/linux/unbundle/replace_gn_files.py.orig 2022-11-30 08:12:58 UTC -+++ build/linux/unbundle/replace_gn_files.py -@@ -53,6 +53,7 @@ REPLACEMENTS = { - 'libjpeg': 'third_party/libjpeg.gni', - 'libjxl' : 'third_party/libjxl/BUILD.gn', - 'libpng': 'third_party/libpng/BUILD.gn', -+ 'libusb': 'third_party/libusb/BUILD.gn', - 'libvpx': 'third_party/libvpx/BUILD.gn', - 'libwebp': 'third_party/libwebp/BUILD.gn', - 'libxml': 'third_party/libxml/BUILD.gn', diff --git a/devel/electron22/files/patch-build_toolchain_freebsd_BUILD.gn b/devel/electron22/files/patch-build_toolchain_freebsd_BUILD.gn deleted file mode 100644 index 7857149615a..00000000000 --- a/devel/electron22/files/patch-build_toolchain_freebsd_BUILD.gn +++ /dev/null @@ -1,69 +0,0 @@ ---- build/toolchain/freebsd/BUILD.gn.orig 2022-02-07 13:39:41 UTC -+++ build/toolchain/freebsd/BUILD.gn -@@ -0,0 +1,66 @@ -+# 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_x86") { -+ toolchain_args = { -+ current_cpu = "x86" -+ current_os = "freebsd" -+ } -+} -+ -+gcc_toolchain("x86") { -+ cc = "gcc" -+ cxx = "g++" -+ -+ readelf = "readelf" -+ nm = "nm" -+ ar = "ar" -+ ld = cxx -+ -+ toolchain_args = { -+ current_cpu = "x86" -+ current_os = "freebsd" -+ is_clang = false -+ } -+} -+ -+clang_toolchain("clang_x64") { -+ toolchain_args = { -+ current_cpu = "x64" -+ current_os = "freebsd" -+ } -+} -+ -+gcc_toolchain("x64") { -+ cc = "gcc" -+ cxx = "g++" -+ -+ readelf = "readelf" -+ nm = "nm" -+ ar = "ar" -+ ld = cxx -+ -+ toolchain_args = { -+ current_cpu = "x64" -+ current_os = "freebsd" -+ is_clang = false -+ } -+} -+ -+clang_toolchain("clang_arm") { -+ toolchain_args = { -+ current_cpu = "arm64" -+ current_os = "freebsd" -+ } -+} -+ -+clang_toolchain("clang_arm64") { -+ toolchain_args = { -+ current_cpu = "arm64" -+ current_os = "freebsd" -+ } -+} diff --git a/devel/electron22/files/patch-build_toolchain_gcc__solink__wrapper.py b/devel/electron22/files/patch-build_toolchain_gcc__solink__wrapper.py deleted file mode 100644 index 34debf134be..00000000000 --- a/devel/electron22/files/patch-build_toolchain_gcc__solink__wrapper.py +++ /dev/null @@ -1,11 +0,0 @@ ---- build/toolchain/gcc_solink_wrapper.py.orig 2022-02-07 13:39:41 UTC -+++ build/toolchain/gcc_solink_wrapper.py -@@ -39,7 +39,7 @@ def CollectDynSym(args): - """Replaces: nm --format=posix -g -D -p $sofile | cut -f1-2 -d' '""" - toc = '' - nm = subprocess.Popen(wrapper_utils.CommandToRun( -- [args.nm, '--format=posix', '-g', '-D', '-p', args.sofile]), -+ [args.nm, '-g', '-D', '-p', args.sofile]), - stdout=subprocess.PIPE, - bufsize=-1, - universal_newlines=True) diff --git a/devel/electron22/files/patch-build_toolchain_gcc__toolchain.gni b/devel/electron22/files/patch-build_toolchain_gcc__toolchain.gni deleted file mode 100644 index 7ac958f7bae..00000000000 --- a/devel/electron22/files/patch-build_toolchain_gcc__toolchain.gni +++ /dev/null @@ -1,44 +0,0 @@ ---- build/toolchain/gcc_toolchain.gni.orig 2022-08-31 12:19:35 UTC -+++ build/toolchain/gcc_toolchain.gni -@@ -53,6 +53,13 @@ if (enable_resource_allowlist_generation) { - "enable_resource_allowlist_generation=true does not work for target_os=$target_os") - } - -+declare_args() { -+ extra_cflags = "" -+ extra_cppflags = "" -+ extra_cxxflags = "" -+ extra_ldflags = "" -+} -+ - # This template defines a toolchain for something that works like gcc - # (including clang). - # -@@ -786,22 +793,12 @@ template("gcc_toolchain") { - # use_gold too. - template("clang_toolchain") { - gcc_toolchain(target_name) { -- _path = "$clang_base_path/bin" -- _is_path_absolute = get_path_info(_path, "abspath") == _path -- -- # Preserve absolute paths for tools like distcc. -- if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) { -- prefix = _path -- } else { -- prefix = rebase_path(_path, root_build_dir) -- } -- -- cc = "${prefix}/clang" -- cxx = "${prefix}/clang++" -+ cc = "cc" -+ cxx = "c++" - ld = cxx -- readelf = "${prefix}/llvm-readelf" -- ar = "${prefix}/llvm-ar" -- nm = "${prefix}/llvm-nm" -+ readelf = "readelf" -+ ar = "ar" -+ nm = "nm" - - forward_variables_from(invoker, - [ diff --git a/devel/electron22/files/patch-build_toolchain_openbsd_BUILD.gn b/devel/electron22/files/patch-build_toolchain_openbsd_BUILD.gn deleted file mode 100644 index 04e6f6b416e..00000000000 --- a/devel/electron22/files/patch-build_toolchain_openbsd_BUILD.gn +++ /dev/null @@ -1,69 +0,0 @@ ---- build/toolchain/openbsd/BUILD.gn.orig 2022-02-07 13:39:41 UTC -+++ build/toolchain/openbsd/BUILD.gn -@@ -0,0 +1,66 @@ -+# 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_x86") { -+ toolchain_args = { -+ current_cpu = "x86" -+ current_os = "openbsd" -+ } -+} -+ -+gcc_toolchain("x86") { -+ cc = "gcc" -+ cxx = "g++" -+ -+ readelf = "readelf" -+ nm = "nm" -+ ar = "ar" -+ ld = cxx -+ -+ toolchain_args = { -+ current_cpu = "x86" -+ current_os = "openbsd" -+ is_clang = false -+ } -+} -+ -+clang_toolchain("clang_x64") { -+ toolchain_args = { -+ current_cpu = "x64" -+ current_os = "openbsd" -+ } -+} -+ -+gcc_toolchain("x64") { -+ cc = "gcc" -+ cxx = "g++" -+ -+ readelf = "readelf" -+ nm = "nm" -+ ar = "ar" -+ ld = cxx -+ -+ toolchain_args = { -+ current_cpu = "x64" -+ current_os = "openbsd" -+ is_clang = false -+ } -+} -+ -+clang_toolchain("clang_arm") { -+ toolchain_args = { -+ current_cpu = "arm64" -+ current_os = "openbsd" -+ } -+} -+ -+clang_toolchain("clang_arm64") { -+ toolchain_args = { -+ current_cpu = "arm64" -+ current_os = "openbsd" -+ } -+} diff --git a/devel/electron22/files/patch-cc_BUILD.gn b/devel/electron22/files/patch-cc_BUILD.gn deleted file mode 100644 index 191d5bb8cc4..00000000000 --- a/devel/electron22/files/patch-cc_BUILD.gn +++ /dev/null @@ -1,19 +0,0 @@ ---- cc/BUILD.gn.orig 2022-11-30 08:12:58 UTC -+++ cc/BUILD.gn -@@ -666,7 +666,7 @@ cc_test_static_library("test_support") { - if (enable_vulkan) { - deps += [ "//gpu/vulkan/init" ] - } -- if (!is_android) { -+ if (!is_android && !is_bsd) { - data_deps = [ "//third_party/mesa_headers" ] - } - } -@@ -894,7 +894,6 @@ cc_test("cc_unittests") { - data = [ "//components/viz/test/data/" ] - data_deps = [ - "//testing/buildbot/filters:cc_unittests_filters", -- "//third_party/mesa_headers", - ] - - if (is_android && enable_chrome_android_internal) { diff --git a/devel/electron22/files/patch-chrome_app_app__management__strings.grdp b/devel/electron22/files/patch-chrome_app_app__management__strings.grdp deleted file mode 100644 index 951439da521..00000000000 --- a/devel/electron22/files/patch-chrome_app_app__management__strings.grdp +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/app/app_management_strings.grdp.orig 2022-07-22 17:30:31 UTC -+++ chrome/app/app_management_strings.grdp -@@ -173,7 +173,7 @@ - You can open and edit supported files with this app from Finder or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. - - -- -+ - - You can open and edit supported files with this app from your file browser or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. - diff --git a/devel/electron22/files/patch-chrome_app_chrome__command__ids.h b/devel/electron22/files/patch-chrome_app_chrome__command__ids.h deleted file mode 100644 index e5fe7eacffe..00000000000 --- a/devel/electron22/files/patch-chrome_app_chrome__command__ids.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/app/chrome_command_ids.h.orig 2022-06-17 14:20:10 UTC -+++ chrome/app/chrome_command_ids.h -@@ -67,7 +67,7 @@ - #define IDC_NAME_WINDOW 34049 - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - #define IDC_USE_SYSTEM_TITLE_BAR 34051 - #define IDC_RESTORE_WINDOW 34052 - #endif diff --git a/devel/electron22/files/patch-chrome_app_chrome__main.cc b/devel/electron22/files/patch-chrome_app_chrome__main.cc deleted file mode 100644 index b9058a38e3e..00000000000 --- a/devel/electron22/files/patch-chrome_app_chrome__main.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/app/chrome_main.cc.orig 2022-08-31 12:19:35 UTC -+++ chrome/app/chrome_main.cc -@@ -26,7 +26,7 @@ - #include "chrome/app/notification_metrics.h" - #endif - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "base/base_switches.h" - #endif - -@@ -152,7 +152,7 @@ int ChromeMain(int argc, const char** argv) { - headless::SetUpCommandLine(command_line); - } else { - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - if (command_line->HasSwitch(switches::kHeadless)) { - #if BUILDFLAG(GOOGLE_CHROME_BRANDING) - command_line->AppendSwitch(::headless::switches::kEnableCrashReporter); diff --git a/devel/electron22/files/patch-chrome_app_chrome__main__delegate.cc b/devel/electron22/files/patch-chrome_app_chrome__main__delegate.cc deleted file mode 100644 index 02d6971435e..00000000000 --- a/devel/electron22/files/patch-chrome_app_chrome__main__delegate.cc +++ /dev/null @@ -1,121 +0,0 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/app/chrome_main_delegate.cc -@@ -135,7 +135,7 @@ - #include "components/about_ui/credit_utils.h" - #endif - --#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) - #include "components/nacl/common/nacl_paths.h" - #include "components/nacl/zygote/nacl_fork_delegate_linux.h" - #endif -@@ -179,16 +179,16 @@ - #include "v8/include/v8.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "base/environment.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - #include "base/message_loop/message_pump_libevent.h" - #endif - - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "chrome/browser/policy/policy_path_parser.h" - #include "components/crash/core/app/crashpad.h" - #endif -@@ -344,7 +344,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty - // and resources loaded. - bool SubprocessNeedsResourceBundle(const std::string& process_type) { - return --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // The zygote process opens the resources for the renderers. - process_type == switches::kZygoteProcess || - #endif -@@ -429,7 +429,7 @@ bool HandleVersionSwitches(const base::CommandLine& co - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - // Show the man page if --help or -h is on the command line. - void HandleHelpSwitches(const base::CommandLine& command_line) { - if (command_line.HasSwitch(switches::kHelp) || -@@ -518,7 +518,7 @@ void InitializeUserDataDir(base::CommandLine* command_ - std::string process_type = - command_line->GetSwitchValueASCII(switches::kProcessType); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // On Linux, Chrome does not support running multiple copies under different - // DISPLAYs, so the profile directory can be specified in the environment to - // support the virtual desktop use-case. -@@ -601,7 +601,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat - #endif - - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Record the startup process creation time on supported platforms. On Android - // this is recorded in ChromeMainDelegateAndroid. - startup_metric_utils::RecordStartupProcessCreationTime( -@@ -848,6 +848,8 @@ void ChromeMainDelegate::CommonEarlyInitialization() { - // not always enabled on ChromeOS. - #if BUILDFLAG(IS_CHROMEOS) - bool enable_gwp_asan = crash_reporter::IsCrashpadEnabled(); -+#elif BUILDFLAG(IS_BSD) -+ bool enable_gwp_asan = false; - #else - bool enable_gwp_asan = true; - #endif -@@ -908,7 +910,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { - base::internal::TimerBase::InitializeFeatures(); - base::InitializeCpuReductionExperiment(); - base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures(); --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - base::MessagePumpLibevent::InitializeFeatures(); - #elif BUILDFLAG(IS_MAC) - base::PlatformThread::InitFeaturesPostFieldTrial(); -@@ -1017,7 +1019,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag - // switch of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - // This will directly exit if the user asked for help. - HandleHelpSwitches(command_line); - #endif -@@ -1047,7 +1049,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo - #if BUILDFLAG(IS_CHROMEOS) - chromeos::dbus_paths::RegisterPathProvider(); - #endif --#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) - nacl::RegisterPathProvider(); - #endif - -@@ -1437,7 +1439,7 @@ void ChromeMainDelegate::PreSandboxStartup() { - CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; - } - --#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) - // Zygote needs to call InitCrashReporter() in RunZygote(). - if (process_type != switches::kZygoteProcess) { - if (command_line.HasSwitch(switches::kPreCrashpadCrashTest)) { -@@ -1517,7 +1519,7 @@ absl::variant Chrome - - // This entry is not needed on Linux, where the NaCl loader - // process is launched via nacl_helper instead. --#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) - {switches::kNaClLoaderProcess, NaClMain}, - #else - {"", nullptr}, // To avoid constant array of size 0 diff --git a/devel/electron22/files/patch-chrome_app_chromium__strings.grd b/devel/electron22/files/patch-chrome_app_chromium__strings.grd deleted file mode 100644 index fb42efb1aea..00000000000 --- a/devel/electron22/files/patch-chrome_app_chromium__strings.grd +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/app/chromium_strings.grd.orig 2022-11-30 08:12:58 UTC -+++ chrome/app/chromium_strings.grd -@@ -296,7 +296,7 @@ If you update this file, be sure also to update google - Welcome to Chromium; new browser window opened - - -- -+ - - Welcome to Chromium - -@@ -425,7 +425,7 @@ If you update this file, be sure also to update google - To get future Chromium updates, you'll need Windows 10 or later. This computer is using Windows 8.1. - - -- -+ - - Chromium may not function correctly because it is no longer supported on this Linux distribution - diff --git a/devel/electron22/files/patch-chrome_app_generated__resources.grd b/devel/electron22/files/patch-chrome_app_generated__resources.grd deleted file mode 100644 index 845d972c407..00000000000 --- a/devel/electron22/files/patch-chrome_app_generated__resources.grd +++ /dev/null @@ -1,74 +0,0 @@ ---- chrome/app/generated_resources.grd.orig 2022-11-30 08:12:58 UTC -+++ chrome/app/generated_resources.grd -@@ -2,7 +2,7 @@ - - -@@ -3090,7 +3090,7 @@ are declared in tools/grit/grit_rule.gni. - - - -- -+ - - Device Credentials - -@@ -4820,7 +4820,7 @@ are declared in tools/grit/grit_rule.gni. - Read information about your browser, OS, device, installed software, registry values and files - - -- -+ - - Read information about your browser, OS, device, installed software and files - -@@ -5487,7 +5487,7 @@ Keep your key file in a safe place. You will need it t - Old versions of Chrome Apps won't open on Windows devices after December 2022. Contact your administrator to update to a new version or remove this app. - - -- -+ - - Old versions of Chrome Apps won't open on Linux devices after December 2022. Contact your administrator to update to a new version or remove this app. - -@@ -5515,7 +5515,7 @@ Keep your key file in a safe place. You will need it t - Old versions of Chrome apps won't open on Windows devices after December 2022. You can check if there's a new version available. - - -- -+ - - Old versions of Chrome apps won't open on Linux devices after December 2022. You can check if there's a new version available. - -@@ -9106,7 +9106,7 @@ Check your passwords anytime in -+ - - Use system title bar and borders - -@@ -10404,7 +10404,7 @@ Please help our engineers fix this problem. Tell us wh - Set as default - - -- -+ - - Minimize - -@@ -12500,7 +12500,7 @@ Please help our engineers fix this problem. Tell us wh - Open Anyway - - -- -+ - - System Signals Utilities - diff --git a/devel/electron22/files/patch-chrome_app_google__chrome__strings.grd b/devel/electron22/files/patch-chrome_app_google__chrome__strings.grd deleted file mode 100644 index d87739da852..00000000000 --- a/devel/electron22/files/patch-chrome_app_google__chrome__strings.grd +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/app/google_chrome_strings.grd.orig 2022-11-30 08:12:58 UTC -+++ chrome/app/google_chrome_strings.grd -@@ -301,7 +301,7 @@ chromium_strings.grd. --> - Welcome to Chrome; new browser window opened - - -- -+ - - Welcome to Google Chrome - -@@ -453,7 +453,7 @@ chromium_strings.grd. --> - To get future Google Chrome updates, you'll need Windows 10 or later. This computer is using Windows 8.1. - - -- -+ - - Google Chrome may not function correctly because it is no longer supported on this Linux distribution - diff --git a/devel/electron22/files/patch-chrome_app_profiles__strings.grdp b/devel/electron22/files/patch-chrome_app_profiles__strings.grdp deleted file mode 100644 index cf95a34a489..00000000000 --- a/devel/electron22/files/patch-chrome_app_profiles__strings.grdp +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/app/profiles_strings.grdp.orig 2022-02-07 13:39:41 UTC -+++ chrome/app/profiles_strings.grdp -@@ -66,7 +66,7 @@ - Add Profile... - - -- -+ - - Add profile... - diff --git a/devel/electron22/files/patch-chrome_app_settings__strings.grdp b/devel/electron22/files/patch-chrome_app_settings__strings.grdp deleted file mode 100644 index e2debe6e3cb..00000000000 --- a/devel/electron22/files/patch-chrome_app_settings__strings.grdp +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/app/settings_strings.grdp.orig 2022-11-30 08:12:58 UTC -+++ chrome/app/settings_strings.grdp -@@ -142,7 +142,7 @@ - Theme - - -- -+ - - GTK - -@@ -162,7 +162,7 @@ - Use Classic - - -- -+ - - Reset to default - diff --git a/devel/electron22/files/patch-chrome_app_theme_chrome__unscaled__resources.grd b/devel/electron22/files/patch-chrome_app_theme_chrome__unscaled__resources.grd deleted file mode 100644 index 6d213a978d9..00000000000 --- a/devel/electron22/files/patch-chrome_app_theme_chrome__unscaled__resources.grd +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/app/theme/chrome_unscaled_resources.grd.orig 2022-10-24 13:33:33 UTC -+++ chrome/app/theme/chrome_unscaled_resources.grd -@@ -19,7 +19,7 @@ - - - -- -+ - - - -@@ -36,7 +36,7 @@ - - - -- -+ - - - -@@ -78,7 +78,7 @@ - - - -- -+ - - - diff --git a/devel/electron22/files/patch-chrome_app_theme_theme__resources.grd b/devel/electron22/files/patch-chrome_app_theme_theme__resources.grd deleted file mode 100644 index 903d659849e..00000000000 --- a/devel/electron22/files/patch-chrome_app_theme_theme__resources.grd +++ /dev/null @@ -1,47 +0,0 @@ ---- chrome/app/theme/theme_resources.grd.orig 2022-11-30 08:12:58 UTC -+++ chrome/app/theme/theme_resources.grd -@@ -135,7 +135,7 @@ - - - -- -+ - - - -@@ -152,7 +152,7 @@ - - - -- -+ - - - -@@ -176,7 +176,7 @@ - - - -- -+ - - - -@@ -186,7 +186,7 @@ - - - -- -+ - - - -@@ -195,7 +195,7 @@ - - - -- -+ - - - diff --git a/devel/electron22/files/patch-chrome_browser_about__flags.cc b/devel/electron22/files/patch-chrome_browser_about__flags.cc deleted file mode 100644 index eecfc181098..00000000000 --- a/devel/electron22/files/patch-chrome_browser_about__flags.cc +++ /dev/null @@ -1,128 +0,0 @@ ---- chrome/browser/about_flags.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/about_flags.cc -@@ -215,7 +215,7 @@ - #include "ui/native_theme/native_theme_features.h" - #include "ui/ui_features.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "base/allocator/buildflags.h" - #endif - -@@ -291,7 +291,7 @@ - #include "chrome/browser/supervised_user/supervised_user_features/supervised_user_features.h" // nogncheck - #endif // ENABLE_SUPERVISED_USERS - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - #include "ui/ozone/buildflags.h" - #include "ui/ozone/public/ozone_switches.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -398,7 +398,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap - {"Max 3 Frames", &kDXGIWaitableSwapChain3Frames, 1, nullptr}}; - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const FeatureEntry::Choice kOzonePlatformHintRuntimeChoices[] = { - {flag_descriptions::kOzonePlatformHintChoiceDefault, "", ""}, - {flag_descriptions::kOzonePlatformHintChoiceAuto, -@@ -1322,7 +1322,7 @@ const FeatureEntry::FeatureVariation - }; - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - const FeatureEntry::FeatureParam kOmniboxDocumentProviderServerScoring[] = { - {"DocumentUseServerScore", "true"}, - {"DocumentUseClientScore", "false"}, -@@ -4182,7 +4182,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(base::kOneGroupPerRenderer)}, - #endif // BUILDFLAG(IS_CHROMEOS) - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - { - "enable-accelerated-video-decode", - flag_descriptions::kAcceleratedVideoDecodeName, -@@ -4784,7 +4784,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(features::kWebShare)}, - #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, - flag_descriptions::kOzonePlatformHintDescription, kOsLinux, - MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, -@@ -4803,7 +4803,7 @@ const FeatureEntry kFeatureEntries[] = { - password_manager::features::kForceInitialSyncWhenDecryptionFails)}, - #endif // BUILDFLAG(IS_LINUX) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - {"skip-undecryptable-passwords", - flag_descriptions::kSkipUndecryptablePasswordsName, - flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -5063,7 +5063,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(feed::kDiscoFeedEndpoint)}, - #endif // BUILDFLAG(IS_ANDROID) - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - {"following-feed-sidepanel", flag_descriptions::kFollowingFeedSidepanelName, - flag_descriptions::kFollowingFeedSidepanelDescription, kOsDesktop, - FEATURE_VALUE_TYPE(feed::kWebUiFeed)}, -@@ -5633,7 +5633,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)}, - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - {"omnibox-experimental-keyword-mode", - flag_descriptions::kOmniboxExperimentalKeywordModeName, - flag_descriptions::kOmniboxExperimentalKeywordModeDescription, kOsDesktop, -@@ -6213,7 +6213,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kPointerLockOptionsDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kPointerLockOptions)}, - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - {"enable-async-dns", flag_descriptions::kAsyncDnsName, - flag_descriptions::kAsyncDnsDescription, kOsWin | kOsLinux, - FEATURE_VALUE_TYPE(features::kAsyncDns)}, -@@ -7186,7 +7186,7 @@ const FeatureEntry kFeatureEntries[] = { - #endif // BUILDFLAG(IS_CHROMEOS) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - {"global-media-controls-modern-ui", - flag_descriptions::kGlobalMediaControlsModernUIName, - flag_descriptions::kGlobalMediaControlsModernUIDescription, -@@ -8059,7 +8059,7 @@ const FeatureEntry kFeatureEntries[] = { - #endif - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - {"quick-commands", flag_descriptions::kQuickCommandsName, - flag_descriptions::kQuickCommandsDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kQuickCommands)}, -@@ -8350,7 +8350,7 @@ const FeatureEntry kFeatureEntries[] = { - - #if BUILDFLAG(IS_WIN) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - { - "ui-debug-tools", - flag_descriptions::kUIDebugToolsName, -@@ -8968,7 +8968,7 @@ const FeatureEntry kFeatureEntries[] = { - #endif - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - {"document-picture-in-picture-api", - flag_descriptions::kDocumentPictureInPictureApiName, - flag_descriptions::kDocumentPictureInPictureApiDescription, diff --git a/devel/electron22/files/patch-chrome_browser_after__startup__task__utils.cc b/devel/electron22/files/patch-chrome_browser_after__startup__task__utils.cc deleted file mode 100644 index ef6940d77ab..00000000000 --- a/devel/electron22/files/patch-chrome_browser_after__startup__task__utils.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/after_startup_task_utils.cc.orig 2022-08-31 12:19:35 UTC -+++ chrome/browser/after_startup_task_utils.cc -@@ -107,7 +107,7 @@ void SetBrowserStartupIsComplete() { - TRACE_EVENT0("startup", "SetBrowserStartupIsComplete"); - g_startup_complete_flag.Get().Set(); - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Process::Current().CreationTime() is not available on all platforms. - const base::Time process_creation_time = - base::Process::Current().CreationTime(); diff --git a/devel/electron22/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc b/devel/electron22/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc deleted file mode 100644 index cd6ccf427c2..00000000000 --- a/devel/electron22/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2022-08-31 12:19:35 UTC -+++ chrome/browser/apps/platform_apps/platform_app_launch.cc -@@ -20,7 +20,7 @@ - #include "extensions/common/extension.h" - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #include "chrome/browser/ui/browser.h" - #include "chrome/browser/ui/browser_navigator.h" - #include "chrome/browser/ui/browser_window.h" -@@ -124,7 +124,7 @@ bool OpenExtensionApplicationTab(Profile* profile, con - } - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - bool OpenDeprecatedApplicationPrompt(Profile* profile, - const std::string& app_id) { - if (!extensions::IsExtensionUnsupportedDeprecatedApp(profile, app_id)) diff --git a/devel/electron22/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h b/devel/electron22/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h deleted file mode 100644 index 393b6f62495..00000000000 --- a/devel/electron22/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/apps/platform_apps/platform_app_launch.h -@@ -36,7 +36,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, - // and false otherwise. - bool OpenExtensionApplicationTab(Profile* profile, const std::string& app_id); - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Opens the deprecated Chrome Apps flow if |app_id| refers to a Chrome App and - // Chrome Apps are deprecated on the |profile|. Returns true if that was the - // case, or false otherwise. diff --git a/devel/electron22/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc b/devel/electron22/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc deleted file mode 100644 index bea2cd82878..00000000000 --- a/devel/electron22/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -@@ -90,7 +90,7 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForSch - return metrics::OmniboxInputType::QUERY; - - case ExternalProtocolHandler::UNKNOWN: { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Linux impl of GetApplicationNameForProtocol doesn't distinguish - // between URL schemes with handers and those without. This will - // make the default behaviour be search on Linux. diff --git a/devel/electron22/files/patch-chrome_browser_background_background__mode__manager.cc b/devel/electron22/files/patch-chrome_browser_background_background__mode__manager.cc deleted file mode 100644 index 6f088ee13b1..00000000000 --- a/devel/electron22/files/patch-chrome_browser_background_background__mode__manager.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/background/background_mode_manager.cc.orig 2022-07-22 17:30:31 UTC -+++ chrome/browser/background/background_mode_manager.cc -@@ -894,7 +894,7 @@ gfx::ImageSkia GetStatusTrayIcon() { - return gfx::ImageSkia(); - - return family->CreateExact(size).AsImageSkia(); --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( - IDR_PRODUCT_LOGO_128); - #elif BUILDFLAG(IS_MAC) diff --git a/devel/electron22/files/patch-chrome_browser_background_background__mode__optimizer.cc b/devel/electron22/files/patch-chrome_browser_background_background__mode__optimizer.cc deleted file mode 100644 index 37083840f5b..00000000000 --- a/devel/electron22/files/patch-chrome_browser_background_background__mode__optimizer.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/background/background_mode_optimizer.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/background/background_mode_optimizer.cc -@@ -31,7 +31,7 @@ std::unique_ptr BackgroundMod - switches::kKeepAliveForTest)) - return nullptr; - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (base::FeatureList::IsEnabled(features::kBackgroundModeAllowRestart)) - return base::WrapUnique(new BackgroundModeOptimizer()); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/devel/electron22/files/patch-chrome_browser_browser__features.cc b/devel/electron22/files/patch-chrome_browser_browser__features.cc deleted file mode 100644 index 167ccb912cd..00000000000 --- a/devel/electron22/files/patch-chrome_browser_browser__features.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/browser_features.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/browser_features.cc -@@ -30,7 +30,7 @@ BASE_FEATURE(kColorProviderRedirectionForThemeProvider - // the browser exits. - BASE_FEATURE(kDestroyProfileOnBrowserClose, - "DestroyProfileOnBrowserClose", --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT); - #else - base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/devel/electron22/files/patch-chrome_browser_browser__process__impl.cc b/devel/electron22/files/patch-chrome_browser_browser__process__impl.cc deleted file mode 100644 index 620726935fc..00000000000 --- a/devel/electron22/files/patch-chrome_browser_browser__process__impl.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/browser_process_impl.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/browser_process_impl.cc -@@ -211,7 +211,7 @@ - #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "chrome/browser/error_reporting/chrome_js_error_report_processor.h" // nogncheck - #endif - -@@ -1160,7 +1160,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { - - ApplyMetricsReportingPolicy(); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - ChromeJsErrorReportProcessor::Create(); - #endif - -@@ -1420,7 +1420,7 @@ void BrowserProcessImpl::Unpin() { - // Mac is currently not supported. - // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is - // complete. --#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -+#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) - - bool BrowserProcessImpl::IsRunningInBackground() const { - // Check if browser is in the background. diff --git a/devel/electron22/files/patch-chrome_browser_browser__process__impl.h b/devel/electron22/files/patch-chrome_browser_browser__process__impl.h deleted file mode 100644 index da5c7801d61..00000000000 --- a/devel/electron22/files/patch-chrome_browser_browser__process__impl.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/browser_process_impl.h.orig 2022-09-24 10:57:32 UTC -+++ chrome/browser/browser_process_impl.h -@@ -363,7 +363,7 @@ class BrowserProcessImpl : public BrowserProcess, - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -+#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) - base::RepeatingTimer autoupdate_timer_; - - // Gets called by autoupdate timer to see if browser needs restart and can be diff --git a/devel/electron22/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/devel/electron22/files/patch-chrome_browser_chrome__browser__interface__binders.cc deleted file mode 100644 index 84d9dd4a041..00000000000 --- a/devel/electron22/files/patch-chrome_browser_chrome__browser__interface__binders.cc +++ /dev/null @@ -1,71 +0,0 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/chrome_browser_interface_binders.cc -@@ -114,13 +114,13 @@ - #endif // BUILDFLAG(FULL_SAFE_BROWSING) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - #include "chrome/browser/ui/webui/connectors_internals/connectors_internals.mojom.h" - #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" - #endif - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h" - #include "ui/webui/resources/cr_components/app_management/app_management.mojom.h" - #endif -@@ -190,7 +190,7 @@ - #endif // BUILDFLAG(IS_ANDROID) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "chrome/browser/ui/webui/discards/discards.mojom.h" - #include "chrome/browser/ui/webui/discards/discards_ui.h" - #include "chrome/browser/ui/webui/discards/site_data.mojom.h" -@@ -807,7 +807,7 @@ void PopulateChromeFrameBinders( - #endif // BUILDFLAG(ENABLE_SPEECH_SERVICE) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (!render_frame_host->GetParent()) { - map->Add( - base::BindRepeating(&DraggableRegionsHostImpl::CreateIfAllowed)); -@@ -815,7 +815,7 @@ void PopulateChromeFrameBinders( - #endif - - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) && - !render_frame_host->GetParentOrOuterDocument()) { - // The service binder will reject non-primary main frames, but we still need -@@ -880,14 +880,14 @@ void PopulateChromeWebUIFrameBinders( - SegmentationInternalsUI>(map); - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - RegisterWebUIControllerInterfaceBinder< - connectors_internals::mojom::PageHandler, - enterprise_connectors::ConnectorsInternalsUI>(map); - #endif - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - RegisterWebUIControllerInterfaceBinder< - app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); - #endif -@@ -1271,7 +1271,7 @@ void PopulateChromeWebUIFrameBinders( - #endif // BUILDFLAG(IS_CHROMEOS_ASH) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - RegisterWebUIControllerInterfaceBinder(map); - diff --git a/devel/electron22/files/patch-chrome_browser_chrome__browser__main.cc b/devel/electron22/files/patch-chrome_browser_chrome__browser__main.cc deleted file mode 100644 index b313c3db7fb..00000000000 --- a/devel/electron22/files/patch-chrome_browser_chrome__browser__main.cc +++ /dev/null @@ -1,43 +0,0 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/chrome_browser_main.cc -@@ -239,11 +239,11 @@ - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - #include "chrome/browser/first_run/upgrade_util_linux.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "components/crash/core/app/crashpad.h" - #endif - -@@ -278,7 +278,7 @@ - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" - #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" - #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" -@@ -1048,7 +1048,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { - browser_creator_->AddFirstRunTabs(master_prefs_->new_tabs); - } - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Create directory for user-level Native Messaging manifest files. This - // makes it less likely that the directory will be created by third-party - // software with incorrect owner or permission. See crbug.com/725513 . -@@ -1096,7 +1096,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - metrics::DesktopSessionDurationTracker::Initialize(); - ProfileActivityMetricsRecorder::Initialize(); - TouchModeStatsTracker::Initialize( diff --git a/devel/electron22/files/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc b/devel/electron22/files/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc deleted file mode 100644 index 009b0cbbe1e..00000000000 --- a/devel/electron22/files/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/chrome_browser_main_extra_parts_linux.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/chrome_browser_main_extra_parts_linux.cc -@@ -120,7 +120,7 @@ ChromeBrowserMainExtraPartsLinux::ChromeBrowserMainExt - ChromeBrowserMainExtraPartsLinux::~ChromeBrowserMainExtraPartsLinux() = default; - - void ChromeBrowserMainExtraPartsLinux::PreEarlyInitialization() { --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // On the desktop, we fix the platform name if necessary. - // See https://crbug.com/1246928. - auto* const command_line = base::CommandLine::ForCurrentProcess(); diff --git a/devel/electron22/files/patch-chrome_browser_chrome__browser__main__linux.cc b/devel/electron22/files/patch-chrome_browser_chrome__browser__main__linux.cc deleted file mode 100644 index 4393081b8a6..00000000000 --- a/devel/electron22/files/patch-chrome_browser_chrome__browser__main__linux.cc +++ /dev/null @@ -1,28 +0,0 @@ ---- chrome/browser/chrome_browser_main_linux.cc.orig 2022-06-17 14:20:10 UTC -+++ chrome/browser/chrome_browser_main_linux.cc -@@ -57,13 +57,15 @@ ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLi - } - - void ChromeBrowserMainPartsLinux::PostCreateMainMessageLoop() { --#if BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // No-op: Ash and Lacros Bluetooth DBusManager initialization depend on - // FeatureList, and is done elsewhere. - #endif // BUILDFLAG(IS_CHROMEOS) - - #if !BUILDFLAG(IS_CHROMEOS) -+#if !BUILDFLAG(IS_BSD) - bluez::BluezDBusManager::Initialize(nullptr /* system_bus */); -+#endif - - // Set up crypt config. This needs to be done before anything starts the - // network service, as the raw encryption key needs to be shared with the -@@ -123,7 +125,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { - #endif // defined(USE_DBUS) && !BUILDFLAG(IS_CHROMEOS) - - void ChromeBrowserMainPartsLinux::PostDestroyThreads() { --#if BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // No-op; per PostBrowserStart() comment, this is done elsewhere. - #else - bluez::BluezDBusManager::Shutdown(); diff --git a/devel/electron22/files/patch-chrome_browser_chrome__browser__main__posix.cc b/devel/electron22/files/patch-chrome_browser_chrome__browser__main__posix.cc deleted file mode 100644 index 0c5acc3fd1b..00000000000 --- a/devel/electron22/files/patch-chrome_browser_chrome__browser__main__posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/chrome_browser_main_posix.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/chrome_browser_main_posix.cc -@@ -73,7 +73,7 @@ void ExitHandler::ExitWhenPossibleOnUIThread(int signa - } else { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - switch (signal) { - case SIGINT: - case SIGHUP: diff --git a/devel/electron22/files/patch-chrome_browser_chrome__content__browser__client.cc b/devel/electron22/files/patch-chrome_browser_chrome__content__browser__client.cc deleted file mode 100644 index 4694fd16cb8..00000000000 --- a/devel/electron22/files/patch-chrome_browser_chrome__content__browser__client.cc +++ /dev/null @@ -1,145 +0,0 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/chrome_content_browser_client.cc -@@ -393,7 +393,7 @@ - #include "components/user_manager/user_manager.h" - #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" - #include "storage/browser/file_system/external_mount_points.h" --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - #include "chrome/browser/chrome_browser_main_linux.h" - #elif BUILDFLAG(IS_ANDROID) - #include "base/android/application_status_listener.h" -@@ -478,12 +478,12 @@ - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) - #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "components/crash/core/app/crash_switches.h" - #include "components/crash/core/app/crashpad.h" - #endif -@@ -492,13 +492,13 @@ - #include "components/crash/content/browser/crash_handler_host_linux.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h" - #include "chrome/browser/ui/webui/app_settings/web_app_settings_navigation_throttle.h" - #endif - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || - // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -527,11 +527,11 @@ - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" - #elif defined(USE_OZONE) - #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" -@@ -1537,7 +1537,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo - #elif BUILDFLAG(IS_CHROMEOS_LACROS) - main_parts = std::make_unique( - is_integration_test, &startup_data_); --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - main_parts = std::make_unique( - is_integration_test, &startup_data_); - #elif BUILDFLAG(IS_ANDROID) -@@ -1576,7 +1576,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo - std::make_unique()); - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - main_parts->AddParts( - std::make_unique()); - #else -@@ -1597,7 +1597,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo - main_parts->AddParts(std::make_unique()); - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - main_parts->AddParts(std::make_unique()); - #elif defined(USE_OZONE) - main_parts->AddParts(std::make_unique()); -@@ -1616,7 +1616,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo - - chrome::AddMetricsExtraParts(main_parts.get()); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - main_parts->AddParts( - std::make_unique< - chrome::enterprise_util::ChromeBrowserMainExtraPartsEnterprise>()); -@@ -2395,6 +2395,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin - #elif BUILDFLAG(IS_POSIX) - #if BUILDFLAG(IS_ANDROID) - bool enable_crash_reporter = true; -+#elif BUILDFLAG(IS_BSD) -+ bool enable_crash_reporter = false; - #elif BUILDFLAG(IS_CHROMEOS) - bool enable_crash_reporter = false; - if (crash_reporter::IsCrashpadEnabled()) { -@@ -2759,7 +2761,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin - ThreadProfilerConfiguration::Get()->AppendCommandLineSwitchForChildProcess( - command_line); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - // Opt into a hardened stack canary mitigation if it hasn't already been - // force-disabled. - if (!browser_command_line.HasSwitch(switches::kChangeStackGuardOnFork)) { -@@ -4206,7 +4208,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst - } - } - --#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) - void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( - const base::CommandLine& command_line, - int child_process_id, -@@ -4655,14 +4657,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati - &throttles); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - MaybeAddThrottle( - WebAppSettingsNavigationThrottle::MaybeCreateThrottleFor(handle), - &throttles); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle:: - MaybeCreateThrottleFor(handle), - &throttles); -@@ -4697,7 +4699,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati - handle)); - } - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle:: - MaybeCreateThrottleFor(handle), - &throttles); diff --git a/devel/electron22/files/patch-chrome_browser_chrome__content__browser__client.h b/devel/electron22/files/patch-chrome_browser_chrome__content__browser__client.h deleted file mode 100644 index ff91d139a1c..00000000000 --- a/devel/electron22/files/patch-chrome_browser_chrome__content__browser__client.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/chrome_content_browser_client.h -@@ -439,7 +439,7 @@ class ChromeContentBrowserClient : public content::Con - void OverridePageVisibilityState( - content::RenderFrameHost* render_frame_host, - content::PageVisibilityState* visibility_state) override; --#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) - void GetAdditionalMappedFilesForChildProcess( - const base::CommandLine& command_line, - int child_process_id, diff --git a/devel/electron22/files/patch-chrome_browser_content__settings_chrome__content__settings__utils.cc b/devel/electron22/files/patch-chrome_browser_content__settings_chrome__content__settings__utils.cc deleted file mode 100644 index c879c3ede81..00000000000 --- a/devel/electron22/files/patch-chrome_browser_content__settings_chrome__content__settings__utils.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/content_settings/chrome_content_settings_utils.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/content_settings/chrome_content_settings_utils.cc -@@ -44,7 +44,7 @@ void UpdateLocationBarUiForWebContents(content::WebCon - location_bar->UpdateContentSettingsIcons(); - - // TODO(https://crbug.com/1346734): Enable this on all platforms. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // The document PiP window does not have a location bar, but has some content - // setting views that need to be updated too. - if (browser->is_type_picture_in_picture()) { diff --git a/devel/electron22/files/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc b/devel/electron22/files/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc deleted file mode 100644 index 8b9b9115d38..00000000000 --- a/devel/electron22/files/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc -@@ -69,7 +69,7 @@ void ChromeProtocolHandlerRegistryDelegate::CheckDefau - // If true default protocol handlers will be removed if the OS level - // registration for a protocol is no longer Chrome. - bool ChromeProtocolHandlerRegistryDelegate::ShouldRemoveHandlersNotInOS() { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // We don't do this on Linux as the OS registration there is not reliable, - // and Chrome OS doesn't have any notion of OS registration. - // TODO(benwells): When Linux support is more reliable remove this diff --git a/devel/electron22/files/patch-chrome_browser_defaults.cc b/devel/electron22/files/patch-chrome_browser_defaults.cc deleted file mode 100644 index d03a4357817..00000000000 --- a/devel/electron22/files/patch-chrome_browser_defaults.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/defaults.cc.orig 2022-07-22 17:30:31 UTC -+++ chrome/browser/defaults.cc -@@ -52,7 +52,7 @@ const bool kSyncAutoStarts = true; - const bool kSyncAutoStarts = false; - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const bool kScrollEventChangesTab = true; - #else - const bool kScrollEventChangesTab = false; diff --git a/devel/electron22/files/patch-chrome_browser_dev__ui__browser__resources.grd b/devel/electron22/files/patch-chrome_browser_dev__ui__browser__resources.grd deleted file mode 100644 index a794ac4cb7d..00000000000 --- a/devel/electron22/files/patch-chrome_browser_dev__ui__browser__resources.grd +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/dev_ui_browser_resources.grd.orig 2022-09-24 10:57:32 UTC -+++ chrome/browser/dev_ui_browser_resources.grd -@@ -36,7 +36,7 @@ This file specifies browser resources for developer-fa - - - -- -+ - - - diff --git a/devel/electron22/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc b/devel/electron22/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc deleted file mode 100644 index e5e00061d6a..00000000000 --- a/devel/electron22/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/device_identity/device_oauth2_token_service_factory.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/device_identity/device_oauth2_token_service_factory.cc -@@ -28,7 +28,7 @@ std::unique_ptr CreatePlatform - return std::make_unique( - local_state); - #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \ -- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) - return std::make_unique(local_state); - #else - NOTREACHED(); diff --git a/devel/electron22/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc b/devel/electron22/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc deleted file mode 100644 index 6b9f8c54bad..00000000000 --- a/devel/electron22/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/devtools/devtools_eye_dropper.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/devtools/devtools_eye_dropper.cc -@@ -186,7 +186,7 @@ void DevToolsEyeDropper::UpdateCursor() { - // magnified projection only with centered hotspot. - // Mac Retina requires cursor to be > 120px in order to render smoothly. - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const float kCursorSize = 63; - const float kDiameter = 63; - const float kHotspotOffset = 32; diff --git a/devel/electron22/files/patch-chrome_browser_diagnostics_diagnostics__writer.h b/devel/electron22/files/patch-chrome_browser_diagnostics_diagnostics__writer.h deleted file mode 100644 index 43c1038a824..00000000000 --- a/devel/electron22/files/patch-chrome_browser_diagnostics_diagnostics__writer.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/diagnostics/diagnostics_writer.h.orig 2022-02-07 13:39:41 UTC -+++ chrome/browser/diagnostics/diagnostics_writer.h -@@ -14,6 +14,8 @@ namespace diagnostics { - // Console base class used internally. - class SimpleConsole; - -+#undef MACHINE -+ - class DiagnosticsWriter : public DiagnosticsModel::Observer { - public: - // The type of formatting done by this writer. diff --git a/devel/electron22/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc b/devel/electron22/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc deleted file mode 100644 index 30a004efaf4..00000000000 --- a/devel/electron22/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1551,7 +1551,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe - bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile( - const base::FilePath& path) { - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) { - return !download_prefs_->ShouldOpenPdfInSystemReader(); - } -@@ -1667,7 +1667,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow - content::CheckDownloadAllowedCallback check_download_allowed_cb) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - // Don't download pdf if it is a file URL, as that might cause an infinite - // download loop if Chrome is not the system pdf viewer. - if (url.SchemeIsFile() && download_prefs_->ShouldOpenPdfInSystemReader()) { -@@ -1713,7 +1713,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl - DCHECK(download_item->IsSavePackageDownload()); - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - absl::optional settings = - safe_browsing::DeepScanningRequest::ShouldUploadBinary(download_item); - diff --git a/devel/electron22/files/patch-chrome_browser_download_download__commands.cc b/devel/electron22/files/patch-chrome_browser_download_download__commands.cc deleted file mode 100644 index 64002dd0fec..00000000000 --- a/devel/electron22/files/patch-chrome_browser_download_download__commands.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/download/download_commands.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/download/download_commands.cc -@@ -26,7 +26,7 @@ - #include "ui/base/clipboard/scoped_clipboard_writer.h" - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #include "chrome/browser/ui/browser.h" - #include "chrome/browser/ui/browser_finder.h" - #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" -@@ -167,7 +167,7 @@ void DownloadCommands::ExecuteCommand(Command command) - } - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - - Browser* DownloadCommands::GetBrowser() const { - if (!model_) diff --git a/devel/electron22/files/patch-chrome_browser_download_download__commands.h b/devel/electron22/files/patch-chrome_browser_download_download__commands.h deleted file mode 100644 index 35050c88691..00000000000 --- a/devel/electron22/files/patch-chrome_browser_download_download__commands.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/download/download_commands.h.orig 2022-08-31 12:19:35 UTC -+++ chrome/browser/download/download_commands.h -@@ -55,7 +55,7 @@ class DownloadCommands { - void ExecuteCommand(Command command); - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - bool IsDownloadPdf() const; - bool CanOpenPdfInSystemViewer() const; - Browser* GetBrowser() const; diff --git a/devel/electron22/files/patch-chrome_browser_download_download__file__picker.cc b/devel/electron22/files/patch-chrome_browser_download_download__file__picker.cc deleted file mode 100644 index 6613471e110..00000000000 --- a/devel/electron22/files/patch-chrome_browser_download_download__file__picker.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/download/download_file_picker.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/download/download_file_picker.cc -@@ -16,7 +16,7 @@ - #include "content/public/browser/download_manager.h" - #include "content/public/browser/web_contents.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - #include "chrome/browser/ui/browser_list.h" - #include "chrome/browser/ui/browser_window.h" - #include "ui/aura/window.h" -@@ -85,7 +85,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl - // dialog in Linux (See SelectFileImpl() in select_file_dialog_linux_gtk.cc). - // and windows.Here we make owning_window host to browser current active - // window if it is null. https://crbug.com/1301898 --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - if (!owning_window || !owning_window->GetHost()) { - owning_window = BrowserList::GetInstance() - ->GetLastActive() diff --git a/devel/electron22/files/patch-chrome_browser_download_download__item__model.cc b/devel/electron22/files/patch-chrome_browser_download_download__item__model.cc deleted file mode 100644 index 9014d4024a1..00000000000 --- a/devel/electron22/files/patch-chrome_browser_download_download__item__model.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/download/download_item_model.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/download/download_item_model.cc -@@ -756,7 +756,7 @@ bool DownloadItemModel::IsCommandChecked( - download_crx_util::IsExtensionDownload(*download_); - case DownloadCommands::ALWAYS_OPEN_TYPE: - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (download_commands->CanOpenPdfInSystemViewer()) { - DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile()); - return prefs->ShouldOpenPdfInSystemReader(); -@@ -799,7 +799,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand - base::UmaHistogramBoolean("Download.SetAlwaysOpenTo", !is_checked); - DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile()); - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (download_commands->CanOpenPdfInSystemViewer()) { - prefs->SetShouldOpenPdfInSystemReader(!is_checked); - SetShouldPreferOpeningInBrowser(is_checked); -@@ -1217,7 +1217,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe - return; - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (download_->GetOriginalMimeType() == "application/x-x509-user-cert") { - SetShouldPreferOpeningInBrowser(true); - return; diff --git a/devel/electron22/files/patch-chrome_browser_download_download__prefs.cc b/devel/electron22/files/patch-chrome_browser_download_download__prefs.cc deleted file mode 100644 index cc12bca0a1a..00000000000 --- a/devel/electron22/files/patch-chrome_browser_download_download__prefs.cc +++ /dev/null @@ -1,90 +0,0 @@ ---- chrome/browser/download/download_prefs.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/download/download_prefs.cc -@@ -13,6 +13,7 @@ - #include "base/callback_helpers.h" - #include "base/check.h" - #include "base/cxx17_backports.h" -+#include "base/command_line.h" - #include "base/feature_list.h" - #include "base/files/file_util.h" - #include "base/no_destructor.h" -@@ -61,6 +62,10 @@ - #include "chrome/browser/ui/pdf/adobe_reader_info_win.h" - #endif - -+#if BUILDFLAG(IS_OPENBSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" -+#endif -+ - using content::BrowserContext; - using content::BrowserThread; - using content::DownloadManager; -@@ -71,7 +76,7 @@ namespace { - // Consider downloads 'dangerous' if they go to the home directory on Linux and - // to the desktop on any platform. - bool DownloadPathIsDangerous(const base::FilePath& download_path) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - base::FilePath home_dir = base::GetHomeDir(); - if (download_path == home_dir) { - return true; -@@ -182,7 +187,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi - #endif // BUILDFLAG(IS_CHROMEOS_ASH) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - should_open_pdf_in_system_reader_ = - prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader); - #endif -@@ -302,7 +307,7 @@ void DownloadPrefs::RegisterProfilePrefs( - registry->RegisterTimePref(prefs::kDownloadLastCompleteTime, - /*default_value=*/base::Time()); - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false); - #endif - #if BUILDFLAG(IS_ANDROID) -@@ -475,7 +480,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens - } - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) { - if (should_open_pdf_in_system_reader_ == should_open) - return; -@@ -507,7 +512,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons - - void DownloadPrefs::ResetAutoOpenByUser() { - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - SetShouldOpenPdfInSystemReader(false); - #endif - auto_open_by_user_.clear(); -@@ -538,7 +543,7 @@ void DownloadPrefs::SaveAutoOpenState() { - bool DownloadPrefs::CanPlatformEnableAutoOpenForPdf() const { - #if BUILDFLAG(IS_CHROMEOS) - return false; // There is no UI for auto-open on ChromeOS. --#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -+#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - return ShouldOpenPdfInSystemReader(); - #else - return false; -@@ -662,7 +667,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa - #else - // If the stored download directory is an absolute path, we presume it's - // correct; there's not really much more validation we can do here. -+#if BUILDFLAG(IS_OPENBSD) -+ // If unveil(2) is used, force the file dialog directory to something we -+ // know is available. -+ auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); -+ if (!sandbox->unveil_initialized() && path.IsAbsolute()) -+#else - if (path.IsAbsolute()) -+#endif - return path; - - // When the default download directory is *not* an absolute path, we use the diff --git a/devel/electron22/files/patch-chrome_browser_download_download__prefs.h b/devel/electron22/files/patch-chrome_browser_download_download__prefs.h deleted file mode 100644 index 128fa520622..00000000000 --- a/devel/electron22/files/patch-chrome_browser_download_download__prefs.h +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/download/download_prefs.h.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/download/download_prefs.h -@@ -118,7 +118,7 @@ class DownloadPrefs { - void DisableAutoOpenByUserBasedOnExtension(const base::FilePath& file_name); - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - // Store the user preference to disk. If |should_open| is true, also disable - // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin. - void SetShouldOpenPdfInSystemReader(bool should_open); -@@ -178,7 +178,7 @@ class DownloadPrefs { - std::unique_ptr auto_open_allowed_by_urls_; - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - bool should_open_pdf_in_system_reader_; - #endif - diff --git a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc b/devel/electron22/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc deleted file mode 100644 index c90f36e25b3..00000000000 --- a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc +++ /dev/null @@ -1,16 +0,0 @@ ---- chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc.orig 2022-09-24 10:57:32 UTC -+++ chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc -@@ -142,11 +142,11 @@ AnalysisServiceSettings::AnalysisServiceSettings( - const char* verification_key = kKeyWindowsVerification; - #elif BUILDFLAG(IS_MAC) - const char* verification_key = kKeyMacVerification; --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char* verification_key = kKeyLinuxVerification; - #endif - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const base::Value::Dict& dict = settings_value.GetDict(); - const base::Value::List* signatures = - dict.FindListByDottedPath(verification_key); diff --git a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc b/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc deleted file mode 100644 index 2265e7bf79b..00000000000 --- a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc +++ /dev/null @@ -1,43 +0,0 @@ ---- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc -@@ -11,11 +11,11 @@ - #include "chrome/browser/profiles/profile.h" - #include "components/keyed_service/core/keyed_service.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - #include "chrome/browser/browser_process.h" - #if BUILDFLAG(IS_MAC) - #include "chrome/browser/enterprise/connectors/device_trust/browser/mac_device_trust_connector_service.h" --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/connectors/device_trust/browser/browser_device_trust_connector_service.h" - #endif // BUILDFLAG(IS_MAC) - #include "chrome/browser/policy/chrome_browser_policy_connector.h" -@@ -45,7 +45,7 @@ DeviceTrustConnectorService* DeviceTrustConnectorServi - - bool DeviceTrustConnectorServiceFactory::ServiceIsCreatedWithBrowserContext() - const { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - return IsDeviceTrustConnectorFeatureEnabled(); - #else - return false; -@@ -81,7 +81,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil - - DeviceTrustConnectorService* service = nullptr; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (IsDeviceTrustConnectorFeatureEnabled()) { - auto* key_manager = g_browser_process->browser_policy_connector() - ->chrome_browser_cloud_management_controller() -@@ -89,7 +89,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil - #if BUILDFLAG(IS_MAC) - service = new MacDeviceTrustConnectorService( - key_manager, profile->GetPrefs(), g_browser_process->local_state()); --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - service = new BrowserDeviceTrustConnectorService(key_manager, - profile->GetPrefs()); - #endif // BUILDFLAG(IS_MAC) diff --git a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc b/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc deleted file mode 100644 index 63412c621bd..00000000000 --- a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc -@@ -21,7 +21,7 @@ - #include "components/policy/core/common/management/management_service.h" - #include "content/public/browser/browser_context.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - #include "chrome/browser/browser_process.h" - #include "chrome/browser/enterprise/connectors/device_trust/attestation/desktop/desktop_attestation_service.h" - #include "chrome/browser/policy/chrome_browser_policy_connector.h" diff --git a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc b/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc deleted file mode 100644 index 72a03e4cb33..00000000000 --- a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc -@@ -14,7 +14,7 @@ - - #if BUILDFLAG(IS_WIN) - #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/win_key_rotation_command.h" --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/linux_key_rotation_command.h" - #elif BUILDFLAG(IS_MAC) - #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mac_key_rotation_command.h" -@@ -47,7 +47,7 @@ std::unique_ptr KeyRotationCommand - PrefService* local_prefs) { - #if BUILDFLAG(IS_WIN) - return std::make_unique(); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - return std::make_unique(url_loader_factory); - #elif BUILDFLAG(IS_MAC) - return std::make_unique(url_loader_factory, diff --git a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc b/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc deleted file mode 100644 index 8268b3ffef1..00000000000 --- a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/key_persistence_delegate_factory.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/key_persistence_delegate_factory.cc -@@ -13,7 +13,7 @@ - #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/win_key_persistence_delegate.h" - #elif BUILDFLAG(IS_MAC) - #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/mac_key_persistence_delegate.h" --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/linux_key_persistence_delegate.h" - #endif - -@@ -44,7 +44,7 @@ KeyPersistenceDelegateFactory::CreateKeyPersistenceDel - return std::make_unique(); - #elif BUILDFLAG(IS_MAC) - return std::make_unique(); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - return std::make_unique(); - #else - NOTREACHED(); diff --git a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc b/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc deleted file mode 100644 index 933f77966f2..00000000000 --- a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc -@@ -18,7 +18,7 @@ - #include "chrome/browser/profiles/profile.h" - #include "components/policy/core/common/management/management_service.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - #include "base/check.h" - #include "chrome/browser/enterprise/connectors/device_trust/signals/decorators/browser/browser_signals_decorator.h" - #include "chrome/browser/policy/chrome_browser_policy_connector.h" -@@ -54,7 +54,7 @@ std::unique_ptr CreateSignalsService(P - enterprise_signals::ContextInfoFetcher::CreateInstance( - profile, ConnectorsServiceFactory::GetForBrowserContext(profile)))); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - policy::CloudPolicyStore* store = nullptr; - - // Managed device. diff --git a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc b/devel/electron22/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc deleted file mode 100644 index 17ad5be2852..00000000000 --- a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc +++ /dev/null @@ -1,19 +0,0 @@ ---- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc -@@ -19,14 +19,14 @@ - #include "chrome/common/chrome_paths.h" - #include "components/version_info/version_info.h" - --#if !BUILDFLAG(IS_FUCHSIA) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) - #include "components/crash/core/app/crashpad.h" - #include "third_party/crashpad/crashpad/client/crash_report_database.h" - #endif // !BUILDFLAG(IS_FUCHSIA) - - namespace enterprise_connectors { - --#if !BUILDFLAG(IS_FUCHSIA) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) - namespace { - // key names used when building the dictionary to pass to the real-time - // reporting API diff --git a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h b/devel/electron22/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h deleted file mode 100644 index d4b190de249..00000000000 --- a/devel/electron22/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h -@@ -9,7 +9,7 @@ - #include "chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h" - #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" - --#if !BUILDFLAG(IS_FUCHSIA) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) - #include "third_party/crashpad/crashpad/client/crash_report_database.h" - #endif // !BUILDFLAG(IS_FUCHSIA) - namespace enterprise_connectors { -@@ -27,7 +27,7 @@ class BrowserCrashEventRouter - BrowserCrashEventRouter& operator=(const BrowserCrashEventRouter&) = delete; - ~BrowserCrashEventRouter() override; - --#if !BUILDFLAG(IS_FUCHSIA) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) - void OnCloudReportingLaunched( - enterprise_reporting::ReportScheduler* report_scheduler) override; - void UploadToReportingServer( -@@ -41,7 +41,7 @@ class BrowserCrashEventRouter - nullptr; - raw_ptr controller_ = nullptr; - --#if !BUILDFLAG(IS_FUCHSIA) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) - // ReportCrashes() checks the enterprise policy settings, retrieves crash - // reports from the crashpad local database and sends reports that have not - // been sent to the reporting server. diff --git a/devel/electron22/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc b/devel/electron22/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc deleted file mode 100644 index 255d96a1e28..00000000000 --- a/devel/electron22/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/enterprise/remote_commands/cbcm_remote_commands_factory.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/enterprise/remote_commands/cbcm_remote_commands_factory.cc -@@ -11,7 +11,7 @@ - #include "chrome/browser/profiles/profile_manager.h" - #include "components/policy/core/common/remote_commands/remote_command_job.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/connectors/device_trust/device_trust_features.h" - #include "chrome/browser/enterprise/remote_commands/rotate_attestation_credential_job.h" - #include "chrome/browser/policy/chrome_browser_policy_connector.h" -@@ -31,7 +31,7 @@ CBCMRemoteCommandsFactory::BuildJobForType( - g_browser_process->profile_manager()); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (enterprise_connectors::IsDeviceTrustConnectorFeatureEnabled() && - type == enterprise_management:: - RemoteCommand_Type_BROWSER_ROTATE_ATTESTATION_CREDENTIAL) { diff --git a/devel/electron22/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc b/devel/electron22/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc deleted file mode 100644 index 7474e42d664..00000000000 --- a/devel/electron22/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/enterprise/signals/device_info_fetcher.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/enterprise/signals/device_info_fetcher.cc -@@ -10,7 +10,7 @@ - #include "chrome/browser/enterprise/signals/device_info_fetcher_mac.h" - #elif BUILDFLAG(IS_WIN) - #include "chrome/browser/enterprise/signals/device_info_fetcher_win.h" --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/signals/device_info_fetcher_linux.h" - #endif - -@@ -71,7 +71,7 @@ std::unique_ptr DeviceInfoFetcher:: - return std::make_unique(); - #elif BUILDFLAG(IS_WIN) - return std::make_unique(); --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - return std::make_unique(); - #else - return std::make_unique(); diff --git a/devel/electron22/files/patch-chrome_browser_enterprise_signals_device__info__fetcher__linux.cc b/devel/electron22/files/patch-chrome_browser_enterprise_signals_device__info__fetcher__linux.cc deleted file mode 100644 index 63eec68ffcf..00000000000 --- a/devel/electron22/files/patch-chrome_browser_enterprise_signals_device__info__fetcher__linux.cc +++ /dev/null @@ -1,78 +0,0 @@ ---- chrome/browser/enterprise/signals/device_info_fetcher_linux.cc.orig 2022-02-07 13:39:41 UTC -+++ chrome/browser/enterprise/signals/device_info_fetcher_linux.cc -@@ -4,12 +4,23 @@ - - #include "chrome/browser/enterprise/signals/device_info_fetcher_linux.h" - -+#include "build/build_config.h" -+ - #if defined(USE_GIO) - #include - #endif // defined(USE_GIO) - #include -+#if !defined(OS_BSD) - #include -+#endif - -+#if defined(OS_BSD) -+#include -+#include -+#include -+#include -+#endif -+ - #include - - #include "base/environment.h" -@@ -118,6 +129,7 @@ SettingValue GetScreenlockSecured() { - // Implements the logic from the native host installation script. First find the - // root device identifier, then locate its parent and get its type. - SettingValue GetDiskEncrypted() { -+#if !defined(OS_BSD) - struct stat info; - // First figure out the device identifier. Fail fast if this fails. - if (stat("/", &info) != 0) -@@ -139,11 +151,35 @@ SettingValue GetDiskEncrypted() { - } - return SettingValue::UNKNOWN; - } -+#endif - return SettingValue::DISABLED; - } - - std::vector GetMacAddresses() { - std::vector result; -+#if defined(OS_BSD) -+ struct ifaddrs* ifa = nullptr; -+ -+ if (getifaddrs(&ifa) != 0) -+ return result; -+ -+ struct ifaddrs* interface = ifa; -+ for (; interface != nullptr; interface = interface->ifa_next) { -+ if (interface->ifa_addr == nullptr || -+ interface->ifa_addr->sa_family != AF_LINK) { -+ continue; -+ } -+ struct sockaddr_dl* sdl = -+ reinterpret_cast(interface->ifa_addr); -+ if (!sdl || sdl->sdl_alen != 6) -+ continue; -+ char* link_address = static_cast(LLADDR(sdl)); -+ result.push_back(base::StringPrintf( -+ "%02x:%02x:%02x:%02x:%02x:%02x", link_address[0] & 0xff, -+ link_address[1] & 0xff, link_address[2] & 0xff, link_address[3] & 0xff, -+ link_address[4] & 0xff, link_address[5] & 0xff)); -+ } -+#else - base::DirReaderPosix reader("/sys/class/net"); - if (!reader.IsValid()) - return result; -@@ -166,6 +202,7 @@ std::vector GetMacAddresses() { - &address); - result.push_back(address); - } -+#endif - return result; - } - diff --git a/devel/electron22/files/patch-chrome_browser_extensions_BUILD.gn b/devel/electron22/files/patch-chrome_browser_extensions_BUILD.gn deleted file mode 100644 index 5e119c6db81..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_BUILD.gn +++ /dev/null @@ -1,13 +0,0 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/extensions/BUILD.gn -@@ -1328,6 +1328,10 @@ static_library("extensions") { - deps += [ "//chrome/services/printing/public/mojom" ] - } - -+ if (is_bsd) { -+ sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] -+ } -+ - if (enable_service_discovery) { - sources += [ - "api/mdns/mdns_api.cc", diff --git a/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc b/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc deleted file mode 100644 index 6ddb4b1c7de..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig 2022-07-22 17:30:31 UTC -+++ chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc -@@ -24,7 +24,7 @@ - #include "base/win/registry.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "base/environment.h" - #include "base/nix/xdg_util.h" - #endif -@@ -256,7 +256,7 @@ base::FilePath GetEndpointVerificationDir() { - bool got_path = false; - #if BUILDFLAG(IS_WIN) - got_path = base::PathService::Get(base::DIR_LOCAL_APP_DATA, &path); --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - std::unique_ptr env(base::Environment::Create()); - path = base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar, - base::nix::kDotConfigDir); -@@ -267,7 +267,7 @@ base::FilePath GetEndpointVerificationDir() { - if (!got_path) - return path; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - path = path.AppendASCII("google"); - #else - path = path.AppendASCII("Google"); diff --git a/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc b/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc deleted file mode 100644 index 82dd2b1604b..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc -@@ -8,7 +8,7 @@ - - #include "build/build_config.h" - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - #include - #include diff --git a/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h b/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h deleted file mode 100644 index cd8c6956534..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h.orig 2022-08-31 12:19:35 UTC -+++ chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h -@@ -7,7 +7,7 @@ - - #include "build/build_config.h" - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - #include - diff --git a/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc deleted file mode 100644 index 285de9a9036..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc -@@ -32,7 +32,7 @@ - #include "components/reporting/util/statusor.h" - #endif - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "base/strings/string_util.h" - #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" - #include "chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h" -@@ -149,7 +149,7 @@ api::enterprise_reporting_private::ContextInfo ToConte - return info; - } - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - device_signals::SignalsAggregationRequest CreateAggregationRequest( - const std::string& user_id, -@@ -209,7 +209,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: - - // getPersistentSecret - --#if !BUILDFLAG(IS_LINUX) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) - - EnterpriseReportingPrivateGetPersistentSecretFunction:: - EnterpriseReportingPrivateGetPersistentSecretFunction() = default; -@@ -634,7 +634,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: - } - #endif - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - // getFileSystemInfo - diff --git a/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h b/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h deleted file mode 100644 index bba2bf2f5f3..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h -@@ -19,7 +19,7 @@ - #include "components/reporting/proto/synced/record.pb.h" - #include "components/reporting/proto/synced/record_constants.pb.h" - #include "components/reporting/util/statusor.h" --#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "base/time/time.h" - #include "components/device_signals/core/browser/signals_types.h" - #endif // BUILDFLAG(IS_CHROMEOS) -@@ -55,7 +55,7 @@ class EnterpriseReportingPrivateGetDeviceIdFunction : - ~EnterpriseReportingPrivateGetDeviceIdFunction() override; - }; - --#if !BUILDFLAG(IS_LINUX) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) - - class EnterpriseReportingPrivateGetPersistentSecretFunction - : public ExtensionFunction { -@@ -265,7 +265,7 @@ class EnterpriseReportingPrivateEnqueueRecordFunction - - #endif - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - class EnterpriseReportingPrivateGetFileSystemInfoFunction - : public ExtensionFunction { diff --git a/devel/electron22/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc b/devel/electron22/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc deleted file mode 100644 index 8619d31fb60..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc -@@ -20,6 +20,7 @@ static base::LazyInstancePostTask( - FROM_HERE, -@@ -33,6 +34,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis - base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, - base::BindOnce(&RemovableStorageProvider::PopulateDeviceList), - std::move(callback)); -+#else -+ NOTIMPLEMENTED(); -+#endif - } - - // static diff --git a/devel/electron22/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc b/devel/electron22/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc deleted file mode 100644 index 657717257a2..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc -@@ -82,7 +82,7 @@ bool NativeProcessLauncher::LaunchNativeProcess( - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - // Don't use no_new_privs mode, e.g. in case the host needs to use sudo. - options.allow_new_privs = true; - #endif diff --git a/devel/electron22/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc b/devel/electron22/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc deleted file mode 100644 index dd1ce962892..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -508,7 +508,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall( - } - - void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() { --#if !BUILDFLAG(IS_LINUX) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) - PasswordsPrivateEventRouter* router = - PasswordsPrivateEventRouterFactory::GetForProfile(profile_); - if (router) diff --git a/devel/electron22/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc b/devel/electron22/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc deleted file mode 100644 index 78afcea5e4b..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -190,7 +190,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - (*s_allowlist)[::prefs::kUseCustomChromeFrame] = - settings_api::PrefType::PREF_TYPE_BOOLEAN; - #endif -@@ -202,7 +202,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist - settings_api::PrefType::PREF_TYPE_STRING; - (*s_allowlist)[::prefs::kPolicyThemeColor] = - settings_api::PrefType::PREF_TYPE_NUMBER; --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - (*s_allowlist)[::prefs::kUsesSystemThemeDeprecated] = - settings_api::PrefType::PREF_TYPE_BOOLEAN; - (*s_allowlist)[::prefs::kSystemTheme] = diff --git a/devel/electron22/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc b/devel/electron22/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc deleted file mode 100644 index 643e85fb553..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2022-07-22 17:30:31 UTC -+++ chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc -@@ -29,7 +29,7 @@ - #include "extensions/browser/process_manager.h" - #include "extensions/common/error_utils.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "extensions/common/permissions/permissions_data.h" - #endif - -@@ -38,7 +38,7 @@ namespace { - bool CanEnableAudioDebugRecordingsFromExtension( - const extensions::Extension* extension) { - bool enabled_by_permissions = false; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (extension) { - enabled_by_permissions = - extension->permissions_data()->active_permissions().HasAPIPermission( -@@ -580,7 +580,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi - - ExtensionFunction::ResponseAction - WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Unlike other WebrtcLoggingPrivate functions that take a RequestInfo object, - // this function shouldn't be called by a component extension on behalf of - // some web code. It returns a DirectoryEntry for use directly in the calling diff --git a/devel/electron22/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc b/devel/electron22/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc deleted file mode 100644 index 3d067f932c0..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2022-08-31 12:19:35 UTC -+++ chrome/browser/extensions/browser_context_keyed_service_factories.cc -@@ -53,7 +53,7 @@ - #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" - #include "ppapi/buildflags/buildflags.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h" - #endif - -@@ -122,7 +122,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() - extensions::SettingsPrivateEventRouterFactory::GetInstance(); - extensions::SettingsOverridesAPI::GetFactoryInstance(); - extensions::SidePanelService::GetFactoryInstance(); --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - extensions::SystemIndicatorManagerFactory::GetInstance(); - #endif - extensions::TabGroupsEventRouterFactory::GetInstance(); diff --git a/devel/electron22/files/patch-chrome_browser_extensions_external__provider__impl.cc b/devel/electron22/files/patch-chrome_browser_extensions_external__provider__impl.cc deleted file mode 100644 index feb34df383c..00000000000 --- a/devel/electron22/files/patch-chrome_browser_extensions_external__provider__impl.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/extensions/external_provider_impl.cc.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/extensions/external_provider_impl.cc -@@ -828,7 +828,7 @@ void ExternalProviderImpl::CreateExternalProviders( - if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - provider_list->push_back(std::make_unique( - service, - base::MakeRefCounted( -@@ -856,7 +856,7 @@ void ExternalProviderImpl::CreateExternalProviders( - bundled_extension_creation_flags)); - - // Define a per-user source of external extensions. --#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ -+#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ - BUILDFLAG(CHROMIUM_BRANDING)) - provider_list->push_back(std::make_unique( - service, diff --git a/devel/electron22/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc b/devel/electron22/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc deleted file mode 100644 index 94bdf3571f7..00000000000 --- a/devel/electron22/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -256,7 +256,7 @@ const struct { - {base::DIR_HOME, FILE_PATH_LITERAL("Library/Mobile Documents"), - kDontBlockChildren}, - #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // On Linux also block access to devices via /dev, as well as security - // sensitive data in /sys and /proc. - {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, diff --git a/devel/electron22/files/patch-chrome_browser_first__run_first__run__dialog.h b/devel/electron22/files/patch-chrome_browser_first__run_first__run__dialog.h deleted file mode 100644 index 8f7d4918c91..00000000000 --- a/devel/electron22/files/patch-chrome_browser_first__run_first__run__dialog.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/first_run/first_run_dialog.h.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/first_run/first_run_dialog.h -@@ -12,7 +12,7 @@ - // Hide this function on platforms where the dialog does not exist. - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -+#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) - - namespace first_run { - diff --git a/devel/electron22/files/patch-chrome_browser_first__run_first__run__internal.h b/devel/electron22/files/patch-chrome_browser_first__run_first__run__internal.h deleted file mode 100644 index c20f89819d9..00000000000 --- a/devel/electron22/files/patch-chrome_browser_first__run_first__run__internal.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/first_run/first_run_internal.h.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/first_run/first_run_internal.h -@@ -54,7 +54,7 @@ FirstRunState DetermineFirstRunState(bool has_sentinel - bool force_first_run, - bool no_first_run); - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // For testing, forces the first run dialog to either be shown or not. If not - // called, the decision to show the dialog or not will be made by Chrome based - // on a number of factors (such as install type, whether it's a Chrome-branded diff --git a/devel/electron22/files/patch-chrome_browser_flag__descriptions.cc b/devel/electron22/files/patch-chrome_browser_flag__descriptions.cc deleted file mode 100644 index e7681c0b9f3..00000000000 --- a/devel/electron22/files/patch-chrome_browser_flag__descriptions.cc +++ /dev/null @@ -1,65 +0,0 @@ ---- chrome/browser/flag_descriptions.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/flag_descriptions.cc -@@ -6600,7 +6600,7 @@ const char kSearchWebInSidePanelDescription[] = - // Random platform combinations ----------------------------------------------- - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - const char kQuickCommandsName[] = "Quick Commands"; - const char kQuickCommandsDescription[] = - "Enable a text interface to browser features. Invoke with Ctrl-Space."; -@@ -6609,7 +6609,7 @@ const char kQuickCommandsDescription[] = - // BUILDFLAG(IS_FUCHSIA) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel"; - const char kFollowingFeedSidepanelDescription[] = - "Enables the following feed in the sidepanel."; -@@ -6623,7 +6623,7 @@ const char kWebShareDescription[] = - "platforms."; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) - --#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -+#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) - const char kOzonePlatformHintChoiceDefault[] = "Default"; - const char kOzonePlatformHintChoiceAuto[] = "Auto"; - const char kOzonePlatformHintChoiceX11[] = "X11"; -@@ -6643,7 +6643,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti - "Bluetooth"; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kCleanUndecryptablePasswordsLinuxName[] = - "Cleanup local undecryptable passwords during initial sync flow"; - const char kCleanUndecryptablePasswordsLinuxDescription[] = -@@ -6656,7 +6656,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail - "storage and requests initial sync."; - #endif // BUILDFLAG(IS_LINUX) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - const char kSkipUndecryptablePasswordsName[] = - "Skip undecryptable passwords to use the available decryptable " - "passwords."; -@@ -6665,7 +6665,7 @@ const char kSkipUndecryptablePasswordsDescription[] = - "there are undecryptable ones."; - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kAsyncDnsName[] = "Async DNS resolver"; - const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver."; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -@@ -6770,7 +6770,7 @@ const char kElasticOverscrollDescription[] = - - #if BUILDFLAG(IS_WIN) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - const char kUIDebugToolsName[] = "Debugging tools for UI"; - const char kUIDebugToolsDescription[] = - "Enables additional keyboard shortcuts to help debugging."; diff --git a/devel/electron22/files/patch-chrome_browser_flag__descriptions.h b/devel/electron22/files/patch-chrome_browser_flag__descriptions.h deleted file mode 100644 index e67e921ea87..00000000000 --- a/devel/electron22/files/patch-chrome_browser_flag__descriptions.h +++ /dev/null @@ -1,51 +0,0 @@ ---- chrome/browser/flag_descriptions.h.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/flag_descriptions.h -@@ -3779,7 +3779,7 @@ extern const char kSearchWebInSidePanelDescription[]; - // Random platform combinations ----------------------------------------------- - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - extern const char kQuickCommandsName[]; - extern const char kQuickCommandsDescription[]; - -@@ -3796,7 +3796,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa - extern const char kWebBluetoothConfirmPairingSupportDescription[]; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const char kOzonePlatformHintChoiceDefault[]; - extern const char kOzonePlatformHintChoiceAuto[]; - extern const char kOzonePlatformHintChoiceX11[]; -@@ -3812,18 +3812,18 @@ extern const char kForcePasswordInitialSyncWhenDecrypt - extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; - #endif // BUILDFLAG(IS_LINUX) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - extern const char kSkipUndecryptablePasswordsName[]; - extern const char kSkipUndecryptablePasswordsDescription[]; - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const char kAsyncDnsName[]; - extern const char kAsyncDnsDescription[]; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - extern const char kFollowingFeedSidepanelName[]; - extern const char kFollowingFeedSidepanelDescription[]; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -3900,7 +3900,7 @@ extern const char kElasticOverscrollDescription[]; - - #if BUILDFLAG(IS_WIN) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - extern const char kUIDebugToolsName[]; - extern const char kUIDebugToolsDescription[]; - diff --git a/devel/electron22/files/patch-chrome_browser_headless_headless__mode__util.cc b/devel/electron22/files/patch-chrome_browser_headless_headless__mode__util.cc deleted file mode 100644 index e6827702b02..00000000000 --- a/devel/electron22/files/patch-chrome_browser_headless_headless__mode__util.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/headless/headless_mode_util.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/headless/headless_mode_util.cc -@@ -9,7 +9,7 @@ - // Native headless is currently available on Linux, Windows and Mac platforms. - // More platforms will be added later, so avoid function level clutter by - // providing stub implementations at the end of the file. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - - #include - #include -@@ -17,7 +17,7 @@ - #include "base/base_switches.h" - #include "ui/gfx/switches.h" - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "ui/gl/gl_switches.h" - #include "ui/ozone/public/ozone_switches.h" - #endif // BUILDFLAG(IS_LINUX) -@@ -52,7 +52,7 @@ void SetUpCommandLine(const base::CommandLine* command - base::CommandLine::ForCurrentProcess()->AppendSwitch( - ::switches::kNoErrorDialogs); - } --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Native headless chrome on Linux relies on ozone/headless platform. - base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( - ::switches::kOzonePlatform, switches::kHeadless); diff --git a/devel/electron22/files/patch-chrome_browser_intranet__redirect__detector.h b/devel/electron22/files/patch-chrome_browser_intranet__redirect__detector.h deleted file mode 100644 index cb20abe773a..00000000000 --- a/devel/electron22/files/patch-chrome_browser_intranet__redirect__detector.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/intranet_redirect_detector.h.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/intranet_redirect_detector.h -@@ -27,7 +27,7 @@ class SimpleURLLoader; - class PrefRegistrySimple; - - #if !(BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)) - #error "IntranetRedirectDetector should only be built on Desktop platforms." - #endif - diff --git a/devel/electron22/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc b/devel/electron22/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc deleted file mode 100644 index 1359e252c0e..00000000000 --- a/devel/electron22/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig 2022-02-07 13:39:41 UTC -+++ chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc -@@ -39,10 +39,12 @@ void MTPDeviceMapService::RegisterMTPFileSystem( - // Note that this initializes the delegate asynchronously, but since - // the delegate will only be used from the IO thread, it is guaranteed - // to be created before use of it expects it to be there. -+#if !defined(OS_BSD) - CreateMTPDeviceAsyncDelegate( - device_location, read_only, - base::BindOnce(&MTPDeviceMapService::AddAsyncDelegate, - base::Unretained(this), device_location, read_only)); -+#endif - mtp_device_usage_map_[key] = 0; - } - diff --git a/devel/electron22/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc b/devel/electron22/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc deleted file mode 100644 index 66d669e63ab..00000000000 --- a/devel/electron22/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc +++ /dev/null @@ -1,16 +0,0 @@ ---- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/media_galleries/media_file_system_registry.cc -@@ -585,7 +585,12 @@ class MediaFileSystemRegistry::MediaFileSystemContextI - // Constructor in 'private' section because depends on private class definition. - MediaFileSystemRegistry::MediaFileSystemRegistry() - : file_system_context_(new MediaFileSystemContextImpl) { -- StorageMonitor::GetInstance()->AddObserver(this); -+ /* -+ * This conditional is needed for shutdown. Destructors -+ * try to get the media file system registry. -+ */ -+ if (StorageMonitor::GetInstance()) -+ StorageMonitor::GetInstance()->AddObserver(this); - } - - MediaFileSystemRegistry::~MediaFileSystemRegistry() { diff --git a/devel/electron22/files/patch-chrome_browser_media_audio__service__util.cc b/devel/electron22/files/patch-chrome_browser_media_audio__service__util.cc deleted file mode 100644 index 4713f329eb1..00000000000 --- a/devel/electron22/files/patch-chrome_browser_media_audio__service__util.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/media/audio_service_util.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/media/audio_service_util.cc -@@ -21,7 +21,7 @@ - - namespace { - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) - bool GetPolicyOrFeature(const char* policy_name, const base::Feature& feature) { - const policy::PolicyMap& policies = -@@ -40,7 +40,7 @@ bool GetPolicyOrFeature(const char* policy_name, const - bool IsAudioServiceSandboxEnabled() { - // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being - // built with OS_CHROMEOS instead of OS_LINUX. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) - return GetPolicyOrFeature(policy::key::kAudioSandboxEnabled, - features::kAudioServiceSandbox); diff --git a/devel/electron22/files/patch-chrome_browser_media_router_discovery_BUILD.gn b/devel/electron22/files/patch-chrome_browser_media_router_discovery_BUILD.gn deleted file mode 100644 index ebaf501970b..00000000000 --- a/devel/electron22/files/patch-chrome_browser_media_router_discovery_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/media/router/discovery/BUILD.gn.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/media/router/discovery/BUILD.gn -@@ -80,7 +80,7 @@ static_library("discovery") { - "media_sink_discovery_metrics.h", - ] - -- if (is_linux || is_chromeos) { -+ if ((is_linux || is_chromeos) && !is_bsd) { - sources += [ "discovery_network_list_wifi_linux.cc" ] - } - diff --git a/devel/electron22/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc b/devel/electron22/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc deleted file mode 100644 index 71650219d44..00000000000 --- a/devel/electron22/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc +++ /dev/null @@ -1,48 +0,0 @@ ---- chrome/browser/media/router/discovery/discovery_network_list_posix.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/media/router/discovery/discovery_network_list_posix.cc -@@ -5,11 +5,12 @@ - #include "chrome/browser/media/router/discovery/discovery_network_list.h" - - #include -+#include -+#include -+#include - #include - #include - #include --#include --#include - - #include - -@@ -18,7 +19,7 @@ - #include "chrome/browser/media/router/discovery/discovery_network_list_wifi.h" - #include "net/base/net_errors.h" - --#if !BUILDFLAG(IS_MAC) -+#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) - #include - #else - #include -@@ -27,7 +28,7 @@ - namespace media_router { - namespace { - --#if !BUILDFLAG(IS_MAC) -+#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) - using sll = struct sockaddr_ll; - #define SOCKET_ARP_TYPE(s) ((s)->sll_hatype) - #define SOCKET_ADDRESS_LEN(s) ((s)->sll_halen) -@@ -38,6 +39,12 @@ using sll = struct sockaddr_dl; - #define SOCKET_ARP_TYPE(s) ((s)->sdl_type) - #define SOCKET_ADDRESS_LEN(s) ((s)->sdl_alen) - #define SOCKET_ADDRESS(s) (LLADDR(s)) -+#endif -+ -+#if BUILDFLAG(IS_BSD) -+bool MaybeGetWifiSSID(const std::string& if_name, std::string* ssid_out) { -+ return false; -+} - #endif - - void GetDiscoveryNetworkInfoListImpl( diff --git a/devel/electron22/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc b/devel/electron22/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc deleted file mode 100644 index bf6fc5cf1a6..00000000000 --- a/devel/electron22/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc +++ /dev/null @@ -1,30 +0,0 @@ ---- chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc.orig 2021-04-14 18:40:53 UTC -+++ chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc -@@ -9,7 +9,11 @@ - #include - #include - -+#include "build/build_config.h" -+ -+#if !defined(OS_BSD) - #include -+#endif - - #include "base/check.h" - #include "base/files/scoped_file.h" -@@ -20,6 +24,7 @@ namespace media_router { - bool MaybeGetWifiSSID(const std::string& if_name, std::string* ssid_out) { - DCHECK(ssid_out); - -+#if !defined(OS_BSD) - base::ScopedFD ioctl_socket(socket(AF_INET, SOCK_DGRAM, 0)); - if (!ioctl_socket.is_valid()) { - // AF_INET is for IPv4, so it may fail for IPv6-only hosts even when there -@@ -41,6 +46,7 @@ bool MaybeGetWifiSSID(const std::string& if_name, std: - ssid_out->assign(ssid); - return true; - } -+#endif - return false; - } - diff --git a/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc b/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc deleted file mode 100644 index 5e7159774a6..00000000000 --- a/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/media/webrtc/webrtc_event_log_uploader.cc -@@ -40,7 +40,7 @@ const char kProduct[] = "Chrome"; - const char kProduct[] = "Chrome_Mac"; - #elif BUILDFLAG(IS_CHROMEOS_ASH) - const char kProduct[] = "Chrome_ChromeOS"; --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - const char kProduct[] = "Chrome_Linux"; - #elif BUILDFLAG(IS_ANDROID) - const char kProduct[] = "Chrome_Android"; diff --git a/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc b/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc deleted file mode 100644 index be4c6b83e83..00000000000 --- a/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc +++ /dev/null @@ -1,13 +0,0 @@ ---- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/media/webrtc/webrtc_log_uploader.cc -@@ -362,6 +362,10 @@ void WebRtcLogUploader::SetupMultipart( - const char product[] = "Chrome_ChromeOS"; - #elif BUILDFLAG(IS_FUCHSIA) - const char product[] = "Chrome_Fuchsia"; -+#elif defined(OS_OPENBSD) -+ const char product[] = "Chrome_OpenBSD"; -+#elif defined(OS_FREEBSD) -+ const char product[] = "Chrome_FreeBSD"; - #else - #error Platform not supported. - #endif diff --git a/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc b/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc deleted file mode 100644 index 6d56e2f1ab3..00000000000 --- a/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc +++ /dev/null @@ -1,33 +0,0 @@ ---- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/media/webrtc/webrtc_logging_controller.cc -@@ -24,10 +24,10 @@ - #include "content/public/browser/browser_context.h" - #include "content/public/browser/render_process_host.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "content/public/browser/child_process_security_policy.h" - #include "storage/browser/file_system/isolated_context.h" --#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - - using webrtc_event_logging::WebRtcEventLogManager; - -@@ -281,7 +281,7 @@ void WebRtcLoggingController::StartEventLogging( - web_app_id, callback); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void WebRtcLoggingController::GetLogsDirectory( - LogsDirectoryCallback callback, - LogsDirectoryErrorCallback error_callback) { -@@ -327,7 +327,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess - FROM_HERE, - base::BindOnce(std::move(callback), file_system.id(), registered_name)); - } --#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - - void WebRtcLoggingController::OnRtpPacket( - std::unique_ptr packet_header, diff --git a/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h b/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h deleted file mode 100644 index 1b1c49d92b0..00000000000 --- a/devel/electron22/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/media/webrtc/webrtc_logging_controller.h -@@ -133,7 +133,7 @@ class WebRtcLoggingController - size_t web_app_id, - const StartEventLoggingCallback& callback); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Ensures that the WebRTC Logs directory exists and then grants render - // process access to the 'WebRTC Logs' directory, and invokes |callback| with - // the ids necessary to create a DirectoryEntry object. -@@ -192,7 +192,7 @@ class WebRtcLoggingController - bool success, - const std::string& error_message); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Grants the render process access to the 'WebRTC Logs' directory, and - // invokes |callback| with the ids necessary to create a DirectoryEntry - // object. If the |logs_path| couldn't be created or found, |error_callback| diff --git a/devel/electron22/files/patch-chrome_browser_memory__details.cc b/devel/electron22/files/patch-chrome_browser_memory__details.cc deleted file mode 100644 index 18dd4eaf463..00000000000 --- a/devel/electron22/files/patch-chrome_browser_memory__details.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/memory_details.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/memory_details.cc -@@ -38,7 +38,7 @@ - #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h" - #include "ui/base/l10n/l10n_util.h" - --#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) - #include "content/public/browser/zygote_host/zygote_host_linux.h" - #endif - -@@ -329,7 +329,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() { - std::ref(process))); - } - --#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) - if (content::ZygoteHost::GetInstance()->IsZygotePid(process.pid)) { - process.process_type = content::PROCESS_TYPE_ZYGOTE; - } diff --git a/devel/electron22/files/patch-chrome_browser_memory__details__linux.cc b/devel/electron22/files/patch-chrome_browser_memory__details__linux.cc deleted file mode 100644 index e174124e6c9..00000000000 --- a/devel/electron22/files/patch-chrome_browser_memory__details__linux.cc +++ /dev/null @@ -1,37 +0,0 @@ ---- chrome/browser/memory_details_linux.cc.orig 2022-02-07 13:39:41 UTC -+++ chrome/browser/memory_details_linux.cc -@@ -13,6 +13,7 @@ - #include - - #include "base/bind.h" -+#include "base/command_line.h" - #include "base/files/file_util.h" - #include "base/process/process_iterator.h" - #include "base/process/process_metrics.h" -@@ -27,6 +28,7 @@ - #include "content/public/browser/browser_task_traits.h" - #include "content/public/browser/browser_thread.h" - #include "content/public/common/process_type.h" -+#include "sandbox/policy/switches.h" - #include "ui/base/l10n/l10n_util.h" - - using base::ProcessEntry; -@@ -70,9 +72,18 @@ ProcessData GetProcessDataMemoryInformation( - - std::unique_ptr metrics( - base::ProcessMetrics::CreateProcessMetrics(pid)); -+ -+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); -+ if (!command_line->HasSwitch(sandbox::policy::switches::kNoSandbox)) { -+ pmi.num_open_fds = 0; -+ pmi.open_fds_soft_limit = 0; -+ goto out; -+ } -+ - pmi.num_open_fds = metrics->GetOpenFdCount(); - pmi.open_fds_soft_limit = metrics->GetOpenFdSoftLimit(); - -+out: - process_data.processes.push_back(pmi); - } - return process_data; diff --git a/devel/electron22/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc b/devel/electron22/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc deleted file mode 100644 index e19d6f09e1a..00000000000 --- a/devel/electron22/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc +++ /dev/null @@ -1,23 +0,0 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -61,8 +61,10 @@ - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) -+#if !BUILDFLAG(IS_BSD) - #include -+#endif - - #include "base/linux_util.h" - #include "base/strings/string_split.h" -@@ -494,7 +496,7 @@ void RecordStartupMetrics() { - - // Record whether Chrome is the default browser or not. - // Disabled on Linux due to hanging browser tests, see crbug.com/1216328. --#if !BUILDFLAG(IS_LINUX) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) - shell_integration::DefaultWebClientState default_state = - shell_integration::GetDefaultBrowser(); - base::UmaHistogramEnumeration("DefaultBrowser.State", default_state, diff --git a/devel/electron22/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/devel/electron22/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc deleted file mode 100644 index adda8fe459e..00000000000 --- a/devel/electron22/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc +++ /dev/null @@ -1,47 +0,0 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -176,7 +176,7 @@ - #include "chrome/notification_helper/notification_helper_constants.h" - #endif - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "components/metrics/motherboard_metrics_provider.h" - #endif - -@@ -731,7 +731,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic - metrics_service_->RegisterMetricsProvider( - std::make_unique()); - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - metrics_service_->RegisterMetricsProvider( - std::make_unique()); - #endif -@@ -810,7 +810,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) - metrics_service_->RegisterMetricsProvider( - std::make_unique()); -@@ -908,7 +908,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic - std::make_unique()); - #endif - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - metrics_service_->RegisterMetricsProvider( - metrics::CreateDesktopSessionMetricsProvider()); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) -@@ -1093,7 +1093,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve - #endif - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) - // This creates the DesktopProfileSessionDurationsServices if it didn't exist - // already. diff --git a/devel/electron22/files/patch-chrome_browser_metrics_perf_cpu__identity.cc b/devel/electron22/files/patch-chrome_browser_metrics_perf_cpu__identity.cc deleted file mode 100644 index ace1a4b8f5e..00000000000 --- a/devel/electron22/files/patch-chrome_browser_metrics_perf_cpu__identity.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/metrics/perf/cpu_identity.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/metrics/perf/cpu_identity.cc -@@ -109,7 +109,7 @@ CPUIdentity GetCPUIdentity() { - result.release = - #if BUILDFLAG(IS_CHROMEOS_ASH) - base::SysInfo::KernelVersion(); --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - base::SysInfo::OperatingSystemVersion(); - #else - #error "Unsupported configuration" diff --git a/devel/electron22/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc b/devel/electron22/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc deleted file mode 100644 index 167de82c10f..00000000000 --- a/devel/electron22/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/metrics/power/process_metrics_recorder_util.cc.orig 2022-07-22 17:30:31 UTC -+++ chrome/browser/metrics/power/process_metrics_recorder_util.cc -@@ -59,7 +59,7 @@ void RecordProcessHistograms(const char* histogram_suf - const ProcessMonitor::Metrics& metrics) { - RecordAverageCPUUsage(histogram_suffix, metrics.cpu_usage); - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - base::UmaHistogramCounts10000( - base::StrCat({"PerformanceMonitor.IdleWakeups2.", histogram_suffix}), - metrics.idle_wakeups); diff --git a/devel/electron22/files/patch-chrome_browser_metrics_power_process__monitor.cc b/devel/electron22/files/patch-chrome_browser_metrics_power_process__monitor.cc deleted file mode 100644 index 560fb98cad8..00000000000 --- a/devel/electron22/files/patch-chrome_browser_metrics_power_process__monitor.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/metrics/power/process_monitor.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/metrics/power/process_monitor.cc -@@ -64,7 +64,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet - #endif - - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - metrics.idle_wakeups = process_metrics.GetIdleWakeupsPerSecond(); - #endif - #if BUILDFLAG(IS_MAC) -@@ -81,7 +81,7 @@ void ScaleMetrics(ProcessMonitor::Metrics* metrics, do - metrics->cpu_usage *= factor; - - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - metrics->idle_wakeups *= factor; - #endif - -@@ -168,7 +168,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me - lhs.cpu_usage += rhs.cpu_usage; - - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - lhs.idle_wakeups += rhs.idle_wakeups; - #endif - diff --git a/devel/electron22/files/patch-chrome_browser_metrics_power_process__monitor.h b/devel/electron22/files/patch-chrome_browser_metrics_power_process__monitor.h deleted file mode 100644 index 16db05f3bd3..00000000000 --- a/devel/electron22/files/patch-chrome_browser_metrics_power_process__monitor.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/metrics/power/process_monitor.h.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/metrics/power/process_monitor.h -@@ -75,7 +75,7 @@ class ProcessMonitor : public content::BrowserChildPro - double cpu_usage = 0.0; - - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_AIX) -+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) - // Returns the number of average idle cpu wakeups per second since the last - // time the metric was sampled. - int idle_wakeups = 0; diff --git a/devel/electron22/files/patch-chrome_browser_net_system__network__context__manager.cc b/devel/electron22/files/patch-chrome_browser_net_system__network__context__manager.cc deleted file mode 100644 index 41096bf74d4..00000000000 --- a/devel/electron22/files/patch-chrome_browser_net_system__network__context__manager.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/net/system_network_context_manager.cc -@@ -91,7 +91,7 @@ - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - #include "chrome/common/chrome_paths_internal.h" - #include "chrome/grit/chromium_strings.h" - #include "ui/base/l10n/l10n_util.h" -@@ -173,7 +173,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut - auth_dynamic_params->basic_over_http_enabled = - local_state->GetBoolean(prefs::kBasicAuthOverHttpEnabled); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - auth_dynamic_params->delegate_by_kdc_policy = - local_state->GetBoolean(prefs::kAuthNegotiateDelegateByKdcPolicy); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -451,7 +451,7 @@ SystemNetworkContextManager::SystemNetworkContextManag - pref_change_registrar_.Add(prefs::kAllHttpAuthSchemesAllowedForOrigins, - auth_pref_callback); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - pref_change_registrar_.Add(prefs::kAuthNegotiateDelegateByKdcPolicy, - auth_pref_callback); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -523,7 +523,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe - registry->RegisterBooleanPref(prefs::kKerberosEnabled, false); - #endif // BUILDFLAG(IS_CHROMEOS_LACROS) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy, - false); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) diff --git a/devel/electron22/files/patch-chrome_browser_new__tab__page_modules_drive_drive__service.cc b/devel/electron22/files/patch-chrome_browser_new__tab__page_modules_drive_drive__service.cc deleted file mode 100644 index a45f061b45f..00000000000 --- a/devel/electron22/files/patch-chrome_browser_new__tab__page_modules_drive_drive__service.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/new_tab_page/modules/drive/drive_service.cc.orig 2022-02-07 13:39:41 UTC -+++ chrome/browser/new_tab_page/modules/drive/drive_service.cc -@@ -28,7 +28,7 @@ - #include "services/network/public/cpp/resource_request.h" - - namespace { --#if OS_LINUX -+#if defined(OS_LINUX) || defined(OS_BSD) - constexpr char kPlatform[] = "LINUX"; - #elif OS_WIN - constexpr char kPlatform[] = "WINDOWS"; diff --git a/devel/electron22/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc b/devel/electron22/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc deleted file mode 100644 index d0f0036afb0..00000000000 --- a/devel/electron22/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/new_tab_page/new_tab_page_util.cc.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/new_tab_page/new_tab_page_util.cc -@@ -11,7 +11,7 @@ - - namespace { - bool IsOsSupportedForRecipe() { --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - return true; - #else - return false; -@@ -27,7 +27,7 @@ bool IsOsSupportedForCart() { - } - - bool IsOsSupportedForDrive() { --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - return true; - #else - return false; diff --git a/devel/electron22/files/patch-chrome_browser_notifications_notification__display__service__impl.cc b/devel/electron22/files/patch-chrome_browser_notifications_notification__display__service__impl.cc deleted file mode 100644 index cf7943370f2..00000000000 --- a/devel/electron22/files/patch-chrome_browser_notifications_notification__display__service__impl.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- chrome/browser/notifications/notification_display_service_impl.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/notifications/notification_display_service_impl.cc -@@ -32,7 +32,7 @@ - #endif - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #include "chrome/browser/send_tab_to_self/desktop_notification_handler.h" - #include "chrome/browser/sharing/sharing_notification_handler.h" - #endif -@@ -65,7 +65,7 @@ NotificationDisplayServiceImpl* NotificationDisplaySer - // static - void NotificationDisplayServiceImpl::RegisterProfilePrefs( - user_prefs::PrefRegistrySyncable* registry) { --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - registry->RegisterBooleanPref(prefs::kAllowSystemNotifications, true); - #endif - } -@@ -81,7 +81,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer - std::make_unique()); - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - AddNotificationHandler( - NotificationHandler::Type::SEND_TAB_TO_SELF, - std::make_unique( -@@ -89,7 +89,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer - #endif - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - AddNotificationHandler( - NotificationHandler::Type::TAILORED_SECURITY, - std::make_unique()); diff --git a/devel/electron22/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc b/devel/electron22/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc deleted file mode 100644 index 1d138c9c3cb..00000000000 --- a/devel/electron22/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/notifications/notification_platform_bridge_delegator.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/notifications/notification_platform_bridge_delegator.cc -@@ -57,7 +57,7 @@ bool SystemNotificationsEnabled(Profile* profile) { - #elif BUILDFLAG(IS_WIN) - return NotificationPlatformBridgeWin::SystemNotificationEnabled(); - #else --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (profile) { - // Prefs take precedence over flags. - PrefService* prefs = profile->GetPrefs(); diff --git a/devel/electron22/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc b/devel/electron22/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc deleted file mode 100644 index 022a3a4941c..00000000000 --- a/devel/electron22/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2022-09-24 10:57:32 UTC -+++ chrome/browser/password_manager/password_reuse_manager_factory.cc -@@ -92,7 +92,7 @@ KeyedService* PasswordReuseManagerFactory::BuildServic - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_LACROS) -+ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - std::unique_ptr notifier = - std::make_unique( - IdentityManagerFactory::GetForProfile(profile)); diff --git a/devel/electron22/files/patch-chrome_browser_platform__util__linux.cc b/devel/electron22/files/patch-chrome_browser_platform__util__linux.cc deleted file mode 100644 index 0648db76b2a..00000000000 --- a/devel/electron22/files/patch-chrome_browser_platform__util__linux.cc +++ /dev/null @@ -1,12 +0,0 @@ ---- chrome/browser/platform_util_linux.cc.orig 2022-08-31 12:19:35 UTC -+++ chrome/browser/platform_util_linux.cc -@@ -295,7 +295,9 @@ void RunCommand(const std::string& command, - - base::LaunchOptions options; - options.current_directory = working_directory; -+#if !defined(OS_BSD) - options.allow_new_privs = true; -+#endif - // xdg-open can fall back on mailcap which eventually might plumb through - // to a command that needs a terminal. Set the environment variable telling - // it that we definitely don't have a terminal available and that it should diff --git a/devel/electron22/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc b/devel/electron22/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc deleted file mode 100644 index c423fdd7f15..00000000000 --- a/devel/electron22/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/policy/browser_signin_policy_handler.cc.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/policy/browser_signin_policy_handler.cc -@@ -45,7 +45,7 @@ void BrowserSigninPolicyHandler::ApplyPolicySettings(c - policies.GetValue(policy_name(), base::Value::Type::INTEGER); - switch (static_cast(value->GetInt())) { - case BrowserSigninMode::kForced: --#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) - prefs->SetValue(prefs::kForceBrowserSignin, base::Value(true)); - #endif - [[fallthrough]]; diff --git a/devel/electron22/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc b/devel/electron22/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc deleted file mode 100644 index 3a6b435d8c1..00000000000 --- a/devel/electron22/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc -@@ -47,7 +47,7 @@ - #include "chrome/browser/policy/browser_dm_token_storage_mac.h" - #endif // BUILDFLAG(IS_MAC) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "chrome/browser/policy/browser_dm_token_storage_linux.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - -@@ -56,7 +56,7 @@ - #include "chrome/install_static/install_util.h" - #endif // BUILDFLAG(IS_WIN) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/connectors/device_trust/device_trust_features.h" - #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/device_trust_key_manager_impl.h" - #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/key_rotation_launcher.h" -@@ -89,7 +89,7 @@ void ChromeBrowserCloudManagementControllerDesktop:: - - #if BUILDFLAG(IS_MAC) - storage_delegate = std::make_unique(); --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - storage_delegate = std::make_unique(); - #elif BUILDFLAG(IS_WIN) - storage_delegate = std::make_unique(); -@@ -244,7 +244,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC - - std::unique_ptr - ChromeBrowserCloudManagementControllerDesktop::CreateDeviceTrustKeyManager() { --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (enterprise_connectors::IsDeviceTrustConnectorFeatureEnabled()) { - auto key_rotation_launcher = - enterprise_connectors::KeyRotationLauncher::Create( diff --git a/devel/electron22/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/devel/electron22/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc deleted file mode 100644 index 381d94e504e..00000000000 --- a/devel/electron22/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -1747,7 +1747,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - { key::kPrefixedStorageInfoEnabled, - storage::kPrefixedStorageInfoEnabled, - base::Value::Type::BOOLEAN }, --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_CHROMEOS_ASH) - { key::kHighEfficiencyModeEnabled, - performance_manager::user_tuning::prefs::kHighEfficiencyModeEnabled, - base::Value::Type::BOOLEAN }, diff --git a/devel/electron22/files/patch-chrome_browser_policy_device__management__service__configuration.cc b/devel/electron22/files/patch-chrome_browser_policy_device__management__service__configuration.cc deleted file mode 100644 index 56bc422f973..00000000000 --- a/devel/electron22/files/patch-chrome_browser_policy_device__management__service__configuration.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/policy/device_management_service_configuration.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/policy/device_management_service_configuration.cc -@@ -21,7 +21,7 @@ - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ -- !BUILDFLAG(IS_ANDROID)) -+ !BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/connectors/common.h" - #include "chrome/browser/enterprise/connectors/connectors_service.h" - #endif -@@ -100,7 +100,7 @@ DeviceManagementServiceConfiguration::GetReportingConn - content::BrowserContext* context) const { - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ -- !BUILDFLAG(IS_ANDROID)) -+ !BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD) - auto* service = - enterprise_connectors::ConnectorsServiceFactory::GetForBrowserContext( - context); diff --git a/devel/electron22/files/patch-chrome_browser_prefs_browser__prefs.cc b/devel/electron22/files/patch-chrome_browser_prefs_browser__prefs.cc deleted file mode 100644 index 9cd7d1ab156..00000000000 --- a/devel/electron22/files/patch-chrome_browser_prefs_browser__prefs.cc +++ /dev/null @@ -1,69 +0,0 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/prefs/browser_prefs.cc -@@ -446,14 +446,14 @@ - #include "components/os_crypt/os_crypt.h" - #endif - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "chrome/browser/web_applications/url_handler_prefs.h" - #include "components/device_signals/core/browser/pref_names.h" - #endif - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) - #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" - #endif -@@ -481,7 +481,7 @@ - #include "chrome/browser/sessions/session_service_log.h" - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "ui/color/system_theme.h" - #endif - -@@ -978,7 +978,7 @@ void RegisterProfilePrefsForMigration( - registry->RegisterIntegerPref(kProfileAvatarTutorialShown, 0); - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Deprecated 08/2022. - registry->RegisterBooleanPref(prefs::kUsesSystemThemeDeprecated, false); - #endif -@@ -1212,7 +1212,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) - #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) - #endif // BUILDFLAG(IS_WIN) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - web_app::url_handler_prefs::RegisterLocalStatePrefs(registry); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - -@@ -1537,11 +1537,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync - safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry); - #endif - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - device_signals::RegisterProfilePrefs(registry); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); - #endif - -@@ -1938,7 +1938,7 @@ void MigrateObsoleteProfilePrefs(Profile* profile) { - profile_prefs->ClearPref(kProfileAvatarTutorialShown); - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Added 08/2022. - if (profile_prefs->HasPrefPath(prefs::kUsesSystemThemeDeprecated)) { - auto migrated_theme = diff --git a/devel/electron22/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc b/devel/electron22/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc deleted file mode 100644 index ea151f20f8b..00000000000 --- a/devel/electron22/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2022-04-21 18:48:31 UTC -+++ chrome/browser/prefs/pref_service_incognito_allowlist.cc -@@ -138,7 +138,7 @@ const char* const kPersistentPrefNames[] = { - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - // Toggleing custom frames affects all open windows in the profile, hence - // should be written to the regular profile when changed in incognito mode. - prefs::kUseCustomChromeFrame, diff --git a/devel/electron22/files/patch-chrome_browser_printing_print__backend__service__manager.cc b/devel/electron22/files/patch-chrome_browser_printing_print__backend__service__manager.cc deleted file mode 100644 index 0f457624265..00000000000 --- a/devel/electron22/files/patch-chrome_browser_printing_print__backend__service__manager.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/printing/print_backend_service_manager.cc.orig 2022-06-17 14:20:10 UTC -+++ chrome/browser/printing/print_backend_service_manager.cc -@@ -481,7 +481,7 @@ absl::optional PrintBackendServiceManager::R - query_clients_.insert(client_id); - break; - case ClientType::kQueryWithUi: --#if !BUILDFLAG(IS_LINUX) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) - if (!query_with_ui_clients_.empty()) - return absl::nullopt; - #endif -@@ -706,7 +706,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate - break; - - case ClientType::kQueryWithUi: --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // No need to update if there were other query with UI clients. - if (query_with_ui_clients_.size() > 1) - return absl::nullopt; -@@ -763,7 +763,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate - return kNoClientsRegisteredResetOnIdleTimeout; - - case ClientType::kQueryWithUi: --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // No need to update if there were other query with UI clients. - if (!query_with_ui_clients_.empty()) - return absl::nullopt; diff --git a/devel/electron22/files/patch-chrome_browser_printing_print__job__worker.cc b/devel/electron22/files/patch-chrome_browser_printing_print__job__worker.cc deleted file mode 100644 index 33fb7b94c45..00000000000 --- a/devel/electron22/files/patch-chrome_browser_printing_print__job__worker.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/printing/print_job_worker.cc.orig 2022-09-24 10:57:32 UTC -+++ chrome/browser/printing/print_job_worker.cc -@@ -195,7 +195,7 @@ void PrintJobWorker::SetSettings(base::Value::Dict new - crash_key = std::make_unique( - print_backend->GetPrinterDriverInfo(printer_name)); - --#if BUILDFLAG(IS_LINUX) && defined(USE_CUPS) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_CUPS) - PrinterBasicInfo basic_info; - if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) == - mojom::ResultCode::kSuccess) { diff --git a/devel/electron22/files/patch-chrome_browser_process__singleton__posix.cc b/devel/electron22/files/patch-chrome_browser_process__singleton__posix.cc deleted file mode 100644 index 4b865dd4e08..00000000000 --- a/devel/electron22/files/patch-chrome_browser_process__singleton__posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/process_singleton_posix.cc.orig 2023-01-30 07:58:59 UTC -+++ chrome/browser/process_singleton_posix.cc -@@ -357,7 +357,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo - if (g_disable_prompt) - return g_user_opted_unlock_in_use_profile; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - std::u16string relaunch_button_text = - l10n_util::GetStringUTF16(IDS_PROFILE_IN_USE_LINUX_RELAUNCH); - return ShowProcessSingletonDialog(error, relaunch_button_text); diff --git a/devel/electron22/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/devel/electron22/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc deleted file mode 100644 index 92d39b0f355..00000000000 --- a/devel/electron22/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc +++ /dev/null @@ -1,25 +0,0 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -258,7 +258,7 @@ - #include "chrome/browser/ui/cocoa/screentime/screentime_features.h" - #endif - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/idle/idle_service_factory.h" - #endif - -@@ -439,11 +439,11 @@ void ChromeBrowserMainExtraPartsProfiles:: - #endif - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) - metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); - #endif --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - enterprise_idle::IdleServiceFactory::GetInstance(); - #endif - ModelTypeStoreServiceFactory::GetInstance(); diff --git a/devel/electron22/files/patch-chrome_browser_profiles_profile__impl.cc b/devel/electron22/files/patch-chrome_browser_profiles_profile__impl.cc deleted file mode 100644 index 61555368517..00000000000 --- a/devel/electron22/files/patch-chrome_browser_profiles_profile__impl.cc +++ /dev/null @@ -1,31 +0,0 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2022-11-30 08:12:58 UTC -+++ chrome/browser/profiles/profile_impl.cc -@@ -258,6 +258,10 @@ - #include "chrome/browser/spellchecker/spellcheck_service.h" - #endif - -+#if BUILDFLAG(IS_OPENBSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" -+#endif -+ - using bookmarks::BookmarkModel; - using content::BrowserThread; - using content::DownloadManagerDelegate; -@@ -839,7 +843,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) - } - - base::FilePath ProfileImpl::last_selected_directory() { -+#if BUILDFLAG(IS_OPENBSD) -+ // If unveil(2) is used, force the file dialog directory to something we -+ // know is available. -+ auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); -+ if (sandbox->unveil_initialized()) -+ return GetPrefs()->GetFilePath(prefs::kDownloadDefaultDirectory); -+ else -+ return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); -+#else - return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); -+#endif - } - - void ProfileImpl::set_last_selected_directory(const base::FilePath& path) { diff --git a/devel/electron22/files/patch-chrome_browser_profiles_profiles__state.cc b/devel/electron22/files/patch-chrome_browser_profiles_profiles__state.cc deleted file mode 100644 index 014e10c0cde..00000000000 --- a/devel/electron22/files/patch-chrome_browser_profiles_profiles__state.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/profiles/profiles_state.cc.orig 2022-09-24 10:57:32 UTC -+++ chrome/browser/profiles/profiles_state.cc -@@ -181,7 +181,7 @@ bool IsGuestModeRequested(const base::CommandLine& com - PrefService* local_state, - bool show_warning) { - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - DCHECK(local_state); - - // Check if guest mode enforcement commandline switch or policy are provided. diff --git a/devel/electron22/files/patch-chrome_browser_renderer__preferences__util.cc b/devel/electron22/files/patch-chrome_browser_renderer__preferences__util.cc deleted file mode 100644 index 757006f3bbb..00000000000 --- a/devel/electron22/files/patch-chrome_browser_renderer__preferences__util.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/renderer_preferences_util.cc.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/renderer_preferences_util.cc -@@ -37,7 +37,7 @@ - #include "ui/views/controls/textfield/textfield.h" - #endif - --#if defined(USE_AURA) && BUILDFLAG(IS_LINUX) -+#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) - #include "chrome/browser/themes/theme_service.h" - #include "chrome/browser/themes/theme_service_factory.h" - #include "ui/linux/linux_ui.h" -@@ -156,7 +156,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc - prefs->caret_blink_interval = views::Textfield::GetCaretBlinkInterval(); - #endif - --#if defined(USE_AURA) && BUILDFLAG(IS_LINUX) -+#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) - auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); - if (linux_ui_theme) { - if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) { -@@ -179,7 +179,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc - #endif - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - content::UpdateFontRendererPreferencesFromSystemSettings(prefs); - #endif - diff --git a/devel/electron22/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts b/devel/electron22/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts deleted file mode 100644 index b8cd2cb5a76..00000000000 --- a/devel/electron22/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/resources/sandbox_internals/sandbox_internals.ts.orig 2022-09-24 10:57:32 UTC -+++ chrome/browser/resources/sandbox_internals/sandbox_internals.ts -@@ -2,7 +2,7 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - --// -+// - import './strings.m.js'; - - import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; -@@ -121,7 +121,7 @@ function androidHandler() { - } - // - --// -+// - - /** - * Adds a status row that reports either Yes or No. -@@ -182,7 +182,7 @@ document.addEventListener('DOMContentLoaded', () => { - // - androidHandler(); - // -- // -+ // - linuxHandler(); - // - }); diff --git a/devel/electron22/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts b/devel/electron22/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts deleted file mode 100644 index 72a1213d63a..00000000000 --- a/devel/electron22/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts -@@ -16,7 +16,7 @@ export interface AppearanceBrowserProxy { - - useDefaultTheme(): void; - -- // -+ // - useGtkTheme(): void; - useQtTheme(): void; - // -@@ -45,7 +45,7 @@ export class AppearanceBrowserProxyImpl implements App - chrome.send('useDefaultTheme'); - } - -- // -+ // - useGtkTheme() { - chrome.send('useGtkTheme'); - } diff --git a/devel/electron22/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html b/devel/electron22/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html deleted file mode 100644 index e2564e50325..00000000000 --- a/devel/electron22/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2022-10-24 13:33:33 UTC -+++ chrome/browser/resources/settings/appearance_page/appearance_page.html -@@ -27,7 +27,7 @@ - -- -+ - - -- -+ -