Update repo

This commit is contained in:
termux-pacman-bot
2022-10-30 03:14:17 +00:00
parent 68b20a6ebf
commit a09fd35673
7 changed files with 227 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
--- a/Source/WebKit/NetworkProcess/cache/NetworkCacheBlobStorage.cpp
+++ b/Source/WebKit/NetworkProcess/cache/NetworkCacheBlobStorage.cpp
@@ -99,8 +99,10 @@ BlobStorage::Blob BlobStorage::add(const
if (FileSystem::makeSafeToUseMemoryMapForPath(blobPath)) {
auto existingData = mapFile(blobPath);
if (bytesEqual(existingData, data)) {
+#ifndef __ANDROID__
if (!FileSystem::hardLink(blobPath, path))
WTFLogAlways("Failed to create hard link from %s to %s", blobPath.utf8().data(), path.utf8().data());
+#endif
return { existingData, hash };
}
}
@@ -111,8 +113,10 @@ BlobStorage::Blob BlobStorage::add(const
if (mappedData.isNull())
return { };
+#ifndef __ANDROID__
if (!FileSystem::hardLink(blobPath, path))
WTFLogAlways("Failed to create hard link from %s to %s", blobPath.utf8().data(), path.utf8().data());
+#endif
m_approximateSize += mappedData.size();

View File

@@ -0,0 +1,11 @@
--- a/Source/cmake/OptionsCommon.cmake
+++ b/Source/cmake/OptionsCommon.cmake
@@ -112,7 +112,7 @@
# passing the option DT_RUNPATH is used, which can be overriden by the value
# of LD_LIBRARY_PATH set in the environment, resulting in unexpected behaviour
# for developers.
-if (LD_SUPPORTS_DISABLE_NEW_DTAGS)
+if (FALSE)
string(APPEND CMAKE_EXE_LINKER_FLAGS " -Wl,--disable-new-dtags")
string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Wl,--disable-new-dtags")
string(APPEND CMAKE_MODULE_LINKER_FLAGS " -Wl,--disable-new-dtags")

View File

@@ -0,0 +1,22 @@
diff --git a/Source/WTF/wtf/PlatformGTK.cmake b/Source/WTF/wtf/PlatformGTK.cmake
index fa6958fbd3..c6d4a51fec 100644
--- a/Source/WTF/wtf/PlatformGTK.cmake
+++ b/Source/WTF/wtf/PlatformGTK.cmake
@@ -13,7 +13,7 @@ list(APPEND WTF_PUBLIC_HEADERS
glib/WTFGType.h
)
-if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+if (CMAKE_SYSTEM_NAME MATCHES "Android")
list(APPEND WTF_PUBLIC_HEADERS
linux/ProcessMemoryFootprint.h
linux/CurrentProcessMemoryStatus.h
@@ -47,7 +47,7 @@ list(APPEND WTF_SOURCES
unix/UniStdExtrasUnix.cpp
)
-if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+if (CMAKE_SYSTEM_NAME MATCHES "Android")
list(APPEND WTF_SOURCES
linux/CurrentProcessMemoryStatus.cpp
linux/MemoryFootprintLinux.cpp

View File

@@ -0,0 +1,70 @@
diff --git a/Source/WebKit/Platform/unix/SharedMemoryUnix.cpp b/Source/WebKit/Platform/unix/SharedMemoryUnix.cpp
index aff7b0d18d..7d22cb5f5c 100644
--- a/Source/WebKit/Platform/unix/SharedMemoryUnix.cpp
+++ b/Source/WebKit/Platform/unix/SharedMemoryUnix.cpp
@@ -54,6 +54,65 @@
#include "ArgumentCoders.h"
#endif
+static int shm_unlink(const char *name) {
+ size_t namelen;
+ char *fname;
+
+ /* Construct the filename. */
+ while (name[0] == '/') ++name;
+
+ if (name[0] == '\0') {
+ /* The name "/" is not supported. */
+ errno = EINVAL;
+ return -1;
+ }
+
+ namelen = strlen(name);
+ fname = (char *) alloca(sizeof("@TERMUX_PREFIX@/tmp/") - 1 + namelen + 1);
+ memcpy(fname, "@TERMUX_PREFIX@/tmp/", sizeof("@TERMUX_PREFIX@/tmp/") - 1);
+ memcpy(fname + sizeof("@TERMUX_PREFIX@/tmp/") - 1, name, namelen + 1);
+
+ return unlink(fname);
+}
+
+static int shm_open(const char *name, int oflag, mode_t mode) {
+ size_t namelen;
+ char *fname;
+ int fd;
+
+ /* Construct the filename. */
+ while (name[0] == '/') ++name;
+
+ if (name[0] == '\0') {
+ /* The name "/" is not supported. */
+ errno = EINVAL;
+ return -1;
+ }
+
+ namelen = strlen(name);
+ fname = (char *) alloca(sizeof("@TERMUX_PREFIX@/tmp/") - 1 + namelen + 1);
+ memcpy(fname, "@TERMUX_PREFIX@/tmp/", sizeof("@TERMUX_PREFIX@/tmp/") - 1);
+ memcpy(fname + sizeof("@TERMUX_PREFIX@/tmp/") - 1, name, namelen + 1);
+
+ fd = open(fname, oflag, mode);
+ if (fd != -1) {
+ /* We got a descriptor. Now set the FD_CLOEXEC bit. */
+ int flags = fcntl(fd, F_GETFD, 0);
+ flags |= FD_CLOEXEC;
+ flags = fcntl(fd, F_SETFD, flags);
+
+ if (flags == -1) {
+ /* Something went wrong. We cannot return the descriptor. */
+ int save_errno = errno;
+ close(fd);
+ fd = -1;
+ errno = save_errno;
+ }
+ }
+
+ return fd;
+}
+
namespace WebKit {
SharedMemory::Handle::Handle()

View File

@@ -0,0 +1,50 @@
# x11-packages
# This specific package is for webkit2gtk-4.0.
TERMUX_PKG_HOMEPAGE=https://webkitgtk.org
TERMUX_PKG_DESCRIPTION="A full-featured port of the WebKit rendering engine"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.38.1
TERMUX_PKG_SRCURL=https://webkitgtk.org/releases/webkitgtk-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=02e195b3fb9e057743b3364ee7f1eec13f71614226849544c07c32a73b8f1848
TERMUX_PKG_DEPENDS="atk, enchant, fontconfig, freetype, glib, gst-plugins-base, gst-plugins-good, gstreamer, gtk3, harfbuzz, harfbuzz-icu, libc++, libcairo, libgcrypt, libhyphen, libicu, libjpeg-turbo, libnotify, libpng, libsoup, libtasn1, libwebp, libxml2, libx11, libxcomposite, libxdamage, libxslt, libxt, littlecms, openjpeg, pango, woff2"
TERMUX_PKG_BUILD_DEPENDS="g-ir-scanner, xorgproto"
#TERMUX_PKG_PROVIDES="webkit2gtk-4.0"
TERMUX_PKG_BREAKS="webkit, webkitgtk"
TERMUX_PKG_REPLACES="webkit, webkitgtk"
TERMUX_PKG_DISABLE_GIR=false
# USE_OPENGL_OR_ES causes crashes when enabled.
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DPORT=GTK
-DENABLE_GAMEPAD=OFF
-DUSE_SYSTEMD=OFF
-DUSE_LIBSECRET=OFF
-DENABLE_INTROSPECTION=ON
-DENABLE_DOCUMENTATION=OFF
-DUSE_WPE_RENDERER=OFF
-DENABLE_BUBBLEWRAP_SANDBOX=OFF
-DUSE_LD_GOLD=OFF
-DUSE_OPENGL_OR_ES=OFF
-DENABLE_JOURNALD_LOG=OFF
-DUSE_SOUP2=ON
-DUSE_GTK4=OFF
-DENABLE_WEBDRIVER=OFF
"
# WebKitWebDriver is provided by a subpackage of webkit2gtk-4.1 named
# webkit2gtk-driver.
TERMUX_PKG_RM_AFTER_INSTALL="bin/WebKitWebDriver"
termux_step_pre_configure() {
termux_setup_gir
CPPFLAGS+=" -DHAVE_MISSING_STD_FILESYSTEM_PATH_CONSTRUCTOR"
CPPFLAGS+=" -DCMS_NO_REGISTER_KEYWORD"
}
termux_step_post_massage() {
local _GUARD_FILE="lib/lib${TERMUX_PKG_NAME}-4.0.so"
if [ ! -e "${_GUARD_FILE}" ]; then
termux_error_exit "Error: file ${_GUARD_FILE} not found."
fi
}

View File

@@ -0,0 +1,39 @@
diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp
index 31d9abcb31..863514e97c 100644
--- a/Source/JavaScriptCore/jsc.cpp
+++ b/Source/JavaScriptCore/jsc.cpp
@@ -127,7 +127,7 @@
#if OS(DARWIN)
#include <wtf/spi/darwin/ProcessMemoryFootprint.h>
-#elif OS(LINUX)
+#elif OS(LINUX) || OS(ANDROID)
#include <wtf/linux/ProcessMemoryFootprint.h>
#endif
@@ -2662,7 +2662,7 @@ JSC_DEFINE_HOST_FUNCTION(functionDropAllLocks, (JSGlobalObject* globalObject, Ca
int jscmain(int argc, char** argv);
-#if OS(DARWIN) || OS(LINUX)
+#if OS(DARWIN) || OS(LINUX) || OS(ANDROID)
static size_t memoryLimit;
static void crashIfExceedingMemoryLimit()
@@ -2697,7 +2697,7 @@ static void startMemoryMonitoringThreadIfNeeded()
}
});
}
-#endif // OS(DARWIN) || OS(LINUX)
+#endif // OS(DARWIN) || OS(LINUX) || OS(ANDROID)
static double s_desiredTimeout;
static double s_timeoutMultiplier = 1.0;
@@ -3498,7 +3498,7 @@ int jscmain(int argc, char** argv)
#endif
initializeTimeoutIfNeeded();
-#if OS(DARWIN) || OS(LINUX)
+#if OS(DARWIN) || OS(LINUX) || OS(ANDROID)
startMemoryMonitoringThreadIfNeeded();
#endif

View File

@@ -0,0 +1,11 @@
--- a/Source/bmalloc/libpas/src/libpas/pas_min_heap.h
+++ b/Source/bmalloc/libpas/src/libpas/pas_min_heap.h
@@ -260,7 +260,7 @@
\
size_t index = config.get_index(&element); \
PAS_ASSERT(index); \
- PAS_ASSERT(!bcmp(name##_get_ptr_by_index(min_heap, index), &element, sizeof(type))); \
+ PAS_ASSERT(!memcmp(name##_get_ptr_by_index(min_heap, index), &element, sizeof(type))); \
name##_remove_by_index(min_heap, index); \
} \
\