building repository pakete
continuous-integration/drone/push Build is passing Details

This commit is contained in:
teldra 2021-04-15 16:30:34 +02:00
commit aa2ea4f494
182 changed files with 8168 additions and 574 deletions

View File

@ -957,7 +957,7 @@ libfftw3l_omp.so.3 libfftw-3.3.5_1
libfftw3f_threads.so.3 libfftw-3.3_1
libfftw3f.so.3 libfftw-3.3_1
libfftw3f_omp.so.3 libfftw-3.3.5_1
libfluidsynth.so.2 libfluidsynth-2.1.1_1
libfluidsynth.so.3 libfluidsynth-2.2.0_1
liblo.so.7 liblo-0.26_1
libvamp-sdk.so.2 libvamp-plugin-sdk-2.2_1
librubberband.so.2 librubberband-1.6.0_1

View File

@ -0,0 +1,6 @@
remove_obsoletes () {
for repo in $XBPS_HOSTDIR/binpkgs $XBPS_HOSTDIR/binpkgs/debug $XBPS_HOSTDIR/binpkgs/nonfree $XBPS_HOSTDIR/binpkgs/multilib/ $XBPS_HOSTDIR/binpkgs/multilib/nonfree ; do
msg_normal "Cleaning $repo\n"
XBPS_ARCH=${XBPS_CROSS_BUILD:-$XBPS_MACHINE} $XBPS_RINDEX_CMD -r $repo
done
}

View File

@ -1,7 +1,7 @@
# Template file for 'Carla'
pkgname=Carla
version=2.1
revision=2
revision=3
archs="x86_64* i686* aarch64* arm*"
build_style=gnu-makefile
pycompile_dirs="usr/share/carla"

View File

@ -1,10 +1,10 @@
# Template file for 'EmptyEpsilon'
pkgname=EmptyEpsilon
_ver_major=2020
_ver_minor=11
_ver_patch=23
_ver_major=2021
_ver_minor=03
_ver_patch=31
version="${_ver_major}.${_ver_minor}.${_ver_patch}"
revision=3
revision=1
wrksrc="EmptyEpsilon-EE-${version}"
build_style=cmake
configure_args="-DSERIOUS_PROTON_DIR=$XBPS_BUILDDIR/SeriousProton-EE-${version}
@ -20,5 +20,5 @@ license="GPL-2.0-only"
homepage="https://daid.github.io/EmptyEpsilon/"
distfiles="https://github.com/daid/EmptyEpsilon/archive/EE-${version}.tar.gz
https://github.com/daid/SeriousProton/archive/EE-${version}.tar.gz>SP-${version}.tar.gz"
checksum="339df2f3b57135663cb7bd253d7e157c3c5d457137bc6ed4c9651f48e8e6bf0c
7552ab3b2a82735401aba2215ae5bcae5fa2c9946b709ff77e0c2cc5a60abc23"
checksum="c1c4f11fefe1afac6076c795e8785c7507a297ba3f7f2be9ed30c97b1e93cb24
62ab03dc904bd10f017fff338e55ec97c86f0bc3903a18d6c44285b86776a2d7"

View File

@ -1,7 +1,7 @@
# Template file for 'SLADE'
pkgname=SLADE
version=3.1.12a
revision=4
revision=5
build_style=cmake
build_helper=cmake-wxWidgets-gtk3
hostmakedepends="pkg-config p7zip which"

View File

@ -1,7 +1,7 @@
# Template file for 'alure'
pkgname=alure
version=1.2
revision=2
revision=3
build_style=cmake
configure_args="-DMODPLUG=ON -DDYNLOAD=OFF"
hostmakedepends="pkg-config"

View File

@ -1,6 +1,6 @@
# Template file for 'android-tools'
pkgname=android-tools
version=31.0.0
version=31.0.0p1
revision=1
archs="armv* aarch64* x86_64* i686* ppc64le*"
build_style=cmake
@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
license="Apache-2.0, ISC, GPL-2.0-only, MIT"
homepage="http://developer.android.com/tools/help/adb.html"
distfiles="https://github.com/nmeum/android-tools/releases/download/${version}/android-tools-${version}.tar.xz"
checksum=0b8f16370072d03e9f26de17ecba7dd44771cb042a23e86869108d57eb22f20d
checksum=51a4c3ba5f16945905449c4bd2c1c781a4df7469f6b7362f8837f4f640d8c7b6
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"

View File

@ -1,7 +1,7 @@
# Template file for 'ardour'
pkgname=ardour
version=6.6
revision=1
revision=2
_commit="e4e21f4d073ab00b1a0bb6ff6ca49f28b02fd68a"
build_style=waf3
configure_args="--cxx11 --no-phone-home --with-backends=jack,alsa,dummy
@ -19,6 +19,8 @@ maintainer="tibequadorian <tibequadorian@posteo.de>"
license="GPL-2.0-or-later"
homepage="http://ardour.org"
CXXFLAGS="-fpermissive"
case "$XBPS_TARGET_MACHINE" in
x86_64*) configure_args+=" --dist-target=x86_64" ;;
i686*) configure_args+=" --dist-target=i686" ;;

View File

@ -2,7 +2,7 @@
#Keep in sync with audacious!
pkgname=audacious-plugins
version=4.1
revision=3
revision=4
build_style=gnu-configure
configure_args="$(vopt_enable gtk) $(vopt_enable qt)"
hostmakedepends="gettext pkg-config glib-devel"

View File

@ -6,7 +6,7 @@ build_style=cmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-svg-devel qt5-x11extras-devel qt5-tools-devel"
short_desc="Run Thunderbird with a system tray icon"
maintainer="cptpcrd <cptpcrd.git@gmail.com>"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/gyunaev/birdtray"
distfiles="https://github.com/gyunaev/birdtray/archive/v${version}.tar.gz"

View File

@ -0,0 +1,65 @@
From: Joshua Strobl <joshua@streambits.io>
Date: Mon, 12 Apr 2021 06:14:04 +0300
Subject: [PATCH] Support moved font anti-aliasing and hinting in GSD 40. Fixes
#2121.
---
src/panel/meson.build | 4 ++++
src/panel/settings/settings_fonts.vala | 11 ++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git src/panel/meson.build src/panel/meson.build
index ee610868..5451c278 100644
--- src/panel/meson.build
+++ src/panel/meson.build
@@ -72,6 +72,10 @@ budgie_panel_vala_args = [
'--gresources=' + gresource,
]
+if dep_gsd.version().version_compare('>=40.0')
+ budgie_panel_vala_args += ['-D', 'HAVE_GSD_40']
+endif
+
budgie_panel_c_args = [
'-DWNCK_I_KNOW_THIS_IS_UNSTABLE'
]
diff --git src/panel/settings/settings_fonts.vala src/panel/settings/settings_fonts.vala
index fc17622f..f750b926 100644
--- src/panel/settings/settings_fonts.vala
+++ src/panel/settings/settings_fonts.vala
@@ -24,7 +24,10 @@ namespace Budgie {
private Settings ui_settings;
private Settings wm_settings;
+
+#if !HAVE_GSD_40
private Settings x_settings;
+#endif
public FontPage() {
Object(group: SETTINGS_GROUP_APPEARANCE,
@@ -135,14 +138,20 @@ namespace Budgie {
/* Hook up settings */
ui_settings = new Settings("org.gnome.desktop.interface");
wm_settings = new Settings("org.gnome.desktop.wm.preferences");
- x_settings = new Settings("org.gnome.settings-daemon.plugins.xsettings");
ui_settings.bind("document-font-name", fontbutton_document, "font-name", SettingsBindFlags.DEFAULT);
ui_settings.bind("font-name", fontbutton_interface, "font-name", SettingsBindFlags.DEFAULT);
ui_settings.bind("monospace-font-name", fontbutton_monospace, "font-name", SettingsBindFlags.DEFAULT);
wm_settings.bind("titlebar-font", fontbutton_title, "font-name", SettingsBindFlags.DEFAULT);
ui_settings.bind("text-scaling-factor", spinbutton_scaling, "value", SettingsBindFlags.DEFAULT);
+
+#if HAVE_GSD_40
+ ui_settings.bind("font-antialiasing", combobox_antialias, "active-id", SettingsBindFlags.DEFAULT);
+ ui_settings.bind("font-hinting", combobox_hinting, "active-id", SettingsBindFlags.DEFAULT);
+#else
+ x_settings = new Settings("org.gnome.settings-daemon.plugins.xsettings");
x_settings.bind("hinting", combobox_hinting, "active-id", SettingsBindFlags.DEFAULT);
x_settings.bind("antialiasing", combobox_antialias, "active-id", SettingsBindFlags.DEFAULT);
+#endif
}
}
}
--
2.31.1

View File

@ -1,7 +1,7 @@
# Template file for 'budgie-desktop'
pkgname=budgie-desktop
version=10.5.2
revision=2
revision=3
build_style=meson
build_helper=gir
configure_args="-Dwith-gtk-doc=false"

View File

@ -1,7 +1,7 @@
# Template file for 'calf'
pkgname=calf
version=0.90.3
revision=2
revision=3
build_style=gnu-configure
configure_args="--enable-experimental"
hostmakedepends="automake libtool pkg-config"

View File

@ -1,6 +1,6 @@
# Template file for 'composer'
pkgname=composer
version=1.10.13
version=2.0.12
revision=1
build_style=fetch
depends="php"
@ -10,7 +10,7 @@ license="MIT"
homepage="https://getcomposer.org/"
distfiles="https://github.com/composer/composer/releases/download/${version}/composer.phar
https://raw.githubusercontent.com/composer/composer/master/LICENSE"
checksum="5ca7445cfd48dd27c5a84aa005a47b4d9fd91132313830609875df3a6973708f
checksum="82ea8c1537cfaceb7e56f6004c7ccdf99ddafce7237c07374d920e635730a631
7855ac293067aebe7e51afdd23b9dea54b8be24187dbecc9b9142581c37f596c"
do_install() {

View File

@ -1,7 +1,7 @@
# Template file for 'csound'
pkgname=csound
version=6.15.0
revision=1
revision=2
build_style=cmake
configure_args="
-DLUA_MODULE_INSTALL_DIR=${XBPS_CROSS_BASE}/usr/lib/lua/5.1

View File

@ -1,7 +1,7 @@
# Template file for 'curl'
pkgname=curl
version=7.76.0
revision=2
version=7.76.1
revision=1
build_style=gnu-configure
configure_args="ac_cv_sizeof_off_t=8 --enable-threaded-resolver --enable-ipv6
$(vopt_with rtmp) $(vopt_with gssapi) $(vopt_enable ldap) $(vopt_with gnutls)
@ -21,15 +21,12 @@ license="MIT"
homepage="https://curl.haxx.se"
changelog="https://curl.haxx.se/changes.html#${version//./_}"
distfiles="${homepage}/download/${pkgname}-${version}.tar.bz2"
checksum=e29bfe3633701590d75b0071bbb649ee5ca4ca73f00649268bd389639531c49a
checksum=7a8e184d7d31312c4ebf6a8cb59cd757e61b2b2833a9ed4f9bf708066e7695e9
patch_args="-Np1"
build_options="gnutls gssapi ldap rtmp ssh ssl zstd"
build_options_default="ssh ssl zstd"
vopt_conflict ssl gnutls
# force usage of gmtime_r, fix in https://github.com/curl/curl/pull/6859
CFLAGS="-DHAVE_GMTIME_R -DTIME_WITH_SYS_TIME"
pre_configure() {
export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
export CFLAGS="${CFLAGS/-I${XBPS_CROSS_BASE}\/usr\/include/}"

View File

@ -1,6 +1,6 @@
# Template file for 'diffoscope'
pkgname=diffoscope
version=171
version=172
revision=1
build_style=python3-module
# file 5.39 causes errors there, see https://bugs.astron.com/view.php?id=170
@ -16,4 +16,4 @@ license="GPL-3.0-or-later"
homepage="https://diffoscope.org/"
changelog="https://salsa.debian.org/reproducible-builds/diffoscope/raw/master/debian/changelog"
distfiles="${PYPI_SITE}/d/diffoscope/diffoscope-${version}.tar.gz"
checksum=a14af04a63dd526445b24f358b4856985e637891627b7a0fab90443990850f85
checksum=5ffe7f38555c6409bc7e7edc277ed77dd78641fe1306fc38d153dbbe445ddea4

View File

@ -1,7 +1,7 @@
# Template file for 'distr0'
pkgname=distr0
version=0.3.3
revision=7
revision=8
build_style=meta
depends="void-repo-multilib void-repo-multilib-nonfree
void-repo-nonfree lvm2 cronie socklog-void ntp xtools

View File

@ -1,6 +1,6 @@
# Template file for 'distrobuilder'
pkgname=distrobuilder
version=1.1
version=1.2
revision=1
wrksrc="distrobuilder-distrobuilder-${version}"
build_style=go
@ -13,4 +13,4 @@ maintainer="Robert Lowry <bobertlo@gmail.com>"
license="Apache-2.0"
homepage="https://linuxcontainers.org/distrobuilder/introduction/"
distfiles="https://github.com/lxc/distrobuilder/archive/distrobuilder-${version}.tar.gz"
checksum=a21b41f7d4030b923d7ea3840f90ff6912f6474e516140f488b87c8dfe970bbc
checksum=c60f8cee78a9ed6b4606a3849f1bc3288f5e80651b7c59ea62c5dd8aae3e9e45

View File

@ -1,6 +1,6 @@
# Template file for 'doctl'
pkgname=doctl
version=1.58.0
version=1.59.0
revision=1
build_style=go
go_import_path="github.com/digitalocean/doctl/cmd/doctl"
@ -10,4 +10,4 @@ maintainer="Benjamín Albiñana <benalb@gmail.com>"
license="Apache-2.0"
homepage="https://github.com/digitalocean/doctl"
distfiles="https://github.com/digitalocean/doctl/archive/v${version}.tar.gz"
checksum=f4a7d608f4718a2a5e9ce5d1fcec25c16ee03d05f78ebf134faf23c261abefdf
checksum=b37b693635af48da8b2b222486be3e315e9ba6eb8fdb0b0e976bff1e63f9c520

View File

@ -0,0 +1,29 @@
--- base/threading/platform_thread_linux.cc.orig
+++ base/threading/platform_thread_linux.cc
@@ -99 +99,2 @@ size_t GetDefaultThreadStackSize(const p
- return 0;
+ // use 8mb like glibc to avoid running out of space
+ return (1 << 23);
--- chrome/app/shutdown_signal_handlers_posix.cc.orig
+++ chrome/app/shutdown_signal_handlers_posix.cc
@@ -184,11 +184,19 @@
g_shutdown_pipe_read_fd = pipefd[0];
g_shutdown_pipe_write_fd = pipefd[1];
#if !defined(ADDRESS_SANITIZER)
+# if defined(__GLIBC__)
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
+# else
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
+# endif
#else
// ASan instrumentation bloats the stack frames, so we need to increase the
// stack size to avoid hitting the guard page.
+# if defined(__GLIBC__)
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
+# else
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
+# endif
#endif
ShutdownDetector* detector = new ShutdownDetector(
g_shutdown_pipe_read_fd, shutdown_callback, task_runner);

View File

@ -0,0 +1,23 @@
--- third_party/crashpad/crashpad/util/linux/ptracer.cc
+++ third_party/crashpad/crashpad/util/linux/ptracer.cc
@@ -26,6 +26,7 @@
#if defined(ARCH_CPU_X86_FAMILY)
#include <asm/ldt.h>
+#include <asm/ptrace-abi.h>
#endif
namespace crashpad {
--- third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
+++ third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
@@ -17,7 +17,9 @@
#include_next <sys/ptrace.h>
+#if defined(__GLIBC__)
#include <sys/cdefs.h>
+#endif
// https://sourceware.org/bugzilla/show_bug.cgi?id=22433
#if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \

View File

@ -0,0 +1,202 @@
--- ./third_party/lss/linux_syscall_support.h.orig
+++ ./third_party/lss/linux_syscall_support.h
@@ -1127,6 +1127,12 @@
#ifndef __NR_fallocate
#define __NR_fallocate 285
#endif
+
+#undef __NR_pread
+#define __NR_pread __NR_pread64
+#undef __NR_pwrite
+#define __NR_pwrite __NR_pwrite64
+
/* End of x86-64 definitions */
#elif defined(__mips__)
#if _MIPS_SIM == _MIPS_SIM_ABI32
--- ./third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h.orig
+++ ./third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
@@ -37,6 +37,10 @@
#include "common/memory.h"
#include "google_breakpad/common/minidump_format.h"
+#if !defined(__GLIBC__)
+ #define _libc_fpstate _fpstate
+#endif
+
namespace google_breakpad {
// Wraps platform-dependent implementations of accessors to ucontext_t structs.
--- ./third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h.orig
+++ ./third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
@@ -36,6 +36,7 @@
#include <elf.h>
#include <link.h>
#include <stddef.h>
+#include <limits.h>
#include "common/memory_range.h"
--- ./sandbox/linux/suid/process_util.h.orig
+++ ./sandbox/linux/suid/process_util.h
@@ -11,6 +11,14 @@
#include <stdbool.h>
#include <sys/types.h>
+// Some additional functions
+# define TEMP_FAILURE_RETRY(expression) \
+ (__extension__ \
+ ({ long int __result; \
+ do __result = (long int) (expression); \
+ while (__result == -1L && errno == EINTR); \
+ __result; }))
+
// This adjusts /proc/process/oom_score_adj so the Linux OOM killer
// will prefer certain process types over others. The range for the
// adjustment is [-1000, 1000], with [0, 1000] being user accessible.
--- ./sandbox/linux/seccomp-bpf/trap.cc.orig 2020-04-12 08:26:40.184159217 -0400
+++ ./sandbox/linux/seccomp-bpf/trap.cc 2020-04-12 08:46:16.737191222 -0400
@@ -174,7 +174,7 @@
// If the version of glibc doesn't include this information in
// siginfo_t (older than 2.17), we need to explicitly copy it
// into an arch_sigsys structure.
- memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
+ memcpy(&sigsys, &info->__sifields, sizeof(sigsys));
#endif
#if defined(__mips__)
--- ./third_party/ffmpeg/libavutil/cpu.c.orig
+++ ./third_party/ffmpeg/libavutil/cpu.c
@@ -38,7 +38,6 @@
#include <sys/param.h>
#endif
#include <sys/types.h>
-#include <sys/sysctl.h>
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2021-03-10 07:23:00.145810088 -0500
+++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc 2021-03-10 10:57:19.405962671 -0500
@@ -55,7 +55,9 @@
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if defined(__GLIBC__)
#include <gnu/libc-version.h>
+#endif
#include "base/linux_util.h"
#include "base/strings/string_split.h"
@@ -316,7 +318,7 @@
void RecordLinuxGlibcVersion() {
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if defined(__GLIBC__) || BUILDFLAG(IS_CHROMEOS_LACROS)
base::Version version(gnu_get_libc_version());
UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE;
--- services/device/serial/serial_io_handler_posix.cc.orig 2019-07-03 10:57:32.568171835 -0400
+++ services/device/serial/serial_io_handler_posix.cc 2019-07-03 10:57:16.867983031 -0400
@@ -6,6 +6,7 @@
#include <sys/ioctl.h>
#include <termios.h>
+#include <asm-generic/ioctls.h>
#include <algorithm>
#include <utility>
diff --git a/third_party/ots/include/opentype-sanitiser.h b/third_party/ots/include/opentype-sanitiser.h
--- third_party/ots/include/opentype-sanitiser.h
+++ third_party/ots/include/opentype-sanitiser.h
@@ -20,6 +20,7 @@ typedef unsigned __int64 uint64_t;
#define htonl(x) _byteswap_ulong (x)
#define htons(x) _byteswap_ushort (x)
#else
+#include <sys/types.h>
#include <arpa/inet.h>
#include <stdint.h>
#endif
--- ./base/logging.cc.orig 2021-01-20 12:09:54.227038757 -0500
+++ ./base/logging.cc 2021-01-20 12:24:32.600301351 -0500
@@ -557,8 +557,7 @@
LogMessage::~LogMessage() {
size_t stack_start = stream_.tellp();
-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
- !defined(OS_AIX)
+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__)
if (severity_ == LOGGING_FATAL && !base::debug::BeingDebugged()) {
// Include a stack trace on a fatal, unless a debugger is attached.
base::debug::StackTrace stack_trace;
--- ./third_party/blink/renderer/platform/wtf/stack_util.cc.orig
+++ ./third_party/blink/renderer/platform/wtf/stack_util.cc
@@ -28,7 +28,7 @@
// FIXME: On Mac OSX and Linux, this method cannot estimate stack size
// correctly for the main thread.
-#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
+#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
defined(OS_FUCHSIA)
// pthread_getattr_np() can fail if the thread is not invoked by
// pthread_create() (e.g., the main thread of blink_unittests).
@@ -96,7 +96,7 @@
}
void* GetStackStart() {
-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
defined(OS_FUCHSIA)
pthread_attr_t attr;
int error;
--- ./net/dns/dns_config_service_posix.cc.orig
+++ ./net/dns/dns_config_service_posix.cc
@@ -122,7 +122,7 @@
ConfigParsePosixResult result;
config->unhandled_options = false;
// TODO(fuchsia): Use res_ninit() when it's implemented on Fuchsia.
-#if defined(OS_OPENBSD) || defined(OS_FUCHSIA)
+#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) || defined(_GNU_SOURCE)
// Note: res_ninit in glibc always returns 0 and sets RES_INIT.
// res_init behaves the same way.
memset(&_res, 0, sizeof(_res));
--- third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Signals.inc.orig 2019-06-18 11:51:17.000000000 -0400
+++ third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Signals.inc 2019-07-03 12:32:50.938758186 -0400
@@ -25,7 +25,7 @@
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <string>
-#if HAVE_EXECINFO_H
+#if HAVE_EXECINFO_H && defined(__GLIBC__)
# include <execinfo.h> // For backtrace().
#endif
#if HAVE_SIGNAL_H
@@ -52,6 +52,7 @@
#include <unwind.h>
#else
#undef HAVE__UNWIND_BACKTRACE
+#undef HAVE_BACKTRACE
#endif
#endif
--- third_party/nasm/nasmlib/realpath.c.orig 2019-07-03 12:23:05.021949895 -0400
+++ third_party/nasm/nasmlib/realpath.c 2019-07-03 12:24:24.246862665 -0400
@@ -49,7 +49,7 @@
#include "nasmlib.h"
-#ifdef HAVE_CANONICALIZE_FILE_NAME
+#if defined(__GLIBC__)
/*
* GNU-specific, but avoids the realpath(..., NULL)
--- mojo/public/cpp/platform/named_platform_channel_posix.cc.orig 2020-07-19 13:26:10.696171063 -0400
+++ mojo/public/cpp/platform/named_platform_channel_posix.cc 2020-07-19 13:26:43.680151714 -0400
@@ -5,6 +5,7 @@
#include "mojo/public/cpp/platform/named_platform_channel.h"
#include <errno.h>
+#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>

View File

@ -0,0 +1,22 @@
--- base/debug/stack_trace.cc.orig 2018-12-08 14:11:25.303475116 +0100
+++ base/debug/stack_trace.cc 2018-12-08 18:00:43.874946999 +0100
@@ -229,7 +229,7 @@
}
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
std::stringstream stream;
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
OutputToStreamWithPrefix(&stream, prefix_string);
#endif
return stream.str();
--- net/socket/udp_socket_posix.cc.orig 2019-07-03 13:13:46.034342649 -0400
+++ net/socket/udp_socket_posix.cc 2019-07-03 13:23:53.117081909 -0400
@@ -1194,7 +1194,7 @@
msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
msgvec->reserve(buffers.size());
for (size_t j = 0; j < buffers.size(); j++)
- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0});
+ msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, 0, 0, 0}, 0});
int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0));
SendResult send_result(0, 0, std::move(buffers));
if (result < 0) {

View File

@ -0,0 +1,55 @@
diff --git a/buildtools/third_party/libc++/trunk/include/locale b/buildtools/third_party/libc++/trunk/include/locale
index d29a2dc..53998bc 100644
--- buildtools/third_party/libc++/trunk/include/locale
+++ buildtools/third_party/libc++/trunk/include/locale
@@ -11,6 +11,15 @@
#ifndef _LIBCPP_LOCALE
#define _LIBCPP_LOCALE
+// musl doesn't define _l (with locale) variants of functions, as it only supports UTF-8.
+// we can simply make macros that will call the non-localated ones if we're using musl, or rather not-using something that has the _l ones.
+// couldn't find anything glibc #defines when it creates strtoull_l (that it doesn't undefine a few lines later), so let's test against glibc and glibc-likes.
+// almost all glibc-likes define __GNU_LIBRARY__ for compatibility
+#ifndef __GNU_LIBRARY__
+#define strtoull_l(A, B, C, LOC) strtoull(A,B,C)
+#define strtoll_l(A, B, C, LOC) strtoll(A,B,C)
+#endif
+
/*
locale synopsis
diff --git a/buildtools/third_party/libc++/trunk/src/locale.cpp b/buildtools/third_party/libc++/trunk/src/locale.cpp
index 4163c2c..3d1902a 100644
--- a/buildtools/third_party/libc++/trunk/src/locale.cpp
+++ buildtools/third_party/libc++/trunk/src/locale.cpp
@@ -1028,11 +1028,11 @@ ctype<char>::do_narrow(const char_type* low, const char_type* high, char dfault,
return low;
}
-#if defined(__EMSCRIPTEN__)
+//#if defined(__EMSCRIPTEN__)
extern "C" const unsigned short ** __ctype_b_loc();
extern "C" const int ** __ctype_tolower_loc();
extern "C" const int ** __ctype_toupper_loc();
-#endif
+//#endif
#ifdef _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
const ctype<char>::mask*
@@ -1136,12 +1136,10 @@ ctype<char>::classic_table() _NOEXCEPT
#elif defined(_AIX)
return (const unsigned int *)__lc_ctype_ptr->obj->mask;
#else
- // Platform not supported: abort so the person doing the port knows what to
- // fix
-# warning ctype<char>::classic_table() is not implemented
- printf("ctype<char>::classic_table() is not implemented\n");
- abort();
- return NULL;
+// not sure any other libc like this exists, but there is no way to differentiate musl as of right now
+// to be fair, with the change above, this should always work
+// also, #warning is a gcc extension
+ return (const unsigned long *)*__ctype_b_loc();
#endif
}
#endif

View File

@ -0,0 +1,92 @@
--- ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.orig 2019-07-03 11:53:21.213479736 -0400
+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2019-07-03 11:57:01.304998253 -0400
@@ -140,31 +140,14 @@
ResultExpr RestrictCloneToThreadsAndEPERMFork() {
const Arg<unsigned long> flags(0);
- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
- CLONE_SIGHAND | CLONE_THREAD |
- CLONE_SYSVSEM;
- const uint64_t kObsoleteAndroidCloneMask = kAndroidCloneMask | CLONE_DETACHED;
+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_THREAD | CLONE_SYSVSEM;
+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
+ CLONE_DETACHED;
+ const BoolExpr thread_clone_ok = (flags&~safe)==required;
- const uint64_t kGlibcPthreadFlags =
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD |
- CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID;
- const BoolExpr glibc_test = flags == kGlibcPthreadFlags;
-
- const BoolExpr android_test =
- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask,
- flags == kGlibcPthreadFlags);
-
- // The following two flags are the two important flags in any vfork-emulating
- // clone call. EPERM any clone call that contains both of them.
- const uint64_t kImportantCloneVforkFlags = CLONE_VFORK | CLONE_VM;
-
- const BoolExpr is_fork_or_clone_vfork =
- AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0,
- (flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags);
-
- return If(IsAndroid() ? android_test : glibc_test, Allow())
- .ElseIf(is_fork_or_clone_vfork, Error(EPERM))
+ return If(thread_clone_ok, Allow())
+ .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM))
.Else(CrashSIGSYSClone());
}
--- ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.orig
+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -494,6 +494,7 @@
case __NR_mlock:
case __NR_munlock:
case __NR_munmap:
+ case __NR_mremap:
return true;
case __NR_madvise:
case __NR_mincore:
@@ -509,7 +510,6 @@
case __NR_modify_ldt:
#endif
case __NR_mprotect:
- case __NR_mremap:
case __NR_msync:
case __NR_munlockall:
case __NR_readahead:
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
index 80f02c0..21fbe21 100644
--- sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -373,6 +373,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
#if defined(__i386__)
case __NR_waitpid:
#endif
+ case __NR_set_tid_address:
return true;
case __NR_clone: // Should be parameter-restricted.
case __NR_setns: // Privileged.
@@ -385,7 +386,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
case __NR_set_thread_area:
#endif
- case __NR_set_tid_address:
case __NR_unshare:
#if !defined(__mips__) && !defined(__aarch64__)
case __NR_vfork:
--- sandbox/policy/linux/bpf_renderer_policy_linux.cc
+++ sandbox/policy/linux/bpf_renderer_policy_linux.cc
@@ -100,9 +100,9 @@
case __NR_uname:
case __NR_sched_getparam:
case __NR_sched_getscheduler:
+ case __NR_sched_setscheduler:
return Allow();
case __NR_sched_getaffinity:
- case __NR_sched_setscheduler:
return RestrictSchedTarget(GetPolicyPid(), sysno);
case __NR_prlimit64:
// See crbug.com/662450 and setrlimit comment above.

View File

@ -0,0 +1,30 @@
--- third_party/libsync/src/include/sync/sync.h.orig 2020-02-21 07:43:33.748325175 -0500
+++ third_party/libsync/src/include/sync/sync.h 2020-02-21 07:44:07.288328784 -0500
@@ -19,12 +19,16 @@
#ifndef __SYS_CORE_SYNC_H
#define __SYS_CORE_SYNC_H
+#if defined(__GLIBC__)
#include <sys/cdefs.h>
+#endif
#include <stdint.h>
#include <linux/types.h>
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
struct sync_legacy_merge_data {
int32_t fd2;
@@ -158,6 +162,8 @@
struct sync_pt_info *itr);
void sync_fence_info_free(struct sync_fence_info_data *info);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
#endif /* __SYS_CORE_SYNC_H */

View File

@ -0,0 +1,190 @@
diff --git sandbox/linux/bpf_dsl/seccomp_macros.h sandbox/linux/bpf_dsl/seccomp_macros.h
index a6aec544e..2a4a7f1bc 100644
--- sandbox/linux/bpf_dsl/seccomp_macros.h
+++ sandbox/linux/bpf_dsl/seccomp_macros.h
@@ -16,7 +16,7 @@
#if defined(__mips__)
// sys/user.h in eglibc misses size_t definition
#include <stddef.h>
-#elif defined(__powerpc64__)
+#elif defined(__powerpc64__) && defined(__GLIBC__)
// Manually define greg_t on ppc64
typedef unsigned long long greg_t;
#endif
@@ -361,11 +361,11 @@ typedef struct pt_regs regs_struct;
#define SECCOMP_ARCH AUDIT_ARCH_PPC64
#endif
-#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.regs->gpr[_reg])
+#define SECCOMP_REG(_ctx, _reg) (((struct pt_regs *)(_ctx)->uc_mcontext.regs)->gpr[_reg])
#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, 3)
#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, 0)
-#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.regs->nip
+#define SECCOMP_IP(_ctx) ((struct pt_regs *)(_ctx)->uc_mcontext.regs)->nip
#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, 3)
#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, 4)
#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, 5)
diff --git sandbox/linux/seccomp-bpf/syscall.cc sandbox/linux/seccomp-bpf/syscall.cc
index d53a7ff56..c290f0e92 100644
--- sandbox/linux/seccomp-bpf/syscall.cc
+++ sandbox/linux/seccomp-bpf/syscall.cc
@@ -499,9 +499,9 @@ void Syscall::PutValueInUcontext(intptr_t ret_val, ucontext_t* ctx) {
// Same as MIPS, need to invert ret and set error register (cr0.SO)
if (ret_val <= -1 && ret_val >= -4095) {
ret_val = -ret_val;
- ctx->uc_mcontext.regs->ccr |= (1 << 28);
+ ((struct pt_regs *)ctx->uc_mcontext.regs)->ccr |= (1 << 28);
} else {
- ctx->uc_mcontext.regs->ccr &= ~(1 << 28);
+ ((struct pt_regs *)ctx->uc_mcontext.regs)->ccr &= ~(1 << 28);
}
#endif
SECCOMP_RESULT(ctx) = static_cast<greg_t>(ret_val);
diff --git third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h
index cdce9bf8..73d77dda 100644
--- third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h
+++ third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h
@@ -46,7 +46,7 @@
// The following platforms have an implementation of a hardware counter.
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
- defined(__powerpc__) || defined(__ppc__) || \
+ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \
defined(_M_IX86) || defined(_M_X64)
#define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
#else
--- third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
+++ third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
@@ -64,7 +64,7 @@
#elif defined(__i386__) || defined(__x86_64__)
#define ABSL_STACKTRACE_INL_HEADER \
"absl/debugging/internal/stacktrace_x86-inl.inc"
-#elif defined(__ppc__) || defined(__PPC__)
+#elif (defined(__ppc__) || defined(__PPC__)) && defined(__GLIBC__)
#define ABSL_STACKTRACE_INL_HEADER \
"absl/debugging/internal/stacktrace_powerpc-inl.inc"
#elif defined(__aarch64__)
diff --git third_party/breakpad/BUILD.gn third_party/breakpad/BUILD.gn
index f9a60e37..25f3a0b7 100644
--- third_party/breakpad/BUILD.gn
+++ third_party/breakpad/BUILD.gn
@@ -637,6 +637,7 @@ if (is_linux || is_android) {
if (current_cpu == "ppc64") {
defines = [ "HAVE_GETCONTEXT" ]
+ libs += [ "ucontext" ]
} else {
sources += [
"breakpad/src/common/linux/breakpad_getcontext.S"
diff --git third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
index 03afec7a..0264ecf1 100644
--- third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
+++ third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
@@ -273,6 +273,9 @@ void ThreadInfo::FillCPUContext(RawContextCPU* out) const {
#elif defined(__powerpc64__)
+#include <asm/elf.h>
+#include <asm/ptrace.h>
+
uintptr_t ThreadInfo::GetInstructionPointer() const {
return mcontext.gp_regs[PT_NIP];
}
@@ -290,9 +293,9 @@ void ThreadInfo::FillCPUContext(RawContextCPU* out) const {
out->ctr = mcontext.gp_regs[PT_CTR];
for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++)
- out->float_save.fpregs[i] = mcontext.fp_regs[i];
+ out->float_save.fpregs[i] = ((uint64_t *)&mcontext.fp_regs)[i];
- out->float_save.fpscr = mcontext.fp_regs[NFPREG-1];
+ out->float_save.fpscr = ((uint64_t *)&mcontext.fp_regs)[ELF_NFPREG-1];
for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++)
out->vector_save.save_vr[i] = \
diff --git third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
index 1090470f..e580233d 100644
--- third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+++ third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
@@ -257,6 +257,9 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
#elif defined(__powerpc64__)
+#include <asm/elf.h>
+#include <asm/ptrace.h>
+
uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
return uc->uc_mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP];
}
@@ -280,9 +283,9 @@ void UContextReader::FillCPUContext(RawContextCPU* out, const ucontext_t* uc,
out->ctr = uc->uc_mcontext.gp_regs[PT_CTR];
for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++)
- out->float_save.fpregs[i] = uc->uc_mcontext.fp_regs[i];
+ out->float_save.fpregs[i] = ((uint64_t *)&uc->uc_mcontext.fp_regs)[i];
- out->float_save.fpscr = uc->uc_mcontext.fp_regs[NFPREG-1];
+ out->float_save.fpscr = ((uint64_t *)&uc->uc_mcontext.fp_regs)[ELF_NFPREG-1];
for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++)
out->vector_save.save_vr[i] =
diff --git third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
index 5a7ab50c..ee8b858c 100644
--- third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -105,6 +105,11 @@
#define PR_SET_PTRACER 0x59616d61
#endif
+/* musl hack, can't include asm/ptrace.h as that causes conflicts */
+#if defined(__powerpc64__) && !defined(PT_NIP)
+#define PT_NIP 32
+#endif
+
namespace google_breakpad {
namespace {
diff --git third_party/crashpad/crashpad/snapshot/linux/signal_context.h third_party/crashpad/crashpad/snapshot/linux/signal_context.h
index 8e335a09..b2a0f155 100644
--- third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+++ third_party/crashpad/crashpad/snapshot/linux/signal_context.h
@@ -469,7 +469,7 @@ struct MContext64 {
SignalThreadContext64 gp_regs;
SignalFloatContext64 fp_regs;
SignalVectorContext64 *v_regs;
- int64_t vmx_reserve[69];
+ int64_t vmx_reserve[101];
};
struct ContextTraits64 : public Traits64 {
diff --git third_party/crashpad/crashpad/util/linux/thread_info.h third_party/crashpad/crashpad/util/linux/thread_info.h
index dea0d1f3..b203e5b2 100644
--- third_party/crashpad/crashpad/util/linux/thread_info.h
+++ third_party/crashpad/crashpad/util/linux/thread_info.h
@@ -30,6 +30,7 @@
#if defined(ARCH_CPU_PPC64_FAMILY)
#include <sys/ucontext.h>
+#include <asm/ptrace.h>
#endif
namespace crashpad {
diff --git third_party/lss/linux_syscall_support.h third_party/lss/linux_syscall_support.h
index 9955ce44..4c1cc488 100644
--- third_party/lss/linux_syscall_support.h
+++ third_party/lss/linux_syscall_support.h
@@ -4216,9 +4216,13 @@ struct kernel_statfs {
}
#endif
#if defined(__NR_fstatat64)
+ // musl does #define fstatat64 fstatat
+ #undef fstatat64
LSS_INLINE _syscall4(int, fstatat64, int, d,
const char *, p,
struct kernel_stat64 *, b, int, f)
+ // set it back like it was
+ #define fstatat64 fstatat
#endif
#if defined(__NR_waitpid)
// waitpid is polyfilled below when not available.

View File

@ -0,0 +1,54 @@
--- base/trace_event/malloc_dump_provider.cc.orig
+++ base/trace_event/malloc_dump_provider.cc
@@ -243,7 +243,7 @@
allocated_objects_count = main_heap_info.block_count;
#elif defined(OS_FUCHSIA)
// TODO(fuchsia): Port, see https://crbug.com/706592.
-#else
+#elif defined(__GLIBC__)
struct mallinfo info = mallinfo();
DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
--- base/process/process_metrics_posix.cc.orig 2020-11-18 23:50:33.958223497 -0500
+++ base/process/process_metrics_posix.cc 2020-11-18 23:53:52.024589316 -0500
@@ -119,14 +119,14 @@
malloc_statistics_t stats = {0};
malloc_zone_statistics(nullptr, &stats);
return stats.size_in_use;
-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
+#elif defined(__GLIBC__) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
struct mallinfo minfo = mallinfo();
#if BUILDFLAG(USE_TCMALLOC)
return minfo.uordblks;
#else
return minfo.hblkhd + minfo.arena;
#endif
-#elif defined(OS_FUCHSIA)
+#else
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
return 0;
#endif
--- third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc
+++ third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc.orig
@@ -84,7 +84,7 @@
}
size_t Process::GetMallocUsage() {
-#if defined(HAVE_MALLINFO)
+#if defined(HAVE_MALLINFO) && defined(__GLIBC__)
struct mallinfo mi;
mi = ::mallinfo();
return mi.uordblks;
--- third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h.orig 2019-09-30 13:03:42.556880537 -0400
+++ third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h 2019-09-30 13:07:27.989821227 -0400
@@ -122,7 +122,9 @@
/* #undef HAVE_MALLCTL */
/* Define to 1 if you have the `mallinfo' function. */
+#if defined(__GLIBC__)
#define HAVE_MALLINFO 1
+#endif
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1

View File

@ -0,0 +1,38 @@
--- net/dns/host_resolver_manager.cc.orig 2020-10-09 16:39:12.064069835 -0400
+++ net/dns/host_resolver_manager.cc 2020-10-09 16:42:49.738302772 -0400
@@ -2779,8 +2779,7 @@
NetworkChangeNotifier::AddConnectionTypeObserver(this);
if (system_dns_config_notifier_)
system_dns_config_notifier_->AddObserver(this);
-#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \
- !defined(OS_ANDROID)
+#if defined(__GLIBC__)
EnsureDnsReloaderInit();
#endif
--- net/dns/dns_reloader.cc.orig 2020-10-09 16:39:12.064069835 -0400
+++ net/dns/dns_reloader.cc 2020-10-09 16:44:30.442419823 -0400
@@ -4,9 +4,8 @@
#include "net/dns/dns_reloader.h"
-#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \
- !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
-
+#if defined(__GLIBC__)
+
#include <resolv.h>
#include "base/lazy_instance.h"
--- net/dns/host_resolver_proc.cc.orig 2020-10-09 16:39:12.065069836 -0400
+++ net/dns/host_resolver_proc.cc 2020-10-09 16:45:09.641466644 -0400
@@ -159,8 +159,7 @@
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
base::BlockingType::WILL_BLOCK);
-#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \
- !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
+#if defined(__GLIBC__)
DnsReloaderMaybeReload();
#endif
base::Optional<AddressInfo> ai;

View File

@ -0,0 +1,144 @@
# Patch made by Kevin Kofler <Kevin@tigcc.ticalc.org>
# https://bugzilla.redhat.com/show_bug.cgi?id=1904652
diff -up chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.fstatfix chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
--- sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.fstatfix 2021-01-25 10:11:45.427436398 -0500
+++ sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-01-25 10:12:51.337699003 -0500
@@ -257,6 +257,18 @@ ResultExpr EvaluateSyscallImpl(int fs_de
return RestrictKillTarget(current_pid, sysno);
}
+#if defined(__NR_newfstatat)
+ if (sysno == __NR_newfstatat) {
+ return RewriteFstatatSIGSYS();
+ }
+#endif
+
+#if defined(__NR_fstatat64)
+ if (sysno == __NR_fstatat64) {
+ return RewriteFstatatSIGSYS();
+ }
+#endif
+
if (SyscallSets::IsFileSystem(sysno) ||
SyscallSets::IsCurrentDirectory(sysno)) {
return Error(fs_denied_errno);
diff -up chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc.fstatfix chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
--- sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc.fstatfix 2021-01-25 10:13:10.179774081 -0500
+++ sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2021-01-25 10:16:18.790525746 -0500
@@ -6,6 +6,8 @@
#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
+#include <errno.h>
+#include <fcntl.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
@@ -355,6 +357,35 @@ intptr_t SIGSYSSchedHandler(const struct
return -ENOSYS;
}
+intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args,
+ void* aux) {
+ switch (args.nr) {
+#if defined(__NR_newfstatat)
+ case __NR_newfstatat:
+#endif
+#if defined(__NR_fstatat64)
+ case __NR_fstatat64:
+#endif
+#if defined(__NR_newfstatat) || defined(__NR_fstatat64)
+ if (*reinterpret_cast<const char *>(args.args[1]) == '\0'
+ && args.args[3] == static_cast<uint64_t>(AT_EMPTY_PATH)) {
+ return sandbox::sys_fstat64(static_cast<int>(args.args[0]),
+ reinterpret_cast<struct stat64 *>(args.args[2]));
+ } else {
+ errno = EACCES;
+ return -1;
+ }
+ break;
+#endif
+ }
+
+ CrashSIGSYS_Handler(args, aux);
+
+ // Should never be reached.
+ RAW_CHECK(false);
+ return -ENOSYS;
+}
+
bpf_dsl::ResultExpr CrashSIGSYS() {
return bpf_dsl::Trap(CrashSIGSYS_Handler, NULL);
}
@@ -387,6 +418,10 @@ bpf_dsl::ResultExpr RewriteSchedSIGSYS()
return bpf_dsl::Trap(SIGSYSSchedHandler, NULL);
}
+bpf_dsl::ResultExpr RewriteFstatatSIGSYS() {
+ return bpf_dsl::Trap(SIGSYSFstatatHandler, NULL);
+}
+
void AllocateCrashKeys() {
#if !defined(OS_NACL_NONSFI)
if (seccomp_crash_key)
diff -up chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h.fstatfix chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h
--- sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h.fstatfix 2021-01-25 10:16:36.982598236 -0500
+++ sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h 2021-01-25 10:18:45.705111027 -0500
@@ -62,6 +62,10 @@ SANDBOX_EXPORT intptr_t SIGSYSPtraceFail
// sched_setparam(), sched_setscheduler()
SANDBOX_EXPORT intptr_t SIGSYSSchedHandler(const arch_seccomp_data& args,
void* aux);
+// If the fstatat syscall is actually a disguised fstat, calls the regular fstat
+// syscall, otherwise, crashes in the same way as CrashSIGSYS_Handler.
+SANDBOX_EXPORT intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args,
+ void* aux);
// Variants of the above functions for use with bpf_dsl.
SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYS();
@@ -72,6 +76,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Crash
SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSFutex();
SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSPtrace();
SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteSchedSIGSYS();
+SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteFstatatSIGSYS();
// Allocates a crash key so that Seccomp information can be recorded.
void AllocateCrashKeys();
diff -up chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.cc.fstatfix chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.cc
--- sandbox/linux/services/syscall_wrappers.cc.fstatfix 2021-01-25 10:18:53.307141311 -0500
+++ sandbox/linux/services/syscall_wrappers.cc 2021-01-25 10:19:46.982355293 -0500
@@ -261,4 +261,13 @@ int sys_sigaction(int signum,
#endif // defined(MEMORY_SANITIZER)
+SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf)
+{
+#if defined(__NR_fstat64)
+ return syscall(__NR_fstat64, fd, buf);
+#else
+ return syscall(__NR_fstat, fd, buf);
+#endif
+}
+
} // namespace sandbox
diff -up chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.h.fstatfix chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.h
--- sandbox/linux/services/syscall_wrappers.h.fstatfix 2021-01-25 10:19:53.115379741 -0500
+++ sandbox/linux/services/syscall_wrappers.h 2021-01-25 10:20:45.485588421 -0500
@@ -17,6 +17,7 @@ struct sock_fprog;
struct rlimit64;
struct cap_hdr;
struct cap_data;
+struct stat64;
namespace sandbox {
@@ -84,6 +85,9 @@ SANDBOX_EXPORT int sys_sigaction(int sig
const struct sigaction* act,
struct sigaction* oldact);
+// Recent glibc rewrites fstat to fstatat.
+SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf);
+
} // namespace sandbox
#endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_

View File

@ -0,0 +1,25 @@
From c06ddc4935bf1394812c011ce5d93898ccc8a53a Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Tue, 09 Feb 2021 19:22:57 +0000
Subject: [PATCH] IWYU: add ctime for std::time
Bug: None
Change-Id: I8bdae43209984242b9f5e538d74ece4409b65e3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2679610
Reviewed-by: Katie Dektar <katie@chromium.org>
Commit-Queue: Katie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#852287}
---
diff --git a/ui/accessibility/ax_tree_serializer.h b/ui/accessibility/ax_tree_serializer.h
index ddbbdcd..1790e3b 100644
--- ui/accessibility/ax_tree_serializer.h
+++ ui/accessibility/ax_tree_serializer.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <ctime>
#include <ostream>
#include <unordered_map>
#include <unordered_set>

View File

@ -0,0 +1,43 @@
From b5b80df7dafba8cafa4c6c0ba2153dfda467dfc9 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Wed, 27 Jan 2021 20:31:51 +0000
Subject: [PATCH] add dependency on opus in webcodecs
webcodecs uses opus, but dependency is missing. With unbundled
opus library build fails, because include path is incomplete.
Bug: 1169758
Change-Id: I01369364327461196a81002479636cf45017669a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2644623
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847754}
---
third_party/blink/renderer/modules/webcodecs/BUILD.gn | 1 +
third_party/blink/renderer/modules/webcodecs/DEPS | 1 +
2 files changed, 2 insertions(+)
diff --git a/third_party/blink/renderer/modules/webcodecs/BUILD.gn b/third_party/blink/renderer/modules/webcodecs/BUILD.gn
index fdf4ca0fafc72..01a7bf809ffca 100644
--- third_party/blink/renderer/modules/webcodecs/BUILD.gn
+++ third_party/blink/renderer/modules/webcodecs/BUILD.gn
@@ -65,6 +65,7 @@ blink_modules_sources("webcodecs") {
"//media/mojo/clients",
"//media/mojo/mojom",
"//third_party/libyuv:libyuv",
+ "//third_party/opus",
]
if (media_use_openh264) {
deps += [ "//third_party/openh264:encoder" ]
diff --git a/third_party/blink/renderer/modules/webcodecs/DEPS b/third_party/blink/renderer/modules/webcodecs/DEPS
index b8dd596da8caf..ea1919d12205a 100644
--- third_party/blink/renderer/modules/webcodecs/DEPS
+++ third_party/blink/renderer/modules/webcodecs/DEPS
@@ -19,6 +19,7 @@ include_rules = [
"+third_party/libyuv",
"+third_party/openh264",
+ "+third_party/opus",
"+ui/gfx/color_space.h",
"+ui/gfx/geometry/rect.h",

View File

@ -0,0 +1,28 @@
From 5a56bfe8d281250a1deee0d116a9fcde65b9c29a Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Fri, 15 Jan 2021 18:37:05 +0000
Subject: [PATCH] IWYU: add various missing includes
std::weak_ptr and std::shared_ptr require map
*int*_t types require cstdint
---
third_party/dawn/src/dawn_wire/client/Device.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/third_party/dawn/src/dawn_wire/client/Device.h b/third_party/dawn/src/dawn_wire/client/Device.h
index 3f16700..1082549 100644
--- third_party/dawn/src/dawn_wire/client/Device.h
+++ third_party/dawn/src/dawn_wire/client/Device.h
@@ -22,7 +22,9 @@
#include "dawn_wire/client/ApiObjects_autogen.h"
#include "dawn_wire/client/ObjectBase.h"
+#include <cstdint>
#include <map>
+#include <memory>
namespace dawn_wire { namespace client {
--
2.26.2

View File

@ -0,0 +1,29 @@
From 7cd4eab0bfca6192f14d6143410e1ae774eb1c29 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Thu, 31 Dec 2020 11:57:22 +0000
Subject: [PATCH] GCC: do not pass unique_ptr to DCHECK_NE, but the actual
pointer
DCHECK_NE comparison requires CheckOpValueStr to be defined for the
type, or providing an output stream operator. A unique_ptr does not
provide any. USE DCHECK instead.
---
net/third_party/quiche/src/quic/core/quic_path_validator.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/third_party/quiche/src/quic/core/quic_path_validator.cc b/net/third_party/quiche/src/quic/core/quic_path_validator.cc
index 0722216..fb2aeaf 100644
--- net/third_party/quiche/src/quic/core/quic_path_validator.cc
+++ net/third_party/quiche/src/quic/core/quic_path_validator.cc
@@ -68,7 +68,7 @@ void QuicPathValidator::OnPathResponse(const QuicPathFrameBuffer& probing_data,
void QuicPathValidator::StartPathValidation(
std::unique_ptr<QuicPathValidationContext> context,
std::unique_ptr<ResultDelegate> result_delegate) {
- DCHECK_NE(nullptr, context);
+ DCHECK(context);
QUIC_DLOG(INFO) << "Start validating path " << *context
<< " via writer: " << context->WriterToUse();
if (path_context_ != nullptr) {
--
2.26.2

View File

@ -0,0 +1,38 @@
diff --git a/third_party/skia/include/effects/SkImageFilters.h b/third_party/skia/include/effects/SkImageFilters.h
index 04cce0a..d06b007 100644
--- third_party/skia/include/effects/SkImageFilters.h
+++ third_party/skia/include/effects/SkImageFilters.h
@@ -23,6 +23,9 @@ class SkColorFilter;
class SkPaint;
class SkRegion;
+constexpr SkRect kNoCropRect = {SK_ScalarNegativeInfinity, SK_ScalarNegativeInfinity,
+ SK_ScalarInfinity, SK_ScalarInfinity};
+
// A set of factory functions providing useful SkImageFilter effects. For image filters that take an
// input filter, providing nullptr means it will automatically use the dynamic source image. This
// source depends on how the filter is applied, but is either the contents of a saved layer when
@@ -33,8 +36,6 @@ public:
// to those types as a crop rect for the image filter factories. It's not intended to be used
// directly.
struct CropRect {
- static constexpr SkRect kNoCropRect = {SK_ScalarNegativeInfinity, SK_ScalarNegativeInfinity,
- SK_ScalarInfinity, SK_ScalarInfinity};
CropRect() : fCropRect(kNoCropRect) {}
// Intentionally not explicit so callers don't have to use this type but can use SkIRect or
// SkRect as desired.
diff --git a/third_party/skia/src/effects/imagefilters/SkImageFilters.cpp b/third_party/skia/src/effects/imagefilters/SkImageFilters.cpp
index 5290b00..fb97fc1 100644
--- third_party/skia/src/effects/imagefilters/SkImageFilters.cpp
+++ third_party/skia/src/effects/imagefilters/SkImageFilters.cpp
@@ -47,10 +47,6 @@ static SkImageFilter::CropRect to_legacy_crop_rect(const SkImageFilters::CropRec
: SkImageFilter::CropRect(SkRect::MakeEmpty(), 0x0);
}
-// Allow kNoCropRect to be referenced (for certain builds, e.g. macOS libFuzzer chromium target,
-// see crbug.com/1139725)
-constexpr SkRect SkImageFilters::CropRect::kNoCropRect;
-
void SkImageFilters::RegisterFlattenables() {
SkAlphaThresholdFilter::RegisterFlattenables();
SkArithmeticImageFilter::RegisterFlattenables();

View File

@ -0,0 +1,135 @@
From 5e3a738b1204941aab9f15c0eb3d06e20fefd96e Mon Sep 17 00:00:00 2001
From: Scott Violet <sky@chromium.org>
Date: Mon, 8 Mar 2021 21:07:39 +0000
Subject: [PATCH] x11/ozone: fix two edge cases
WindowTreeHost::OnHostMovedInPixels() may trigger a nested message
loop (tab dragging), which when the stack unravels means this may
be deleted. This adds an early out if this happens.
X11WholeScreenMoveLoop has a similar issue, in so far as notifying
the delegate may delete this.
BUG=1185482
TEST=WindowTreeHostPlatform.DeleteHostFromOnHostMovedInPixels
Change-Id: Ieca1c90b3e4358da50b332abe2941fdbb50c5c25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2743555
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#860852}
---
ui/aura/window_tree_host_platform.cc | 10 ++++-
ui/aura/window_tree_host_platform_unittest.cc | 40 ++++++++++++++++++-
ui/base/x/x11_whole_screen_move_loop.cc | 4 ++
3 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/ui/aura/window_tree_host_platform.cc b/ui/aura/window_tree_host_platform.cc
index ce8395fe07..7589542026 100644
--- ui/aura/window_tree_host_platform.cc
+++ ui/aura/window_tree_host_platform.cc
@@ -214,13 +214,21 @@ void WindowTreeHostPlatform::OnBoundsChanged(const gfx::Rect& new_bounds) {
float current_scale = compositor()->device_scale_factor();
float new_scale = ui::GetScaleFactorForNativeView(window());
gfx::Rect old_bounds = bounds_in_pixels_;
+ auto weak_ref = GetWeakPtr();
bounds_in_pixels_ = new_bounds;
- if (bounds_in_pixels_.origin() != old_bounds.origin())
+ if (bounds_in_pixels_.origin() != old_bounds.origin()) {
OnHostMovedInPixels(bounds_in_pixels_.origin());
+ // Changing the bounds may destroy this.
+ if (!weak_ref)
+ return;
+ }
if (bounds_in_pixels_.size() != old_bounds.size() ||
current_scale != new_scale) {
pending_size_ = gfx::Size();
OnHostResizedInPixels(bounds_in_pixels_.size());
+ // Changing the size may destroy this.
+ if (!weak_ref)
+ return;
}
DCHECK_GT(on_bounds_changed_recursion_depth_, 0);
if (--on_bounds_changed_recursion_depth_ == 0) {
diff --git a/ui/aura/window_tree_host_platform_unittest.cc b/ui/aura/window_tree_host_platform_unittest.cc
index eda14e2f0c..4de039c88a 100644
--- ui/aura/window_tree_host_platform_unittest.cc
+++ ui/aura/window_tree_host_platform_unittest.cc
@@ -34,7 +34,7 @@ class TestWindowTreeHost : public WindowTreeHostPlatform {
// OnHostWill/DidProcessBoundsChange. Additionally, this triggers a bounds
// change from within OnHostResized(). Such a scenario happens in production
// code.
-class TestWindowTreeHostObserver : public aura::WindowTreeHostObserver {
+class TestWindowTreeHostObserver : public WindowTreeHostObserver {
public:
TestWindowTreeHostObserver(WindowTreeHostPlatform* host,
ui::PlatformWindow* platform_window)
@@ -51,7 +51,7 @@ class TestWindowTreeHostObserver : public aura::WindowTreeHostObserver {
return on_host_will_process_bounds_change_count_;
}
- // aura::WindowTreeHostObserver:
+ // WindowTreeHostObserver:
void OnHostResized(WindowTreeHost* host) override {
if (!should_change_bounds_in_on_resized_)
return;
@@ -92,5 +92,41 @@ TEST_F(WindowTreeHostPlatformTest, HostWillProcessBoundsChangeRecursion) {
EXPECT_EQ(1, observer.on_host_will_process_bounds_change_count());
}
+// Deletes WindowTreeHostPlatform from OnHostMovedInPixels().
+class DeleteHostWindowTreeHostObserver : public WindowTreeHostObserver {
+ public:
+ explicit DeleteHostWindowTreeHostObserver(
+ std::unique_ptr<TestWindowTreeHost> host)
+ : host_(std::move(host)) {
+ host_->AddObserver(this);
+ }
+ ~DeleteHostWindowTreeHostObserver() override = default;
+
+ TestWindowTreeHost* host() { return host_.get(); }
+
+ // WindowTreeHostObserver:
+ void OnHostMovedInPixels(WindowTreeHost* host,
+ const gfx::Point& new_origin_in_pixels) override {
+ host_->RemoveObserver(this);
+ host_.reset();
+ }
+
+ private:
+ std::unique_ptr<TestWindowTreeHost> host_;
+
+ DISALLOW_COPY_AND_ASSIGN(DeleteHostWindowTreeHostObserver);
+};
+
+// Verifies WindowTreeHostPlatform can be safely deleted when calling
+// OnHostMovedInPixels().
+// Regression test for https://crbug.com/1185482
+TEST_F(WindowTreeHostPlatformTest, DeleteHostFromOnHostMovedInPixels) {
+ std::unique_ptr<TestWindowTreeHost> host =
+ std::make_unique<TestWindowTreeHost>();
+ DeleteHostWindowTreeHostObserver observer(std::move(host));
+ observer.host()->SetBoundsInPixels(gfx::Rect(1, 2, 3, 4));
+ EXPECT_EQ(nullptr, observer.host());
+}
+
} // namespace
} // namespace aura
diff --git a/ui/base/x/x11_whole_screen_move_loop.cc b/ui/base/x/x11_whole_screen_move_loop.cc
index 5ed215db66..db678799db 100644
--- ui/base/x/x11_whole_screen_move_loop.cc
+++ ui/base/x/x11_whole_screen_move_loop.cc
@@ -78,9 +78,13 @@ X11WholeScreenMoveLoop::~X11WholeScreenMoveLoop() {
void X11WholeScreenMoveLoop::DispatchMouseMovement() {
if (!last_motion_in_screen_)
return;
+ auto weak_ref = weak_factory_.GetWeakPtr();
delegate_->OnMouseMovement(last_motion_in_screen_->root_location(),
last_motion_in_screen_->flags(),
last_motion_in_screen_->time_stamp());
+ // The delegate may delete this during dispatch.
+ if (!weak_ref)
+ return;
last_motion_in_screen_.reset();
}

View File

@ -0,0 +1,10 @@
--- chrome/browser/search/background/ntp_backgrounds.h 2020-08-10 20:39:20.000000000 +0200
+++ chrome/browser/search/background/ntp_backgrounds.h 2020-09-04 13:48:22.640023256 +0200
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUNDS_H_
#include <array>
+#include <cstddef>
class GURL;

View File

@ -0,0 +1,26 @@
--- base/process/memory_linux.cc.orig 2017-09-15 08:41:43.000000000 +0000
+++ base/process/memory_linux.cc 2017-09-15 08:44:39.804995469 +0000
@@ -21,6 +21,12 @@
#include "third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h"
#endif
+#if defined(LIBC_GLIBC)
+extern "C" {
+extern void *__libc_malloc(size_t size);
+}
+#endif
+
namespace base {
size_t g_oom_size = 0U;
--- base/process/memory_linux.cc.orig 2020-08-30 14:18:35.401132593 -0400
+++ base/process/memory_linux.cc 2020-08-30 14:19:08.030199189 -0400
@@ -141,7 +141,7 @@
(!defined(LIBC_GLIBC) && !BUILDFLAG(USE_TCMALLOC))
*result = malloc(size);
#elif defined(LIBC_GLIBC) && !BUILDFLAG(USE_TCMALLOC)
- *result = __libc_malloc(size);
+ *result = ::__libc_malloc(size);
#elif BUILDFLAG(USE_TCMALLOC)
*result = tc_malloc_skip_new_handler(size);
#endif

View File

@ -0,0 +1,24 @@
Use monotonic clock for pthread_cond_timedwait with musl too.
diff --git a/v8/src/base/platform/condition-variable.cc b/v8/src/base/platform/condition-variable.cc
index 5ea7083..c13027e 100644
--- ./v8/src/base/platform/condition-variable.cc
+++ ./v8/src/base/platform/condition-variable.cc
@@ -16,7 +16,7 @@ namespace base {
ConditionVariable::ConditionVariable() {
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
- (V8_OS_LINUX && V8_LIBC_GLIBC))
+ V8_OS_LINUX)
// On Free/Net/OpenBSD and Linux with glibc we can change the time
// source for pthread_cond_timedwait() to use the monotonic clock.
pthread_condattr_t attr;
@@ -92,7 +92,7 @@ bool ConditionVariable::WaitFor(Mutex* mutex, const TimeDelta& rel_time) {
&native_handle_, &mutex->native_handle(), &ts);
#else
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
- (V8_OS_LINUX && V8_LIBC_GLIBC))
+ V8_OS_LINUX)
// On Free/Net/OpenBSD and Linux with glibc we can change the time
// source for pthread_cond_timedwait() to use the monotonic clock.
result = clock_gettime(CLOCK_MONOTONIC, &ts);

View File

@ -0,0 +1,72 @@
--- base/debug/stack_trace_posix.cc.orig 2019-05-14 14:49:44.000000000 -0400
+++ base/debug/stack_trace_posix.cc 2019-07-02 10:43:43.490045013 -0400
@@ -27,7 +27,7 @@
#if !defined(USE_SYMBOLIZE)
#include <cxxabi.h>
#endif
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
#include <execinfo.h>
#endif
@@ -86,7 +86,7 @@
// Note: code in this function is NOT async-signal safe (std::string uses
// malloc internally).
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
std::string::size_type search_from = 0;
while (search_from < text->size()) {
// Look for the start of a mangled symbol, from search_from.
@@ -121,7 +121,7 @@
search_from = mangled_start + 2;
}
}
-#endif // !defined(__UCLIBC__) && !defined(_AIX)
+#endif // defined(__GLIBC__) && !defined(_AIX)
}
#endif // !defined(USE_SYMBOLIZE)
@@ -133,7 +133,7 @@
virtual ~BacktraceOutputHandler() = default;
};
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
// This should be more than enough to store a 64-bit number in hex:
// 16 hex digits + 1 for null-terminator.
@@ -216,7 +216,7 @@
}
#endif // defined(USE_SYMBOLIZE)
}
-#endif // !defined(__UCLIBC__) && !defined(_AIX)
+#endif // defined(__GLIBC__) && !defined(_AIX)
void PrintToStderr(const char* output) {
// NOTE: This code MUST be async-signal safe (it's used by in-process
@@ -812,7 +812,7 @@
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
// Though the backtrace API man page does not list any possible negative
// return values, we take no chance.
return base::saturated_cast<size_t>(backtrace(trace, count));
@@ -825,13 +825,13 @@
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
PrintBacktraceOutputHandler handler;
ProcessBacktrace(trace_, count_, prefix_string, &handler);
#endif
}
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
void StackTrace::OutputToStreamWithPrefix(std::ostream* os,
const char* prefix_string) const {
StreamBacktraceOutputHandler handler(os);

View File

@ -0,0 +1,27 @@
--- third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.orig 2015-12-06 09:59:55.554536646 +0100
+++ third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2015-12-06 10:01:16.818238035 +0100
@@ -477,7 +477,9 @@ bool ExceptionHandler::SimulateSignalDel
siginfo.si_code = SI_USER;
siginfo.si_pid = getpid();
ucontext_t context;
+#if defined(__GLIBC__)
getcontext(&context);
+#endif
return HandleSignal(sig, &siginfo, &context);
}
@@ -647,9 +649,14 @@ bool ExceptionHandler::WriteMinidump() {
sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
CrashContext context;
+
+#if defined(__GLIBC__)
int getcontext_result = getcontext(&context.context);
if (getcontext_result)
return false;
+#else
+ return false;
+#endif
#if defined(__i386__)
// In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved

View File

@ -0,0 +1,10 @@
--- sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -370,6 +370,7 @@
switch (sysno) {
case __NR_exit:
case __NR_exit_group:
+ case __NR_membarrier:
case __NR_wait4:
case __NR_waitid:
#if defined(__i386__)

View File

@ -0,0 +1,20 @@
Allow SYS_sched_getparam and SYS_sched_getscheduler
musl uses them for pthread_getschedparam()
source: https://git.alpinelinux.org/aports/commit/community/chromium?id=54af9f8ac24f52d382c5758e2445bf0206eff40e
--- sandbox/policy/linux/bpf_renderer_policy_linux.cc.orig 2019-10-08 21:03:18.253080425 +0200
+++ sandbox/policy/linux/bpf_renderer_policy_linux.cc 2019-10-08 21:04:19.648549718 +0200
@@ -88,10 +88,10 @@
case __NR_sysinfo:
case __NR_times:
case __NR_uname:
- return Allow();
- case __NR_sched_getaffinity:
case __NR_sched_getparam:
case __NR_sched_getscheduler:
+ return Allow();
+ case __NR_sched_getaffinity:
case __NR_sched_setscheduler:
return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno);
case __NR_prlimit64:

View File

@ -0,0 +1,886 @@
diff -Naur chromium-83.0.4103.97.orig/media/BUILD.gn chromium-83.0.4103.97/media/BUILD.gn
--- media/BUILD.gn.orig 2020-06-03 20:40:26.000000000 +0200
+++ media/BUILD.gn 2020-06-13 17:32:28.510395975 +0200
@@ -65,6 +65,9 @@
defines += [ "DLOPEN_PULSEAUDIO" ]
}
}
+ if (use_sndio) {
+ defines += [ "USE_SNDIO" ]
+ }
if (use_cras) {
defines += [ "USE_CRAS" ]
}
diff -Naur chromium-83.0.4103.97.orig/media/audio/BUILD.gn chromium-83.0.4103.97/media/audio/BUILD.gn
--- media/audio/BUILD.gn.orig 2020-06-03 20:39:37.000000000 +0200
+++ media/audio/BUILD.gn 2020-06-13 17:32:28.511395969 +0200
@@ -236,6 +236,17 @@
sources += [ "linux/audio_manager_linux.cc" ]
}
+ if (use_sndio) {
+ libs += [ "sndio" ]
+ sources += [
+ "sndio/audio_manager_sndio.cc",
+ "sndio/sndio_input.cc",
+ "sndio/sndio_input.h",
+ "sndio/sndio_output.cc",
+ "sndio/sndio_output.h"
+ ]
+ }
+
if (use_alsa) {
libs += [ "asound" ]
sources += [
diff -Naur chromium-83.0.4103.97.orig/media/audio/linux/audio_manager_linux.cc chromium-83.0.4103.97/media/audio/linux/audio_manager_linux.cc
--- media/audio/linux/audio_manager_linux.cc.orig 2020-06-03 20:39:37.000000000 +0200
+++ media/audio/linux/audio_manager_linux.cc 2020-06-13 18:09:43.623333167 +0200
@@ -19,6 +19,11 @@
#include "media/audio/pulse/audio_manager_pulse.h"
#include "media/audio/pulse/pulse_util.h"
#endif
+#if defined(USE_SNDIO)
+#include "media/audio/sndio/audio_manager_sndio.h"
+#include "media/audio/sndio/sndio_input.h"
+#include "media/audio/sndio/sndio_output.h"
+#endif
namespace media {
@@ -26,7 +31,8 @@
kPulse,
kAlsa,
kCras,
- kAudioIOMax = kCras // Must always be equal to largest logged entry.
+ kSndio,
+ kAudioIOMax = kSndio // Must always be equal to largest logged entry.
};
std::unique_ptr<media::AudioManager> CreateAudioManager(
@@ -39,6 +45,16 @@
audio_log_factory);
}
+#if defined(USE_SNDIO)
+ struct sio_hdl *hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
+ if (hdl != NULL) {
+ sio_close(hdl);
+ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kSndio, kAudioIOMax + 1);
+ return std::make_unique<AudioManagerSndio>(std::move(audio_thread),
+ audio_log_factory);
+ }
+#endif
+
#if defined(USE_CRAS)
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseCras)) {
UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kCras, kAudioIOMax + 1);
diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/audio_manager_sndio.cc chromium-83.0.4103.97/media/audio/sndio/audio_manager_sndio.cc
--- media/audio/sndio/audio_manager_sndio.cc.orig 1970-01-01 01:00:00.000000000 +0100
+++ media/audio/sndio/audio_manager_sndio.cc 2020-06-13 17:32:28.511395969 +0200
@@ -0,0 +1,148 @@
+// Copyright (c) 2012 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 "media/audio/sndio/audio_manager_sndio.h"
+
+#include "base/metrics/histogram_macros.h"
+#include "base/memory/ptr_util.h"
+#include "media/audio/audio_device_description.h"
+#include "media/audio/audio_output_dispatcher.h"
+#include "media/audio/sndio/sndio_input.h"
+#include "media/audio/sndio/sndio_output.h"
+#include "media/base/limits.h"
+#include "media/base/media_switches.h"
+
+namespace media {
+
+
+// Maximum number of output streams that can be open simultaneously.
+static const int kMaxOutputStreams = 4;
+
+// Default sample rate for input and output streams.
+static const int kDefaultSampleRate = 48000;
+
+void AddDefaultDevice(AudioDeviceNames* device_names) {
+ DCHECK(device_names->empty());
+ device_names->push_front(AudioDeviceName::CreateDefault());
+}
+
+bool AudioManagerSndio::HasAudioOutputDevices() {
+ return true;
+}
+
+bool AudioManagerSndio::HasAudioInputDevices() {
+ return true;
+}
+
+void AudioManagerSndio::GetAudioInputDeviceNames(
+ AudioDeviceNames* device_names) {
+ DCHECK(device_names->empty());
+ AddDefaultDevice(device_names);
+}
+
+void AudioManagerSndio::GetAudioOutputDeviceNames(
+ AudioDeviceNames* device_names) {
+ AddDefaultDevice(device_names);
+}
+
+const char* AudioManagerSndio::GetName() {
+ return "SNDIO";
+}
+
+AudioParameters AudioManagerSndio::GetInputStreamParameters(
+ const std::string& device_id) {
+ static const int kDefaultInputBufferSize = 1024;
+
+ int user_buffer_size = GetUserBufferSize();
+ int buffer_size = user_buffer_size ?
+ user_buffer_size : kDefaultInputBufferSize;
+
+ return AudioParameters(
+ AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO,
+ kDefaultSampleRate, buffer_size);
+}
+
+AudioManagerSndio::AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
+ AudioLogFactory* audio_log_factory)
+ : AudioManagerBase(std::move(audio_thread),
+ audio_log_factory) {
+ DLOG(WARNING) << "AudioManagerSndio";
+ SetMaxOutputStreamsAllowed(kMaxOutputStreams);
+}
+
+AudioManagerSndio::~AudioManagerSndio() {
+ Shutdown();
+}
+
+AudioOutputStream* AudioManagerSndio::MakeLinearOutputStream(
+ const AudioParameters& params,
+ const LogCallback& log_callback) {
+ DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
+ return MakeOutputStream(params);
+}
+
+AudioOutputStream* AudioManagerSndio::MakeLowLatencyOutputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) {
+ DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!";
+ DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
+ return MakeOutputStream(params);
+}
+
+AudioInputStream* AudioManagerSndio::MakeLinearInputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) {
+ DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
+ return MakeInputStream(params);
+}
+
+AudioInputStream* AudioManagerSndio::MakeLowLatencyInputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) {
+ DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
+ return MakeInputStream(params);
+}
+
+AudioParameters AudioManagerSndio::GetPreferredOutputStreamParameters(
+ const std::string& output_device_id,
+ const AudioParameters& input_params) {
+ // TODO(tommi): Support |output_device_id|.
+ DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!";
+ static const int kDefaultOutputBufferSize = 2048;
+
+ ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO;
+ int sample_rate = kDefaultSampleRate;
+ int buffer_size = kDefaultOutputBufferSize;
+ if (input_params.IsValid()) {
+ sample_rate = input_params.sample_rate();
+ channel_layout = input_params.channel_layout();
+ buffer_size = std::min(buffer_size, input_params.frames_per_buffer());
+ }
+
+ int user_buffer_size = GetUserBufferSize();
+ if (user_buffer_size)
+ buffer_size = user_buffer_size;
+
+ return AudioParameters(
+ AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
+ sample_rate, buffer_size);
+}
+
+AudioInputStream* AudioManagerSndio::MakeInputStream(
+ const AudioParameters& params) {
+ DLOG(WARNING) << "MakeInputStream";
+ return new SndioAudioInputStream(this,
+ AudioDeviceDescription::kDefaultDeviceId, params);
+}
+
+AudioOutputStream* AudioManagerSndio::MakeOutputStream(
+ const AudioParameters& params) {
+ DLOG(WARNING) << "MakeOutputStream";
+ return new SndioAudioOutputStream(params, this);
+}
+
+} // namespace media
diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/audio_manager_sndio.h chromium-83.0.4103.97/media/audio/sndio/audio_manager_sndio.h
--- media/audio/sndio/audio_manager_sndio.h.orig 1970-01-01 01:00:00.000000000 +0100
+++ media/audio/sndio/audio_manager_sndio.h 2020-06-13 17:32:28.511395969 +0200
@@ -0,0 +1,65 @@
+// Copyright (c) 2012 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.
+
+#ifndef MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
+#define MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
+
+#include <set>
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/threading/thread.h"
+#include "media/audio/audio_manager_base.h"
+
+namespace media {
+
+class MEDIA_EXPORT AudioManagerSndio : public AudioManagerBase {
+ public:
+ AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
+ AudioLogFactory* audio_log_factory);
+ ~AudioManagerSndio() override;
+
+ // Implementation of AudioManager.
+ bool HasAudioOutputDevices() override;
+ bool HasAudioInputDevices() override;
+ void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
+ void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
+ AudioParameters GetInputStreamParameters(
+ const std::string& device_id) override;
+ const char* GetName() override;
+
+ // Implementation of AudioManagerBase.
+ AudioOutputStream* MakeLinearOutputStream(
+ const AudioParameters& params,
+ const LogCallback& log_callback) override;
+ AudioOutputStream* MakeLowLatencyOutputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) override;
+ AudioInputStream* MakeLinearInputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) override;
+ AudioInputStream* MakeLowLatencyInputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) override;
+
+ protected:
+ AudioParameters GetPreferredOutputStreamParameters(
+ const std::string& output_device_id,
+ const AudioParameters& input_params) override;
+
+ private:
+ // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
+ AudioOutputStream* MakeOutputStream(const AudioParameters& params);
+ AudioInputStream* MakeInputStream(const AudioParameters& params);
+
+ DISALLOW_COPY_AND_ASSIGN(AudioManagerSndio);
+};
+
+} // namespace media
+
+#endif // MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_input.cc chromium-83.0.4103.97/media/audio/sndio/sndio_input.cc
--- media/audio/sndio/sndio_input.cc.orig 1970-01-01 01:00:00.000000000 +0100
+++ media/audio/sndio/sndio_input.cc 2020-06-13 17:32:28.511395969 +0200
@@ -0,0 +1,200 @@
+// 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.
+
+#include "base/bind.h"
+#include "base/logging.h"
+#include "base/macros.h"
+#include "media/base/audio_timestamp_helper.h"
+#include "media/audio/sndio/audio_manager_sndio.h"
+#include "media/audio/audio_manager.h"
+#include "media/audio/sndio/sndio_input.h"
+
+namespace media {
+
+static const SampleFormat kSampleFormat = kSampleFormatS16;
+
+void SndioAudioInputStream::OnMoveCallback(void *arg, int delta)
+{
+ SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
+
+ self->hw_delay += delta;
+}
+
+void *SndioAudioInputStream::ThreadEntry(void *arg) {
+ SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
+
+ self->ThreadLoop();
+ return NULL;
+}
+
+SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* manager,
+ const std::string& device_name,
+ const AudioParameters& params)
+ : manager(manager),
+ params(params),
+ audio_bus(AudioBus::Create(params)),
+ state(kClosed) {
+}
+
+SndioAudioInputStream::~SndioAudioInputStream() {
+ if (state != kClosed)
+ Close();
+}
+
+bool SndioAudioInputStream::Open() {
+ struct sio_par par;
+ int sig;
+
+ if (state != kClosed)
+ return false;
+
+ if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
+ params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
+ LOG(WARNING) << "Unsupported audio format.";
+ return false;
+ }
+
+ sio_initpar(&par);
+ par.rate = params.sample_rate();
+ par.rchan = params.channels();
+ par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
+ par.bps = par.bits / 8;
+ par.sig = sig = par.bits != 8 ? 1 : 0;
+ par.le = SIO_LE_NATIVE;
+ par.appbufsz = params.frames_per_buffer();
+
+ hdl = sio_open(SIO_DEVANY, SIO_REC, 0);
+
+ if (hdl == NULL) {
+ LOG(ERROR) << "Couldn't open audio device.";
+ return false;
+ }
+
+ if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
+ LOG(ERROR) << "Couldn't set audio parameters.";
+ goto bad_close;
+ }
+
+ if (par.rate != (unsigned int)params.sample_rate() ||
+ par.rchan != (unsigned int)params.channels() ||
+ par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
+ par.sig != (unsigned int)sig ||
+ (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
+ (par.bits != par.bps * 8)) {
+ LOG(ERROR) << "Unsupported audio parameters.";
+ goto bad_close;
+ }
+ state = kStopped;
+ buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
+ sio_onmove(hdl, &OnMoveCallback, this);
+ return true;
+bad_close:
+ sio_close(hdl);
+ return false;
+}
+
+void SndioAudioInputStream::Start(AudioInputCallback* cb) {
+
+ StartAgc();
+
+ state = kRunning;
+ hw_delay = 0;
+ callback = cb;
+ sio_start(hdl);
+ if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
+ LOG(ERROR) << "Failed to create real-time thread for recording.";
+ sio_stop(hdl);
+ state = kStopped;
+ }
+}
+
+void SndioAudioInputStream::Stop() {
+
+ if (state == kStopped)
+ return;
+
+ state = kStopWait;
+ pthread_join(thread, NULL);
+ sio_stop(hdl);
+ state = kStopped;
+
+ StopAgc();
+}
+
+void SndioAudioInputStream::Close() {
+
+ if (state == kClosed)
+ return;
+
+ if (state == kRunning)
+ Stop();
+
+ state = kClosed;
+ delete [] buffer;
+ sio_close(hdl);
+
+ manager->ReleaseInputStream(this);
+}
+
+double SndioAudioInputStream::GetMaxVolume() {
+ // Not supported
+ return 0.0;
+}
+
+void SndioAudioInputStream::SetVolume(double volume) {
+ // Not supported. Do nothing.
+}
+
+double SndioAudioInputStream::GetVolume() {
+ // Not supported.
+ return 0.0;
+}
+
+bool SndioAudioInputStream::IsMuted() {
+ // Not supported.
+ return false;
+}
+
+void SndioAudioInputStream::SetOutputDeviceForAec(
+ const std::string& output_device_id) {
+ // Not supported.
+}
+
+void SndioAudioInputStream::ThreadLoop(void) {
+ size_t todo, n;
+ char *data;
+ unsigned int nframes;
+ double normalized_volume = 0.0;
+
+ nframes = audio_bus->frames();
+
+ while (state == kRunning && !sio_eof(hdl)) {
+
+ GetAgcVolume(&normalized_volume);
+
+ // read one block
+ todo = nframes * params.GetBytesPerFrame(kSampleFormat);
+ data = buffer;
+ while (todo > 0) {
+ n = sio_read(hdl, data, todo);
+ if (n == 0)
+ return; // unrecoverable I/O error
+ todo -= n;
+ data += n;
+ }
+ hw_delay -= nframes;
+
+ // convert frames count to TimeDelta
+ const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
+ params.sample_rate());
+
+ // push into bus
+ audio_bus->FromInterleaved(buffer, nframes, SampleFormatToBytesPerChannel(kSampleFormat));
+
+ // invoke callback
+ callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1.);
+ }
+}
+
+} // namespace media
diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_input.h chromium-83.0.4103.97/media/audio/sndio/sndio_input.h
--- media/audio/sndio/sndio_input.h.orig 1970-01-01 01:00:00.000000000 +0100
+++ media/audio/sndio/sndio_input.h 2020-06-13 17:32:28.511395969 +0200
@@ -0,0 +1,91 @@
+// 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.
+
+#ifndef MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
+#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
+
+#include <stdint.h>
+#include <string>
+#include <sndio.h>
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "base/time/time.h"
+#include "media/audio/agc_audio_stream.h"
+#include "media/audio/audio_io.h"
+#include "media/audio/audio_device_description.h"
+#include "media/base/audio_parameters.h"
+
+namespace media {
+
+class AudioManagerBase;
+
+// Implementation of AudioOutputStream using sndio(7)
+class SndioAudioInputStream : public AgcAudioStream<AudioInputStream> {
+ public:
+ // Pass this to the constructor if you want to attempt auto-selection
+ // of the audio recording device.
+ static const char kAutoSelectDevice[];
+
+ // Create a PCM Output stream for the SNDIO device identified by
+ // |device_name|. If unsure of what to use for |device_name|, use
+ // |kAutoSelectDevice|.
+ SndioAudioInputStream(AudioManagerBase* audio_manager,
+ const std::string& device_name,
+ const AudioParameters& params);
+
+ ~SndioAudioInputStream() override;
+
+ // Implementation of AudioInputStream.
+ bool Open() override;
+ void Start(AudioInputCallback* callback) override;
+ void Stop() override;
+ void Close() override;
+ double GetMaxVolume() override;
+ void SetVolume(double volume) override;
+ double GetVolume() override;
+ bool IsMuted() override;
+ void SetOutputDeviceForAec(const std::string& output_device_id) override;
+
+ private:
+
+ enum StreamState {
+ kClosed, // Not opened yet
+ kStopped, // Device opened, but not started yet
+ kRunning, // Started, device playing
+ kStopWait // Stopping, waiting for the real-time thread to exit
+ };
+
+ // C-style call-backs
+ static void OnMoveCallback(void *arg, int delta);
+ static void* ThreadEntry(void *arg);
+
+ // Continuously moves data from the device to the consumer
+ void ThreadLoop();
+ // Our creator, the audio manager needs to be notified when we close.
+ AudioManagerBase* manager;
+ // Parameters of the source
+ AudioParameters params;
+ // We store data here for consumer
+ std::unique_ptr<AudioBus> audio_bus;
+ // Call-back that consumes recorded data
+ AudioInputCallback* callback; // Valid during a recording session.
+ // Handle of the audio device
+ struct sio_hdl* hdl;
+ // Current state of the stream
+ enum StreamState state;
+ // High priority thread running ThreadLoop()
+ pthread_t thread;
+ // Number of frames buffered in the hardware
+ int hw_delay;
+ // Temporary buffer where data is stored sndio-compatible format
+ char* buffer;
+
+ DISALLOW_COPY_AND_ASSIGN(SndioAudioInputStream);
+};
+
+} // namespace media
+
+#endif // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_output.cc chromium-83.0.4103.97/media/audio/sndio/sndio_output.cc
--- media/audio/sndio/sndio_output.cc.orig 1970-01-01 01:00:00.000000000 +0100
+++ media/audio/sndio/sndio_output.cc 2020-06-13 17:32:28.511395969 +0200
@@ -0,0 +1,183 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/logging.h"
+#include "base/time/time.h"
+#include "base/time/default_tick_clock.h"
+#include "media/audio/audio_manager_base.h"
+#include "media/base/audio_timestamp_helper.h"
+#include "media/audio/sndio/sndio_output.h"
+
+namespace media {
+
+static const SampleFormat kSampleFormat = kSampleFormatS16;
+
+void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) {
+ SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
+
+ self->hw_delay -= delta;
+}
+
+void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) {
+ SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
+
+ self->vol = vol;
+}
+
+void *SndioAudioOutputStream::ThreadEntry(void *arg) {
+ SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
+
+ self->ThreadLoop();
+ return NULL;
+}
+
+SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params,
+ AudioManagerBase* manager)
+ : manager(manager),
+ params(params),
+ audio_bus(AudioBus::Create(params)),
+ state(kClosed),
+ mutex(PTHREAD_MUTEX_INITIALIZER) {
+}
+
+SndioAudioOutputStream::~SndioAudioOutputStream() {
+ if (state != kClosed)
+ Close();
+}
+
+bool SndioAudioOutputStream::Open() {
+ struct sio_par par;
+ int sig;
+
+ if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
+ params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
+ LOG(WARNING) << "Unsupported audio format.";
+ return false;
+ }
+ sio_initpar(&par);
+ par.rate = params.sample_rate();
+ par.pchan = params.channels();
+ par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
+ par.bps = par.bits / 8;
+ par.sig = sig = par.bits != 8 ? 1 : 0;
+ par.le = SIO_LE_NATIVE;
+ par.appbufsz = params.frames_per_buffer();
+
+ hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
+ if (hdl == NULL) {
+ LOG(ERROR) << "Couldn't open audio device.";
+ return false;
+ }
+ if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
+ LOG(ERROR) << "Couldn't set audio parameters.";
+ goto bad_close;
+ }
+ if (par.rate != (unsigned int)params.sample_rate() ||
+ par.pchan != (unsigned int)params.channels() ||
+ par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
+ par.sig != (unsigned int)sig ||
+ (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
+ (par.bits != par.bps * 8)) {
+ LOG(ERROR) << "Unsupported audio parameters.";
+ goto bad_close;
+ }
+ state = kStopped;
+ volpending = 0;
+ vol = 0;
+ buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
+ sio_onmove(hdl, &OnMoveCallback, this);
+ sio_onvol(hdl, &OnVolCallback, this);
+ return true;
+ bad_close:
+ sio_close(hdl);
+ return false;
+}
+
+void SndioAudioOutputStream::Close() {
+ if (state == kClosed)
+ return;
+ if (state == kRunning)
+ Stop();
+ state = kClosed;
+ delete [] buffer;
+ sio_close(hdl);
+ manager->ReleaseOutputStream(this); // Calls the destructor
+}
+
+void SndioAudioOutputStream::Start(AudioSourceCallback* callback) {
+ state = kRunning;
+ hw_delay = 0;
+ source = callback;
+ sio_start(hdl);
+ if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
+ LOG(ERROR) << "Failed to create real-time thread.";
+ sio_stop(hdl);
+ state = kStopped;
+ }
+}
+
+void SndioAudioOutputStream::Stop() {
+ if (state == kStopped)
+ return;
+ state = kStopWait;
+ pthread_join(thread, NULL);
+ sio_stop(hdl);
+ state = kStopped;
+}
+
+void SndioAudioOutputStream::SetVolume(double v) {
+ pthread_mutex_lock(&mutex);
+ vol = v * SIO_MAXVOL;
+ volpending = 1;
+ pthread_mutex_unlock(&mutex);
+}
+
+void SndioAudioOutputStream::GetVolume(double* v) {
+ pthread_mutex_lock(&mutex);
+ *v = vol * (1. / SIO_MAXVOL);
+ pthread_mutex_unlock(&mutex);
+}
+
+// This stream is always used with sub second buffer sizes, where it's
+// sufficient to simply always flush upon Start().
+void SndioAudioOutputStream::Flush() {}
+
+void SndioAudioOutputStream::ThreadLoop(void) {
+ int avail, count, result;
+
+ while (state == kRunning) {
+ // Update volume if needed
+ pthread_mutex_lock(&mutex);
+ if (volpending) {
+ volpending = 0;
+ sio_setvol(hdl, vol);
+ }
+ pthread_mutex_unlock(&mutex);
+
+ // Get data to play
+ const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
+ params.sample_rate());
+ count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get());
+ audio_bus->ToInterleaved(count, SampleFormatToBytesPerChannel(kSampleFormat), buffer);
+ if (count == 0) {
+ // We have to submit something to the device
+ count = audio_bus->frames();
+ memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat));
+ LOG(WARNING) << "No data to play, running empty cycle.";
+ }
+
+ // Submit data to the device
+ avail = count * params.GetBytesPerFrame(kSampleFormat);
+ result = sio_write(hdl, buffer, avail);
+ if (result == 0) {
+ LOG(WARNING) << "Audio device disconnected.";
+ break;
+ }
+
+ // Update hardware pointer
+ hw_delay += count;
+ }
+}
+
+} // namespace media
diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_output.h chromium-83.0.4103.97/media/audio/sndio/sndio_output.h
--- media/audio/sndio/sndio_output.h.orig 1970-01-01 01:00:00.000000000 +0100
+++ media/audio/sndio/sndio_output.h 2020-06-13 17:32:28.511395969 +0200
@@ -0,0 +1,86 @@
+// Copyright (c) 2012 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.
+
+#ifndef MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
+#define MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
+
+#include <pthread.h>
+#include <sndio.h>
+
+#include "base/time/tick_clock.h"
+#include "base/time/time.h"
+#include "media/audio/audio_io.h"
+
+namespace media {
+
+class AudioManagerBase;
+
+// Implementation of AudioOutputStream using sndio(7)
+class SndioAudioOutputStream : public AudioOutputStream {
+ public:
+ // The manager is creating this object
+ SndioAudioOutputStream(const AudioParameters& params,
+ AudioManagerBase* manager);
+ virtual ~SndioAudioOutputStream();
+
+ // Implementation of AudioOutputStream.
+ bool Open() override;
+ void Close() override;
+ void Start(AudioSourceCallback* callback) override;
+ void Stop() override;
+ void SetVolume(double volume) override;
+ void GetVolume(double* volume) override;
+ void Flush() override;
+
+ friend void sndio_onmove(void *arg, int delta);
+ friend void sndio_onvol(void *arg, unsigned int vol);
+ friend void *sndio_threadstart(void *arg);
+
+ private:
+ enum StreamState {
+ kClosed, // Not opened yet
+ kStopped, // Device opened, but not started yet
+ kRunning, // Started, device playing
+ kStopWait // Stopping, waiting for the real-time thread to exit
+ };
+
+ // C-style call-backs
+ static void OnMoveCallback(void *arg, int delta);
+ static void OnVolCallback(void *arg, unsigned int vol);
+ static void* ThreadEntry(void *arg);
+
+ // Continuously moves data from the producer to the device
+ void ThreadLoop(void);
+
+ // Our creator, the audio manager needs to be notified when we close.
+ AudioManagerBase* manager;
+ // Parameters of the source
+ AudioParameters params;
+ // Source stores data here
+ std::unique_ptr<AudioBus> audio_bus;
+ // Call-back that produces data to play
+ AudioSourceCallback* source;
+ // Handle of the audio device
+ struct sio_hdl* hdl;
+ // Current state of the stream
+ enum StreamState state;
+ // High priority thread running ThreadLoop()
+ pthread_t thread;
+ // Protects vol, volpending and hw_delay
+ pthread_mutex_t mutex;
+ // Current volume in the 0..SIO_MAXVOL range
+ int vol;
+ // Set to 1 if volumes must be refreshed in the realtime thread
+ int volpending;
+ // Number of frames buffered in the hardware
+ int hw_delay;
+ // Temporary buffer where data is stored sndio-compatible format
+ char* buffer;
+
+ DISALLOW_COPY_AND_ASSIGN(SndioAudioOutputStream);
+};
+
+} // namespace media
+
+#endif // MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
diff -Naur chromium-83.0.4103.97.orig/media/media_options.gni chromium-83.0.4103.97/media/media_options.gni
--- media/media_options.gni.orig 2020-06-03 20:40:26.000000000 +0200
+++ media/media_options.gni 2020-06-13 17:32:28.512395963 +0200
@@ -119,6 +119,9 @@
# Enables runtime selection of ALSA library for audio.
use_alsa = false
+ # Enable runtime selection of sndio(7)
+ use_sndio = false
+
# Alsa should be used on non-Android, non-Mac POSIX systems.
# Alsa should be used on desktop Chromecast and audio-only Chromecast builds.
if (is_posix && !is_android && !is_mac &&

View File

@ -0,0 +1,22 @@
diff --git third_party/node/node.py third_party/node/node.py
index 8097e2c49..10e6a16ea 100755
--- third_party/node/node.py
+++ third_party/node/node.py
@@ -10,11 +10,12 @@ import sys
def GetBinaryPath():
- return os_path.join(os_path.dirname(__file__), *{
- 'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'),
- 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
- 'Windows': ('win', 'node.exe'),
- }[platform.system()])
+ return "/usr/bin/node"
+ #return os_path.join(os_path.dirname(__file__), *{
+ # 'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'),
+ # 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
+ # 'Windows': ('win', 'node.exe'),
+ #}[platform.system()])
def RunNode(cmd_parts, stdout=None):

View File

@ -0,0 +1,51 @@
Description: allow sandboxed code to call gettime64
Add __NR_clock_gettime64 and __NR_clock_nanosleep_time64 to syscall whitelist
and clock selection parameter filtering code.
Add __NR_utimensat_time64 to syscall whitelist
Conditionalise additions on the new calls existing, because they do not exist
on 64-bit architectures.
Author: Peter Michael Green <plugwash@raspbian.org>
Index: chromium-83.0.4103.116/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
===================================================================
--- sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+++ sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
@@ -148,7 +148,11 @@ ResultExpr EvaluateSyscallImpl(int fs_de
return Allow();
#endif
+#ifdef __NR_clock_gettime64
+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_gettime64 || sysno == __NR_clock_nanosleep || sysno == __NR_clock_nanosleep_time64) {
+#else
if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) {
+#endif
return RestrictClockID();
}
Index: chromium-83.0.4103.116/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
===================================================================
--- sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -38,6 +38,10 @@ bool SyscallSets::IsAllowedGettime(int s
case __NR_clock_getres: // Allowed only on Android with parameters
// filtered by RestrictClokID().
case __NR_clock_gettime: // Parameters filtered by RestrictClockID().
+#ifdef __NR_clock_gettime64
+ case __NR_clock_gettime64: // Parameters filtered by RestrictClockID().
+ case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID().
+#endif
case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID().
case __NR_clock_settime: // Privileged.
#if defined(__i386__) || \
@@ -159,6 +163,9 @@ bool SyscallSets::IsFileSystem(int sysno
case __NR_utime:
#endif
case __NR_utimensat: // New.
+#ifdef __NR_utimensat_time64
+ case __NR_utimensat_time64:
+#endif
return true;
default:
return false;

View File

@ -0,0 +1,10 @@
--- third_party/webrtc/modules/desktop_capture/linux/window_capturer_x11.cc.orig 2019-02-21 21:21:24.488058990 +0100
+++ third_party/webrtc/modules/desktop_capture/linux/window_capturer_x11.cc 2019-02-21 21:21:36.151961064 +0100
@@ -16,6 +16,7 @@
#include <memory>
#include <string>
+#include <string.h>
#include <utility>
#include "modules/desktop_capture/desktop_frame.h"

View File

@ -0,0 +1,33 @@
Upstream: Yes, https://webrtc-review.googlesource.com/9384
Reason: Fixes musl builds of webrtc
From 7f90e2cceda0458cf56026eb6ccffb961a47804b Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Fri, 13 Oct 2017 15:49:32 +0200
Subject: [PATCH] IWYU: Include math.h for round(3).
math.h was being implicitly included, which can break the build with
alternative libc implementations.
Bug: None
Change-Id: I969b320b65d0f44abb33d3e1036cfbcb859a4952
Reviewed-on: https://webrtc-review.googlesource.com/9384
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#20292}
---
--- third_party/webrtc/p2p/base/port.cc
+++ third_party/webrtc/p2p/base/port.cc
@@ -10,6 +10,8 @@
#include "p2p/base/port.h"
+#include <math.h>
+
#include <algorithm>
#include <vector>
--
2.15.0.rc2

View File

@ -0,0 +1,10 @@
--- third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h 2020-08-10 20:42:29.000000000 +0200
+++ third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h 2020-09-04 12:47:07.014833633 +0200
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_
#include <array>
+#include <cstddef>
namespace webrtc {

View File

@ -0,0 +1,72 @@
Uses generic target for now. To use ppc64le, change --target to ppc64le-gnu
and add --enable-vsx, and change generic to ppc for the rtcd header.
From 18e6c5c55cfae0cfb458d8210d7bc709360a0e90 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Wed, 9 Sep 2020 19:08:25 +0200
Subject: [PATCH] enable generation of ppc64 libvpx bits
this doesn't update the gni file, that's done from
the template by running the appropriate scripts
---
third_party/libvpx/BUILD.gn | 4 ++++
third_party/libvpx/generate_gni.sh | 9 +++++++++
2 files changed, 13 insertions(+)
diff --git third_party/libvpx/BUILD.gn third_party/libvpx/BUILD.gn
index 7198e59..3300485 100644
--- third_party/libvpx/BUILD.gn
+++ third_party/libvpx/BUILD.gn
@@ -336,6 +336,8 @@ static_library("libvpx") {
} else {
sources = libvpx_srcs_arm64
}
+ } else if (current_cpu == "ppc64") {
+ sources = libvpx_srcs_ppc64
}
configs -= [ "//build/config/compiler:chromium_code" ]
diff --git third_party/libvpx/generate_gni.sh third_party/libvpx/generate_gni.sh
index bcf84b0..8a3f4f1 100755
--- third_party/libvpx/generate_gni.sh
+++ third_party/libvpx/generate_gni.sh
@@ -361,6 +361,7 @@ gen_config_files linux/arm-neon-highbd "--target=armv7-linux-gcc ${all_platforms
gen_config_files linux/arm64-highbd "--target=armv8-linux-gcc ${all_platforms} ${HIGHBD}"
gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}"
gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
+gen_config_files linux/ppc64 "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files win/arm64 "--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD}"
gen_config_files win/ia32 "--target=x86-win32-vs14 ${all_platforms} ${x86_platforms}"
@@ -386,6 +387,7 @@ lint_config linux/arm-neon-highbd
lint_config linux/arm64-highbd
lint_config linux/mipsel
lint_config linux/mips64el
+lint_config linux/ppc64
lint_config linux/generic
lint_config win/arm64
lint_config win/ia32
@@ -415,6 +417,7 @@ gen_rtcd_header linux/arm-neon-highbd armv7
gen_rtcd_header linux/arm64-highbd armv8
gen_rtcd_header linux/mipsel mipsel
gen_rtcd_header linux/mips64el mips64el
+gen_rtcd_header linux/ppc64 generic
gen_rtcd_header linux/generic generic
gen_rtcd_header win/arm64 armv8
gen_rtcd_header win/ia32 x86 "${require_sse2}"
@@ -500,6 +503,12 @@ if [ -z $ONLY_CONFIGS ]; then
echo "MIPS64 source list is identical to MIPS source list. No need to generate it."
+ echo "Generate ppc64 source list."
+ config=$(print_config_basic linux/ppc64)
+ make_clean
+ make libvpx_srcs.txt target=libs $config > /dev/null
+ convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_ppc64
+
echo "Generate NaCl source list."
config=$(print_config_basic nacl)
make_clean
--
2.28.0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,18 @@
--- third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
+++ third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
@@ -574,6 +574,7 @@ swiftshader_llvm_source_set("swiftshader
"llvm/lib/MC/MCAsmInfoCOFF.cpp",
"llvm/lib/MC/MCAsmInfoDarwin.cpp",
"llvm/lib/MC/MCAsmInfoELF.cpp",
+ "llvm/lib/MC/MCAsmInfoXCOFF.cpp",
"llvm/lib/MC/MCAsmMacro.cpp",
"llvm/lib/MC/MCAsmStreamer.cpp",
"llvm/lib/MC/MCAssembler.cpp",
@@ -629,6 +630,7 @@ swiftshader_llvm_source_set("swiftshader
"llvm/lib/MC/MCWinCOFFStreamer.cpp",
"llvm/lib/MC/MCWinEH.cpp",
"llvm/lib/MC/MCXCOFFStreamer.cpp",
+ "llvm/lib/MC/MCXCOFFObjectTargetWriter.cpp",
"llvm/lib/MC/MachObjectWriter.cpp",
"llvm/lib/MC/StringTableBuilder.cpp",
"llvm/lib/MC/SubtargetFeature.cpp",

View File

@ -0,0 +1,42 @@
From ff4122f236b70c272c746d0c336cdbd588d78cd1 Mon Sep 17 00:00:00 2001
From: Elvis Pranskevichus <elvis@magic.io>
Date: Thu, 12 Dec 2019 16:12:18 -0500
Subject: [PATCH] Add a script to list patch targets
---
script/list_patch_targets.py | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100755 script/list_patch_targets.py
diff --git a/script/list_patch_targets.py b/script/list_patch_targets.py
new file mode 100755
index 000000000..55173bac9
--- /dev/null
+++ b/script/list_patch_targets.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+
+import argparse
+import json
+
+
+def parse_args():
+ parser = argparse.ArgumentParser(description='Apply Electron patches')
+ parser.add_argument('config', nargs='+',
+ type=argparse.FileType('r'),
+ help='patches\' config(s) in the JSON format')
+ return parser.parse_args()
+
+
+def main():
+ configs = parse_args().config
+ for config_json in configs:
+ for patch_dir, repo in json.load(config_json).iteritems():
+ print(repo)
+
+
+if __name__ == '__main__':
+ main()
--
2.23.0

View File

@ -0,0 +1,47 @@
diff --git a/build/args/release.gn b/build/args/release.gn
index e5017f6e1..59207b389 100644
--- a/build/args/release.gn
+++ b/build/args/release.gn
@@ -1,6 +1,4 @@
import("all.gn")
-is_component_build = false
-is_official_build = true
# This may be guarded behind is_chrome_branded alongside
# proprietary_codecs https://webrtc-review.googlesource.com/c/src/+/36321,
@@ -8,9 +6,3 @@ is_official_build = true
# The initialization of the decoder depends on whether ffmpeg has
# been built with H.264 support.
rtc_use_h264 = proprietary_codecs
-
-# By default, Electron builds ffmpeg with proprietary codecs enabled. In order
-# to facilitate users who don't want to ship proprietary codecs in ffmpeg, or
-# who have an LGPL requirement to ship ffmpeg as a dynamically linked library,
-# we build ffmpeg as a shared library.
-is_component_ffmpeg = true
diff --git a/build/npm.gni b/build/npm.gni
index a1987d095..fb33a14c3 100644
--- a/build/npm.gni
+++ b/build/npm.gni
@@ -35,7 +35,6 @@ template("npm_action") {
if (!defined(deps)) {
deps = []
}
- deps += [ ":npm_pre_flight_" + target_name ]
script = "//electron/build/npm-run.py"
args = [
diff --git a/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch b/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch
index 0dc9916be..7eaa46bf5 100644
--- a/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch
+++ b/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch
@@ -30,7 +30,7 @@
+ # these values being accurate.
+ 'build_v8_with_gn': 'false',
+ 'enable_lto%': 'false',
-+
++ 'openssl_fips': '',
'conditions': [
['target_arch=="arm64"', {
# Disabled pending https://github.com/nodejs/node/issues/23913.

View File

@ -0,0 +1,17 @@
--- a/build/zip.py.orig 2020-04-27 17:59:53.499281667 +0200
+++ b/build/zip.py 2020-04-27 17:59:57.655839143 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
from __future__ import print_function
import os
import subprocess
--- a/build/npm-run.py.orig 2020-04-27 17:59:50.829351807 +0200
+++ b/build/npm-run.py 2020-04-27 18:00:02.702373256 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
from __future__ import print_function
import os
import subprocess

View File

@ -0,0 +1,10 @@
--- a/script/apply_all_patches.py 2020-08-22 17:46:41.796707506 +0200
+++ - 2020-08-22 17:47:05.887813512 +0200
@@ -14,6 +14,7 @@
for patch_dir, repo in dirs.items():
git.import_patches(repo=repo, patch_data=patch_from_dir(patch_dir),
threeway=threeway is not None,
+ exclude=['test/mjsunit/**', 'content/test/**', 'test/cctest/**', 'test/unittests/**', 'third_party/blink/web_tests/**'],
committer_name="Electron Scripts", committer_email="scripts@electron")

View File

@ -0,0 +1,148 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/metrics/histogram_macros.h"
#include "base/memory/ptr_util.h"
#include "media/audio/openbsd/audio_manager_openbsd.h"
#include "media/audio/audio_device_description.h"
#include "media/audio/audio_output_dispatcher.h"
#include "media/audio/sndio/sndio_input.h"
#include "media/audio/sndio/sndio_output.h"
#include "media/base/limits.h"
#include "media/base/media_switches.h"
namespace media {
// Maximum number of output streams that can be open simultaneously.
static const int kMaxOutputStreams = 4;
// Default sample rate for input and output streams.
static const int kDefaultSampleRate = 48000;
void AddDefaultDevice(AudioDeviceNames* device_names) {
DCHECK(device_names->empty());
device_names->push_front(AudioDeviceName::CreateDefault());
}
bool AudioManagerOpenBSD::HasAudioOutputDevices() {
return true;
}
bool AudioManagerOpenBSD::HasAudioInputDevices() {
return true;
}
void AudioManagerOpenBSD::GetAudioInputDeviceNames(
AudioDeviceNames* device_names) {
DCHECK(device_names->empty());
AddDefaultDevice(device_names);
}
void AudioManagerOpenBSD::GetAudioOutputDeviceNames(
AudioDeviceNames* device_names) {
AddDefaultDevice(device_names);
}
const char* AudioManagerOpenBSD::GetName() {
return "SNDIO";
}
AudioParameters AudioManagerOpenBSD::GetInputStreamParameters(
const std::string& device_id) {
static const int kDefaultInputBufferSize = 1024;
int user_buffer_size = GetUserBufferSize();
int buffer_size = user_buffer_size ?
user_buffer_size : kDefaultInputBufferSize;
return AudioParameters(
AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO,
kDefaultSampleRate, buffer_size);
}
AudioManagerOpenBSD::AudioManagerOpenBSD(std::unique_ptr<AudioThread> audio_thread,
AudioLogFactory* audio_log_factory)
: AudioManagerBase(std::move(audio_thread),
audio_log_factory) {
DLOG(WARNING) << "AudioManagerOpenBSD";
SetMaxOutputStreamsAllowed(kMaxOutputStreams);
}
AudioManagerOpenBSD::~AudioManagerOpenBSD() {
Shutdown();
}
AudioOutputStream* AudioManagerOpenBSD::MakeLinearOutputStream(
const AudioParameters& params,
const LogCallback& log_callback) {
DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
return MakeOutputStream(params);
}
AudioOutputStream* AudioManagerOpenBSD::MakeLowLatencyOutputStream(
const AudioParameters& params,
const std::string& device_id,
const LogCallback& log_callback) {
DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!";
DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
return MakeOutputStream(params);
}
AudioInputStream* AudioManagerOpenBSD::MakeLinearInputStream(
const AudioParameters& params,
const std::string& device_id,
const LogCallback& log_callback) {
DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
return MakeInputStream(params);
}
AudioInputStream* AudioManagerOpenBSD::MakeLowLatencyInputStream(
const AudioParameters& params,
const std::string& device_id,
const LogCallback& log_callback) {
DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
return MakeInputStream(params);
}
AudioParameters AudioManagerOpenBSD::GetPreferredOutputStreamParameters(
const std::string& output_device_id,
const AudioParameters& input_params) {
// TODO(tommi): Support |output_device_id|.
DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!";
static const int kDefaultOutputBufferSize = 2048;
ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO;
int sample_rate = kDefaultSampleRate;
int buffer_size = kDefaultOutputBufferSize;
if (input_params.IsValid()) {
sample_rate = input_params.sample_rate();
channel_layout = input_params.channel_layout();
buffer_size = std::min(buffer_size, input_params.frames_per_buffer());
}
int user_buffer_size = GetUserBufferSize();
if (user_buffer_size)
buffer_size = user_buffer_size;
return AudioParameters(
AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
sample_rate, buffer_size);
}
AudioInputStream* AudioManagerOpenBSD::MakeInputStream(
const AudioParameters& params) {
DLOG(WARNING) << "MakeInputStream";
return new SndioAudioInputStream(this,
AudioDeviceDescription::kDefaultDeviceId, params);
}
AudioOutputStream* AudioManagerOpenBSD::MakeOutputStream(
const AudioParameters& params) {
DLOG(WARNING) << "MakeOutputStream";
return new SndioAudioOutputStream(params, this);
}
} // namespace media

View File

@ -0,0 +1,65 @@
// Copyright (c) 2012 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.
#ifndef MEDIA_AUDIO_OPENBSD_AUDIO_MANAGER_OPENBSD_H_
#define MEDIA_AUDIO_OPENBSD_AUDIO_MANAGER_OPENBSD_H_
#include <set>
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/threading/thread.h"
#include "media/audio/audio_manager_base.h"
namespace media {
class MEDIA_EXPORT AudioManagerOpenBSD : public AudioManagerBase {
public:
AudioManagerOpenBSD(std::unique_ptr<AudioThread> audio_thread,
AudioLogFactory* audio_log_factory);
~AudioManagerOpenBSD() override;
// Implementation of AudioManager.
bool HasAudioOutputDevices() override;
bool HasAudioInputDevices() override;
void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
AudioParameters GetInputStreamParameters(
const std::string& device_id) override;
const char* GetName() override;
// Implementation of AudioManagerBase.
AudioOutputStream* MakeLinearOutputStream(
const AudioParameters& params,
const LogCallback& log_callback) override;
AudioOutputStream* MakeLowLatencyOutputStream(
const AudioParameters& params,
const std::string& device_id,
const LogCallback& log_callback) override;
AudioInputStream* MakeLinearInputStream(
const AudioParameters& params,
const std::string& device_id,
const LogCallback& log_callback) override;
AudioInputStream* MakeLowLatencyInputStream(
const AudioParameters& params,
const std::string& device_id,
const LogCallback& log_callback) override;
protected:
AudioParameters GetPreferredOutputStreamParameters(
const std::string& output_device_id,
const AudioParameters& input_params) override;
private:
// Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
AudioOutputStream* MakeOutputStream(const AudioParameters& params);
AudioInputStream* MakeInputStream(const AudioParameters& params);
DISALLOW_COPY_AND_ASSIGN(AudioManagerOpenBSD);
};
} // namespace media
#endif // MEDIA_AUDIO_OPENBSD_AUDIO_MANAGER_OPENBSD_H_

View File

@ -0,0 +1,200 @@
// 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.
#include "base/bind.h"
#include "base/logging.h"
#include "base/macros.h"
#include "media/base/audio_timestamp_helper.h"
#include "media/audio/openbsd/audio_manager_openbsd.h"
#include "media/audio/audio_manager.h"
#include "media/audio/sndio/sndio_input.h"
namespace media {
static const SampleFormat kSampleFormat = kSampleFormatS16;
void SndioAudioInputStream::OnMoveCallback(void *arg, int delta)
{
SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
self->hw_delay += delta;
}
void *SndioAudioInputStream::ThreadEntry(void *arg) {
SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
self->ThreadLoop();
return NULL;
}
SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* manager,
const std::string& device_name,
const AudioParameters& params)
: manager(manager),
params(params),
audio_bus(AudioBus::Create(params)),
state(kClosed) {
}
SndioAudioInputStream::~SndioAudioInputStream() {
if (state != kClosed)
Close();
}
bool SndioAudioInputStream::Open() {
struct sio_par par;
int sig;
if (state != kClosed)
return false;
if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
LOG(WARNING) << "Unsupported audio format.";
return false;
}
sio_initpar(&par);
par.rate = params.sample_rate();
par.rchan = params.channels();
par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
par.bps = par.bits / 8;
par.sig = sig = par.bits != 8 ? 1 : 0;
par.le = SIO_LE_NATIVE;
par.appbufsz = params.frames_per_buffer();
hdl = sio_open(SIO_DEVANY, SIO_REC, 0);
if (hdl == NULL) {
LOG(ERROR) << "Couldn't open audio device.";
return false;
}
if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
LOG(ERROR) << "Couldn't set audio parameters.";
goto bad_close;
}
if (par.rate != (unsigned int)params.sample_rate() ||
par.rchan != (unsigned int)params.channels() ||
par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
par.sig != (unsigned int)sig ||
(par.bps > 1 && par.le != SIO_LE_NATIVE) ||
(par.bits != par.bps * 8)) {
LOG(ERROR) << "Unsupported audio parameters.";
goto bad_close;
}
state = kStopped;
buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
sio_onmove(hdl, &OnMoveCallback, this);
return true;
bad_close:
sio_close(hdl);
return false;
}
void SndioAudioInputStream::Start(AudioInputCallback* cb) {
StartAgc();
state = kRunning;
hw_delay = 0;
callback = cb;
sio_start(hdl);
if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
LOG(ERROR) << "Failed to create real-time thread for recording.";
sio_stop(hdl);
state = kStopped;
}
}
void SndioAudioInputStream::Stop() {
if (state == kStopped)
return;
state = kStopWait;
pthread_join(thread, NULL);
sio_stop(hdl);
state = kStopped;
StopAgc();
}
void SndioAudioInputStream::Close() {
if (state == kClosed)
return;
if (state == kRunning)
Stop();
state = kClosed;
delete [] buffer;
sio_close(hdl);
manager->ReleaseInputStream(this);
}
double SndioAudioInputStream::GetMaxVolume() {
// Not supported
return 0.0;
}
void SndioAudioInputStream::SetVolume(double volume) {
// Not supported. Do nothing.
}
double SndioAudioInputStream::GetVolume() {
// Not supported.
return 0.0;
}
bool SndioAudioInputStream::IsMuted() {
// Not supported.
return false;
}
void SndioAudioInputStream::SetOutputDeviceForAec(
const std::string& output_device_id) {
// Not supported.
}
void SndioAudioInputStream::ThreadLoop(void) {
size_t todo, n;
char *data;
unsigned int nframes;
double normalized_volume = 0.0;
nframes = audio_bus->frames();
while (state == kRunning && !sio_eof(hdl)) {
GetAgcVolume(&normalized_volume);
// read one block
todo = nframes * params.GetBytesPerFrame(kSampleFormat);
data = buffer;
while (todo > 0) {
n = sio_read(hdl, data, todo);
if (n == 0)
return; // unrecoverable I/O error
todo -= n;
data += n;
}
hw_delay -= nframes;
// convert frames count to TimeDelta
const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
params.sample_rate());
// push into bus
audio_bus->FromInterleaved(buffer, nframes, SampleFormatToBytesPerChannel(kSampleFormat));
// invoke callback
callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1.);
}
}
} // namespace media

View File

@ -0,0 +1,91 @@
// 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.
#ifndef MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
#include <stdint.h>
#include <string>
#include <sndio.h>
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "media/audio/agc_audio_stream.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_device_description.h"
#include "media/base/audio_parameters.h"
namespace media {
class AudioManagerBase;
// Implementation of AudioOutputStream using sndio(7)
class SndioAudioInputStream : public AgcAudioStream<AudioInputStream> {
public:
// Pass this to the constructor if you want to attempt auto-selection
// of the audio recording device.
static const char kAutoSelectDevice[];
// Create a PCM Output stream for the SNDIO device identified by
// |device_name|. If unsure of what to use for |device_name|, use
// |kAutoSelectDevice|.
SndioAudioInputStream(AudioManagerBase* audio_manager,
const std::string& device_name,
const AudioParameters& params);
~SndioAudioInputStream() override;
// Implementation of AudioInputStream.
bool Open() override;
void Start(AudioInputCallback* callback) override;
void Stop() override;
void Close() override;
double GetMaxVolume() override;
void SetVolume(double volume) override;
double GetVolume() override;
bool IsMuted() override;
void SetOutputDeviceForAec(const std::string& output_device_id) override;
private:
enum StreamState {
kClosed, // Not opened yet
kStopped, // Device opened, but not started yet
kRunning, // Started, device playing
kStopWait // Stopping, waiting for the real-time thread to exit
};
// C-style call-backs
static void OnMoveCallback(void *arg, int delta);
static void* ThreadEntry(void *arg);
// Continuously moves data from the device to the consumer
void ThreadLoop();
// Our creator, the audio manager needs to be notified when we close.
AudioManagerBase* manager;
// Parameters of the source
AudioParameters params;
// We store data here for consumer
std::unique_ptr<AudioBus> audio_bus;
// Call-back that consumes recorded data
AudioInputCallback* callback; // Valid during a recording session.
// Handle of the audio device
struct sio_hdl* hdl;
// Current state of the stream
enum StreamState state;
// High priority thread running ThreadLoop()
pthread_t thread;
// Number of frames buffered in the hardware
int hw_delay;
// Temporary buffer where data is stored sndio-compatible format
char* buffer;
DISALLOW_COPY_AND_ASSIGN(SndioAudioInputStream);
};
} // namespace media
#endif // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_

View File

@ -0,0 +1,183 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/logging.h"
#include "base/time/time.h"
#include "base/time/default_tick_clock.h"
#include "media/audio/audio_manager_base.h"
#include "media/base/audio_timestamp_helper.h"
#include "media/audio/sndio/sndio_output.h"
namespace media {
static const SampleFormat kSampleFormat = kSampleFormatS16;
void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) {
SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
self->hw_delay -= delta;
}
void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) {
SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
self->vol = vol;
}
void *SndioAudioOutputStream::ThreadEntry(void *arg) {
SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
self->ThreadLoop();
return NULL;
}
SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params,
AudioManagerBase* manager)
: manager(manager),
params(params),
audio_bus(AudioBus::Create(params)),
state(kClosed),
mutex(PTHREAD_MUTEX_INITIALIZER) {
}
SndioAudioOutputStream::~SndioAudioOutputStream() {
if (state != kClosed)
Close();
}
bool SndioAudioOutputStream::Open() {
struct sio_par par;
int sig;
if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
LOG(WARNING) << "Unsupported audio format.";
return false;
}
sio_initpar(&par);
par.rate = params.sample_rate();
par.pchan = params.channels();
par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
par.bps = par.bits / 8;
par.sig = sig = par.bits != 8 ? 1 : 0;
par.le = SIO_LE_NATIVE;
par.appbufsz = params.frames_per_buffer();
hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
if (hdl == NULL) {
LOG(ERROR) << "Couldn't open audio device.";
return false;
}
if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
LOG(ERROR) << "Couldn't set audio parameters.";
goto bad_close;
}
if (par.rate != (unsigned int)params.sample_rate() ||
par.pchan != (unsigned int)params.channels() ||
par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
par.sig != (unsigned int)sig ||
(par.bps > 1 && par.le != SIO_LE_NATIVE) ||
(par.bits != par.bps * 8)) {
LOG(ERROR) << "Unsupported audio parameters.";
goto bad_close;
}
state = kStopped;
volpending = 0;
vol = 0;
buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
sio_onmove(hdl, &OnMoveCallback, this);
sio_onvol(hdl, &OnVolCallback, this);
return true;
bad_close:
sio_close(hdl);
return false;
}
void SndioAudioOutputStream::Close() {
if (state == kClosed)
return;
if (state == kRunning)
Stop();
state = kClosed;
delete [] buffer;
sio_close(hdl);
manager->ReleaseOutputStream(this); // Calls the destructor
}
void SndioAudioOutputStream::Start(AudioSourceCallback* callback) {
state = kRunning;
hw_delay = 0;
source = callback;
sio_start(hdl);
if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
LOG(ERROR) << "Failed to create real-time thread.";
sio_stop(hdl);
state = kStopped;
}
}
void SndioAudioOutputStream::Stop() {
if (state == kStopped)
return;
state = kStopWait;
pthread_join(thread, NULL);
sio_stop(hdl);
state = kStopped;
}
void SndioAudioOutputStream::SetVolume(double v) {
pthread_mutex_lock(&mutex);
vol = v * SIO_MAXVOL;
volpending = 1;
pthread_mutex_unlock(&mutex);
}
void SndioAudioOutputStream::GetVolume(double* v) {
pthread_mutex_lock(&mutex);
*v = vol * (1. / SIO_MAXVOL);
pthread_mutex_unlock(&mutex);
}
// This stream is always used with sub second buffer sizes, where it's
// sufficient to simply always flush upon Start().
void SndioAudioOutputStream::Flush() {}
void SndioAudioOutputStream::ThreadLoop(void) {
int avail, count, result;
while (state == kRunning) {
// Update volume if needed
pthread_mutex_lock(&mutex);
if (volpending) {
volpending = 0;
sio_setvol(hdl, vol);
}
pthread_mutex_unlock(&mutex);
// Get data to play
const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
params.sample_rate());
count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get());
audio_bus->ToInterleaved(count, SampleFormatToBytesPerChannel(kSampleFormat), buffer);
if (count == 0) {
// We have to submit something to the device
count = audio_bus->frames();
memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat));
LOG(WARNING) << "No data to play, running empty cycle.";
}
// Submit data to the device
avail = count * params.GetBytesPerFrame(kSampleFormat);
result = sio_write(hdl, buffer, avail);
if (result == 0) {
LOG(WARNING) << "Audio device disconnected.";
break;
}
// Update hardware pointer
hw_delay += count;
}
}
} // namespace media

