Skip to content
Snippets Groups Projects
Commit e2105f2a authored by Hiroki Tagato's avatar Hiroki Tagato
Browse files

devel/electron11: backport missing patch from www/chromium [1]

While here:
- fix patch error when WRKDIR is within the ports git repo [2]
- bump PORTREVISION

PR:		254907
Submitted by:	mikael [1]
Reported by:	many [2]
parent b64f1988
No related branches found
No related tags found
No related merge requests found
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 \
......
......@@ -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")
......
--- 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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment