diff options
author | Hiroki Tagato <tagattie@FreeBSD.org> | 2021-04-11 13:15:39 +0000 |
---|---|---|
committer | Hiroki Tagato <tagattie@FreeBSD.org> | 2021-04-11 13:23:42 +0000 |
commit | e2105f2ad67dccede5c128ea63673003d1b10ec4 (patch) | |
tree | 19d23da303388ba568bf815a82cafe61f3589500 /devel | |
parent | b64f1988e365b12baed8efb0e99a07299f8741e2 (diff) | |
download | ports-e2105f2ad67dccede5c128ea63673003d1b10ec4.tar.gz ports-e2105f2ad67dccede5c128ea63673003d1b10ec4.zip |
Diffstat (limited to 'devel')
-rw-r--r-- | devel/electron11/Makefile | 1 | ||||
-rw-r--r-- | devel/electron11/files/apply-electron-patches.sh | 8 | ||||
-rw-r--r-- | devel/electron11/files/patch-gpu_ipc_service_gpu__watchdog__thread__v2.cc | 47 |
3 files changed, 55 insertions, 1 deletions
diff --git a/devel/electron11/Makefile b/devel/electron11/Makefile index 15e7b6543abc..d859559bc1c5 100644 --- a/devel/electron11/Makefile +++ b/devel/electron11/Makefile @@ -1,6 +1,7 @@ PORTNAME= electron DISTVERSIONPREFIX= v DISTVERSION= ${ELECTRON_VER:S/-beta./.b/} +PORTREVISION= 1 CATEGORIES= devel java MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/:chromium_official \ https://commondatastorage.googleapis.com/chromium-nodejs/:chromium_node \ diff --git a/devel/electron11/files/apply-electron-patches.sh b/devel/electron11/files/apply-electron-patches.sh index 17365d1f06b1..9d974b536054 100644 --- a/devel/electron11/files/apply-electron-patches.sh +++ b/devel/electron11/files/apply-electron-patches.sh @@ -2,18 +2,24 @@ PATH=/bin:/usr/bin:/usr/local/bin -PATCH_CMD="git apply" +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") diff --git a/devel/electron11/files/patch-gpu_ipc_service_gpu__watchdog__thread__v2.cc b/devel/electron11/files/patch-gpu_ipc_service_gpu__watchdog__thread__v2.cc new file mode 100644 index 000000000000..d53d8a3f3a59 --- /dev/null +++ b/devel/electron11/files/patch-gpu_ipc_service_gpu__watchdog__thread__v2.cc @@ -0,0 +1,47 @@ +--- gpu/ipc/service/gpu_watchdog_thread_v2.cc.orig 2021-03-20 14:36:05 UTC ++++ gpu/ipc/service/gpu_watchdog_thread_v2.cc +@@ -77,7 +77,7 @@ GpuWatchdogThreadImplV2::GpuWatchdogThreadImplV2( + } + #endif + +-#if defined(USE_X11) ++#if defined(USE_X11) && !defined(OS_BSD) + tty_file_ = base::OpenFile( + base::FilePath(FILE_PATH_LITERAL("/sys/class/tty/tty0/active")), "r"); + UpdateActiveTTY(); +@@ -105,7 +105,7 @@ GpuWatchdogThreadImplV2::~GpuWatchdogThreadImplV2() { + CloseHandle(watched_thread_handle_); + #endif + +-#if defined(USE_X11) ++#if defined(USE_X11) && !defined(OS_BSD) + if (tty_file_) + fclose(tty_file_); + #endif +@@ -481,7 +481,7 @@ void GpuWatchdogThreadImplV2::OnWatchdogTimeout() { + if (foregrounded_event_) + num_of_timeout_after_foregrounded_++; + +-#if defined(USE_X11) ++#if defined(USE_X11) && !defined(OS_BSD) + UpdateActiveTTY(); + #endif + +@@ -874,7 +874,7 @@ bool GpuWatchdogThreadImplV2::WithinOneMinFromForegrou + return foregrounded_event_ && num_of_timeout_after_foregrounded_ <= count; + } + +-#if defined(USE_X11) ++#if defined(USE_X11) && !defined(OS_BSD) + void GpuWatchdogThreadImplV2::UpdateActiveTTY() { + last_active_tty_ = active_tty_; + +@@ -891,7 +891,7 @@ void GpuWatchdogThreadImplV2::UpdateActiveTTY() { + #endif + + bool GpuWatchdogThreadImplV2::ContinueOnNonHostX11ServerTty() { +-#if defined(USE_X11) ++#if defined(USE_X11) && !defined(OS_BSD) + if (host_tty_ == -1 || active_tty_ == -1) + return false; + |