View File

@ -0,0 +1,86 @@
// Copyright (c) 2012 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.
#ifndef MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
#define MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
#include <pthread.h>
#include <sndio.h>
#include "base/time/tick_clock.h"
#include "base/time/time.h"
#include "media/audio/audio_io.h"
namespace media {
class AudioManagerBase;
// Implementation of AudioOutputStream using sndio(7)
class SndioAudioOutputStream : public AudioOutputStream {
public:
// The manager is creating this object
SndioAudioOutputStream(const AudioParameters& params,
AudioManagerBase* manager);
virtual ~SndioAudioOutputStream();
// Implementation of AudioOutputStream.
bool Open() override;
void Close() override;
void Start(AudioSourceCallback* callback) override;
void Stop() override;
void SetVolume(double volume) override;
void GetVolume(double* volume) override;
void Flush() override;
friend void sndio_onmove(void *arg, int delta);
friend void sndio_onvol(void *arg, unsigned int vol);
friend void *sndio_threadstart(void *arg);
private:
enum StreamState {
kClosed, // Not opened yet
kStopped, // Device opened, but not started yet
kRunning, // Started, device playing
kStopWait // Stopping, waiting for the real-time thread to exit
};
// C-style call-backs
static void OnMoveCallback(void *arg, int delta);
static void OnVolCallback(void *arg, unsigned int vol);
static void* ThreadEntry(void *arg);
// Continuously moves data from the producer to the device
void ThreadLoop(void);
// Our creator, the audio manager needs to be notified when we close.
AudioManagerBase* manager;
// Parameters of the source
AudioParameters params;
// Source stores data here
std::unique_ptr<AudioBus> audio_bus;
// Call-back that produces data to play
AudioSourceCallback* source;
// Handle of the audio device
struct sio_hdl* hdl;
// Current state of the stream
enum StreamState state;
// High priority thread running ThreadLoop()
pthread_t thread;
// Protects vol, volpending and hw_delay
pthread_mutex_t mutex;
// Current volume in the 0..SIO_MAXVOL range
int vol;
// Set to 1 if volumes must be refreshed in the realtime thread
int volpending;
// Number of frames buffered in the hardware
int hw_delay;
// Temporary buffer where data is stored sndio-compatible format
char* buffer;
DISALLOW_COPY_AND_ASSIGN(SndioAudioOutputStream);
};
} // namespace media
#endif // MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_

View File

@ -0,0 +1,43 @@
diff --git a/chromium/media/audio/linux/audio_manager_linux.cc b/chromium/media/audio/linux/audio_manager_linux.cc
index 5d703549372..9e60b40c749 100644
--- media/audio/linux/audio_manager_linux.cc
+++ media/audio/linux/audio_manager_linux.cc
@@ -20,6 +20,10 @@
#include "media/audio/pulse/audio_manager_pulse.h"
#include "media/audio/pulse/pulse_util.h"
#endif
+#if defined(USE_SNDIO)
+#include <sndio.h>
+#include "media/audio/openbsd/audio_manager_openbsd.h"
+#endif
namespace media {
@@ -27,7 +31,8 @@ enum LinuxAudioIO {
kPulse,
kAlsa,
kCras,
- kAudioIOMax = kCras // Must always be equal to largest logged entry.
+ kSndio,
+ kAudioIOMax = kSndio // Must always be equal to largest logged entry.
};
std::unique_ptr<media::AudioManager> CreateAudioManager(
@@ -41,6 +46,17 @@ std::unique_ptr<media::AudioManager> CreateAudioManager(
}
#endif
+#if defined(USE_SNDIO)
+ struct sio_hdl * hdl = NULL;
+ if ((hdl=sio_open(SIO_DEVANY, SIO_PLAY, 1)) != NULL) {
+ sio_close(hdl);
+ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kSndio, kAudioIOMax +1);
+ return std::make_unique<AudioManagerOpenBSD>(std::move(audio_thread),
+ audio_log_factory);
+ }
+ DVLOG(1) << "Sndio is not available on the OS";
+#endif
+
#if defined(USE_PULSEAUDIO)
pa_threaded_mainloop* pa_mainloop = nullptr;
pa_context* pa_context = nullptr;

View File

@ -0,0 +1,12 @@
--- media/BUILD.gn 2020-03-24 10:16:30.000000000 +0100
+++ - 2020-04-06 14:32:27.960817513 +0200
@@ -65,6 +65,9 @@
if (use_cras) {
defines += [ "USE_CRAS" ]
}
+ if (use_sndio) {
+ defines += [ "USE_SNDIO" ]
+ }
}
# Internal grouping of the configs necessary to support sub-folders having their

View File

@ -0,0 +1,23 @@
--- media/audio/BUILD.gn 2020-03-24 10:16:30.000000000 +0100
+++ - 2020-04-06 14:31:28.871450217 +0200
@@ -232,9 +232,19 @@
deps += [ "//media/base/android:media_jni_headers" ]
}
- if (is_linux) {
+ if (is_linux) {
sources += [ "linux/audio_manager_linux.cc" ]
}
+ if (use_sndio) {
+ libs += [ "sndio" ]
+ sources += [
+ "openbsd/audio_manager_openbsd.cc",
+ "sndio/sndio_input.cc",
+ "sndio/sndio_input.h",
+ "sndio/sndio_output.cc",
+ "sndio/sndio_output.h"
+ ]
+ }
if (use_alsa) {
libs += [ "asound" ]

View File

@ -0,0 +1,12 @@
--- media/media_options.gni 2020-03-24 10:16:30.000000000 +0100
+++ - 2020-04-06 14:29:22.958630783 +0200
@@ -114,6 +114,9 @@
# Enables runtime selection of ALSA library for audio.
use_alsa = false
+ # Enables runtime selection of sndio library for audio.
+ use_sndio = false
+
# Alsa should be used on non-Android, non-Mac POSIX systems.
# Alsa should be used on desktop Chromecast and audio-only Chromecast builds.
if (is_posix && !is_android && !is_mac &&

385
srcpkgs/electron12/template Normal file
View File

@ -0,0 +1,385 @@
# Template file for 'electron12'
pkgname=electron12
version=12.0.2
_nodever=14.16.0
_chromiumver=89.0.4389.90
revision=1
archs="x86_64* i686* aarch64* ppc64le*"
build_wrksrc="src"
create_wrksrc=yes
hostmakedepends="$(vopt_if clang clang) python pkgconf perl gperf bison ninja nodejs hwids
libwebp-devel freetype-devel harfbuzz-devel libpng-devel nss-devel which git libevent-devel
pciutils-devel libatomic-devel ffmpeg-devel libxml2-devel libglib-devel yarn openjdk libxslt-devel
opus-devel libXcursor-devel libXcomposite-devel libXtst-devel libXrandr-devel libXScrnSaver-devel
alsa-lib-devel re2-devel snappy-devel mit-krb5-devel $(vopt_if pulseaudio pulseaudio-devel)
$(vopt_if sndio sndio-devel) jq"
makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel
libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel
libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-devel
libXScrnSaver-devel alsa-lib-devel snappy-devel libdrm-devel
libxml2-devel libxslt-devel $(vopt_if pulseaudio pulseaudio-devel) libexif-devel
libXcursor-devel libflac-devel speex-devel libmtp-devel libwebp-devel
libjpeg-turbo-devel libevent-devel json-c-devel harfbuzz-devel
minizip-devel jsoncpp-devel zlib-devel libcap-devel libXdamage-devel
re2-devel fontconfig-devel freetype-devel opus-devel libatomic-devel
$(vopt_if sndio sndio-devel) ffmpeg-devel libva-devel libuv-devel c-ares-devel libnotify-devel
$(vopt_if pipewire pipewire-devel) wayland-devel"
short_desc="Cross platform application development framework based on web technologies"
maintainer="John <me@johnnynator.dev>"
license="BSD-3-Clause"
homepage="https://electronjs.org"
distfiles="https://github.com/electron/electron/archive/v$version.tar.gz>electron-${version}.tar.gz
https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$_chromiumver.tar.xz
https://github.com/nodejs/node/archive/v$_nodever.tar.gz>node-$_nodever.tar.gz"
checksum="e4e15ec16bd8a1541b066b98c9b204da4c01be20aa18808b4fe77f22793458de
11c6089c5fdd921216aa4eb34b52818a9b091cad655a24aed0982d29e65b279a
bcdf869b0743405515ee897b1047b5e851a717e426b4974d26537c9b10dfd53a"
case "$XBPS_TARGET_MACHINE" in
ppc64*-musl) makedepends+=" libucontext-devel" ;;
esac
no_generic_pkgconfig_link=yes
lib32disabled=yes
nopie=yes # contains tools that are not PIE, enables PIE itself
build_options="pulseaudio sndio clang pipewire"
build_options_default="pulseaudio clang pipewire"
if [ "$build_option_clang" ]; then
nocross="No proper setup for using clang as cross compiler in void yet"
elif [ "${XBPS_TARGET_MACHINE%%-musl}" = "aarch64" ]; then
broken="Falls apart at runtime when compiled with gcc"
fi
_buildtype=Release
_is_debug=false
CFLAGS="-Wno-unknown-warning-option -fPIC"
CXXFLAGS="-Wno-unknown-warning-option -fPIC"
_apply_patch() {
local args="$1" pname="$(basename $2)"
if [ ! -f ".${pname}_done" ]; then
msg_normal "$pkgver: patching: ${pname}.\n"
patch -N $args -i $2
touch .${pname}_done
fi
}
_get_chromium_arch() {
case "$1" in
x86_64*) echo x64 ;;
i686*) echo x86 ;;
arm*) echo arm ;;
aarch64*) echo arm64 ;;
ppc64*) echo ppc64 ;;
ppc*) echo ppc ;;
mipsel*) echo mipsel ;;
mips*) echo mips ;;
*) msg_error "$pkgver: cannot be compiled for ${XBPS_TARGET_MACHINE}.\n" ;;
esac
}
post_extract() {
ln -s chromium-$_chromiumver src
mkdir -p src/third_party/
ln -s ../../node-$_nodever src/third_party/electron_node
ln -s ../electron-${version} src/electron
}
post_patch() {
cd $wrksrc
for x in $FILESDIR/patches/*; do
case "${x##*/}" in
electron*.patch)
cd src/electron
_apply_patch -p1 "$x"
cd "$wrksrc";;
esac
done
# Sigh, electron uses git am...
if [ ! -f ".electron_patches_done" ]; then
mv src/electron/patches/config.json config.json.old
jq 'del(."src/electron/patches/Mantle", ."src/electron/patches/ReactiveObjC",
."src/electron/patches/squirrel.mac", ."src/electron/patches/nan")' \
config.json.old > src/electron/patches/config.json
python2 src/electron/script/list_patch_targets.py src/electron/patches/config.json | while read -r repopath; do
cd "$wrksrc"/"$repopath"
git init -q
git config "gc.auto" 0
if [ "$repopath" != "src" ]; then
echo "/${repopath#src/}" >> "$wrksrc/$build_wrksrc/.gitignore"
fi
git add .
git -c 'user.name=Electron build' -c 'user.email=electron@ebuild' \
commit -q -m "." || true
done
cd $wrksrc
python2 src/electron/script/apply_all_patches.py src/electron/patches/config.json
touch .electron_patches_done
fi
for x in $FILESDIR/patches/*; do
case "${x##*/}" in
chromium*.patch)
cd src
_apply_patch -p0 "$x"
cd "$wrksrc";;
esac
done
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
for x in $FILESDIR/musl-patches/*; do
case "${x##*/}" in
chromium*.patch)
cd src
_apply_patch -p0 "$x"
cd "$wrksrc";;
electron*.patch)
cd src/electron
_apply_patch -p1 "$x"
cd "$wrksrc";;
esac
done
fi
if [ "$build_option_sndio" ]; then
mkdir -p ${wrksrc}/${build_wrksrc}/media/audio/{sndio,openbsd}
cp ${FILESDIR}/sndio-files/sndio_*put.* \
${wrksrc}/${build_wrksrc}/media/audio/sndio
cp ${FILESDIR}/sndio-files/audio_manager_openbsd.* \
${wrksrc}/${build_wrksrc}/media/audio/openbsd
for f in "${FILESDIR}"/sndio-patches/*.patch; do
cd src
_apply_patch -p0 "$f"
cd "$wrksrc"
done
fi
}
pre_configure() {
cd "$wrksrc/$build_wrksrc"
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion
touch chrome/test/data/webui/i18n_process_css_test.html
# Use the file at run time instead of effectively compiling it in
sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
-i services/device/public/cpp/usb/BUILD.gn
mkdir -p third_party/node/linux/node-linux-x64/bin
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
# compile gn early, so it can be used to generate gni stuff
msg_normal "Bootstrapping GN\n"
CC="${CC_FOR_BUILD:-$CC}" CXX="${CXX_FOR_BUILD:-$CXX}" LD="${LD_FOR_BUILD:-$LD}" \
CFLAGS="${CFLAGS_FOR_BUILD:-$CFLAGS}" CXXFLAGS="${CXXFLAGS_FOR_BUILD:-$CXXFLAGS}" \
LDFLAGS="${XBPS_LDFLAGS}" \
python2 tools/gn/bootstrap/bootstrap.py -s -v --skip-generate-buildfiles
# we need to generate ppc64 stuff for libvpx as it's not shipped
# this has to be done before unbundling, but after gn is built
# comment out if we switch back to system libvpx again later
case "$XBPS_TARGET_MACHINE" in
ppc64*)
pushd third_party/libvpx
mkdir -p source/config/linux/ppc64
# need PATH to find gn
PATH="${wrksrc}/${build_wrksrc}/out/Release:$PATH" \
./generate_gni.sh || \
msg_error "failed to generate libvpx gni"
popd
;;
esac
# reusable system library settings
local use_system="
ffmpeg
flac
fontconfig
freetype
harfbuzz-ng
libdrm
libevent
libjpeg
libpng
libwebp
libxml
libxslt
opus
re2
snappy
"
for _lib in $use_system libjpeg_turbo; do
msg_normal "Removing buildscripts for system provided $_lib\n"
find -type f -path "*third_party/$_lib/*" \
\! -path "*third_party/$_lib/chromium/*" \
\! -path "*third_party/$_lib/google/*" \
\! -path './base/third_party/icu/*' \
\! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \
\! -path './third_party/harfbuzz-ng/utils/hb_scoped.h' \
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
-delete
done
msg_normal "Replacing gn files\n"
python2 build/linux/unbundle/replace_gn_files.py --system-libraries \
$use_system
third_party/libaddressinput/chromium/tools/update-strings.py
}
do_configure() {
local target_arch="$(_get_chromium_arch ${XBPS_TARGET_MACHINE})"
local host_arch="$(_get_chromium_arch ${XBPS_MACHINE})"
# the build system will set march for use, adding it to cflags will break builds
export CXXFLAGS=$( shopt -s extglob; echo ${CXXFLAGS/-march=*([^ ])} )
export CFLAGS=$( shopt -s extglob; echo ${CFLAGS/-march=*([^ ])} )
export CFLAGS=${CFLAGS/-g/}
export CXXFLAGS=${CXXFLAGS/-g/}
local conf=()
cd third_party/electron_node
if [ "$CROSS_BUILD" ]; then
conf_args=" --dest-cpu=${target_arch} --cross-compiling"
fi
./configure --prefix=/usr \
--shared-zlib \
--shared-libuv \
--shared-openssl \
--shared-cares \
--openssl-use-def-ca-store \
--without-npm \
--without-dtrace \
--without-bundled-v8 \
${conf_args}
cd "$wrksrc/$build_wrksrc"/electron
yarn install
cd "$wrksrc/$build_wrksrc"
if [ "$build_option_clang" ]; then
export CC=clang
export CXX=clang++
export HOST_CC=clang
export HOST_CXX=clang++
else
export CXXFLAGS="$CXXFLAGS -fpermissive"
export BUILD_CXXFLAGS="$BUILD_CXXFLAGS -fpermissive"
export BUILD_AR="$AR_host"
export BUILD_NM="$NM_host"
fi
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
# Note: These are for Void Linux use ONLY.
conf+=(
'google_api_key="AIzaSyA9gWazKaHaNIPPg2hrMj6_ZSG8AFmq738"'
'google_default_client_id="126659149423-hoo6ickbk3p1u2qjsdsp0ddciurfvb4t.apps.googleusercontent.com"'
'google_default_client_secret="_ozIx2D-DKm_se_2NPwV4l5b"'
)
conf+=(
'blink_symbol_level=0'
'clang_use_chrome_plugins=false'
'custom_toolchain="//build/toolchain/linux/unbundle:default"'
)
if [ "$CROSS_BUILD" ]; then
conf+=(
'host_toolchain="//build/toolchain/linux/unbundle:host"'
'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
"host_pkg_config=\"$PKG_CONFIG_FOR_BUILD\""
"pkg_config=\"$PKG_CONFIG\""
)
else
conf+=(
'host_toolchain="//build/toolchain/linux/unbundle:default"'
'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:default"'
)
fi
if [ "$build_option_sndio" ]; then
conf+=(
'use_sndio=true'
)
fi
if [ -n "$XBPS_DEBUG_PKGS" ]; then
conf+=('symbol_level=1')
else
conf+=('symbol_level=0')
fi
conf+=(
'enable_hangout_services_extension=true'
'enable_nacl_nonsfi=false'
'enable_nacl=false'
'enable_precompiled_headers=false'
'fatal_linker_warnings=false'
'ffmpeg_branding="Chrome"'
'fieldtrial_testing_like_official_build=true'
'gold_path="/usr/bin/ld.gold"'
'icu_use_data_file=true'
"is_clang=$(vopt_if clang true false)"
'is_component_build=false'
"is_debug=$_is_debug"
'proprietary_codecs=true'
'treat_warnings_as_errors=false'
'use_allocator_shim=false'
'use_allocator="none"'
'use_cups=true'
'use_custom_libcxx=false'
'use_gnome_keyring=false'
'use_gold=false'
'use_lld=false'
'use_system_libwayland=true'
"use_pulseaudio=$(vopt_if pulseaudio 'true' 'false')"
"rtc_use_pipewire=$(vopt_if pipewire true false)"
'rtc_pipewire_version="0.3"'
'use_sysroot=false'
'use_system_harfbuzz=true'
"target_cpu=\"$target_arch\""
"host_cpu=\"$host_arch\""
'import("//electron/build/args/release.gn")'
)
msg_normal "Configuring build\n"
out/Release/gn gen out/$_buildtype --args="${conf[*]}"
}
do_build() {
export CXXFLAGS=$( shopt -s extglob; echo ${CXXFLAGS/-march=*([^ ])} )
export CFLAGS=$( shopt -s extglob; echo ${CFLAGS/-march=*([^ ])} )
export CFLAGS=${CFLAGS/-g/}
export CXXFLAGS=${CXXFLAGS/-g/}
if [ "$build_option_clang" ]; then
export CC=clang
export CXX=clang++
export HOST_CC=clang
export HOST_CXX=clang++
else
export BUILD_CXXFLAGS="$BUILD_CXXFLAGS -fpermissive"
export CXXFLAGS="$CXXFLAGS -fpermissive"
export BUILD_AR="$AR_host"
export BUILD_NM="$NM_host"
fi
msg_normal "Ninja turtles GO!\n"
ninja ${makejobs} -C out/$_buildtype electron third_party/electron_node:headers
# finish rest of the build
strip -s out/$_buildtype/electron
ninja ${makejobs} -C out/$_buildtype electron_dist_zip
}
do_install() {
vmkdir /usr/lib/$pkgname
vmkdir /usr/include/$pkgname
bsdtar -xf out/$_buildtype/dist.zip -C "$DESTDIR/usr/lib/$pkgname"
chmod u+s "$DESTDIR/usr/lib/$pkgname/chrome-sandbox"
cp out/$_buildtype/gen/node_headers.tar.gz "$DESTDIR"/usr/include/$pkgname
vlicense ${wrksrc}/src/LICENSE chromium.LICENSE
vlicense ${wrksrc}/src/electron/LICENSE electron.LICENSE
vlicense ${wrksrc}/src/third_party/electron_node/LICENSE node.LICENSE
vmkdir /usr/bin
ln -s ../lib/$pkgname/electron "$DESTDIR"/usr/bin/$pkgname
}

View File

@ -0,0 +1,2 @@
site=https://www.electronjs.org/releases/stable?version=${version%%.*}
pattern='tag/v\K[\d\.]+(?=")'

View File

@ -1,2 +1,2 @@
#!/bin/sh
exec electron10 /usr/lib/element-desktop/resources/app.asar "$@"
exec electron12 /usr/lib/element-desktop/resources/app.asar "$@"

View File

@ -1,6 +1,6 @@
# Template file for 'element-desktop'
pkgname=element-desktop
version=1.7.24
version=1.7.25
revision=1
wrksrc="element-web-${version}"
conf_files="/etc/${pkgname}/config.json"
@ -9,7 +9,7 @@ hostmakedepends="git yarn nodejs rust cargo python3 curl
app-builder"
makedepends="libsecret-devel"
depends="c-ares ffmpeg gtk+3 http-parser libevent
libxslt minizip nss re2 snappy sqlcipher electron10"
libxslt minizip nss re2 snappy sqlcipher electron12"
short_desc="Glossy Matrix collaboration client, desktop version"
maintainer="projectmoon <projectmoon@agnos.is>"
license="Apache-2.0"
@ -18,8 +18,8 @@ _ghpage="https://github.com/vector-im"
_archive="archive/v${version}.tar.gz"
distfiles="${_ghpage}/element-desktop/${_archive}>element-desktop.tar.gz
${_ghpage}/element-web/${_archive}>element-web.tar.gz"
checksum="b7031155c52985992f4ae920e3a37d6f6f37fe49d70552bcdcb58a59b768d898
57dcb4cd5a4387ef009047b66eaf40be7b7eb202e81dd2e22152c70dcb40e39d"
checksum="33ddceb3538b9bf5ae6104c14d01ea2148e89c689b24d724dd5e60182bf5fe95
c38fc7e77c82c655457b244b0e7e5802618aa088ddbbaa9bae4db4185236b972"
export USE_SYSTEM_APP_BUILDER=true

View File

@ -1,6 +1,6 @@
# Template file for 'exa'
pkgname=exa
version=0.10.0
version=0.10.1
revision=1
build_style=cargo
hostmakedepends="pkg-config libgit2-devel"
@ -11,8 +11,8 @@ license="MIT"
homepage="https://the.exa.website/"
distfiles="https://github.com/ogham/exa/archive/v${version}.tar.gz
https://github.com/ogham/exa/releases/download/v${version}/exa-accoutrements-v${version}.zip"
checksum="27420f7b805941988399d63f388be4f6077eee94a505bf01c2fb0e7d15cbf78d
c1ab340af63e64bc3fd854c03f6161aa240a533e928688036a7d4544aecabc05"
checksum="ff0fa0bfc4edef8bdbbb3cabe6fdbd5481a71abbbcc2159f402dea515353ae7c
531596a1ef2a757c7728087529528150e6eb52bb8224fe575aa00a5f1b762849"
post_extract() {
mkdir -p accoutrements

View File

@ -1,6 +1,6 @@
# Template file for 'exiftool'
pkgname=exiftool
version=12.23
version=12.24
revision=1
wrksrc="Image-ExifTool-${version}"
build_style=perl-module
@ -10,4 +10,4 @@ license="Artistic-1.0-Perl, GPL-1.0-or-later"
homepage="https://exiftool.org/"
changelog="https://exiftool.org/history.html"
distfiles="https://exiftool.org/Image-ExifTool-${version}.tar.gz"
checksum=825188ea0721b6db9c35a2fa4cd680342a129f6fa5bae41bb17da2d4299771d1
checksum=4bbc925eda0072426ffb3b0a6dcedeff173da798fde1efff846a7579854a2f98

View File

@ -1,6 +1,6 @@
# Template file for 'exo'
pkgname=exo
version=4.16.1
version=4.16.2
revision=1
build_style=gnu-configure
configure_args="--disable-static --with-locales-dir=/usr/share/locale"
@ -12,7 +12,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://xfce.org/"
distfiles="https://archive.xfce.org/src/xfce/exo/${version%.*}/exo-${version}.tar.bz2"
checksum=528dac256315ffc2a4a53b3b421979327962121989886e3cf920aeff9912b53b
checksum=4e89f5536afbf1cb9191cceb720fb2764df1a4fae3459512b7320841ab5a9e9d
pre_configure() {
if [ "$CROSS_BUILD" ]; then

View File

@ -1,6 +1,6 @@
# Template file for 'fluidsynth'
pkgname=fluidsynth
version=2.1.8
version=2.2.0
revision=1
build_style=cmake
make_check_target=check
@ -13,7 +13,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="http://www.fluidsynth.org/"
distfiles="https://github.com/FluidSynth/fluidsynth/archive/v${version}.tar.gz"
checksum=a254efceff5d99f8d658d12d25318317f37307e6df852ec9baeb7da173496967
checksum=928fb16f307507485bd1d9b010dafba8c747bce5de2ba47ab1705944c87013b6
libfluidsynth_package() {
short_desc+=" - runtime library"

View File

@ -1,15 +1,15 @@
# Template file for 'geis'
pkgname=geis
version=2.2.17
revision=7
hostmakedepends="pkg-config python3-devel"
makedepends="dbus-devel grail-devel frame-devel libXi-devel python3-devel xorg-server-devel"
revision=8
build_style="gnu-configure"
configure_args="--disable-static"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-3"
homepage="https://launchpad.net/geis"
hostmakedepends="pkg-config python3-devel"
makedepends="dbus-devel grail-devel frame-devel libXi-devel python3-devel xorg-server-devel"
short_desc="Gesture Engine Interface and Support"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-3.0-only"
homepage="https://launchpad.net/geis"
distfiles="https://launchpad.net/geis/trunk/$version/+download/geis-$version.tar.xz"
checksum=8a60f5683852094038904e690d23cc5a90a980fc52da67f0f28890baa25c70eb
@ -27,7 +27,6 @@ geis-devel_package() {
}
}
geis-python3_package() {
pycompile_module="geis geisview"
short_desc+=" - Python3 bindings"
pkg_install() {
vmove usr/bin/pygeis

View File

@ -1,12 +1,12 @@
# Template file for 'genext2fs'
pkgname=genext2fs
version=1.4.1
revision=2
revision=3
build_style=gnu-configure
configure_args="ac_cv_have_working_snprintf=yes ac_cv_have_working_vsnprintf=yes"
short_desc="Generates an ext2 filesystem as a normal (i.e. non-root) user"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2"
license="GPL-2.0-only"
homepage="http://genext2fs.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.gz"
checksum=404dbbfa7a86a6c3de8225c8da254d026b17fd288e05cec4df2cc7e1f4feecfc

View File

@ -1,7 +1,7 @@
# Template file for 'geoip'
pkgname=geoip
version=1.6.12
revision=2
revision=3
wrksrc="GeoIP-${version}"
build_style=gnu-configure
configure_args="--mandir=/usr/share/man --sysconfdir=/etc/geoip"
@ -9,8 +9,8 @@ hostmakedepends="automake libtool"
makedepends="zlib-devel"
short_desc="Non-DNS IP-to-country resolver C library and utilities"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="http://www.maxmind.com/app/c"
license="GPL-2"
distfiles="https://github.com/maxmind/geoip-api-c/releases/download/v$version/GeoIP-$version.tar.gz"
checksum=1dfb748003c5e4b7fd56ba8c4cd786633d5d6f409547584f6910398389636f80

View File

@ -1,17 +1,17 @@
# Template file for 'gforth'
pkgname=gforth
version=0.7.3
revision=2
revision=3
build_style=gnu-configure
disable_parallel_build=yes
hostmakedepends="m4"
makedepends="libffi-devel"
short_desc="GNU Forth, a fast and portable implementation of ANS Forth"
maintainer="ZweiSpeedruns <zcm727@gmail.com>"
license="GPL-3"
license="GPL-3.0-or-later"
homepage="https://www.gnu.org/software/gforth/"
distfiles="${GNU_SITE}/gforth/gforth-${version}.tar.gz"
checksum=2f62f2233bf022c23d01c920b1556aa13eab168e3236b13352ac5e9f18542bb0
disable_parallel_build=yes
nocross="Configure script is picky: https://api.travis-ci.org/jobs/158049419/log.txt?deansi=true"
case "${XBPS_TARGET_MACHINE}" in

View File

@ -1,13 +1,13 @@
# Template file for 'gftp'
pkgname=gftp
version=2.0.19
revision=8
revision=9
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="gtk+-devel openssl-devel"
short_desc="Graphical file transfer client"
maintainer="psylence <psylence@protonmail.com>"
license="GPL-2"
license="GPL-2.0-or-later"
homepage="https://www.gftp.org"
distfiles="https://sources.voidlinux.org/gftp-${version}/gftp-${version}.tar.bz2"
checksum=5306a46be96d6f4d23906cb1836fb3d732039621a6c7fcfa921acc21ac110bfd

View File

@ -1,16 +1,16 @@
# Template file for 'git-crypt'
pkgname=git-crypt
version=0.6.0
revision=7
revision=8
build_style=gnu-makefile
make_use_env=yes
makedepends="openssl-devel"
hostmakedepends="libxslt docbook-xsl"
make_build_args="ENABLE_MAN=yes"
make_install_args="ENABLE_MAN=yes"
hostmakedepends="libxslt docbook-xsl"
makedepends="openssl-devel"
short_desc="Transparent file encryption in git"
maintainer="Andy Cobaugh <andrewcobaugh@gmail.com>"
license="GPL-3"
license="GPL-3.0-or-later"
homepage="https://www.agwa.name/projects/git-crypt/"
distfiles="https://github.com/AGWA/git-crypt/archive/${version}.tar.gz"
checksum=777c0c7aadbbc758b69aff1339ca61697011ef7b92f1d1ee9518a8ee7702bb78
@ -21,6 +21,4 @@ post_install() {
vdoc NEWS
vdoc doc/multiple_keys.md
vman man/man1/git-crypt.1
vlicense COPYING
}

View File

@ -1,6 +1,6 @@
# Template file for 'git-extras'
pkgname=git-extras
version=6.1.0
version=6.2.0
revision=1
build_style=gnu-makefile
depends="bash git"
@ -9,7 +9,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/tj/git-extras"
distfiles="https://github.com/tj/git-extras/archive/${version}.tar.gz"
checksum=7be0b15ee803d76d2c2e8036f5d9db6677f2232bb8d2c4976691ff7ae026a22f
checksum=151bc129f717179c1f7b6c83faf1d4829eeddef8b7c501dac05dc38c28270c3e
post_patch() {
vsed -i 's|$(SYSCONFDIR)/bash_completion.d|/usr/share/bash-completion/completions|' Makefile

View File

@ -1,13 +1,13 @@
# Template file for 'glpk'
pkgname=glpk
version=5.0
revision=1
revision=2
build_style=gnu-configure
configure_args="--with-gmp"
makedepends="gmp-devel"
short_desc="GNU Linear Programming Kit to solve LP, MIP and other problems"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-3"
license="GPL-3.0-or-later"
homepage="http://www.gnu.org/software/glpk/glpk.html"
distfiles="${GNU_SITE}/glpk/${pkgname}-${version}.tar.gz"
checksum=4a1013eebb50f728fc601bdd833b0b2870333c3b3e5a816eeba921d95bec6f15

View File

@ -1,14 +1,14 @@
# Template file for 'glu'
pkgname=glu
version=9.0.1
revision=1
revision=2
build_style=gnu-configure
configure_args="--disable-static"
hostmakedepends="pkg-config"
makedepends="MesaLib-devel"
short_desc="Mesa OpenGL utility library (GLU)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1"
license="SGI-B-2.0"
homepage="http://cgit.freedesktop.org/mesa/glu/"
distfiles="https://mesa.freedesktop.org/archive/glu/glu-${version}.tar.gz"
checksum=f6f484cfcd51e489afe88031afdea1e173aa652697e4c19ddbcb8260579a10f7

View File

@ -1,20 +1,20 @@
# Template file for 'glyr'
pkgname=glyr
version="1.0.10"
revision=1
version=1.0.10
revision=2
build_style=cmake
hostmakedepends="pkg-config"
makedepends="libcurl-devel glib-devel sqlite-devel"
short_desc="A music metadata searchengine utility and library"
short_desc="Music metadata searchengine utility and library"
maintainer="Michal Koutenský <koutak.m@gmail.com>"
license="LGPL-3"
license="LGPL-3.0-or-later"
homepage="https://github.com/sahib/glyr"
distfiles="https://github.com/sahib/glyr/archive/${version}.tar.gz"
checksum=77e8da60221c8d27612e4a36482069f26f8ed74a1b2768ebc373c8144ca806e8
glyr-devel_package() {
depends="glyr>=${version}_${revision}"
short_desc="A music metadata searchengine utility and library - development files"
short_desc="Music metadata searchengine utility and library - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig

View File

@ -1,14 +1,14 @@
# Template file for 'gmtp'
pkgname=gmtp
version=1.3.11
revision=1
revision=2
build_style=gnu-configure
hostmakedepends="pkg-config glib-devel"
makedepends="libmtp-devel libflac-devel libid3tag-devel libvorbis-devel gtk+3-devel"
depends="desktop-file-utils"
short_desc="A simple MP3 player client for MTP based devices"
short_desc="Simple MP3 player client for MTP based devices"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD"
license="BSD-3-Clause"
homepage="http://gmtp.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/gmtp/gmtp-${version}.tar.gz"
checksum=5a830c9c448aa2caf7a844aaa9ba38c2ac0239547366c1e6874e0080bd5f0613

View File

@ -1,13 +1,13 @@
# Template file for 'gnome-epub-thumbnailer'
pkgname=gnome-epub-thumbnailer
version=1.6
revision=1
revision=2
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="gdk-pixbuf-devel libarchive-devel libxml2-devel"
short_desc="Thumbnailer for EPub and MOBI books"
maintainer="Alif Rachmawadi <arch@subosito.com>"
license="GPL-3"
license="GPL-2.0-or-later"
homepage="https://git.gnome.org/browse/gnome-epub-thumbnailer"
distfiles="${GNOME_SITE}/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
checksum=b502420d9b02ea0b0fc7986ef5a091a12b2286be14fed9e47594fe9fa0c5898e

View File

@ -1,14 +1,14 @@
# Template file for 'gnugo'
pkgname=gnugo
version=3.8
revision=1
nocross=yes
revision=2
build_style=gnu-configure
short_desc="Free program that plays the game Go"
maintainer="Brandon Wilson <x@wilsonb.com>"
license="GPL-3"
license="GPL-3.0-or-later"
homepage="https://www.gnu.org/software/gnugo/"
distfiles="${GNU_SITE}/gnugo/${pkgname}-${version}.tar.gz"
checksum=da68d7a65f44dcf6ce6e4e630b6f6dd9897249d34425920bfdd4e07ff1866a72
nocross=yes
CFLAGS="-fcommon"

View File

@ -1,14 +1,14 @@
# Template file for 'gnupod'
pkgname=gnupod
version=0.99.8
revision=3
revision=4
build_style=gnu-configure
hostmakedepends="perl-Digest-SHA1 perl-XML-Parser perl-Unicode-String perl-MP3-Info perl-TimeDate"
makedepends="${hostmakedepends}"
depends="${makedepends}"
short_desc="Command line tools for managing data on iPods"
maintainer="Evan Deaubl <evan@deaubl.name>"
license="GPL-3"
license="GPL-3.0-or-later"
homepage="http://www.gnu.org/software/gnupod/"
distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tgz"
checksum=bd566295a2e14352e6d05f5c816cab36b0e80d3ab36d29c4bbb45c581d3f3c31

View File

@ -1,14 +1,14 @@
# Template file for 'gnurobbo'
pkgname=gnurobbo
version=0.68
revision=3
revision=4
build_wrksrc=gnurobbo
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="SDL_mixer-devel SDL_image-devel SDL_ttf-devel"
short_desc="Reimplementation of Janusz Pelc's Robbo for Atari XE/XL"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2"
license="GPL-2.0-or-later"
homepage="http://gnurobbo.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/gnurobbo/gnurobbo/gnurobbo%20${version}/gnurobbo-${version}-source.tar.gz"
checksum=6c7e9e425655da02c2442d13b5fa8f542af62d2c8f253db2fb63470c5c0c3db8
@ -16,7 +16,7 @@ checksum=6c7e9e425655da02c2442d13b5fa8f542af62d2c8f253db2fb63470c5c0c3db8
CFLAGS="-fcommon"
pre_build() {
sed -i Makefile \
vsed -i Makefile \
-e "s;\(CFLAGS\?+=\)-d;\1;" \
-e "s;CFLAGS+\?=;\0 ${CFLAGS} ;" \
-e "s;LDFLAGS+\?=;\0 ${LDFLAGS} ;" \

View File

@ -1,6 +1,6 @@
# Template file for 'go'
pkgname=go
version=1.16.2
version=1.16.3
revision=1
create_wrksrc=yes
build_wrksrc=go
@ -11,7 +11,7 @@ license="BSD-3-Clause"
homepage="http://golang.org/"
changelog="https://golang.org/doc/devel/release.html"
distfiles="https://golang.org/dl/go${version}.src.tar.gz"
checksum=37ca14287a23cb8ba2ac3f5c3dd8adbc1f7a54b9701a57824bf19a0b271f83ea
checksum=b298d29de9236ca47a023e382313bcc2d2eed31dfa706b60a04103ce83a71a25
nostrip=yes
noverifyrdeps=yes

View File

@ -1,5 +1,5 @@
# Template file for 'google-chrome'
_chromeVersion=89.0.4389.114
_chromeVersion=89.0.4389.128
_chromeRevision=1
_channel=stable
@ -22,7 +22,7 @@ _chromeUrl="${_baseUrl}/${_filename}"
_licenseUrl="https://www.google.com/intl/en/chrome/terms/"
distfiles="$_chromeUrl"
checksum=0ab92895e8b1b93a8d2591e0f89b32554af2ffc5a6f2bf9c1860a4ecb7a78b1b
checksum=1903d5f17ccdbc47bf8e07e15529a22118b192b847846a1b74f54883b11fa41e
do_extract() {
mkdir -p ${DESTDIR}

View File

@ -1,14 +1,14 @@
# Template build file for 'gopm'
# Template file for 'gopm'
pkgname=gopm
version=0.7.2.20150801
revision=14
revision=15
_commit=4295c22189eb27deedc13fd33e05c1a4da07aa3d
wrksrc="${pkgname}-${_commit}"
build_style=go
go_import_path="github.com/gpmgo/gopm"
short_desc="Go Package Manager"
maintainer="John Regan <john@jrjrtech.com>"
license="Apache"
homepage="http://gopm.io/"
license="Apache-2.0"
homepage="https://github.com/gpmgo/gopm"
distfiles="https://github.com/gpmgo/gopm/archive/${_commit}.tar.gz"
checksum="67fd6c8940eab9adca178f880d217095ef54db8c608b0d000144d9ba7880c3f8"

View File

@ -1,12 +1,12 @@
# Template file for 'gosh'
pkgname=gosh
version=0.2.3
revision=12
revision=13
build_style=go
go_import_path="github.com/mkouhei/gosh"
short_desc="Interactive shell for Golang"
maintainer="Diogo Leal <diogo@diogoleal.com>"
license="GPL-3"
license="GPL-3.0-or-later"
homepage="https://github.com/mkouhei/gosh"
distfiles="https://github.com/mkouhei/gosh/archive/v${version}.tar.gz"
checksum=0b601b467a57d809134a13c8e52c4986eb328931a4db3c237630cdcd9891a707

View File

@ -1,12 +1,12 @@
# Template file for 'govendor'
pkgname=govendor
version=1.0.9
revision=2
revision=3
build_style=go
go_import_path="github.com/kardianos/govendor"
short_desc="Go vendor tool that works with the standard vendor file"
maintainer="lemmi <lemmi@nerd2nerd.org>"
license="BSD"
license="BSD-3-Clause"
homepage="https://github.com/kardianos/govendor"
distfiles="https://github.com/kardianos/govendor/archive/v${version}.tar.gz"
checksum=d303abf194838792234a1451c3a1e87885d1b2cd21774867b592c1f7db00551e

View File

@ -1,11 +1,11 @@
# Template file for 'gperf'
pkgname=gperf
version=3.1
revision=2
revision=3
build_style=gnu-configure
short_desc="Perfect hash function generator"
homepage="https://www.gnu.org/software/gperf/"
license="GPL-3"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://www.gnu.org/software/gperf/"
distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.gz"
checksum=588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2

View File

@ -1,13 +1,13 @@
# Template file for 'gpm'
pkgname=gpm
version=1.20.7
revision=9
revision=10
build_style=gnu-configure
hostmakedepends="automake libtool flex texinfo"
makedepends="ncurses-devel libfl-devel"
short_desc="Mouse server for the console and xterm"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2"
license="GPL-2.0-or-later"
homepage="http://www.nico.schottelius.org/software/gpm/"
distfiles="http://www.nico.schottelius.org/software/gpm/archives/gpm-${version}.tar.lzma"
checksum=a955053b36556ffa7c628ce18fd6de7d625966573fa412fb08869533d8f7385c

View File

@ -1,17 +1,17 @@
# Template build file for 'grail'
# Template file for 'grail'
pkgname=grail
version=3.1.1
revision=1
revision=2
build_style=gnu-configure
configure_args="--with-x11"
hostmakedepends="pkg-config"
makedepends="frame-devel libXfixes-devel libXi-devel"
short_desc="Gesture Recognition And Instantiation Library"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-3"
license="LGPL-3.0-only"
homepage="https://launchpad.net/grail"
distfiles="https://launchpad.net/${pkgname}/trunk/${version}/+download/${pkgname}-${version}.tar.bz2"
checksum=5eed1f650f042481daa3a2de5e7d43261fe343b2a1b1e240f3b7fc26572c9df3
hostmakedepends="pkg-config"
makedepends="frame-devel libXfixes-devel libXi-devel"
configure_args="--with-x11"
grail-devel_package() {
depends="grail>=${version}_${revision}"

View File

@ -0,0 +1,15 @@
Index: grub-btrfs-4.9/Makefile
===================================================================
--- grub-btrfs-4.9.orig/Makefile
+++ grub-btrfs-4.9/Makefile
@@ -9,10 +9,6 @@ LIB_DIR = $(DESTDIR)$(PREFIX)/lib
.PHONY: install uninstall help
install:
- @if test "$(shell id -u)" != 0; then \
- echo "You are not root, run this target as root please."; \
- exit 1; \
- fi
@install -Dm755 -t "$(DESTDIR)/etc/grub.d/" 41_snapshots-btrfs
@install -Dm644 -t "$(DESTDIR)/etc/default/grub-btrfs/" config
@install -Dm644 -t "$(LIB_DIR)/systemd/system/" grub-btrfs.service

View File

@ -1,6 +1,6 @@
# Template file for 'grub-btrfs'
pkgname=grub-btrfs
version=4.8.1
version=4.9
revision=1
build_style=gnu-makefile
depends="grub bash"
@ -9,7 +9,8 @@ maintainer="Anjandev Momi <anjan@momi.ca>"
license="GPL-3.0-or-later"
homepage="https://github.com/Antynea/grub-btrfs"
distfiles="https://github.com/Antynea/grub-btrfs/archive/v${version}.tar.gz"
checksum=a0092e705adc91fbb73804327abe68002fa705ea7a4948bb21467134c7f69830
checksum=62461133c697643e98a608239773f500edee3e4055c5729fef6639d1cd610243
patch_args=-Np1
post_install() {
rm -rf -- "${DESTDIR}"/usr/lib/systemd

Some files were not shown because too many files have changed in this diff Show More