summaryrefslogtreecommitdiff
path: root/skip
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
committerdavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
commitf29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (patch)
tree76fe6267f8307e7630fc6f53ff99a9767ad40de0 /skip
parent05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff)
Work
Diffstat (limited to 'skip')
-rw-r--r--skip/apache2/alpine.layout22
-rw-r--r--skip/apache2/apache2-ssl.post-install30
-rw-r--r--skip/apache2/apache2.confd54
-rwxr-xr-xskip/apache2/apache2.initd154
-rw-r--r--skip/apache2/apache2.logrotate10
-rw-r--r--skip/apache2/apache2.pre-install8
-rw-r--r--skip/apache2/apache2.pre-upgrade8
-rw-r--r--skip/apache2/apache2.xibuild119
-rw-r--r--skip/avahi/CVE-2021-3468.patch37
-rw-r--r--skip/avahi/CVE-2021-36217.patch148
-rw-r--r--skip/avahi/avahi.pre-install12
-rw-r--r--skip/avahi/avahi.xibuild60
-rw-r--r--skip/cabal/cabal.project.freeze47
-rw-r--r--skip/cabal/cabal.xibuild52
-rw-r--r--skip/dino/dino.xibuild32
-rw-r--r--skip/dino/mobile-ui.patch967
-rw-r--r--skip/docbook2x/01_fix_static_datadir_evaluation.patch19
-rw-r--r--skip/docbook2x/02_fix_418703_dont_use_abbreviated_sfnet_address.patch27
-rw-r--r--skip/docbook2x/03_fix_420153_filename_whitespace_handling.patch43
-rw-r--r--skip/docbook2x/04_fix_442782_preprocessor_declaration_syntax.patch90
-rw-r--r--skip/docbook2x/05_fix_439214_error_on_missing_refentry.patch33
-rw-r--r--skip/docbook2x/06_fix_man_typo.patch24
-rw-r--r--skip/docbook2x/docbook2x.xibuild39
-rw-r--r--skip/electrum/0001-apk-add-instead-of-apt-get-install.patch22
-rw-r--r--skip/electrum/electrum.xibuild31
-rw-r--r--skip/elvish/elvish.xibuild20
-rw-r--r--skip/execline/execline.xibuild24
-rw-r--r--skip/ext-dump/ext-dump.xibuild35
-rw-r--r--skip/firefox/allow-custom-rust-vendor.patch564
-rw-r--r--skip/firefox/avoid-redefinition.patch15
-rw-r--r--skip/firefox/disable-moz-stackwalk.patch18
-rw-r--r--skip/firefox/disable-neon-in-aom.patch39
-rw-r--r--skip/firefox/firefox-safe.desktop11
-rw-r--r--skip/firefox/firefox.desktop81
-rw-r--r--skip/firefox/firefox.xibuild143
-rw-r--r--skip/firefox/fix-fortify-system-wrappers.patch13
-rw-r--r--skip/firefox/fix-neon-aom.patch13
-rw-r--r--skip/firefox/fix-rust-target.patch31
-rw-r--r--skip/firefox/fix-webrtc-glibcisms.patch20
-rw-r--r--skip/firefox/mallinfo.patch20
-rw-r--r--skip/firefox/no-ccache-stats.patch11
-rw-r--r--skip/firefox/sandbox-fork.patch15
-rw-r--r--skip/firefox/sandbox-largefile.patch17
-rw-r--r--skip/firefox/sandbox-sched_setscheduler.patch16
-rw-r--r--skip/firefox/stab.h71
-rw-r--r--skip/firefox/zstandard.patch8
-rw-r--r--skip/guitarix/guitarix-0.43.1-glib2.patch15
-rw-r--r--skip/guitarix/guitarix.xibuild27
-rw-r--r--skip/heimdal/005_all_heimdal-suid_fix.patch20
-rw-r--r--skip/heimdal/CVE-2018-16860.patch147
-rw-r--r--skip/heimdal/autoconf-270.patch27
-rwxr-xr-xskip/heimdal/heimdal-kadmind.initd24
-rwxr-xr-xskip/heimdal/heimdal-kdc.initd23
-rwxr-xr-xskip/heimdal/heimdal-kpasswdd.initd24
-rw-r--r--skip/heimdal/heimdal.xibuild82
-rw-r--r--skip/heimdal/heimdal_missing-include.patch11
-rw-r--r--skip/heimdal/silence-include-headers-redirect-warnings.patch80
-rw-r--r--skip/leveldb/leveldb.xibuild28
-rw-r--r--skip/libetonyek/libetonyek.xibuild30
-rw-r--r--skip/liblangtag/liblangtag.xibuild26
-rw-r--r--skip/libreoffice/autoconf-boost-macros.patch152
-rw-r--r--skip/libreoffice/disable-liborcus-unittest.patch13
-rw-r--r--skip/libreoffice/fix-execinfo.patch34
-rw-r--r--skip/libreoffice/libreoffice-base.xibuild11
-rw-r--r--skip/libreoffice/libreoffice-calc.xibuild11
-rw-r--r--skip/libreoffice/libreoffice-common.xibuild10
-rw-r--r--skip/libreoffice/libreoffice-draw.xibuild11
-rw-r--r--skip/libreoffice/libreoffice-impress.xibuild11
-rw-r--r--skip/libreoffice/libreoffice-math.xibuild11
-rw-r--r--skip/libreoffice/libreoffice-postgres.xibuild10
-rw-r--r--skip/libreoffice/libreoffice-sdk.xibuild10
-rw-r--r--skip/libreoffice/libreoffice-writer.xibuild11
-rw-r--r--skip/libreoffice/libreoffice.xibuild136
-rw-r--r--skip/libreoffice/linux-musl.patch60
-rw-r--r--skip/libreoffice/musl-libintl.patch15
-rw-r--r--skip/libreoffice/musl-stacksize.patch40
-rw-r--r--skip/libreoffice/pld-skia-patches.patch10
-rw-r--r--skip/libreoffice/poppler-22.03.patch39
-rw-r--r--skip/libreoffice/remove-backtrace.patch163
-rw-r--r--skip/libreoffice/skia-freetype2.11.diff37
-rw-r--r--skip/lsp-plugins/lsp-plugins.xibuild32
-rw-r--r--skip/lsp-plugins/null.patch13
-rw-r--r--skip/luakit/luakit.xibuild25
-rw-r--r--skip/mingw-w64-gcc/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch53
-rw-r--r--skip/mingw-w64-gcc/mingw-w64-gcc.xibuild72
-rw-r--r--skip/pandoc/cabal.config223
-rw-r--r--skip/pandoc/cabal.project.freeze249
-rw-r--r--skip/pandoc/pandoc.xibuild57
-rw-r--r--skip/php8/.php8.xibuild.swpbin0 -> 24576 bytes
-rw-r--r--skip/php8/atomic-lsapi.patch82
-rw-r--r--skip/php8/disabled-tests.list213
-rw-r--r--skip/php8/fix-tests-devserver.patch23
-rw-r--r--skip/php8/includedir.patch41
-rw-r--r--skip/php8/install-pear.patch14
-rw-r--r--skip/php8/php8-fpm-version-suffix.patch79
-rw-r--r--skip/php8/php8-fpm.initd93
-rw-r--r--skip/php8/php8-fpm.logrotate13
-rw-r--r--skip/php8/php8-module.conf13
-rw-r--r--skip/php8/php8.xibuild215
-rw-r--r--skip/php8/sharedir.patch11
-rw-r--r--skip/php8/xfail-openssl-1.1-test.patch13
-rw-r--r--skip/python-pyqtwebengine/python-pyqtwebengine.xibuild26
-rw-r--r--skip/python-pyside2/python-3.10.patch119
-rw-r--r--skip/python-pyside2/python-pyside2.xibuild39
-rw-r--r--skip/qt5-qt3d/qt5-qt3d.xibuild35
-rw-r--r--skip/qt5-qtwebengine/0001-pretend-to-stay-at-5.15.3.patch8
-rw-r--r--skip/qt5-qtwebengine/0010-chromium-musl-Match-syscalls-to-match-musl.patch44
-rw-r--r--skip/qt5-qtwebengine/default-pthread-stacksize.patch23
-rw-r--r--skip/qt5-qtwebengine/ffmpeg5.patch151
-rw-r--r--skip/qt5-qtwebengine/fix-chromium-build.patch79
-rw-r--r--skip/qt5-qtwebengine/fix-strncpy-error.patch10
-rw-r--r--skip/qt5-qtwebengine/musl-hacks.patch13
-rw-r--r--skip/qt5-qtwebengine/musl-sandbox.patch181
-rw-r--r--skip/qt5-qtwebengine/nasm.patch13
-rw-r--r--skip/qt5-qtwebengine/qt-chromium-python3.patch1752
-rw-r--r--skip/qt5-qtwebengine/qt-musl-crashpad.patch13
-rw-r--r--skip/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch103
-rw-r--r--skip/qt5-qtwebengine/qt-musl-elf-arm.patch13
-rw-r--r--skip/qt5-qtwebengine/qt-musl-execinfo.patch108
-rw-r--r--skip/qt5-qtwebengine/qt-musl-mallinfo.patch43
-rw-r--r--skip/qt5-qtwebengine/qt-musl-off_t.patch10
-rw-r--r--skip/qt5-qtwebengine/qt-musl-pread-pwrite.patch20
-rw-r--r--skip/qt5-qtwebengine/qt-musl-pvalloc.patch14
-rw-r--r--skip/qt5-qtwebengine/qt-musl-resolve.patch61
-rw-r--r--skip/qt5-qtwebengine/qt-musl-siginfo_t.patch18
-rw-r--r--skip/qt5-qtwebengine/qt-musl-stackstart.patch22
-rw-r--r--skip/qt5-qtwebengine/qt-musl-sysreg-for__WORDSIZE.patch14
-rw-r--r--skip/qt5-qtwebengine/qt-musl-thread-stacksize.patch26
-rw-r--r--skip/qt5-qtwebengine/qt-musl-tid-caching.patch81
-rw-r--r--skip/qt5-qtwebengine/qt5-qtwebengine.xibuild76
-rw-r--r--skip/qt5-qtwebengine/qt5-webengine-gcc12.patch13
-rw-r--r--skip/qt5-qtwebengine/remove-glibc-check.patch78
-rw-r--r--skip/qt5-qtwebengine/sndio.patch142
-rw-r--r--skip/qt5-qtwebengine/support-python3.patch158
-rw-r--r--skip/ripgrep/minimize-size.patch28
-rw-r--r--skip/ripgrep/ripgrep.xibuild35
-rw-r--r--skip/ruby-kramdown/gemspec.patch18
-rw-r--r--skip/ruby-kramdown/ruby-kramdown.xibuild47
-rw-r--r--skip/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch24
-rw-r--r--skip/rust/0007-do-not-install-libunwind-source.patch19
-rw-r--r--skip/rust/alpine-move-py-scripts-to-share.patch23
-rw-r--r--skip/rust/alpine-target.patch191
-rw-r--r--skip/rust/cargo.xibuild8
-rw-r--r--skip/rust/check-rustc109
-rw-r--r--skip/rust/install-template-shebang.patch10
-rw-r--r--skip/rust/link-musl-dynamically.patch17
-rw-r--r--skip/rust/musl-fix-linux_musl_base.patch23
-rw-r--r--skip/rust/need-rpath.patch62
-rw-r--r--skip/rust/need-ssp_nonshared.patch13
-rw-r--r--skip/rust/rust.xibuild77
-rw-r--r--skip/samba/add_missing___compar_fn_t.patch14
-rw-r--r--skip/samba/getpwent_r.patch80
-rw-r--r--skip/samba/missing-headers.patch38
-rw-r--r--skip/samba/musl_rm_unistd_incl.patch37
-rw-r--r--skip/samba/musl_uintptr.patch35
-rw-r--r--skip/samba/netapp.patch85
-rw-r--r--skip/samba/netdb-defines.patch19
-rw-r--r--skip/samba/pidl.patch114
-rw-r--r--skip/samba/samba-bgqd-include-signal-h.patch13
-rw-r--r--skip/samba/samba.confd9
-rw-r--r--skip/samba/samba.initd79
-rw-r--r--skip/samba/samba.logrotate9
-rw-r--r--skip/samba/samba.xibuild78
-rw-r--r--skip/samba/winbind.post-install6
-rw-r--r--skip/samba/winbind.post-upgrade6
-rw-r--r--skip/samba/winbind.pre-install5
-rw-r--r--skip/samba/winbind.pre-upgrade5
-rw-r--r--skip/thunderbird/allow-custom-rust-vendor.patch564
-rw-r--r--skip/thunderbird/avoid-redefinition.patch15
-rw-r--r--skip/thunderbird/cbindgen-0.24.patch17
-rw-r--r--skip/thunderbird/disable-moz-stackwalk.patch18
-rw-r--r--skip/thunderbird/disable-neon-in-aom.patch39
-rw-r--r--skip/thunderbird/distribution.ini8
-rw-r--r--skip/thunderbird/fix-fortify-system-wrappers.patch13
-rw-r--r--skip/thunderbird/fix-libresolv-path.patch17
-rw-r--r--skip/thunderbird/fix-rust-target.patch31
-rw-r--r--skip/thunderbird/fix-tools.patch18
-rw-r--r--skip/thunderbird/fix-webrtc-glibcisms.patch20
-rw-r--r--skip/thunderbird/mallinfo.patch20
-rw-r--r--skip/thunderbird/metainfo.patch12
-rw-r--r--skip/thunderbird/psutil.patch9
-rw-r--r--skip/thunderbird/sandbox-fork.patch15
-rw-r--r--skip/thunderbird/sandbox-largefile.patch17
-rw-r--r--skip/thunderbird/sandbox-sched_setscheduler.patch16
-rw-r--r--skip/thunderbird/stab.h71
-rw-r--r--skip/thunderbird/thunderbird.desktop64
-rw-r--r--skip/thunderbird/thunderbird.xibuild204
-rw-r--r--skip/thunderbird/vendor-prefs.js17
-rw-r--r--skip/thunderbird/zstandard.patch8
-rw-r--r--skip/webkit2gtk/webkit2gtk.xibuild59
-rw-r--r--skip/wine/rpath.patch57
-rw-r--r--skip/wine/wine.xibuild64
192 files changed, 11523 insertions, 878 deletions
diff --git a/skip/apache2/alpine.layout b/skip/apache2/alpine.layout
new file mode 100644
index 0000000..e9c948f
--- /dev/null
+++ b/skip/apache2/alpine.layout
@@ -0,0 +1,22 @@
+<Layout Alpine>
+ prefix: /usr
+ exec_prefix: ${prefix}
+ bindir: ${prefix}/bin
+ sbindir: ${prefix}/sbin
+ libdir: ${prefix}/lib
+ libexecdir: ${prefix}/lib+
+ mandir: ${prefix}/share/man
+ sysconfdir: /etc+
+ datadir: ${prefix}/share+
+ installbuilddir: ${datadir}/build
+ errordir: ${datadir}/error
+ iconsdir: ${datadir}/icons
+ htdocsdir: /var/www/localhost/htdocs
+ manualdir: /usr/share/doc/apache2/manual
+ cgidir: /var/www/localhost/cgi-bin
+ includedir: /usr/include+
+ localstatedir: /var
+ runtimedir: /run+
+ logfiledir: ${localstatedir}/log+
+ proxycachedir: ${localstatedir}/cache+
+</Layout>
diff --git a/skip/apache2/apache2-ssl.post-install b/skip/apache2/apache2-ssl.post-install
new file mode 100644
index 0000000..1e8478a
--- /dev/null
+++ b/skip/apache2/apache2-ssl.post-install
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+ssldir=/etc/ssl/apache2
+sslkey=$ssldir/server.key
+sslcert=$ssldir/server.pem
+
+umask 077
+
+[ -f $sslkey ] || openssl genrsa 2048 > $sslkey 2>/dev/null
+
+FQDN=`hostname -f`
+if [ "x${FQDN}" = "x" ]; then
+ FQDN=localhost.localdomain
+fi
+
+if [ ! -f ${sslcert} ] ; then
+cat << EOF | openssl req -new -key ${sslkey} \
+ -x509 -days 365 -set_serial $RANDOM \
+ -out ${sslcert} 2>/dev/null
+--
+SomeState
+SomeCity
+SomeOrganization
+SomeOrganizationalUnit
+${FQDN}
+root@${FQDN}
+EOF
+fi
+
+
diff --git a/skip/apache2/apache2.confd b/skip/apache2/apache2.confd
new file mode 100644
index 0000000..aeb3222
--- /dev/null
+++ b/skip/apache2/apache2.confd
@@ -0,0 +1,54 @@
+# /etc/conf.d/apache2: config file for /etc/init.d/apache2
+
+#
+# The default processing model (MPM) is the process-based
+# 'prefork' model. A thread-based model, 'worker', is also
+# available, but does not work with some modules (such as PHP).
+#
+#HTTPD=/usr/sbin/httpd.worker
+
+HTTPD="/usr/sbin/httpd"
+
+#
+# To pass additional options (for instance, -D definitions) to the
+# httpd binary at startup, set HTTPD_OPTS here.
+#
+HTTPD_OPTS=
+
+# Extended options for advanced uses of Apache ONLY
+# You don't need to edit these unless you are doing crazy Apache stuff
+# As not having them set correctly, or feeding in an incorrect configuration
+# via them will result in Apache failing to start
+# YOU HAVE BEEN WARNED.
+
+# PID file
+#PIDFILE=/run/apache2/httpd.pid
+
+# timeout for startup/shutdown checks
+#TIMEOUT=10
+
+# ServerRoot setting
+#SERVERROOT=/var/www
+
+# Configuration file location
+# - If this does NOT start with a '/', then it is treated relative to
+# $SERVERROOT by Apache
+#CONFIGFILE=/etc/apache2/httpd.conf
+
+# Location to log startup errors to
+# They are normally dumped to your terminal.
+#STARTUPERRORLOG="/var/log/apache2/startuperror.log"
+
+# A command that outputs a formatted text version of the HTML at the URL
+# of the command line. Designed for lynx, however other programs may work.
+#LYNX="lynx -dump"
+
+# The URL to your server's mod_status status page.
+# Required for status and fullstatus
+#STATUSURL="http://localhost/server-status"
+
+# Method to use when reloading the server
+# Valid options are 'restart' and 'graceful'
+# See http://httpd.apache.org/docs/2.2/stopping.html for information on
+# what they do and how they differ.
+#RELOAD_TYPE="graceful"
diff --git a/skip/apache2/apache2.initd b/skip/apache2/apache2.initd
new file mode 100755
index 0000000..2975e7a
--- /dev/null
+++ b/skip/apache2/apache2.initd
@@ -0,0 +1,154 @@
+#!/sbin/openrc-run
+
+extra_commands="configdump configtest modules virtualhosts"
+extra_started_commands="fullstatus graceful gracefulstop reload"
+
+depend() {
+ need net
+ use mysql dns logger netmount postgresql
+ after sshd firewall
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+checkconfd() {
+ PIDFILE="${PIDFILE:-/run/apache2/httpd.pid}"
+ TIMEOUT=${TIMEOUT:-10}
+
+ SERVERROOT="${SERVERROOT:-/var/www}"
+ if [ ! -d ${SERVERROOT} ]; then
+ eerror "SERVERROOT does not exist: ${SERVERROOT}"
+ return 1
+ fi
+
+ CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
+ [ "${CONFIGFILE#/}" = "${CONFIGFILE}" ] && CONFIGFILE="${SERVERROOT}/${CONFIGFILE}"
+ if [ ! -r "${CONFIGFILE}" ]; then
+ eerror "Unable to read configuration file: ${CONFIGFILE}"
+ return 1
+ fi
+
+ HTTPD_OPTS="${HTTPD_OPTS} -d ${SERVERROOT}"
+ HTTPD_OPTS="${HTTPD_OPTS} -f ${CONFIGFILE}"
+ [ -n "${STARTUPERRORLOG}" ] && HTTPD_OPTS="${HTTPD_OPTS} -E ${STARTUPERRORLOG}"
+ return 0
+
+}
+
+checkconfig() {
+ checkconfd || return 1
+
+ ${HTTPD} ${HTTPD_OPTS} -t 1>/dev/null 2>&1
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eerror "${SVCNAME} has detected an error in your setup:"
+ ${HTTPD} ${HTTPD_OPTS} -t
+ fi
+
+ return $ret
+}
+
+start() {
+ checkconfig || return 1
+ checkpath --directory $(dirname $PIDFILE)
+
+ [ -f /var/log/apache2/ssl_scache ] && rm /var/log/apache2/ssl_scache
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start \
+ --pidfile ${PIDFILE} \
+ --exec ${HTTPD} \
+ -- ${HTTPD_OPTS} -k start
+ eend $?
+}
+
+stop() {
+ checkconfd || return 1
+
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile ${PIDFILE} --exec ${HTTPD} \
+ --retry ${TIMEOUT}
+ eend $?
+}
+
+reload() {
+ RELOAD_TYPE="${RELOAD_TYPE:-graceful}"
+
+ checkconfig || return 1
+ service_started "${SVCNAME}" || return
+
+ if [ "${RELOAD_TYPE}" = "restart" ]; then
+ ebegin "Restarting ${SVCNAME}"
+ ${HTTPD} ${HTTPD_OPTS} -k restart
+ eend $?
+ elif [ "${RELOAD_TYPE}" = "graceful" ]; then
+ ebegin "Gracefully restarting ${SVCNAME}"
+ ${HTTPD} ${HTTPD_OPTS} -k graceful
+ eend $?
+ else
+ eerror "${RELOAD_TYPE} is not a valid RELOAD_TYPE. Please edit /etc/conf.d/${SVCNAME}"
+ fi
+}
+
+graceful() {
+ checkconfig || return 1
+ service_started "${SVCNAME}" || return
+ ebegin "Gracefully restarting ${SVCNAME}"
+ ${HTTPD} ${HTTPD_OPTS} -k graceful
+ eend $?
+}
+
+gracefulstop() {
+ checkconfig || return 1
+ ebegin "Gracefully stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile ${PIDFILE} --exec ${HTTPD} \
+ --retry SIGWINCH/${TIMEOUT}
+ eend $?
+}
+
+modules() {
+ checkconfig || return 1
+
+ ${HTTPD} ${HTTPD_OPTS} -M 2>&1
+}
+
+fullstatus() {
+ LYNX="${LYNX:-lynx -dump}"
+ STATUSURL="${STATUSURL:-http://localhost/server-status}"
+
+ if ! service_started "${SVCNAME}"; then
+ eerror "${SVCNAME} not started"
+ elif ! type -p $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then
+ eerror "lynx not installed!"
+ else
+ ${LYNX} ${STATUSURL}
+ fi
+}
+
+virtualhosts() {
+ checkconfd || return 1
+ ${HTTPD} ${HTTPD_OPTS} -S
+}
+
+configdump() {
+ LYNX="${LYNX:-lynx -dump}"
+ INFOURL="${INFOURL:-http://localhost/server-info}"
+
+ checkconfd || return 1
+
+ if ! service_started "${SVCNAME}"; then
+ eerror "${SVCNAME} not started"
+ elif ! type -p $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then
+ eerror "lynx not installed!"
+ else
+ echo "${HTTPD} started with '${HTTPD_OPTS}'"
+ for i in config server list; do
+ ${LYNX} "${INFOURL}/?${i}" | sed '/Apache Server Information/d;/^[[:space:]]\+[_]\+$/Q'
+ done
+ fi
+}
+
diff --git a/skip/apache2/apache2.logrotate b/skip/apache2/apache2.logrotate
new file mode 100644
index 0000000..b50fb71
--- /dev/null
+++ b/skip/apache2/apache2.logrotate
@@ -0,0 +1,10 @@
+/var/log/apache2/*log {
+ missingok
+ notifempty
+ sharedscripts
+ delaycompress
+ postrotate
+ /etc/init.d/apache2 --quiet --ifstarted reload > /dev/null 2>/dev/null || true
+ endscript
+}
+
diff --git a/skip/apache2/apache2.pre-install b/skip/apache2/apache2.pre-install
new file mode 100644
index 0000000..d4ede74
--- /dev/null
+++ b/skip/apache2/apache2.pre-install
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+addgroup -S -g 82 www-data 2>/dev/null
+addgroup -S apache 2>/dev/null
+adduser -S -D -H -h /var/www -s /sbin/nologin -G apache -g apache apache 2>/dev/null
+addgroup apache www-data 2>/dev/null
+
+exit 0
diff --git a/skip/apache2/apache2.pre-upgrade b/skip/apache2/apache2.pre-upgrade
new file mode 100644
index 0000000..d4ede74
--- /dev/null
+++ b/skip/apache2/apache2.pre-upgrade
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+addgroup -S -g 82 www-data 2>/dev/null
+addgroup -S apache 2>/dev/null
+adduser -S -D -H -h /var/www -s /sbin/nologin -G apache -g apache apache 2>/dev/null
+addgroup apache www-data 2>/dev/null
+
+exit 0
diff --git a/skip/apache2/apache2.xibuild b/skip/apache2/apache2.xibuild
new file mode 100644
index 0000000..f2de5a4
--- /dev/null
+++ b/skip/apache2/apache2.xibuild
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+NAME="apache2"
+DESC="A high performance Unix-based HTTP server"
+
+MAKEDEPS=" apr apr-util autoconf automake brotli libxml2 lua nghttp2 openssl-dev>3 pcre sed zlib"
+
+_pkgreal=httpd
+
+PKG_VER=2.4.54
+SOURCE="https://dlcdn.apache.org/$_pkgreal/$_pkgreal-$PKG_VER.tar.bz2"
+
+ADDITIONAL="
+alpine.layout
+apache2-ssl.post-install
+apache2.confd
+apache2.initd
+apache2.logrotate
+apache2.pre-install
+apache2.pre-upgrade
+conf
+"
+
+prepare() {
+ for i in $source; do
+ case $i in
+ *.patch) echo $i; patch -p1 -i "$BUILD_ROOT"/$(basename $i);;
+ esac
+ done
+
+ cat "$BUILD_ROOT/alpine.layout" >> config.layout
+}
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --enable-so \
+ --enable-suexec \
+ --with-suexec-caller=apache \
+ --with-suexec-docroot=/var/www \
+ --with-suexec-logfile=/var/log/apache2/suexec.log \
+ --with-suexec-bin=/usr/sbin/suexec \
+ --with-suexec-uidmin=99 \
+ --with-suexec-gidmin=99 \
+ --with-apr=/usr/bin/apr-1-config \
+ --with-apr-util=/usr/bin/apu-1-config \
+ --with-pcre=/usr \
+ --enable-mods-shared=all \
+ --enable-mpms-shared=all \
+ --with-mpm=prefork \
+ --enable-ssl \
+ --with-ssl \
+ --enable-proxy \
+ --enable-cache \
+ --enable-disk-cache \
+ --enable-mem-cache \
+ --enable-file-cache \
+ --enable-ldap \
+ --enable-authnz-ldap \
+ --enable-cgid \
+ --enable-cgi \
+ --enable-authn-anon \
+ --enable-authn-alias \
+ --disable-imagemap \
+ --enable-proxy-connect \
+ --enable-proxy-http \
+ --enable-proxy-ftp \
+ --enable-deflate \
+ --enable-dbd \
+ --enable-exception-hook \
+ --enable-dav \
+ --enable-dav-fs \
+ --enable-dav-lock
+ make
+}
+
+package() {
+ make -j1 DESTDIR="$PKG_DEST" install
+
+ # config
+ rm -r "$PKG_DEST"/etc/apache2/extra/httpd-vhosts.conf \
+ "$PKG_DEST"/etc/apache2/original
+ mv "$PKG_DEST"/etc/apache2/extra "$PKG_DEST"/etc/apache2/conf.d
+ for file in "$PKG_DEST"/etc/apache2/conf.d/httpd-*; do
+ mv "$file" \
+ "$(dirname $file)/${file#$PKG_DEST/etc/apache2/conf.d/httpd-}"
+ done
+ sed -Ei \
+ 's:^(\t?#?LoadModule .+ )lib/apache2/:\1modules/:;ta;b;:a;s/^#?LoadModule (dav.*|lbmethod_.+|.*ldap|lua|proxy.*|ssl|xml2enc)_module //;tb;b;:b;d' \
+ "$PKG_DEST"/etc/apache2/httpd.conf
+
+ # init scripts and logrotate
+ install -D -m755 "$BUILD_ROOT"/apache2.initd \
+ "$PKG_DEST"/etc/init.d/apache2
+ install -D -m644 "$BUILD_ROOT"/apache2.logrotate \
+ "$PKG_DEST"/etc/logrotate.d/apache2
+ install -D -m644 "$BUILD_ROOT"/apache2.confd \
+ "$PKG_DEST"/etc/conf.d/apache2
+
+ install -d "$PKG_DEST"/var/www
+ install -d -m 2750 -g wheel "$PKG_DEST"/var/log/apache2
+ ln -fs /var/log/apache2 "$PKG_DEST"/var/www/logs
+ ln -fs /run/apache2 "$PKG_DEST"/var/www/run
+ ln -fs /usr/lib/apache2 "$PKG_DEST"/var/www/modules
+ rm -fr "$PKG_DEST"/run
+
+ # verify all MPMs are built
+ # ref #2866
+ for i in prefork event worker; do
+ if ! [ -e "$PKG_DEST"/usr/lib/apache2/mod_mpm_$i.so ]; then
+ error "$i MPM was not built"
+ fi
+ done
+
+ # create the run directory
+ # ref #9982
+ mkdir -p "$PKG_DEST"/run/apache2
+}
+
diff --git a/skip/avahi/CVE-2021-3468.patch b/skip/avahi/CVE-2021-3468.patch
new file mode 100644
index 0000000..3e0725a
--- /dev/null
+++ b/skip/avahi/CVE-2021-3468.patch
@@ -0,0 +1,37 @@
+From 447affe29991ee99c6b9732fc5f2c1048a611d3b Mon Sep 17 00:00:00 2001
+From: Riccardo Schirone <sirmy15@gmail.com>
+Date: Fri, 26 Mar 2021 11:50:24 +0100
+Subject: [PATCH] Avoid infinite-loop in avahi-daemon by handling HUP event in
+ client_work
+
+If a client fills the input buffer, client_work() disables the
+AVAHI_WATCH_IN event, thus preventing the function from executing the
+`read` syscall the next times it is called. However, if the client then
+terminates the connection, the socket file descriptor receives a HUP
+event, which is not handled, thus the kernel keeps marking the HUP event
+as occurring. While iterating over the file descriptors that triggered
+an event, the client file descriptor will keep having the HUP event and
+the client_work() function is always called with AVAHI_WATCH_HUP but
+without nothing being done, thus entering an infinite loop.
+
+See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984938
+---
+ avahi-daemon/simple-protocol.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/avahi-daemon/simple-protocol.c b/avahi-daemon/simple-protocol.c
+index 3e0ebb11..6c0274d6 100644
+--- a/avahi-daemon/simple-protocol.c
++++ b/avahi-daemon/simple-protocol.c
+@@ -424,6 +424,11 @@ static void client_work(AvahiWatch *watch, AVAHI_GCC_UNUSED int fd, AvahiWatchEv
+ }
+ }
+
++ if (events & AVAHI_WATCH_HUP) {
++ client_free(c);
++ return;
++ }
++
+ c->server->poll_api->watch_update(
+ watch,
+ (c->outbuf_length > 0 ? AVAHI_WATCH_OUT : 0) |
diff --git a/skip/avahi/CVE-2021-36217.patch b/skip/avahi/CVE-2021-36217.patch
new file mode 100644
index 0000000..7b0449a
--- /dev/null
+++ b/skip/avahi/CVE-2021-36217.patch
@@ -0,0 +1,148 @@
+From 9d31939e55280a733d930b15ac9e4dda4497680c Mon Sep 17 00:00:00 2001
+From: Tommi Rantala <tommi.t.rantala@nokia.com>
+Date: Mon, 8 Feb 2021 11:04:43 +0200
+Subject: [PATCH] Fix NULL pointer crashes from #175
+
+avahi-daemon is crashing when running "ping .local".
+The crash is due to failing assertion from NULL pointer.
+Add missing NULL pointer checks to fix it.
+
+Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd
+---
+ avahi-core/browse-dns-server.c | 5 ++++-
+ avahi-core/browse-domain.c | 5 ++++-
+ avahi-core/browse-service-type.c | 3 +++
+ avahi-core/browse-service.c | 3 +++
+ avahi-core/browse.c | 3 +++
+ avahi-core/resolve-address.c | 5 ++++-
+ avahi-core/resolve-host-name.c | 5 ++++-
+ avahi-core/resolve-service.c | 5 ++++-
+ 8 files changed, 29 insertions(+), 5 deletions(-)
+
+diff --git a/avahi-core/browse-dns-server.c b/avahi-core/browse-dns-server.c
+index 049752e9..c2d914fa 100644
+--- a/avahi-core/browse-dns-server.c
++++ b/avahi-core/browse-dns-server.c
+@@ -343,7 +343,10 @@ AvahiSDNSServerBrowser *avahi_s_dns_server_browser_new(
+ AvahiSDNSServerBrowser* b;
+
+ b = avahi_s_dns_server_browser_prepare(server, interface, protocol, domain, type, aprotocol, flags, callback, userdata);
++ if (!b)
++ return NULL;
++
+ avahi_s_dns_server_browser_start(b);
+
+ return b;
+-}
+\ No newline at end of file
++}
+diff --git a/avahi-core/browse-domain.c b/avahi-core/browse-domain.c
+index f145d56a..06fa70c0 100644
+--- a/avahi-core/browse-domain.c
++++ b/avahi-core/browse-domain.c
+@@ -253,7 +253,10 @@ AvahiSDomainBrowser *avahi_s_domain_browser_new(
+ AvahiSDomainBrowser *b;
+
+ b = avahi_s_domain_browser_prepare(server, interface, protocol, domain, type, flags, callback, userdata);
++ if (!b)
++ return NULL;
++
+ avahi_s_domain_browser_start(b);
+
+ return b;
+-}
+\ No newline at end of file
++}
+diff --git a/avahi-core/browse-service-type.c b/avahi-core/browse-service-type.c
+index fdd22dcd..b1fc7af8 100644
+--- a/avahi-core/browse-service-type.c
++++ b/avahi-core/browse-service-type.c
+@@ -171,6 +171,9 @@ AvahiSServiceTypeBrowser *avahi_s_service_type_browser_new(
+ AvahiSServiceTypeBrowser *b;
+
+ b = avahi_s_service_type_browser_prepare(server, interface, protocol, domain, flags, callback, userdata);
++ if (!b)
++ return NULL;
++
+ avahi_s_service_type_browser_start(b);
+
+ return b;
+diff --git a/avahi-core/browse-service.c b/avahi-core/browse-service.c
+index 5531360c..63e0275a 100644
+--- a/avahi-core/browse-service.c
++++ b/avahi-core/browse-service.c
+@@ -184,6 +184,9 @@ AvahiSServiceBrowser *avahi_s_service_browser_new(
+ AvahiSServiceBrowser *b;
+
+ b = avahi_s_service_browser_prepare(server, interface, protocol, service_type, domain, flags, callback, userdata);
++ if (!b)
++ return NULL;
++
+ avahi_s_service_browser_start(b);
+
+ return b;
+diff --git a/avahi-core/browse.c b/avahi-core/browse.c
+index 2941e579..e8a915e9 100644
+--- a/avahi-core/browse.c
++++ b/avahi-core/browse.c
+@@ -634,6 +634,9 @@ AvahiSRecordBrowser *avahi_s_record_browser_new(
+ AvahiSRecordBrowser *b;
+
+ b = avahi_s_record_browser_prepare(server, interface, protocol, key, flags, callback, userdata);
++ if (!b)
++ return NULL;
++
+ avahi_s_record_browser_start_query(b);
+
+ return b;
+diff --git a/avahi-core/resolve-address.c b/avahi-core/resolve-address.c
+index ac0b29b1..e61dd242 100644
+--- a/avahi-core/resolve-address.c
++++ b/avahi-core/resolve-address.c
+@@ -286,7 +286,10 @@ AvahiSAddressResolver *avahi_s_address_resolver_new(
+ AvahiSAddressResolver *b;
+
+ b = avahi_s_address_resolver_prepare(server, interface, protocol, address, flags, callback, userdata);
++ if (!b)
++ return NULL;
++
+ avahi_s_address_resolver_start(b);
+
+ return b;
+-}
+\ No newline at end of file
++}
+diff --git a/avahi-core/resolve-host-name.c b/avahi-core/resolve-host-name.c
+index 808b0e72..4e8e5973 100644
+--- a/avahi-core/resolve-host-name.c
++++ b/avahi-core/resolve-host-name.c
+@@ -318,7 +318,10 @@ AvahiSHostNameResolver *avahi_s_host_name_resolver_new(
+ AvahiSHostNameResolver *b;
+
+ b = avahi_s_host_name_resolver_prepare(server, interface, protocol, host_name, aprotocol, flags, callback, userdata);
++ if (!b)
++ return NULL;
++
+ avahi_s_host_name_resolver_start(b);
+
+ return b;
+-}
+\ No newline at end of file
++}
+diff --git a/avahi-core/resolve-service.c b/avahi-core/resolve-service.c
+index 66bf3cae..43771763 100644
+--- a/avahi-core/resolve-service.c
++++ b/avahi-core/resolve-service.c
+@@ -519,7 +519,10 @@ AvahiSServiceResolver *avahi_s_service_resolver_new(
+ AvahiSServiceResolver *b;
+
+ b = avahi_s_service_resolver_prepare(server, interface, protocol, name, type, domain, aprotocol, flags, callback, userdata);
++ if (!b)
++ return NULL;
++
+ avahi_s_service_resolver_start(b);
+
+ return b;
+-}
+\ No newline at end of file
++}
diff --git a/skip/avahi/avahi.pre-install b/skip/avahi/avahi.pre-install
new file mode 100644
index 0000000..89b2fd4
--- /dev/null
+++ b/skip/avahi/avahi.pre-install
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+addgroup -S -g 28 netdev 2>/dev/null
+addgroup -S -g 86 avahi 2>/dev/null
+adduser -S -u 86 -D -H \
+ -h /var/run/avahi-daemon \
+ -s /sbin/nologin \
+ -G avahi \
+ -g "Avahi System User" \
+ avahi 2>/dev/null
+
+exit 0
diff --git a/skip/avahi/avahi.xibuild b/skip/avahi/avahi.xibuild
new file mode 100644
index 0000000..d1e53f4
--- /dev/null
+++ b/skip/avahi/avahi.xibuild
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+NAME="avahi"
+DESC="multicast/unicast DNS-SD framework"
+
+MAKEDEPS="gdbm intltool gobject-introspection expat libdaemon glib dbus libcap gettext autoconf automake libtool libevent"
+
+PKG_VER=0.8
+SOURCE="https://github.com/lathiat/avahi/releases/download/v$PKG_VER/avahi-$PKG_VER.tar.gz"
+
+ADDITIONAL="
+CVE-2021-3468.patch
+CVE-2021-36217.patch
+avahi.pre-install
+"
+
+prepare() {
+ apply_patches
+ autoreconf -vif
+}
+
+build() {
+ # we dont build autoipd since dhcpcd does same job
+ LDFLAGS="$LDFLAGS -lintl" \
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-autoipd \
+ --disable-qt3 \
+ --disable-qt4 \
+ --disable-qt5 \
+ --disable-gtk \
+ --disable-gtk3 \
+ --disable-mono \
+ --disable-monodoc \
+ --disable-doxygen-doc \
+ --disable-xmltoman \
+ --enable-compat-libdns_sd \
+ --enable-compat-howl \
+ --disable-python \
+ --with-dbus-sys=/usr/share/dbus-1/system.d \
+ --with-distro="gentoo"
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+
+ install -d -o avahi -g avahi "$PKG_DEST"/var/run/avahi-daemon
+
+ ln -s avahi-compat-howl.pc "$PKG_DEST"/usr/lib/pkgconfig/howl.pc
+ ln -s avahi-compat-libdns_sd.pc "$PKG_DEST"/usr/lib/pkgconfig/libdns_sd.pc
+ ln -s avahi-compat-libdns_sd/dns_sd.h "$PKG_DEST"/usr/include/
+}
+
diff --git a/skip/cabal/cabal.project.freeze b/skip/cabal/cabal.project.freeze
index 07c927e..f4c0bd7 100644
--- a/skip/cabal/cabal.project.freeze
+++ b/skip/cabal/cabal.project.freeze
@@ -1,65 +1,68 @@
active-repositories: hackage.haskell.org:merge
-constraints: any.Cabal ==3.6.2.0,
- Cabal -bundled-binary-generic,
- any.HTTP ==4000.3.16,
- HTTP -conduit10 -mtl1 +network-uri -warn-as-error -warp-tests,
+constraints: any.Cabal ==3.8.1.0,
+ any.Cabal-syntax ==3.8.1.0,
+ any.HTTP ==4000.4.1,
+ HTTP -conduit10 +network-uri -warn-as-error -warp-tests,
any.array ==0.5.4.0,
any.async ==2.2.4,
async -bench,
- any.base ==4.15.0.0,
- any.base-orphans ==0.8.6,
+ any.base ==4.15.1.0,
+ any.base-orphans ==0.8.7,
any.base16-bytestring ==1.0.2.0,
any.base64-bytestring ==1.2.1.0,
any.binary ==0.8.8.0,
any.bytestring ==0.10.12.1,
- cabal-install -debug-conflict-sets -debug-expensive-assertions -debug-tracetree +lukko +native-dns,
+ cabal-install +lukko +native-dns,
+ any.cabal-install-solver ==3.8.1.0,
+ cabal-install-solver -debug-conflict-sets -debug-expensive-assertions -debug-tracetree,
any.containers ==0.6.4.1,
any.cryptohash-sha256 ==0.11.102.1,
cryptohash-sha256 -exe +use-cbits,
any.deepseq ==1.4.5.0,
- any.directory ==1.3.6.1,
+ any.directory ==1.3.6.2,
any.echo ==0.1.4,
echo -example,
any.ed25519 ==0.0.5.0,
ed25519 +no-donna +test-doctests +test-hlint +test-properties,
any.edit-distance ==0.2.2.1,
+ any.exceptions ==0.10.4,
any.filepath ==1.4.2.1,
- any.ghc-bignum ==1.0,
- any.ghc-bignum-orphans ==0.1.1,
- any.ghc-boot-th ==9.0.1,
+ any.ghc-bignum ==1.1,
+ any.ghc-boot-th ==9.0.2,
any.ghc-prim ==0.7.0,
- any.hackage-security ==0.6.0.1,
- hackage-security +base48 +lukko -mtl21 -old-directory +use-network-uri,
- any.hashable ==1.4.0.0,
+ any.hackage-security ==0.6.2.2,
+ hackage-security +base48 -cabal-syntax +lukko -mtl21 -old-directory +use-network-uri,
+ any.hashable ==1.4.1.0,
hashable +containers +integer-gmp -random-initial-seed,
any.hsc2hs ==0.68.8,
hsc2hs -in-ghc-tree,
any.lukko ==0.1.1.3,
lukko +ofd-locking,
any.mtl ==2.2.2,
- any.network ==3.1.2.5,
+ any.network ==3.1.2.7,
network -devel,
any.network-uri ==2.6.4.1,
any.parsec ==3.1.14.0,
any.pretty ==1.1.3.6,
- any.process ==1.6.11.0,
- any.random ==1.2.1,
+ any.process ==1.6.15.0,
+ any.random ==1.2.1.1,
any.regex-base ==0.94.0.2,
any.regex-posix ==0.96.0.1,
regex-posix -_regex-posix-clib,
any.resolv ==0.1.2.0,
- any.rts ==1.0,
+ any.rts ==1.0.2,
+ any.safe-exceptions ==0.1.7.3,
any.splitmix ==0.1.0.4,
splitmix -optimised-mixer,
any.stm ==2.5.0.0,
any.tar ==0.5.1.1,
tar -old-bytestring -old-time,
any.template-haskell ==2.17.0.0,
- any.text ==1.2.4.1,
- any.th-compat ==0.1.3,
+ any.text ==1.2.5.0,
+ any.th-compat ==0.1.4,
any.time ==1.9.3,
any.transformers ==0.5.6.2,
any.unix ==2.7.2.2,
- any.zlib ==0.6.2.3,
+ any.zlib ==0.6.3.0,
zlib -bundled-c-zlib -non-blocking-ffi -pkg-config
-index-state: hackage.haskell.org 2021-11-17T20:47:55Z
+index-state: hackage.haskell.org 2022-08-16T18:13:49Z
diff --git a/skip/cabal/cabal.xibuild b/skip/cabal/cabal.xibuild
index 501b0e3..64bcd18 100644
--- a/skip/cabal/cabal.xibuild
+++ b/skip/cabal/cabal.xibuild
@@ -3,24 +3,37 @@
NAME="cabal"
DESC="The Haskell Cabal"
-MAKEDEPS="cabal-stage0"
-DEPS="gmp libffi musl zlib "
+MAKEDEPS="ghc gmp libffi zlib cabal-bootstrap"
-PKG_VER=3.6.2.0
+PKG_VER=3.8.1.0
SOURCE="https://hackage.haskell.org/package/cabal-install-$PKG_VER/cabal-install-$PKG_VER.tar.gz"
-ADDITIONAL="cabal.project.freeze "
+ADDITIONAL="
+cabal.project.freeze
+"
+
+cabal_update() {
+ cd $BUILD_ROOT
+ # Build a freeze file to make the build reproducible.
+ # This freeze file is stored in $source and thus tracked in Git.
+ HOME="$_cabal_home" cabal v2-update --allow-newer
+ (
+ cd "$BUILD_ROOT"
+ HOME="$_cabal_home" cabal v2-freeze \
+ --allow-newer --shadow-installed-packages
+ mv cabal.project.freeze "$startdir/"
+ )
+}
-prepare () {
- export cabal_home="$BUILD_ROOT/dist"
-
- ln -sf cabal.project.freeze \
- "cabal.project.freeze"
+prepare() {
+ apply_patches
+ ln -sf "$BUILD_ROOT/cabal.project.freeze" \
+ "$BUILD_ROOT/cabal.project.freeze"
}
-build () {
- HOME="$cabal_home" cabal v2-update
- HOME="$cabal_home" cabal v2-build all \
+build() {
+ HOME="$_cabal_home" cabal v2-update
+ HOME="$_cabal_home" cabal v2-build all \
--allow-newer \
--jobs=${JOBS:-1} \
--prefix=/usr \
@@ -28,13 +41,20 @@ build () {
--sysconfdir=/etc
}
-package () {
- HOME="$cabal_home" cabal list-bin --allow-newer all:exes | \
- xargs install -Dm755 -t "$PKG_DEST"/usr/bin
+package() {
+ # With v2- cabal no longer wants us to separate v2-build and
+ # v2-install, however, we don't want to build everything in a
+ # fakeroot. We work around this by copying binaries build in the
+ # previous step manually.
+ #
+ # See https://github.com/haskell/cabal/issues/6919#issuecomment-761563498
+ HOME="$_cabal_home" cabal list-bin --allow-newer all:exes | \
+ xargs install -Dm755 -t "$PKG_DEST"/usr/bin
mkdir -p "$PKG_DEST"/usr/share/man/man1
- HOME="$cabal_home" cabal man --raw \
+ HOME="$_cabal_home" cabal man --raw \
> "$PKG_DEST"/usr/share/man/man1/cabal.1
install -Dm644 LICENSE "$PKG_DEST/usr/share/licenses/cabal/LICENSE"
}
+
diff --git a/skip/dino/dino.xibuild b/skip/dino/dino.xibuild
new file mode 100644
index 0000000..8f40781
--- /dev/null
+++ b/skip/dino/dino.xibuild
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+NAME="dino"
+DESC="Modern Jabber/XMPP client"
+
+MAKEDEPS=" cmake glib glib-networking gpgme gspell gst-libav gst-plugins-base gtk3 libgcrypt libgee libhandy1 libnice libqrencode libsignal-protocol-c libsoup libsrtp ninja sqlite vala webrtc-audio-processing"
+
+PKG_VER=0.3.0
+SOURCE="https://github.com/dino/dino/releases/download/v$PKG_VER/dino-$PKG_VER.tar.gz"
+
+ADDITIONAL="
+mobile-ui.patch
+"
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --with-tests
+ make
+}
+
+check() {
+ build/xmpp-vala-test
+ build/signal-protocol-vala-test
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+}
diff --git a/skip/dino/mobile-ui.patch b/skip/dino/mobile-ui.patch
new file mode 100644
index 0000000..f274acf
--- /dev/null
+++ b/skip/dino/mobile-ui.patch
@@ -0,0 +1,967 @@
+diff --git a/cmake/FindHandy.cmake b/cmake/FindHandy.cmake
+new file mode 100644
+index 00000000..49148f0f
+--- /dev/null
++++ b/cmake/FindHandy.cmake
+@@ -0,0 +1,11 @@
++include(PkgConfigWithFallback)
++find_pkg_config_with_fallback(Handy
++ PKG_CONFIG_NAME libhandy-1
++ LIB_NAMES libhandy-1
++ INCLUDE_NAMES handy.h
++)
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(Handy
++ REQUIRED_VARS Handy_LIBRARY
++ VERSION_VAR Handy_VERSION)
+diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
+index e052785a..f6c3edc7 100644
+--- a/main/CMakeLists.txt
++++ b/main/CMakeLists.txt
+@@ -11,6 +11,7 @@ find_packages(MAIN_PACKAGES REQUIRED
+ GTK3
+ ICU
+ Gspell
++ Handy
+ )
+
+ set(RESOURCE_LIST
+diff --git a/main/data/add_conversation/select_jid_fragment.ui b/main/data/add_conversation/select_jid_fragment.ui
+index 50bc0e36..be56e710 100644
+--- a/main/data/add_conversation/select_jid_fragment.ui
++++ b/main/data/add_conversation/select_jid_fragment.ui
+@@ -1,82 +1,88 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <interface>
+ <template class="DinoUiSelectJidFragment">
+- <property name="height_request">500</property>
+- <property name="width_request">460</property>
++ <property name="height_request">480</property>
+ <property name="visible">True</property>
+ <child>
+- <object class="GtkGrid">
+- <property name="expand">True</property>
+- <property name="margin-top">20</property>
+- <property name="margin-right">80</property>
+- <property name="margin-bottom">20</property>
+- <property name="margin-left">80</property>
+- <property name="orientation">vertical</property>
+- <property name="row-spacing">10</property>
++ <object class="HdyClamp">
++ <property name="margin-right">18</property>
++ <property name="margin-left">18</property>
++ <property name="maximum-size">300</property>
+ <property name="visible">True</property>
++ <property name="can_focus">False</property>
+ <child>
+- <object class="GtkEntry" id="entry">
+- <property name="activates_default">True</property>
+- <property name="hexpand">True</property>
+- <property name="visible">True</property>
+- </object>
+- </child>
+- <child>
+- <object class="GtkBox">
++ <object class="GtkGrid">
+ <property name="expand">True</property>
++ <property name="margin-top">20</property>
++ <property name="margin-bottom">20</property>
+ <property name="orientation">vertical</property>
++ <property name="row-spacing">10</property>
+ <property name="visible">True</property>
+ <child>
+- <object class="GtkFrame">
++ <object class="GtkEntry" id="entry">
++ <property name="activates_default">True</property>
++ <property name="hexpand">True</property>
++ <property name="visible">True</property>
++ </object>
++ </child>
++ <child>
++ <object class="GtkBox">
++ <property name="expand">True</property>
++ <property name="orientation">vertical</property>
+ <property name="visible">True</property>
+ <child>
+- <object class="GtkScrolledWindow" id="scrolled_window">
+- <property name="hscrollbar_policy">never</property>
+- <property name="expand">True</property>
++ <object class="GtkFrame">
+ <property name="visible">True</property>
+ <child>
+- <object class="GtkBox" id="box">
+- <property name="orientation">vertical</property>
++ <object class="GtkScrolledWindow" id="scrolled_window">
++ <property name="hscrollbar_policy">never</property>
++ <property name="expand">True</property>
+ <property name="visible">True</property>
++ <child>
++ <object class="GtkBox" id="box">
++ <property name="orientation">vertical</property>
++ <property name="visible">True</property>
++ </object>
++ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+- </object>
+- </child>
+- <child>
+- <object class="GtkToolbar">
+- <property name="visible">True</property>
+- <style>
+- <class name="inline-toolbar"/>
+- </style>
+ <child>
+- <object class="GtkToolItem">
++ <object class="GtkToolbar">
+ <property name="visible">True</property>
++ <style>
++ <class name="inline-toolbar"/>
++ </style>
+ <child>
+- <object class="GtkBox">
++ <object class="GtkToolItem">
+ <property name="visible">True</property>
+ <child>
+- <object class="GtkButton" id="add_button">
++ <object class="GtkBox">
+ <property name="visible">True</property>
+ <child>
+- <object class="GtkImage">
+- <property name="icon-name">list-add-symbolic</property>
+- <property name="icon-size">1</property>
++ <object class="GtkButton" id="add_button">
+ <property name="visible">True</property>
++ <child>
++ <object class="GtkImage">
++ <property name="icon-name">list-add-symbolic</property>
++ <property name="icon-size">1</property>
++ <property name="visible">True</property>
++ </object>
++ </child>
+ </object>
+ </child>
+- </object>
+- </child>
+- <child>
+- <object class="GtkButton" id="remove_button">
+- <property name="sensitive">False</property>
+- <property name="visible">True</property>
+ <child>
+- <object class="GtkImage">
+- <property name="icon-name">list-remove-symbolic</property>
+- <property name="icon-size">1</property>
++ <object class="GtkButton" id="remove_button">
++ <property name="sensitive">False</property>
+ <property name="visible">True</property>
++ <child>
++ <object class="GtkImage">
++ <property name="icon-name">list-remove-symbolic</property>
++ <property name="icon-size">1</property>
++ <property name="visible">True</property>
++ </object>
++ </child>
+ </object>
+ </child>
+ </object>
+diff --git a/main/data/contact_details_dialog.ui b/main/data/contact_details_dialog.ui
+index 4058bc77..3ba17746 100644
+--- a/main/data/contact_details_dialog.ui
++++ b/main/data/contact_details_dialog.ui
+@@ -1,6 +1,7 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <interface>
+ <template class="DinoUiContactDetailsDialog">
++ <property name="default_width">800</property>
+ <property name="modal">True</property>
+ <child type="titlebar">
+ <object class="GtkHeaderBar">
+@@ -21,98 +22,103 @@
+ <property name="expand">True</property>
+ <property name="visible">True</property>
+ <child>
+- <object class="GtkBox">
+- <property name="orientation">vertical</property>
++ <object class="HdyClamp">
++ <property name="margin-right">18</property>
++ <property name="margin-left">18</property>
+ <property name="visible">True</property>
++ <property name="can_focus">False</property>
+ <child>
+- <object class="GtkGrid">
+- <property name="margin-top">20</property>
+- <property name="margin-bottom">12</property>
+- <property name="margin-right">100</property>
+- <property name="margin-left">100</property>
+- <property name="column-spacing">10</property>
++ <object class="GtkBox">
++ <property name="orientation">vertical</property>
+ <property name="visible">True</property>
+ <child>
+- <object class="DinoUiAvatarImage" id="avatar">
+- <property name="height">50</property>
+- <property name="width">50</property>
+- <property name="visible">True</property>
+- <property name="allow_gray">False</property>
+- </object>
+- <packing>
+- <property name="left_attach">0</property>
+- <property name="top_attach">0</property>
+- <property name="width">1</property>
+- <property name="height">2</property>
+- </packing>
+- </child>
+- <child>
+- <object class="DinoUiUtilEntryLabelHybrid" id="name_hybrid">
+- <property name="xalign">0</property>
+- <property name="expand">True</property>
+- <property name="visible">True</property>
+- </object>
+- <packing>
+- <property name="left_attach">1</property>
+- <property name="top_attach">0</property>
+- <property name="width">1</property>
+- <property name="height">1</property>
+- </packing>
+- </child>
+- <child>
+- <object class="GtkLabel" id="name_label">
+- <property name="xalign">0</property>
+- <property name="expand">True</property>
++ <object class="GtkGrid">
++ <property name="margin-top">20</property>
++ <property name="margin-bottom">12</property>
++ <property name="column-spacing">10</property>
++ <property name="expand">False</property>
+ <property name="visible">True</property>
+- <attributes>
+- <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+- </attributes>
++ <child>
++ <object class="DinoUiAvatarImage" id="avatar">
++ <property name="height">50</property>
++ <property name="width">50</property>
++ <property name="visible">True</property>
++ <property name="allow_gray">False</property>
++ </object>
++ <packing>
++ <property name="left_attach">0</property>
++ <property name="top_attach">0</property>
++ <property name="width">1</property>
++ <property name="height">2</property>
++ </packing>
++ </child>
++ <child>
++ <object class="DinoUiUtilEntryLabelHybrid" id="name_hybrid">
++ <property name="xalign">0</property>
++ <property name="expand">True</property>
++ <property name="visible">True</property>
++ </object>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="top_attach">0</property>
++ <property name="width">1</property>
++ <property name="height">1</property>
++ </packing>
++ </child>
++ <child>
++ <object class="GtkLabel" id="name_label">
++ <property name="xalign">0</property>
++ <property name="expand">True</property>
++ <property name="visible">True</property>
++ <attributes>
++ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
++ </attributes>
++ </object>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="top_attach">0</property>
++ <property name="width">1</property>
++ <property name="height">1</property>
++ </packing>
++ </child>
++ <child>
++ <object class="GtkLabel" id="jid_label">
++ <property name="xalign">0</property>
++ <property name="yalign">0</property>
++ <property name="selectable">True</property>
++ <property name="expand">True</property>
++ <property name="visible">True</property>
++ </object>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="top_attach">1</property>
++ <property name="width">1</property>
++ <property name="height">1</property>
++ </packing>
++ </child>
++ <child>
++ <object class="GtkLabel" id="account_label">
++ <property name="xalign">1</property>
++ <property name="yalign">1</property>
++ <property name="margin">5</property>
++ <property name="expand">True</property>
++ <property name="visible">True</property>
++ </object>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="top_attach">2</property>
++ <property name="width">1</property>
++ <property name="height">1</property>
++ </packing>
++ </child>
+ </object>
+- <packing>
+- <property name="left_attach">1</property>
+- <property name="top_attach">0</property>
+- <property name="width">1</property>
+- <property name="height">1</property>
+- </packing>
+ </child>
+ <child>
+- <object class="GtkLabel" id="jid_label">
+- <property name="xalign">0</property>
+- <property name="yalign">0</property>
+- <property name="selectable">True</property>
+- <property name="expand">True</property>
++ <object class="GtkBox" id="main_box">
++ <property name="orientation">vertical</property>
+ <property name="visible">True</property>
+ </object>
+- <packing>
+- <property name="left_attach">1</property>
+- <property name="top_attach">1</property>
+- <property name="width">1</property>
+- <property name="height">1</property>
+- </packing>
+ </child>
+- <child>
+- <object class="GtkLabel" id="account_label">
+- <property name="xalign">1</property>
+- <property name="yalign">1</property>
+- <property name="margin">5</property>
+- <property name="expand">True</property>
+- <property name="visible">True</property>
+- </object>
+- <packing>
+- <property name="left_attach">2</property>
+- <property name="top_attach">1</property>
+- <property name="width">1</property>
+- <property name="height">1</property>
+- </packing>
+- </child>
+- </object>
+- </child>
+- <child>
+- <object class="GtkBox" id="main_box">
+- <property name="orientation">vertical</property>
+- <property name="margin-right">100</property>
+- <property name="margin-left">100</property>
+- <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+diff --git a/main/data/conversation_content_view/view.ui b/main/data/conversation_content_view/view.ui
+index 17f753f5..47302e2f 100644
+--- a/main/data/conversation_content_view/view.ui
++++ b/main/data/conversation_content_view/view.ui
+@@ -4,6 +4,7 @@
+ <property name="expand">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
++ <property name="width_request">350</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkStack" id="stack">
+diff --git a/main/data/emojichooser.ui b/main/data/emojichooser.ui
+index d47a2c22..473820a6 100644
+--- a/main/data/emojichooser.ui
++++ b/main/data/emojichooser.ui
+@@ -187,7 +187,7 @@
+ </object>
+ </child>
+ <child>
+- <object class="GtkBox">
++ <object class="GtkGrid">
+ <property name="visible">1</property>
+ <!-- Remember to keep tooltips here in sync with section headings above -->
+ <child>
+@@ -204,6 +204,10 @@
+ </object>
+ </child>
+ </object>
++ <packing>
++ <property name="left_attach">0</property>
++ <property name="top_attach">0</property>
++ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="people.button">
+@@ -219,6 +223,10 @@
+ </object>
+ </child>
+ </object>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="top_attach">0</property>
++ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="body.button">
+@@ -234,6 +242,10 @@
+ </object>
+ </child>
+ </object>
++ <packing>
++ <property name="left_attach">2</property>
++ <property name="top_attach">0</property>
++ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="nature.button">
+@@ -249,6 +261,10 @@
+ </object>
+ </child>
+ </object>
++ <packing>
++ <property name="left_attach">3</property>
++ <property name="top_attach">0</property>
++ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="food.button">
+@@ -264,6 +280,10 @@
+ </object>
+ </child>
+ </object>
++ <packing>
++ <property name="left_attach">4</property>
++ <property name="top_attach">0</property>
++ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="travel.button">
+@@ -279,6 +299,10 @@
+ </object>
+ </child>
+ </object>
++ <packing>
++ <property name="left_attach">0</property>
++ <property name="top_attach">1</property>
++ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="activities.button">
+@@ -294,6 +318,10 @@
+ </object>
+ </child>
+ </object>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="top_attach">1</property>
++ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="objects.button">
+@@ -309,6 +337,10 @@
+ </object>
+ </child>
+ </object>
++ <packing>
++ <property name="left_attach">2</property>
++ <property name="top_attach">1</property>
++ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="symbols.button">
+@@ -324,6 +356,10 @@
+ </object>
+ </child>
+ </object>
++ <packing>
++ <property name="left_attach">3</property>
++ <property name="top_attach">1</property>
++ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="flags.button">
+@@ -339,6 +375,10 @@
+ </object>
+ </child>
+ </object>
++ <packing>
++ <property name="left_attach">4</property>
++ <property name="top_attach">1</property>
++ </packing>
+ </child>
+ </object>
+ </child>
+diff --git a/main/data/im.dino.Dino.appdata.xml.in b/main/data/im.dino.Dino.appdata.xml.in
+index c95ef12e..180b7873 100644
+--- a/main/data/im.dino.Dino.appdata.xml.in
++++ b/main/data/im.dino.Dino.appdata.xml.in
+@@ -45,5 +45,11 @@
+ </description>
+ </release>
+ </releases>
+- -->
+-</component>
++ -->
++
++ <custom>
++ <value key="Purism::form_factor">workstation</value>
++ <value key="Purism::form_factor">mobile</value>
++ </custom>
++
++ </component>
+diff --git a/main/data/im.dino.Dino.desktop b/main/data/im.dino.Dino.desktop
+index 90f3e38f..66faaa82 100644
+--- a/main/data/im.dino.Dino.desktop
++++ b/main/data/im.dino.Dino.desktop
+@@ -11,3 +11,4 @@ Type=Application
+ Categories=GTK;Network;Chat;InstantMessaging;
+ X-GNOME-UsesNotifications=true
+ MimeType=x-scheme-handler/xmpp;
++X-Purism-FormFactor=Workstation;Mobile;
+diff --git a/main/data/theme.css b/main/data/theme.css
+index 3e076248..897e4cc9 100644
+--- a/main/data/theme.css
++++ b/main/data/theme.css
+@@ -74,6 +74,11 @@ window.dino-main .dino-sidebar > frame {
+ border-bottom: 1px solid @borders;
+ }
+
++window.dino-main list.sidebar {
++ border-left: 0px;
++ border-right: 0px;
++}
++
+ .message-box {
+ transition: background .05s ease;
+ }
+diff --git a/main/data/unified_main_content.ui b/main/data/unified_main_content.ui
+index 03c206c1..e16bc4a8 100644
+--- a/main/data/unified_main_content.ui
++++ b/main/data/unified_main_content.ui
+@@ -1,12 +1,14 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <interface>
+- <object class="GtkPaned" id="paned">
+- <property name="position">300</property>
++ <object class="HdyLeaflet" id="paned">
+ <property name="orientation">horizontal</property>
+ <property name="visible">True</property>
++ <property name="can_focus">False</property>
++ <property name="transition-type">slide</property>
+ <child>
+ <object class="GtkStack" id="left_stack">
+ <property name="visible">True</property>
++ <property name="hexpand">False</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolled">
+ <property name="expand">True</property>
+@@ -29,6 +31,7 @@
+ <property name="valign">start</property>
+ <property name="halign">start</property>
+ <property name="visible">True</property>
++ <property name="width_request">260</property>
+ <child>
+ <object class="GtkImage" id="conversation_list_placeholder_image">
+ <property name="visible">True</property>
+@@ -44,7 +47,9 @@
+ <property name="margin-top">70</property>
+ <property name="margin-right">50</property>
+ <property name="visible">True</property>
++ <property name="xalign">0</property>
+ <property name="valign">end</property>
++ <property name="max-width-chars">0</property>
+ <property name="label" translatable="yes">Click here to start a conversation or join a channel.</property>
+ <style>
+ <class name="dim-label"/>
+@@ -58,10 +63,18 @@
+ </child>
+ </object>
+ <packing>
+- <property name="resize">False</property>
+- <property name="shrink">False</property>
++ <property name="name">list-pane</property>
+ </packing>
+ </child>
++ <child>
++ <object class="GtkSeparator" id="paned_separator">
++ <property name="orientation">vertical</property>
++ <property name="visible">True</property>
++ <style>
++ <class name="sidebar"/>
++ </style>
++ </object>
++ </child>
+ <child>
+ <object class="GtkOverlay">
+ <property name="visible">True</property>
+@@ -139,8 +152,7 @@
+ </child>
+ </object>
+ <packing>
+- <property name="resize">True</property>
+- <property name="shrink">False</property>
++ <property name="name">view-pane</property>
+ </packing>
+ </child>
+ </object>
+diff --git a/main/src/ui/add_conversation/add_conference_dialog.vala b/main/src/ui/add_conversation/add_conference_dialog.vala
+index a03f3db6..dfe877ec 100644
+--- a/main/src/ui/add_conversation/add_conference_dialog.vala
++++ b/main/src/ui/add_conversation/add_conference_dialog.vala
+@@ -35,6 +35,8 @@ public class AddConferenceDialog : Gtk.Dialog {
+ setup_jid_add_view();
+ setup_conference_details_view();
+ show_jid_add_view();
++
++ set_default_size(400, 520);
+ }
+
+ private void show_jid_add_view() {
+diff --git a/main/src/ui/add_conversation/select_contact_dialog.vala b/main/src/ui/add_conversation/select_contact_dialog.vala
+index d78a17c1..6be7cf3b 100644
+--- a/main/src/ui/add_conversation/select_contact_dialog.vala
++++ b/main/src/ui/add_conversation/select_contact_dialog.vala
+@@ -27,6 +27,8 @@ public class SelectContactDialog : Gtk.Dialog {
+
+ setup_view();
+ setup_headerbar();
++
++ set_default_size(400, 520);
+ }
+
+ public void set_filter(string str) {
+diff --git a/main/src/ui/contact_details/dialog.vala b/main/src/ui/contact_details/dialog.vala
+index f29d068e..fe21cbba 100644
+--- a/main/src/ui/contact_details/dialog.vala
++++ b/main/src/ui/contact_details/dialog.vala
+@@ -85,11 +85,11 @@ public class Dialog : Gtk.Dialog {
+ ListBoxRow list_row = new ListBoxRow() { activatable=false, visible=true };
+ Box row = new Box(Orientation.HORIZONTAL, 20) { margin_start=15, margin_end=15, margin_top=3, margin_bottom=3, visible=true };
+ list_row.add(row);
+- Label label_label = new Label(label) { xalign=0, yalign=0.5f, hexpand=true, visible=true };
++ Label label_label = new Label(label) { xalign=0, yalign=0.5f, hexpand=true, wrap=true, visible=true };
+ if (description != null && description != "") {
+ Box box = new Box(Orientation.VERTICAL, 0) { visible=true };
+ box.add(label_label);
+- Label desc_label = new Label("") { xalign=0, yalign=0.5f, hexpand=true, visible=true };
++ Label desc_label = new Label("") { xalign=0, yalign=0.5f, hexpand=true, wrap=true, visible=true };
+ desc_label.set_markup("<span size='small'>%s</span>".printf(Markup.escape_text(description)));
+ desc_label.get_style_context().add_class("dim-label");
+ box.add(desc_label);
+@@ -117,7 +117,7 @@ public class Dialog : Gtk.Dialog {
+
+ int pref_height, pref_width;
+ get_content_area().get_preferred_height(null, out pref_height);
+- get_preferred_width(out pref_width, null);
++ get_default_size(out pref_width, null);
+ resize(pref_width, int.min(500, pref_height));
+ }
+
+diff --git a/main/src/ui/conversation_titlebar/conversation_titlebar.vala b/main/src/ui/conversation_titlebar/conversation_titlebar.vala
+index 60d8286b..e7455cab 100644
+--- a/main/src/ui/conversation_titlebar/conversation_titlebar.vala
++++ b/main/src/ui/conversation_titlebar/conversation_titlebar.vala
+@@ -10,6 +10,10 @@ public interface ConversationTitlebar : Widget {
+ public abstract string? subtitle { get; set; }
+ public abstract string? title { get; set; }
+
++ public abstract bool back_button { get; set; }
++
++ public signal void back_pressed();
++
+ public abstract void insert_entry(Plugins.ConversationTitlebarEntry entry);
+ }
+
+@@ -28,6 +32,12 @@ public class ConversationTitlebarNoCsd : ConversationTitlebar, Gtk.Box {
+ }
+ }
+
++ private Revealer back_revealer;
++ public bool back_button {
++ get { return back_revealer.reveal_child; }
++ set { back_revealer.reveal_child = value; }
++ }
++
+ private Box widgets_box = new Box(Orientation.HORIZONTAL, 0) { margin_start=15, valign=Align.END, visible=true };
+ private Label title_label = new Label("") { ellipsize=EllipsizeMode.END, visible=true };
+ private Label subtitle_label = new Label("") { use_markup=true, ellipsize=EllipsizeMode.END, visible=false };
+@@ -36,8 +46,17 @@ public class ConversationTitlebarNoCsd : ConversationTitlebar, Gtk.Box {
+ Box content_box = new Box(Orientation.HORIZONTAL, 0) { margin=5, margin_start=15, margin_end=10, hexpand=true, visible=true };
+ this.add(content_box);
+
++ back_revealer = new Revealer() { visible = true, transition_type = RevealerTransitionType.SLIDE_RIGHT, transition_duration = 200, can_focus = false, reveal_child = false };
++ Button back_button = new Button.from_icon_name("go-previous-symbolic") { visible = true, valign = Align.CENTER, use_underline = true, relief = ReliefStyle.NONE };
++ back_button.get_style_context().add_class("image-button");
++ back_button.clicked.connect(() => back_pressed());
++ back_revealer.add(back_button);
++ content_box.add(back_revealer);
++
+ Box titles_box = new Box(Orientation.VERTICAL, 0) { valign=Align.CENTER, hexpand=true, visible=true };
+- content_box.add(titles_box);
++ ScrolledWindow titles_scroll = new ScrolledWindow(null, null) { vscrollbar_policy=NEVER, hscrollbar_policy=NEVER, visible=true };
++ titles_scroll.add(titles_box);
++ content_box.add(titles_scroll);
+
+ titles_box.add(title_label);
+ subtitle_label.attributes = new AttrList();
+@@ -65,11 +84,22 @@ public class ConversationTitlebarCsd : ConversationTitlebar, Gtk.HeaderBar {
+
+ public new string? title { get { return this.get_title(); } set { base.set_title(value); } }
+ public new string? subtitle { get { return this.get_subtitle(); } set { base.set_subtitle(value); } }
++ private Revealer back_revealer;
++ public bool back_button {
++ get { return back_revealer.reveal_child; }
++ set { back_revealer.reveal_child = value; }
++ }
+
+ public ConversationTitlebarCsd() {
+ this.get_style_context().add_class("dino-right");
+ show_close_button = true;
+ hexpand = true;
++ back_revealer = new Revealer() { visible = true, transition_type = RevealerTransitionType.SLIDE_RIGHT, transition_duration = 200, can_focus = false, reveal_child = false };
++ Button back_button = new Button.from_icon_name("go-previous-symbolic") { visible = true, valign = Align.CENTER, use_underline = true };
++ back_button.get_style_context().add_class("image-button");
++ back_button.clicked.connect(() => back_pressed());
++ back_revealer.add(back_button);
++ this.pack_start(back_revealer);
+ }
+
+ public void insert_entry(Plugins.ConversationTitlebarEntry entry) {
+@@ -77,6 +107,16 @@ public class ConversationTitlebarCsd : ConversationTitlebar, Gtk.HeaderBar {
+ Button gtk_widget = (Gtk.Button)widget;
+ this.pack_end(gtk_widget);
+ }
++
++ /*
++ * HdyLeaflet collapses based on natural_width, but labels set natural_width to the width required to have the full
++ * text in a single line, thus if the label gets longer, HdyLeaflet would collapse. Work around is to just use the
++ * minimum_width as natural_width.
++ */
++ public override void get_preferred_width(out int minimum_width, out int natural_width) {
++ base.get_preferred_width(out minimum_width, out natural_width);
++ natural_width = minimum_width;
++ }
+ }
+
+ }
+diff --git a/main/src/ui/main_window.vala b/main/src/ui/main_window.vala
+index 04c01b26..14563c28 100644
+--- a/main/src/ui/main_window.vala
++++ b/main/src/ui/main_window.vala
+@@ -22,8 +22,10 @@ public class MainWindow : Gtk.Window {
+ public ConversationListTitlebarCsd conversation_list_titlebar_csd;
+ public HeaderBar placeholder_headerbar = new HeaderBar() { title="Dino", show_close_button=true, visible=true };
+ public Box box = new Box(Orientation.VERTICAL, 0) { orientation=Orientation.VERTICAL, visible=true };
+- public Paned headerbar_paned = new Paned(Orientation.HORIZONTAL) { visible=true };
+- public Paned paned;
++ public Hdy.Leaflet headerbar_paned = new Hdy.Leaflet() { visible=true };
++ public Hdy.TitleBar titlebar = new Hdy.TitleBar() { visible=true };
++ public Hdy.HeaderGroup headergroup = new Hdy.HeaderGroup();
++ public Hdy.Leaflet paned;
+ public Revealer search_revealer;
+ public SearchEntry search_entry;
+ public GlobalSearch search_box;
+@@ -44,23 +46,33 @@ public class MainWindow : Gtk.Window {
+ restore_window_size();
+
+ this.get_style_context().add_class("dino-main");
+- setup_headerbar();
+- Gtk.Settings.get_default().notify["gtk-decoration-layout"].connect(set_window_buttons);
+- this.realize.connect(set_window_buttons);
+ setup_unified();
++ setup_headerbar();
+ setup_stack();
+
+- paned.bind_property("position", headerbar_paned, "position", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL);
++ if (!Util.use_csd()) {
++ box.add(headerbar_paned);
++ box.add(new Separator(Orientation.VERTICAL) { visible = true });
++ }
++ box.add(paned);
++
++ paned.bind_property("transition-type", headerbar_paned, "transition-type", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL);
++ paned.bind_property("mode-transition-duration", headerbar_paned, "mode-transition-duration", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL);
++ paned.bind_property("child-transition-duration", headerbar_paned, "child-transition-duration", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL);
++ paned.bind_property("visible-child-name", headerbar_paned, "visible-child-name", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL);
++
++ headerbar_paned.bind_property("folded", headergroup, "decorate-all", BindingFlags.SYNC_CREATE);
+ }
+
+ private void setup_unified() {
+ Builder builder = new Builder.from_resource("/im/dino/Dino/unified_main_content.ui");
+- paned = (Paned) builder.get_object("paned");
+- box.add(paned);
++ paned = (Hdy.Leaflet) builder.get_object("paned");
++ paned.notify["folded"].connect_after(() => update_headerbar());
+ left_stack = (Stack) builder.get_object("left_stack");
+ right_stack = (Stack) builder.get_object("right_stack");
+ conversation_view = (ConversationView) builder.get_object("conversation_view");
+ conversation_selector = ((ConversationSelector) builder.get_object("conversation_list")).init(stream_interactor);
++ conversation_selector.conversation_selected.connect_after(() => show_view_pane());
+ search_box = ((GlobalSearch) builder.get_object("search_box")).init(stream_interactor);
+ search_revealer = (Revealer) builder.get_object("search_revealer");
+ search_entry = (SearchEntry) builder.get_object("search_entry");
+@@ -68,35 +80,60 @@ public class MainWindow : Gtk.Window {
+ conversation_list_placeholder_image.set_from_pixbuf(new Pixbuf.from_resource("/im/dino/Dino/icons/dino-conversation-list-placeholder-arrow.svg"));
+ }
+
++ private void update_headerbar() {
++ conversation_titlebar.back_button = paned.folded;
++ }
++
++ private void show_list_pane() {
++ paned.visible_child_name = "list-pane";
++ if (paned.folded) {
++ conversation_selector.unselect_row(conversation_selector.get_selected_row());
++ }
++ }
++
++ private void show_view_pane() {
++ paned.visible_child_name = "view-pane";
++ }
++
+ private void setup_headerbar() {
++ SizeGroup conversation_list_group = new SizeGroup(SizeGroupMode.HORIZONTAL);
++ conversation_list_group.add_widget(left_stack);
++ SizeGroup conversation_view_group = new SizeGroup(SizeGroupMode.HORIZONTAL);
++ conversation_view_group.add_widget(right_stack);
+ if (Util.use_csd()) {
+ conversation_list_titlebar_csd = new ConversationListTitlebarCsd() { visible=true };
+- headerbar_paned.pack1(conversation_list_titlebar_csd, false, false);
++ headerbar_paned.add_with_properties(conversation_list_titlebar_csd, "name", "list-pane");
++ headergroup.add_gtk_header_bar(conversation_list_titlebar_csd);
++ conversation_list_group.add_widget(conversation_list_titlebar_csd);
++
++ Separator sep = new Separator(Orientation.HORIZONTAL) { visible = true };
++ sep.get_style_context().add_class("sidebar");
++ headerbar_paned.add(sep);
+
+ conversation_titlebar_csd = new ConversationTitlebarCsd() { visible=true };
++ conversation_titlebar_csd.back_pressed.connect(() => show_list_pane());
+ conversation_titlebar = conversation_titlebar_csd;
+- headerbar_paned.pack2(conversation_titlebar_csd, true, false);
++ headerbar_paned.add_with_properties(conversation_titlebar_csd, "name", "view-pane");
++ headergroup.add_gtk_header_bar(conversation_titlebar_csd);
++ conversation_view_group.add_widget(conversation_titlebar);
++
++ titlebar.add(headerbar_paned);
+ } else {
+ ConversationListTitlebar conversation_list_titlebar = new ConversationListTitlebar() { visible=true };
+- headerbar_paned.pack1(conversation_list_titlebar, false, false);
++ headerbar_paned.add_with_properties(conversation_list_titlebar, "name", "list-pane");
++ conversation_list_group.add_widget(conversation_list_titlebar);
+
+- conversation_titlebar = new ConversationTitlebarNoCsd() { visible=true };
+- headerbar_paned.pack2(conversation_titlebar, true, false);
++ Separator sep = new Separator(Orientation.HORIZONTAL) { visible = true };
++ sep.get_style_context().add_class("sidebar");
++ headerbar_paned.add(sep);
+
+- box.add(headerbar_paned);
++ conversation_titlebar = new ConversationTitlebarNoCsd() { visible=true };
++ conversation_titlebar.back_pressed.connect(() => show_list_pane());
++ headerbar_paned.add_with_properties(conversation_titlebar, "name", "view-pane");
++ conversation_view_group.add_widget(conversation_titlebar);
+ }
+ }
+
+- private void set_window_buttons() {
+- if (!Util.use_csd()) return;
+- Gtk.Settings? gtk_settings = Gtk.Settings.get_default();
+- if (gtk_settings == null) return;
+-
+- string[] buttons = gtk_settings.gtk_decoration_layout.split(":");
+- this.conversation_list_titlebar_csd.decoration_layout = buttons[0] + ":";
+- this.conversation_titlebar_csd.decoration_layout = ((buttons.length == 2) ? ":" + buttons[1] : "");
+- }
+-
+ private void setup_stack() {
+ stack.add_named(box, "main");
+ stack.add_named(welcome_placeholder, "welcome_placeholder");
+@@ -118,7 +155,7 @@ public class MainWindow : Gtk.Window {
+
+ stack.set_visible_child_name("main");
+ if (Util.use_csd()) {
+- set_titlebar(headerbar_paned);
++ set_titlebar(titlebar);
+ }
+ } else if (stack_state == StackState.CLEAN_START || stack_state == StackState.NO_ACTIVE_ACCOUNTS) {
+ if (stack_state == StackState.CLEAN_START) {
+@@ -134,7 +171,7 @@ public class MainWindow : Gtk.Window {
+ left_stack.set_visible_child_name("placeholder");
+ right_stack.set_visible_child_name("placeholder");
+ if (Util.use_csd()) {
+- set_titlebar(headerbar_paned);
++ set_titlebar(titlebar);
+ }
+ }
+ }
+diff --git a/plugins/omemo/data/contact_details_dialog.ui b/plugins/omemo/data/contact_details_dialog.ui
+index 188bf06e..d9a35e97 100644
+--- a/plugins/omemo/data/contact_details_dialog.ui
++++ b/plugins/omemo/data/contact_details_dialog.ui
+@@ -2,7 +2,6 @@
+ <interface>
+ <template class="DinoPluginsOmemoContactDetailsDialog">
+ <property name="modal">True</property>
+- <property name="resizable">False</property>
+ <child internal-child="vbox">
+ <object class="GtkBox">
+ <property name="visible">True</property>
+@@ -37,6 +36,8 @@
+ <object class="GtkLabel" id="automatically_accept_new_label">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
++ <property name="xalign">0</property>
++ <property name="wrap">True</property>
+ <attributes>
+ <attribute name="scale" value="1.1"/>
+ </attributes>
+@@ -114,8 +115,10 @@
+ <object class="GtkLabel" id="own_fingerprint_label">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
+- <property name="justify">right</property>
+ <property name="hexpand">True</property>
++ <property name="max_width_chars">35</property>
++ <property name="xalign">0</property>
++ <property name="wrap">True</property>
+ </object>
+ </child>
+ <child>
+diff --git a/plugins/omemo/src/ui/contact_details_dialog.vala b/plugins/omemo/src/ui/contact_details_dialog.vala
+index b268cc13..a714b717 100644
+--- a/plugins/omemo/src/ui/contact_details_dialog.vala
++++ b/plugins/omemo/src/ui/contact_details_dialog.vala
+@@ -288,7 +288,7 @@ public class ContactDetailsDialog : Gtk.Dialog {
+ public class FingerprintRow : ListBoxRow {
+
+ private Image trust_image = new Image() { visible = true, halign = Align.END, icon_size = IconSize.BUTTON };
+- private Label fingerprint_label = new Label("") { use_markup=true, justify=Justification.RIGHT, visible=true, halign = Align.START, valign = Align.CENTER, hexpand = false };
++ private Label fingerprint_label = new Label("") { use_markup=true, max_width_chars=35, wrap=true, visible=true, halign = Align.START, valign = Align.CENTER, hexpand = false, xalign = 0 };
+ private Label trust_label = new Label(null) { visible = true, hexpand = true, xalign = 0 };
+
+ public Row row;
+diff --git a/plugins/omemo/src/ui/util.vala b/plugins/omemo/src/ui/util.vala
+index cf61ed82..0b0c4a9f 100644
+--- a/plugins/omemo/src/ui/util.vala
++++ b/plugins/omemo/src/ui/util.vala
+@@ -51,9 +51,8 @@ public static string fingerprint_markup(string s) {
+ b = (uint8) (b * factor);
+ }
+
+- if (i % 32 == 0 && i != 0) markup += "\n";
+ markup += @"<span foreground=\"$("#%02x%02x%02x".printf(r, g, b))\">$four_chars</span>";
+- if (i % 8 == 4 && i % 32 != 28) markup += " ";
++ if (i % 8 == 4) markup += " ";
+ }
+
+ return "<span font_family='monospace' font='8'>" + markup + "</span>";
diff --git a/skip/docbook2x/01_fix_static_datadir_evaluation.patch b/skip/docbook2x/01_fix_static_datadir_evaluation.patch
new file mode 100644
index 0000000..5241dc3
--- /dev/null
+++ b/skip/docbook2x/01_fix_static_datadir_evaluation.patch
@@ -0,0 +1,19 @@
+Description:
+ 01_fix_static_datadir_evaluation.dpatch by Daniel Leidert (dale) <daniel.leidert@wgdd.de>
+ All lines beginning with `## DP:' are a description of the patch.
+ The evaluation of datadir results in "${prefix}/share" without
+ evaluation of the ${prefix} variable with autoconf 2.60.
+
+Index: docbook2X-0.8.8/configure.ac
+===================================================================
+--- docbook2X-0.8.8.orig/configure.ac
++++ docbook2X-0.8.8/configure.ac
+@@ -148,7 +148,7 @@
+ dnl they will reside and should use these static_* values.
+ dnl Ensure that all static_* are fully expanded.
+
+-eval static_datadir="$datadir"
++eval eval static_datadir="$datadir"
+
+ eval static_bindir="$bindir"
+ old_val=""
diff --git a/skip/docbook2x/02_fix_418703_dont_use_abbreviated_sfnet_address.patch b/skip/docbook2x/02_fix_418703_dont_use_abbreviated_sfnet_address.patch
new file mode 100644
index 0000000..681047a
--- /dev/null
+++ b/skip/docbook2x/02_fix_418703_dont_use_abbreviated_sfnet_address.patch
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_fix_418703_dont_use_abbreviated_sfnet_address.dpatch by Daniel Leidert (dale) <daniel.leidert@wgdd.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Ondrej Certik reported a resolver issue: http://bugs.debian.org/418703.
+## DP: The error seems to be caused by using the abbreviated sf.net URLs. But
+## DP: it is possible, that this issue only occurs together with the issue
+## DP: described in 01_fix_static_datadir_evaluation.dpatch, because the path
+## DP: to the catalog also suffers from this issue.
+
+@DPATCH@
+diff -urNad docbook2x-0.8.8~/perl/db2x_xsltproc.pl docbook2x-0.8.8/perl/db2x_xsltproc.pl
+--- docbook2x-0.8.8~/perl/db2x_xsltproc.pl 2004-08-18 16:21:52.000000000 +0200
++++ docbook2x-0.8.8/perl/db2x_xsltproc.pl 2007-04-12 16:07:20.000000000 +0200
+@@ -110,10 +110,10 @@
+
+ if($options->{'stylesheet'} eq 'texi') {
+ $options->{'stylesheet'} =
+- "http://docbook2x.sf.net/latest/xslt/texi/docbook.xsl";
++ "http://docbook2x.sourceforge.net/latest/xslt/texi/docbook.xsl";
+ } elsif($options->{'stylesheet'} eq 'man') {
+ $options->{'stylesheet'} =
+- "http://docbook2x.sf.net/latest/xslt/man/docbook.xsl";
++ "http://docbook2x.sourceforge.net/latest/xslt/man/docbook.xsl";
+ }
+
+ if(scalar(@argv) != 1) {
diff --git a/skip/docbook2x/03_fix_420153_filename_whitespace_handling.patch b/skip/docbook2x/03_fix_420153_filename_whitespace_handling.patch
new file mode 100644
index 0000000..26cdf8e
--- /dev/null
+++ b/skip/docbook2x/03_fix_420153_filename_whitespace_handling.patch
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_fix_420153_filename_whitespace_handling.dpatch by
+## Daniel Leidert (dale) <daniel.leidert@wgdd.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Peter Eisentraut reported a regression in the whitespace handling of
+## DP: refentrytitle content during filename creation:
+## DP: http://bugs.debian.org/420153. The problem is, that upstream first
+## DP: replaces all spaces (but not linebreaks btw) with underlines and then
+## DP: it tries to normalize the result. This means, that a linebreak with
+## DP: additional whitespaces results in manpage names like 'foo_ ____bar.9'.
+## DP: So what we basically do in this patch is, that we first normalize the
+## DP: refentrytitle and then replace any spaces left with underlines.
+
+@DPATCH@
+diff -urNad docbook2x-0.8.8~/xslt/man/manpage.xsl docbook2x-0.8.8/xslt/man/manpage.xsl
+--- docbook2x-0.8.8~/xslt/man/manpage.xsl 2006-04-20 15:45:55.000000000 +0200
++++ docbook2x-0.8.8/xslt/man/manpage.xsl 2007-04-20 16:19:28.000000000 +0200
+@@ -30,7 +30,7 @@
+
+ <xsl:template name="manpage-filename">
+ <xsl:param name="filename" />
+- <xsl:value-of select="normalize-space(translate($filename, &quot; /&quot;, &quot;__&quot;))" />
++ <xsl:value-of select="translate(normalize-space($filename), ' /', '__')" />
+ </xsl:template>
+
+
+diff -urNad docbook2x-0.8.8~/xslt/man/refentry.xsl docbook2x-0.8.8/xslt/man/refentry.xsl
+--- docbook2x-0.8.8~/xslt/man/refentry.xsl 2006-04-21 04:39:55.000000000 +0200
++++ docbook2x-0.8.8/xslt/man/refentry.xsl 2007-04-20 16:21:53.000000000 +0200
+@@ -38,7 +38,11 @@
+ <xsl:template name="refentry-filename">
+ <xsl:param name="title" />
+
+- <xsl:variable name="title2" select="translate($title, &quot; /&quot;, &quot;__&quot;)" />
++ <xsl:variable name="title2">
++ <xsl:call-template name="manpage-filename">
++ <xsl:with-param name="filename" select="$title" />
++ </xsl:call-template>
++ </xsl:variable>
+
+ <!-- not using gentext here since man page names tend not to have
+ accented chars / non-Latin chars ...
diff --git a/skip/docbook2x/04_fix_442782_preprocessor_declaration_syntax.patch b/skip/docbook2x/04_fix_442782_preprocessor_declaration_syntax.patch
new file mode 100644
index 0000000..b6ddbfa
--- /dev/null
+++ b/skip/docbook2x/04_fix_442782_preprocessor_declaration_syntax.patch
@@ -0,0 +1,90 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_fix_442782_preprocessor_declaration_syntax.dpatch by Colin Watson <cjwatson@debian.org>.
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Conventionally, preprocessor declarations should start with
+## DP: '\"
+## DP: rather than
+## DP: .\"
+## DP: Current man-db only supports the first (and recommended) syntax. So
+## DP: Colin Watson provided this patch to fix docbook2x.
+## DP:
+## DP: <URL:http://bugs.debian.org/442782>
+## DP: <URL:http://lists.gnu.org/archive/html/groff/2007-11/msg00023.html>
+
+@DPATCH@
+diff -urNad trunk~/perl/db2x_manxml.pl trunk/perl/db2x_manxml.pl
+--- trunk~/perl/db2x_manxml.pl 2006-04-22 17:21:32.000000000 +0200
++++ trunk/perl/db2x_manxml.pl 2007-11-24 01:27:37.000000000 +0100
+@@ -342,6 +342,25 @@
+ $self->{line_start} = 1;
+ }
+
++#
++# Print a comment in the output, without causing a break.
++# Params: comment - the comment text.
++# May use any characters; they need not be escaped.
++#
++sub comment_nobreak
++{
++ my ($self, $comment) = @_;
++ $self->write("\n") unless $self->{line_start};
++
++ foreach my $line (split(/\n/, $comment)) {
++ $self->write('\'\" ');
++ $self->write($line);
++ $self->write("\n");
++ }
++
++ $self->{line_start} = 1;
++}
++
+
+ #
+ # Use a roff "escape" i.e. commands embedded in text starting with \
+@@ -510,16 +529,20 @@
+
+ $self->{'adjust-stack'} = [ 'b' ];
+
+- $self->{rw}->comment($elem->attr('preprocessors'))
+- if($elem->attr('preprocessors') ne '');
+-
++ my $preprocessors = $elem->attr('preprocessors');
+ # I've dug through the Internet to see if there was any
+ # standard way to specify encoding with man pages.
+ # The following seems to be a reasonable proposal:
+ # <URL:http://mail.nl.linux.org/linux-utf8/2001-04/msg00168.html>
+ my $encoding = $self->{options}->{'encoding'};
+ $encoding =~ s#//TRANSLIT$##i;
+- $self->{rw}->comment("-*- coding: $encoding -*-");
++ $encoding = "-*- coding: $encoding -*-";
++ if ($preprocessors eq '') {
++ $preprocessors = $encoding;
++ } else {
++ $preprocessors = "$preprocessors $encoding";
++ }
++ $self->{rw}->comment_nobreak($preprocessors);
+
+ # Define escapes for switching to and from monospace fonts (groff only)
+ $self->{rw}->request(qw{ .if \n(.g .ds T< \\\\FC});
+diff -urNad trunk~/xslt/backend/db2x_manxml.xsl trunk/xslt/backend/db2x_manxml.xsl
+--- trunk~/xslt/backend/db2x_manxml.xsl 2006-04-23 16:44:52.000000000 +0200
++++ trunk/xslt/backend/db2x_manxml.xsl 2007-11-24 01:27:37.000000000 +0100
+@@ -528,7 +528,7 @@
+ <exslt:document method="text"
+ encoding="{$encoding}"
+ href="{$path}">
+- <xsl:text>.\" -*- coding: </xsl:text>
++ <xsl:text>'\" -*- coding: </xsl:text>
+ <xsl:value-of select="$encoding" />
+ <xsl:text> -*-&#10;</xsl:text>
+ <xsl:copy-of select="$content" />
+@@ -538,7 +538,7 @@
+ <saxon:output method="text"
+ encoding="{$encoding}"
+ href="{$path}">
+- <xsl:text>.\" -*- coding: </xsl:text>
++ <xsl:text>'\" -*- coding: </xsl:text>
+ <xsl:value-of select="$encoding" />
+ <xsl:text> -*-&#10;</xsl:text>
+ <xsl:copy-of select="$content" />
diff --git a/skip/docbook2x/05_fix_439214_error_on_missing_refentry.patch b/skip/docbook2x/05_fix_439214_error_on_missing_refentry.patch
new file mode 100644
index 0000000..b8a493b
--- /dev/null
+++ b/skip/docbook2x/05_fix_439214_error_on_missing_refentry.patch
@@ -0,0 +1,33 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_fix_439214_error_on_missing_refentry.dpatch by Daniel Leidert <daniel.leidert@wgdd.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: If there is no refentry element, the manpage stylesheets silently
+## DP: "ignores" this. It has been requested to print at least a
+## DP: warning.
+## DP:
+## DP: <URL:http://bugs.debian.org/439214>
+## DP: <URL:http://lists.gnu.org/archive/html/groff/2007-11/msg00023.html>
+
+@DPATCH@
+diff -urNad trunk~/xslt/man/docbook.xsl trunk/xslt/man/docbook.xsl
+--- trunk~/xslt/man/docbook.xsl 2006-04-11 21:00:19.000000000 +0200
++++ trunk/xslt/man/docbook.xsl 2008-02-05 03:31:48.000000000 +0100
+@@ -111,11 +111,15 @@
+ <xsl:when test="child::refentry">
+ <xsl:apply-templates />
+ </xsl:when>
+-
+- <xsl:otherwise>
++ <xsl:when test="descendant-or-self::refentry">
+ <manpageset>
+ <xsl:apply-templates select="descendant-or-self::refentry" />
+ </manpageset>
++ </xsl:when>
++ <xsl:otherwise>
++ <xsl:message terminate="no">
++ <xsl:text>WARNING: Sorry, but I cannot find a refentry element in your source!</xsl:text>
++ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
diff --git a/skip/docbook2x/06_fix_man_typo.patch b/skip/docbook2x/06_fix_man_typo.patch
new file mode 100644
index 0000000..5be21bd
--- /dev/null
+++ b/skip/docbook2x/06_fix_man_typo.patch
@@ -0,0 +1,24 @@
+Author: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+
+--- docbook2x-0.8.8.orig/doc/docbook2man.1
++++ docbook2x-0.8.8/doc/docbook2man.1
+@@ -187,7 +187,7 @@ parameter instead.
+
+ However, inside a custom stylesheet
+ (\fInot on the command-line\fR)
+-this paramter can be set to the XPath expression
++this parameter can be set to the XPath expression
+ \*(T<document('')\*(T>,
+ which will cause the custom translations
+ directly embedded inside the custom stylesheet to be read.
+--- docbook2x-0.8.8.orig/doc/docbook2texi.1
++++ docbook2x-0.8.8/doc/docbook2texi.1
+@@ -230,7 +230,7 @@ parameter instead.
+
+ However, inside a custom stylesheet
+ (\fInot on the command-line\fR)
+-this paramter can be set to the XPath expression
++this parameter can be set to the XPath expression
+ \*(T<document('')\*(T>,
+ which will cause the custom translations
+ directly embedded inside the custom stylesheet to be read.
diff --git a/skip/docbook2x/docbook2x.xibuild b/skip/docbook2x/docbook2x.xibuild
new file mode 100644
index 0000000..cb4d112
--- /dev/null
+++ b/skip/docbook2x/docbook2x.xibuild
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+NAME="docbook2x"
+DESC="DocBook converter to UNIX manpage and GNU Texinfo format"
+
+MAKEDEPS="autoconf automake perl-xml-sax"
+
+PKG_VER=0.8.8
+SOURCE="https://sourceforge.net/projects/docbook2x/files/docbook2x/$PKG_VER/docbook2X-$PKG_VER.tar.gz/download"
+
+ADDITIONAL="
+01_fix_static_datadir_evaluation.patch
+02_fix_418703_dont_use_abbreviated_sfnet_address.patch
+03_fix_420153_filename_whitespace_handling.patch
+04_fix_442782_preprocessor_declaration_syntax.patch
+05_fix_439214_error_on_missing_refentry.patch
+06_fix_man_typo.patch
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ autoreconf --install
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --program-transform-name 's/docbook2/docbook2x-/'
+ make
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+}
+
diff --git a/skip/electrum/0001-apk-add-instead-of-apt-get-install.patch b/skip/electrum/0001-apk-add-instead-of-apt-get-install.patch
new file mode 100644
index 0000000..29d2201
--- /dev/null
+++ b/skip/electrum/0001-apk-add-instead-of-apt-get-install.patch
@@ -0,0 +1,22 @@
+From 46e1404ddad66422bd2106ff6e6954741191826e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20Adamski?= <michal@ert.pl>
+Date: Wed, 14 Oct 2020 11:06:33 +0200
+Subject: [PATCH] `apk add` instead of `apt-get install`
+
+
+diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py
+index 1e1d2831f..b7fe2c42d 100644
+--- a/electrum/gui/qt/__init__.py
++++ b/electrum/gui/qt/__init__.py
+@@ -34,7 +34,7 @@ from typing import Optional, TYPE_CHECKING, List
+ try:
+ import PyQt5
+ except Exception:
+- sys.exit("Error: Could not import PyQt5 on Linux systems, you may try 'sudo apt-get install python3-pyqt5'")
++ sys.exit("Error: Could not import PyQt5 on Linux systems, you may try 'sudo apk add py3-qt5'")
+
+ from PyQt5.QtGui import QGuiApplication
+ from PyQt5.QtWidgets import (QApplication, QSystemTrayIcon, QWidget, QMenu,
+--
+2.25.1
+
diff --git a/skip/electrum/electrum.xibuild b/skip/electrum/electrum.xibuild
new file mode 100644
index 0000000..dd21511
--- /dev/null
+++ b/skip/electrum/electrum.xibuild
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+NAME="electrum"
+DESC="Lightweight Bitcoin Wallet"
+
+MAKEDEPS="python python-pytest python-pyside2 python-mock"
+
+PKG_VER=4.3.1
+SOURCE="
+ https://download.electrum.org/$PKG_VER/Electrum-$PKG_VER.tar.gz
+ "
+
+ADDITIONAL="
+0001-apk-add-instead-of-apt-get-install.patch
+"
+prepare () {
+ apply_patches
+}
+
+build() {
+ python3 setup.py build
+}
+
+check() {
+ CI=1 python3 -m pytest
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$PKG_DEST"
+ rm -r "${pkgdir:?}"/home
+}
diff --git a/skip/elvish/elvish.xibuild b/skip/elvish/elvish.xibuild
new file mode 100644
index 0000000..dd97671
--- /dev/null
+++ b/skip/elvish/elvish.xibuild
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+NAME="elvish"
+DESC="A friendly and expressive shell for Linux, macOS and BSDs"
+
+MAKEDEPS=" go"
+
+PKG_VER=0.18.0
+SOURCE="https://github.com/elves/elvish/archive/v$PKG_VER.tar.gz"
+
+build() {
+ mkdir gopath
+ export GOPATH="$BUILD_ROOT/gopath"
+ go build -o bin/elvish
+}
+
+package() {
+ install -Dm755 bin/elvish "$PKG_DEST"/usr/bin
+}
+
diff --git a/skip/execline/execline.xibuild b/skip/execline/execline.xibuild
new file mode 100644
index 0000000..5e0454f
--- /dev/null
+++ b/skip/execline/execline.xibuild
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+MAKEDEPS="make"
+DEPS="skalibs"
+
+PKG_VER=2.9.0.1
+SOURCE=https://skarnet.org/software/execline/execline-$PKG_VER.tar.gz
+DESC="A non-interactive shell-like scripting language"
+
+build () {
+ ./configure --enable-shared \
+ --enable-static \
+ --enable-allstatic \
+ --enable-static-libc \
+ --libdir=/usr/lib \
+ --with-dynlib=/usr/lib \
+ --enable-pedantic-posix
+
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/skip/ext-dump/ext-dump.xibuild b/skip/ext-dump/ext-dump.xibuild
new file mode 100644
index 0000000..fa8e285
--- /dev/null
+++ b/skip/ext-dump/ext-dump.xibuild
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+NAME="ext-dump"
+DESC="ext2 dump and restore utilities"
+
+MAKEDEPS="make musl "
+
+PKG_VER=0.4b47
+SOURCE="https://sourceforge.net/projects/dump/files/dump/$PKG_VER/dump-$PKG_VER.tar.gz/download"
+
+prepare () {
+
+ for f in \
+ compat/include/compatglob.h \
+ compat/include/compaterr.h \
+ compat/lib/compaterr.c;
+ do
+
+ sed -i 's/__BEGIN_DECLS/#ifdef __cplusplus\nextern "C" {\n#endif/g' $f
+ sed -i 's/__END_DECLS/#ifdef __cplusplus\n}\n#endif/g' $f
+ done
+}
+
+build () {
+ ./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --sysconfdir=/etc \
+ --disable-static
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/skip/firefox/allow-custom-rust-vendor.patch b/skip/firefox/allow-custom-rust-vendor.patch
new file mode 100644
index 0000000..218650f
--- /dev/null
+++ b/skip/firefox/allow-custom-rust-vendor.patch
@@ -0,0 +1,564 @@
+From a5a3db2d32ff1d359aef5ec586b91164570c1685 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Tue, 5 Nov 2019 09:56:15 -0800
+Subject: [PATCH 1/7] Support custom vendor strings.
+
+Add support for custom vendors, as in "x86_64-gentoo-linux-musl".
+
+Fixes #33.
+---
+ src/targets.rs | 108 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ src/triple.rs | 4 --
+ 2 files changed, 106 insertions(+), 6 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 6ae570e..90b2736 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -1,6 +1,8 @@
+ // This file defines all the identifier enums and target-aware logic.
+
+ use crate::triple::{Endianness, PointerWidth, Triple};
++use alloc::boxed::Box;
++use alloc::string::String;
+ use core::fmt;
+ use core::str::FromStr;
+
+@@ -292,7 +294,7 @@ impl Aarch64Architecture {
+
+ /// The "vendor" field, which in practice is little more than an arbitrary
+ /// modifier.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
++#[derive(Clone, Debug, PartialEq, Eq, Hash)]
+ #[allow(missing_docs)]
+ pub enum Vendor {
+ Unknown,
+@@ -306,6 +308,15 @@ pub enum Vendor {
+ Sun,
+ Uwp,
+ Wrs,
++
++ /// A custom vendor. "Custom" in this context means that the vendor is
++ /// not specifically recognized by upstream Autotools, LLVM, Rust, or other
++ /// relevant authorities on triple naming. It's useful for people building
++ /// and using locally patched toolchains.
++ ///
++ /// Outside of such patched environments, users of `target-lexicon` should
++ /// treat `Custom` the same as `Unknown` and ignore the string.
++ Custom(Box<String>),
+ }
+
+ /// The "operating system" field, which sometimes implies an environment, and
+@@ -717,6 +728,7 @@ impl fmt::Display for Vendor {
+ Vendor::Sun => "sun",
+ Vendor::Uwp => "uwp",
+ Vendor::Wrs => "wrs",
++ Vendor::Custom(ref name) => name,
+ };
+ f.write_str(s)
+ }
+@@ -738,7 +750,46 @@ impl FromStr for Vendor {
+ "sun" => Vendor::Sun,
+ "uwp" => Vendor::Uwp,
+ "wrs" => Vendor::Wrs,
+- _ => return Err(()),
++ custom => {
++ use alloc::borrow::ToOwned;
++
++ // A custom vendor. Since triple syntax is so loosely defined,
++ // be as conservative as we can to avoid potential ambiguities.
++ // We err on the side of being too strict here, as we can
++ // always relax it if needed.
++
++ // Don't allow empty string names.
++ if custom.is_empty() {
++ return Err(());
++ }
++
++ // Don't allow any other recognized name as a custom vendor,
++ // since vendors can be omitted in some contexts.
++ if Architecture::from_str(custom).is_ok()
++ || OperatingSystem::from_str(custom).is_ok()
++ || Environment::from_str(custom).is_ok()
++ || BinaryFormat::from_str(custom).is_ok()
++ {
++ return Err(());
++ }
++
++ // Require the first character to be an ascii lowercase.
++ if !custom.chars().nth(0).unwrap().is_ascii_lowercase() {
++ return Err(());
++ }
++
++ // Restrict the set of characters permitted in a custom vendor.
++ if custom
++ .find(|c: char| {
++ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
++ })
++ .is_some()
++ {
++ return Err(());
++ }
++
++ Vendor::Custom(Box::new(custom.to_owned()))
++ }
+ })
+ }
+ }
+@@ -1120,4 +1171,57 @@ mod tests {
+ assert_eq!(t.environment, Environment::Eabihf);
+ assert_eq!(t.binary_format, BinaryFormat::Elf);
+ }
++
++ #[test]
++ fn custom_vendors() {
++ assert!(Triple::from_str("x86_64--linux").is_err());
++ assert!(Triple::from_str("x86_64-42-linux").is_err());
++ assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err());
++ assert!(Triple::from_str("x86_64-^-linux").is_err());
++ assert!(Triple::from_str("x86_64- -linux").is_err());
++ assert!(Triple::from_str("x86_64-CustomVendor-linux").is_err());
++ assert!(Triple::from_str("x86_64-linux-linux").is_err());
++ assert!(Triple::from_str("x86_64-x86_64-linux").is_err());
++ assert!(Triple::from_str("x86_64-elf-linux").is_err());
++ assert!(Triple::from_str("x86_64-gnu-linux").is_err());
++ assert!(Triple::from_str("x86_64-linux-customvendor").is_err());
++ assert!(Triple::from_str("customvendor").is_err());
++ assert!(Triple::from_str("customvendor-x86_64").is_err());
++ assert!(Triple::from_str("x86_64-").is_err());
++ assert!(Triple::from_str("x86_64--").is_err());
++
++ let t = Triple::from_str("x86_64-customvendor-linux")
++ .expect("can't parse target with custom vendor");
++ assert_eq!(t.architecture, Architecture::X86_64);
++ assert_eq!(
++ t.vendor,
++ Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ );
++ assert_eq!(t.operating_system, OperatingSystem::Linux);
++ assert_eq!(t.environment, Environment::Unknown);
++ assert_eq!(t.binary_format, BinaryFormat::Elf);
++ assert_eq!(t.to_string(), "x86_64-customvendor-linux");
++
++ let t = Triple::from_str("x86_64-customvendor")
++ .expect("can't parse target with custom vendor");
++ assert_eq!(t.architecture, Architecture::X86_64);
++ assert_eq!(
++ t.vendor,
++ Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ );
++ assert_eq!(t.operating_system, OperatingSystem::Unknown);
++ assert_eq!(t.environment, Environment::Unknown);
++ assert_eq!(t.binary_format, BinaryFormat::Unknown);
++
++ assert_eq!(
++ Triple::from_str("unknown-foo"),
++ Ok(Triple {
++ architecture: Architecture::Unknown,
++ vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())),
++ operating_system: OperatingSystem::Unknown,
++ environment: Environment::Unknown,
++ binary_format: BinaryFormat::Unknown,
++ })
++ );
++ }
+ }
+diff --git a/src/triple.rs b/src/triple.rs
+index 36dcd9a..1abda26 100644
+--- a/third_party/rust/target-lexicon.0.9.0/src/triple.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/triple.rs
+@@ -322,10 +322,6 @@ mod tests {
+ Triple::from_str("foo"),
+ Err(ParseError::UnrecognizedArchitecture("foo".to_owned()))
+ );
+- assert_eq!(
+- Triple::from_str("unknown-foo"),
+- Err(ParseError::UnrecognizedVendor("foo".to_owned()))
+- );
+ assert_eq!(
+ Triple::from_str("unknown-unknown-foo"),
+ Err(ParseError::UnrecognizedOperatingSystem("foo".to_owned()))
+
+From 6f90d7274dce4e7f9bb120f6b36cf26881bde9a7 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Tue, 5 Nov 2019 10:33:56 -0800
+Subject: [PATCH 2/7] Add more tests.
+
+---
+ src/targets.rs | 30 ++++++++++++++++++++++++++++--
+ 1 file changed, 28 insertions(+), 2 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 90b2736..7d1f069 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -1174,6 +1174,7 @@ mod tests {
+
+ #[test]
+ fn custom_vendors() {
++ // Test various invalid cases.
+ assert!(Triple::from_str("x86_64--linux").is_err());
+ assert!(Triple::from_str("x86_64-42-linux").is_err());
+ assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err());
+@@ -1190,6 +1191,31 @@ mod tests {
+ assert!(Triple::from_str("x86_64-").is_err());
+ assert!(Triple::from_str("x86_64--").is_err());
+
++ // Test various Unicode things.
++ assert!(
++ Triple::from_str("x86_64-𝓬𝓾𝓼𝓽𝓸𝓶𝓿𝓮𝓷𝓭𝓸𝓻-linux").is_err(),
++ "unicode font hazard"
++ );
++ assert!(
++ Triple::from_str("x86_64-ćúśtőḿvéńdőŕ-linux").is_err(),
++ "diacritical mark stripping hazard"
++ );
++ assert!(
++ Triple::from_str("x86_64-customvendοr-linux").is_err(),
++ "homoglyph hazard"
++ );
++ assert!(Triple::from_str("x86_64-customvendor-linux").is_ok());
++ assert!(
++ Triple::from_str("x86_64-ffi-linux").is_err(),
++ "normalization hazard"
++ );
++ assert!(Triple::from_str("x86_64-ffi-linux").is_ok());
++ assert!(
++ Triple::from_str("x86_64-custom‍vendor-linux").is_err(),
++ "zero-width character hazard"
++ );
++
++ // Test some valid cases.
+ let t = Triple::from_str("x86_64-customvendor-linux")
+ .expect("can't parse target with custom vendor");
+ assert_eq!(t.architecture, Architecture::X86_64);
+@@ -1202,8 +1228,8 @@ mod tests {
+ assert_eq!(t.binary_format, BinaryFormat::Elf);
+ assert_eq!(t.to_string(), "x86_64-customvendor-linux");
+
+- let t = Triple::from_str("x86_64-customvendor")
+- .expect("can't parse target with custom vendor");
++ let t =
++ Triple::from_str("x86_64-customvendor").expect("can't parse target with custom vendor");
+ assert_eq!(t.architecture, Architecture::X86_64);
+ assert_eq!(
+ t.vendor,
+
+From c0e318b3c1be2d1965579f07dd563fb9cc0c4eb1 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Tue, 5 Nov 2019 12:56:31 -0800
+Subject: [PATCH 3/7] Use `.chars().any(...)` instead of
+ `.find(...).is_some()`.
+
+---
+ src/targets.rs | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 7d1f069..1078dd3 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon/src-0.9.0/targets.rs
+@@ -779,12 +779,9 @@ impl FromStr for Vendor {
+ }
+
+ // Restrict the set of characters permitted in a custom vendor.
+- if custom
+- .find(|c: char| {
+- !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
+- })
+- .is_some()
+- {
++ if custom.chars().any(|c: char| {
++ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
++ }) {
+ return Err(());
+ }
+
+
+From f319950528654c772193d9eb3bf40bc8df35fcae Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Thu, 7 Nov 2019 15:15:48 -0800
+Subject: [PATCH 4/7] Fix build.rs to generate the correct code to build
+ Vendors.
+
+---
+ build.rs | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/build.rs b/build.rs
+index a0ba3b7..446f9e7 100644
+--- a/third_party/rust/target-lexicon-0.9.0/build.rs
++++ b/third_party/rust/target-lexicon-0.9.0/build.rs
+@@ -32,6 +32,7 @@ mod parse_error {
+ }
+ }
+
++use self::targets::Vendor;
+ use self::triple::Triple;
+
+ fn main() {
+@@ -60,7 +61,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ " architecture: Architecture::{:?},",
+ triple.architecture
+ )?;
+- writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?;
++ writeln!(out, " vendor: {},", vendor_display(&triple.vendor))?;
+ writeln!(
+ out,
+ " operating_system: OperatingSystem::{:?},",
+@@ -90,7 +91,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ writeln!(out, "impl Vendor {{")?;
+ writeln!(out, " /// Return the vendor for the current host.")?;
+ writeln!(out, " pub const fn host() -> Self {{")?;
+- writeln!(out, " Vendor::{:?}", triple.vendor)?;
++ writeln!(out, " {}", vendor_display(&triple.vendor))?;
+ writeln!(out, " }}")?;
+ writeln!(out, "}}")?;
+ writeln!(out)?;
+@@ -160,3 +161,12 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+
+ Ok(())
+ }
++
++fn vendor_display(vendor: &Vendor) -> String {
++ match vendor {
++ Vendor::Custom(custom) => {
++ format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom)
++ }
++ known => format!("Vendor::{:?}", known),
++ }
++}
+
+From e558f6934535be3b8ccc9a99a33e861cb7431dfe Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Fri, 8 Nov 2019 12:10:34 -0800
+Subject: [PATCH 5/7] Fix custom vendors in `const fn` contexts.
+
+---
+ build.rs | 15 +++++++++++----
+ src/lib.rs | 4 ++--
+ src/targets.rs | 51 ++++++++++++++++++++++++++++++++++++++++++--------
+ 3 files changed, 56 insertions(+), 14 deletions(-)
+
+diff --git a/build.rs b/build.rs
+index 446f9e7..e88206e 100644
+--- a/third_party/rust/target-lexicon-0.9.0/build.rs
++++ b/third_party/rust/target-lexicon-0.9.0/build.rs
+@@ -53,6 +53,8 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ writeln!(out, "use crate::Aarch64Architecture::*;")?;
+ writeln!(out, "#[allow(unused_imports)]")?;
+ writeln!(out, "use crate::ArmArchitecture::*;")?;
++ writeln!(out, "#[allow(unused_imports)]")?;
++ writeln!(out, "use crate::CustomVendor;")?;
+ writeln!(out)?;
+ writeln!(out, "/// The `Triple` of the current host.")?;
+ writeln!(out, "pub const HOST: Triple = Triple {{")?;
+@@ -139,7 +141,11 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ " architecture: Architecture::{:?},",
+ triple.architecture
+ )?;
+- writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?;
++ writeln!(
++ out,
++ " vendor: {},",
++ vendor_display(&triple.vendor)
++ )?;
+ writeln!(
+ out,
+ " operating_system: OperatingSystem::{:?},",
+@@ -164,9 +170,10 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+
+ fn vendor_display(vendor: &Vendor) -> String {
+ match vendor {
+- Vendor::Custom(custom) => {
+- format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom)
+- }
++ Vendor::Custom(custom) => format!(
++ "Vendor::Custom(CustomVendor::Static({:?}))",
++ custom.as_str()
++ ),
+ known => format!("Vendor::{:?}", known),
+ }
+ }
+diff --git a/src/lib.rs b/src/lib.rs
+index 8d6da8d..70f6488 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/lib.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/lib.rs
+@@ -28,7 +28,7 @@ mod triple;
+ pub use self::host::HOST;
+ pub use self::parse_error::ParseError;
+ pub use self::targets::{
+- Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, Environment, OperatingSystem,
+- Vendor,
++ Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, CustomVendor, Environment,
++ OperatingSystem, Vendor,
+ };
+ pub use self::triple::{CallingConvention, Endianness, PointerWidth, Triple};
+diff --git a/src/targets.rs b/src/targets.rs
+index 1078dd3..7152020 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -4,6 +4,7 @@ use crate::triple::{Endianness, PointerWidth, Triple};
+ use alloc::boxed::Box;
+ use alloc::string::String;
+ use core::fmt;
++use core::hash::{Hash, Hasher};
+ use core::str::FromStr;
+
+ /// The "architecture" field, which in some cases also specifies a specific
+@@ -292,6 +293,39 @@ impl Aarch64Architecture {
+ }
+ }
+
++/// A string for a `Vendor::Custom` that can either be used in `const`
++/// contexts or hold dynamic strings.
++#[derive(Clone, Debug, Eq)]
++pub enum CustomVendor {
++ /// An owned `String`. This supports the general case.
++ Owned(Box<String>),
++ /// A static `str`, so that `CustomVendor` can be constructed in `const`
++ /// contexts.
++ Static(&'static str),
++}
++
++impl CustomVendor {
++ /// Extracts a string slice.
++ pub fn as_str(&self) -> &str {
++ match self {
++ CustomVendor::Owned(s) => s,
++ CustomVendor::Static(s) => s,
++ }
++ }
++}
++
++impl PartialEq for CustomVendor {
++ fn eq(&self, other: &Self) -> bool {
++ self.as_str() == other.as_str()
++ }
++}
++
++impl Hash for CustomVendor {
++ fn hash<H: Hasher>(&self, state: &mut H) {
++ self.as_str().hash(state)
++ }
++}
++
+ /// The "vendor" field, which in practice is little more than an arbitrary
+ /// modifier.
+ #[derive(Clone, Debug, PartialEq, Eq, Hash)]
+@@ -316,7 +350,7 @@ pub enum Vendor {
+ ///
+ /// Outside of such patched environments, users of `target-lexicon` should
+ /// treat `Custom` the same as `Unknown` and ignore the string.
+- Custom(Box<String>),
++ Custom(CustomVendor),
+ }
+
+ /// The "operating system" field, which sometimes implies an environment, and
+@@ -728,7 +762,7 @@ impl fmt::Display for Vendor {
+ Vendor::Sun => "sun",
+ Vendor::Uwp => "uwp",
+ Vendor::Wrs => "wrs",
+- Vendor::Custom(ref name) => name,
++ Vendor::Custom(ref name) => name.as_str(),
+ };
+ f.write_str(s)
+ }
+@@ -779,13 +813,14 @@ impl FromStr for Vendor {
+ }
+
+ // Restrict the set of characters permitted in a custom vendor.
+- if custom.chars().any(|c: char| {
++ fn is_prohibited_char(c: char) -> bool {
+ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
+- }) {
++ }
++ if custom.chars().any(is_prohibited_char) {
+ return Err(());
+ }
+
+- Vendor::Custom(Box::new(custom.to_owned()))
++ Vendor::Custom(CustomVendor::Owned(Box::new(custom.to_owned())))
+ }
+ })
+ }
+@@ -1218,7 +1253,7 @@ mod tests {
+ assert_eq!(t.architecture, Architecture::X86_64);
+ assert_eq!(
+ t.vendor,
+- Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ Vendor::Custom(CustomVendor::Static("customvendor"))
+ );
+ assert_eq!(t.operating_system, OperatingSystem::Linux);
+ assert_eq!(t.environment, Environment::Unknown);
+@@ -1230,7 +1265,7 @@ mod tests {
+ assert_eq!(t.architecture, Architecture::X86_64);
+ assert_eq!(
+ t.vendor,
+- Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ Vendor::Custom(CustomVendor::Static("customvendor"))
+ );
+ assert_eq!(t.operating_system, OperatingSystem::Unknown);
+ assert_eq!(t.environment, Environment::Unknown);
+@@ -1240,7 +1275,7 @@ mod tests {
+ Triple::from_str("unknown-foo"),
+ Ok(Triple {
+ architecture: Architecture::Unknown,
+- vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())),
++ vendor: Vendor::Custom(CustomVendor::Static("foo")),
+ operating_system: OperatingSystem::Unknown,
+ environment: Environment::Unknown,
+ binary_format: BinaryFormat::Unknown,
+
+From bc4b444133b8a5e56602f7c77c10ef3f1e7a7c78 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Mon, 18 Nov 2019 13:45:58 -0800
+Subject: [PATCH 6/7] Add a testcase with a BOM too, just in case.
+
+---
+ src/targets.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 7152020..9a4d990 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -1246,6 +1246,10 @@ mod tests {
+ Triple::from_str("x86_64-custom‍vendor-linux").is_err(),
+ "zero-width character hazard"
+ );
++ assert!(
++ Triple::from_str("x86_64-customvendor-linux").is_err(),
++ "BOM hazard"
++ );
+
+ // Test some valid cases.
+ let t = Triple::from_str("x86_64-customvendor-linux")
+
+From 721fbbe1c9cfd3adc9aaf011c62d6a36078f4133 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Mon, 18 Nov 2019 20:56:40 -0800
+Subject: [PATCH 7/7] Use an anonymous function instead of just a local
+ function.
+
+---
+ src/targets.rs | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 9a4d990..eb5a088 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -813,10 +813,9 @@ impl FromStr for Vendor {
+ }
+
+ // Restrict the set of characters permitted in a custom vendor.
+- fn is_prohibited_char(c: char) -> bool {
++ if custom.chars().any(|c: char| {
+ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
+- }
+- if custom.chars().any(is_prohibited_char) {
++ }) {
+ return Err(());
+ }
+
diff --git a/skip/firefox/avoid-redefinition.patch b/skip/firefox/avoid-redefinition.patch
new file mode 100644
index 0000000..af11c50
--- /dev/null
+++ b/skip/firefox/avoid-redefinition.patch
@@ -0,0 +1,15 @@
+Author: Rasmus Thomsen <oss@cogitri.dev>
+Reason: FF is mixing userspace net headers (net/if.h) and kernelspace ones
+(linux/if.h), leading to redefinitions. We need to include net/if.h before
+linux/if.h because linux/if.h has redifinition guards whereas net/if.h doesnt
+Upstream: No
+--- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c.orig 2020-07-28 19:24:32.359751046 +0200
++++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c 2020-07-28 19:24:37.856343751 +0200
+@@ -31,6 +31,7 @@
+ */
+
+ #if defined(LINUX)
++#include <net/if.h>
+ #include "addrs-netlink.h"
+ #include <csi_platform.h>
+ #include <assert.h>
diff --git a/skip/firefox/disable-moz-stackwalk.patch b/skip/firefox/disable-moz-stackwalk.patch
new file mode 100644
index 0000000..b6bc756
--- /dev/null
+++ b/skip/firefox/disable-moz-stackwalk.patch
@@ -0,0 +1,18 @@
+diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
+index 7d62921..adcfa44 100644
+--- a/mozglue/misc/StackWalk.cpp
++++ b/mozglue/misc/StackWalk.cpp
+@@ -33,13 +33,7 @@ using namespace mozilla;
+ # define MOZ_STACKWALK_SUPPORTS_MACOSX 0
+ #endif
+
+-#if (defined(linux) && \
+- ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
+- defined(HAVE__UNWIND_BACKTRACE)))
+-# define MOZ_STACKWALK_SUPPORTS_LINUX 1
+-#else
+ # define MOZ_STACKWALK_SUPPORTS_LINUX 0
+-#endif
+
+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+ # define HAVE___LIBC_STACK_END 1
diff --git a/skip/firefox/disable-neon-in-aom.patch b/skip/firefox/disable-neon-in-aom.patch
new file mode 100644
index 0000000..6df05a1
--- /dev/null
+++ b/skip/firefox/disable-neon-in-aom.patch
@@ -0,0 +1,39 @@
+Firefox (75) and AOM itself fail to build with NEON enabled. As such
+we should disable it for now.
+
+In file included from /home/buildozer/aports/community/firefox/src/firefox-75.0/third_party/aom/aom_dsp/arm/blend_a64_mask_neon.c:12:
+/home/buildozer/aports/community/firefox/src/firefox-75.0/third_party/aom/av1/common/arm/mem_neon.h: In function 'load_u8_8x8':
+/usr/lib/gcc/armv7-alpine-linux-musleabihf/9.3.0/include/arm_neon.h:10303:1: error: inlining failed in call to always_inline 'vld1_u8': target specific option mismatch
+10303 | vld1_u8 (const uint8_t * __a)
+ | ^~~~~~~
+--- a/media/libaom/moz.build 2020-04-09 08:20:14.608439591 +0200
++++ b/media/libaom/moz.build 2020-04-09 08:20:21.801745246 +0200
+@@ -42,26 +42,6 @@
+ ASFLAGS += [ '-I%s/media/libaom/config/linux/ia32/' % TOPSRCDIR ]
+ LOCAL_INCLUDES += [ '/media/libaom/config/linux/ia32/' ]
+ EXPORTS.aom += [ 'config/linux/ia32/config/aom_config.h' ]
+-elif CONFIG['CPU_ARCH'] == 'arm':
+- EXPORTS.aom += files['ARM_EXPORTS']
+- ASFLAGS += [
+- '-I%s/media/libaom/config/linux/arm/' % TOPSRCDIR,
+- '-I%s/libaom' % OBJDIR,
+- ]
+- LOCAL_INCLUDES += [ '/media/libaom/config/linux/arm/' ]
+- EXPORTS.aom += [ 'config/linux/arm/config/aom_config.h' ]
+-
+- SOURCES += files['ARM_SOURCES']
+-
+- for f in SOURCES:
+- if f.endswith('neon.c'):
+- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
+-
+- if CONFIG['OS_TARGET'] == 'Android':
+- # For cpu-features.h
+- LOCAL_INCLUDES += [
+- '%%%s/sources/android/cpufeatures' % CONFIG['ANDROID_NDK'],
+- ]
+ else:
+ # Generic C-only configuration
+ EXPORTS.aom += files['GENERIC_EXPORTS']
+
+
diff --git a/skip/firefox/firefox-safe.desktop b/skip/firefox/firefox-safe.desktop
new file mode 100644
index 0000000..1538fc6
--- /dev/null
+++ b/skip/firefox/firefox-safe.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Exec=firefox -safe-mode %u
+Icon=firefox
+Type=Application
+Terminal=false
+MultipleArgs=false
+Name=Firefox - Safe Mode
+GenericName=Web Browser - Safe Mode
+StartupNotify=false
+Categories=Network;WebBrowser;
diff --git a/skip/firefox/firefox.desktop b/skip/firefox/firefox.desktop
new file mode 100644
index 0000000..d048ce4
--- /dev/null
+++ b/skip/firefox/firefox.desktop
@@ -0,0 +1,81 @@
+[Desktop Entry]
+Exec=firefox %u
+Icon=firefox
+Type=Application
+Terminal=false
+Name=Firefox
+Name[bn]=ফায়ারফক্স3
+Name[eo]=Fajrovulpo3
+Name[fi]=Firefox3
+Name[pa]=ਫਾਇਰਫੋਕਸ3
+Name[tg]=Рӯбоҳи оташин3
+GenericName=Web Browser
+GenericName[af]=Web Blaaier
+GenericName[ar]=متصفح ويب
+GenericName[az]=Veb Səyyahı
+GenericName[bg]=Браузър
+GenericName[bn]=ওয়েব ব্রাউজার
+GenericName[br]=Furcher ar Gwiad
+GenericName[bs]=WWW Preglednik
+GenericName[ca]=Fullejador web
+GenericName[cs]=WWW prohlížeč
+GenericName[cy]=Porydd Gwe
+GenericName[da]=Browser
+GenericName[de]=Web-Browser
+GenericName[el]=Περιηγητής Ιστού
+GenericName[eo]=TTT-legilo
+GenericName[es]=Navegador web
+GenericName[et]=Veebilehitseja
+GenericName[eu]=Web arakatzailea
+GenericName[fa]=مرورگر وب
+GenericName[fi]=WWW-selain
+GenericName[fo]=Alnótsfar
+GenericName[fr]=Navigateur web
+GenericName[gl]=Navegador Web
+GenericName[he]=דפדפן אינטרנט
+GenericName[hi]=वेब ब्राउज़र
+GenericName[hr]=Web preglednik
+GenericName[hu]=Webböngésző
+GenericName[is]=Vafri
+GenericName[it]=Browser Web
+GenericName[ja]=ウェブブラウザ
+GenericName[ko]=웹 브라우저
+GenericName[lo]=ເວັບບຣາວເຊີ
+GenericName[lt]=Žiniatinklio naršyklė
+GenericName[lv]=Web Pārlūks
+GenericName[mk]=Прелистувач на Интернет
+GenericName[mn]=Веб-Хөтөч
+GenericName[nb]=Nettleser
+GenericName[nds]=Nettkieker
+GenericName[nl]=Webbrowser
+GenericName[nn]=Nettlesar
+GenericName[nso]=Seinyakisi sa Web
+GenericName[pa]=ਵੈਬ ਝਲਕਾਰਾ
+GenericName[pl]=Przeglądarka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador Web
+GenericName[ro]=Navigator de web
+GenericName[ru]=Веб-браузер
+GenericName[se]=Fierpmádatlogan
+GenericName[sk]=Webový prehliadač
+GenericName[sl]=Spletni brskalnik
+GenericName[sr]=Веб претраживач
+GenericName[sr@Latn]=Veb pretraživač
+GenericName[ss]=Ibrawuza yeWeb
+GenericName[sv]=Webbläsare
+GenericName[ta]=வலை உலாவி
+GenericName[tg]=Тафсиргари вэб
+GenericName[th]=เว็บบราวเซอร์
+GenericName[tr]=Web Tarayıcı
+GenericName[uk]=Навігатор Тенет
+GenericName[uz]=Веб-браузер
+GenericName[ven]=Buronza ya Webu
+GenericName[vi]=Trình duyệt Web
+GenericName[wa]=Betchteu waibe
+GenericName[xh]=Umkhangeli zincwadi we Web
+GenericName[zh_CN]=网页浏览器
+GenericName[zh_TW]=網頁瀏覽器
+GenericName[zu]=Umcingi we-Web
+MimeType=text/html;
+StartupNotify=true
+Categories=Network;WebBrowser;
diff --git a/skip/firefox/firefox.xibuild b/skip/firefox/firefox.xibuild
new file mode 100644
index 0000000..f5c8bc2
--- /dev/null
+++ b/skip/firefox/firefox.xibuild
@@ -0,0 +1,143 @@
+#!/bin/sh
+
+NAME="firefox"
+DESC="Firefox web browser"
+
+MAKEDEPS="make rust cbindgen"
+DEPS="libseccomp nodejs alsa-lib atk cairo dbus ffmpeg fontconfig freetype2 gdk-pixbuf glib gtk3 icu libevent libffi libpng libvpx libwebp libx11 libxcb libxcomposite libxdamage libxext libxfixes libxrandr musl nspr nss pango pixman zlib dbus-glib"
+
+PKG_VER=108.0.1
+
+SOURCE="https://ftp.mozilla.org/pub/firefox/releases/$PKG_VER/source/firefox-$PKG_VER.source.tar.xz"
+ADDITIONAL="
+allow-custom-rust-vendor.patch
+avoid-redefinition.patch
+disable-moz-stackwalk.patch
+disable-neon-in-aom.patch
+firefox-safe.desktop
+firefox.desktop
+fix-fortify-system-wrappers.patch
+fix-neon-aom.patch
+fix-rust-target.patch
+fix-webrtc-glibcisms.patch
+mallinfo.patch
+no-ccache-stats.patch
+sandbox-fork.patch
+sandbox-largefile.patch
+sandbox-sched_setscheduler.patch
+stab.h
+zstandard.patch
+"
+
+prepare () {
+ apply_patches
+
+ cp stab.h toolkit/crashreporter/google-breakpad/src/
+
+ sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/audio_thread_priority/.cargo-checksum.json
+ #sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/target-lexicon-*/.cargo-checksum.json
+}
+
+build () {
+ mkdir -p objdir
+ cd objdir
+ export SHELL=/bin/sh
+ export BUILD_OFFICIAL=1
+ export MOZILLA_OFFICIAL=1
+ export USE_SHORT_LIBNAME=1
+ export MACH_USE_SYSTEM_PYTHON=1
+ export MOZBUILD_STATE_PATH=$BUILD_ROOT/mozbuild
+ # disable desktop notifications
+ export MOZ_NOSPAM=1
+ # Find our triplet JSON
+ export RUST_TARGET="x86_64-unknown-linux-musl"
+ # Build with Clang, takes less RAM
+ export CC="clang"
+ export CXX="clang++"
+
+ export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/firefox"
+ ../mach configure \
+ --without-wasm-sandboxed-libraries \
+ --prefix=/usr \
+ --disable-elf-hack \
+ --enable-rust-simd \
+ --enable-sandbox \
+ --disable-cargo-incremental \
+ --disable-crashreporter \
+ --disable-install-strip \
+ --disable-jemalloc \
+ --disable-minify \
+ --disable-profiling \
+ --disable-strip \
+ --disable-tests \
+ --disable-updater \
+ --enable-alsa \
+ --enable-dbus \
+ --enable-default-toolkit=cairo-gtk3-wayland \
+ --enable-ffmpeg \
+ --enable-hardening \
+ --enable-necko-wifi \
+ --enable-official-branding \
+ --enable-optimize="$CFLAGS -O2" \
+ --enable-pulseaudio \
+ --enable-release \
+ --enable-system-ffi \
+ --enable-system-pixman \
+ --with-distribution-id=xilinux \
+ --with-libclang-path=/usr/lib \
+ --with-system-ffi \
+ --with-system-icu \
+ --with-system-jpeg \
+ --with-system-libevent \
+ --with-system-libvpx \
+ --with-system-nspr \
+ --with-system-nss \
+ --with-system-pixman \
+ --with-system-png \
+ --with-system-webp \
+ --with-system-zlib \
+ --with-unsigned-addon-scopes=app,system &&
+ ../mach build
+}
+
+package () {
+
+ DESTDIR="$PKG_DEST" MOZ_MAKE_FLAGS="$MAKEOPTS" ../mach install
+
+ install -m755 -d "$PKG_DEST"/usr/share/applications
+ install -m755 -d "$PKG_DEST"/usr/share/pixmaps
+
+ local _png
+ for _png in ../browser/branding/official/default*.png; do
+ local i=${_png%.png}
+ i=${i##*/default}
+ install -D -m644 "$_png" "$PKG_DEST"/usr/share/icons/hicolor/"$i"x"$i"/apps/firefox.png
+ done
+
+ install -m644 ../browser/branding/official/default48.png \
+ "$PKG_DEST"/usr/share/pixmaps/firefox.png
+ install -m644 ../firefox.desktop "$PKG_DEST"/usr/share/applications/org.mozilla.firefox.desktop
+ install -m644 ../firefox-safe.desktop "$PKG_DEST"/usr/share/applications/org.mozilla.firefox-safe.desktop
+
+ # Add StartupWMClass=firefox on the .desktop files so Desktop Environments
+ # correctly associate the window with their icon, the correct fix is to have
+ # firefox sets its own AppID but this will work for the meantime
+ # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1607399
+ echo "StartupWMClass=firefox" >> $PKG_DEST/usr/share/applications/org.mozilla.firefox.desktop
+ echo "StartupWMClass=firefox" >> $PKG_DEST/usr/share/applications/org.mozilla.firefox-safe.desktop
+
+ # install our vendor prefs
+ install -d $PKG_DEST/usr/lib/firefox/browser/defaults/preferences
+
+ cat >> $PKG_DEST/usr/lib/firefox/browser/defaults/preferences/firefox-branding.js <<- EOF
+ // Use LANG environment variable to choose locale
+ pref("intl.locale.requested", "");
+
+ // Disable default browser checking.
+ pref("browser.shell.checkDefaultBrowser", false);
+
+ // Don't disable our bundled extensions in the application directory
+ pref("extensions.autoDisableScopes", 11);
+ pref("extensions.shownSelectionUI", true);
+ EOF
+}
diff --git a/skip/firefox/fix-fortify-system-wrappers.patch b/skip/firefox/fix-fortify-system-wrappers.patch
new file mode 100644
index 0000000..17cf7e3
--- /dev/null
+++ b/skip/firefox/fix-fortify-system-wrappers.patch
@@ -0,0 +1,13 @@
+The wrapper features.h gets pulled in by system headers causing thigns to
+break. We work around it by simply not wrap features.h
+
+--- ./config/system-headers.mozbuild.orig
++++ ./config/system-headers.mozbuild
+@@ -229,7 +229,6 @@
+ 'execinfo.h',
+ 'extras.h',
+ 'fcntl.h',
+- 'features.h',
+ 'fenv.h',
+ 'ffi.h',
+ 'fibdef.h',
diff --git a/skip/firefox/fix-neon-aom.patch b/skip/firefox/fix-neon-aom.patch
new file mode 100644
index 0000000..7ea16e7
--- /dev/null
+++ b/skip/firefox/fix-neon-aom.patch
@@ -0,0 +1,13 @@
+diff --git a/media/libaom/moz.build b/media/libaom/moz.build
+index fd8c7f2..db3f9ca 100644
+--- a/media/libaom/moz.build
++++ b/media/libaom/moz.build
+@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
+
+ for f in SOURCES:
+ if f.endswith('neon.c'):
+- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
++ SOURCES[f].flags += CONFIG['NEON_FLAGS']
+
+ if CONFIG['OS_TARGET'] == 'Android':
+ # For cpu-features.h
diff --git a/skip/firefox/fix-rust-target.patch b/skip/firefox/fix-rust-target.patch
new file mode 100644
index 0000000..9342063
--- /dev/null
+++ b/skip/firefox/fix-rust-target.patch
@@ -0,0 +1,31 @@
+Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's
+weird custom build system...
+
+--- a/build/moz.configure/rust.configure
++++ b/build/moz.configure/rust.configure
+@@ -225,7 +225,9 @@
+ data.setdefault(key, []).append(namespace(rust_target=t, target=info))
+ return data
+
+-
++@imports('os')
++@imports(_from='mozbuild.util', _import='ensure_unicode')
++@imports(_from='mozbuild.util', _import='system_encoding')
+ def detect_rustc_target(
+ host_or_target, compiler_info, arm_target, rust_supported_targets
+ ):
+@@ -340,13 +342,13 @@
+
+ return None
+
+- rustc_target = find_candidate(candidates)
++ rustc_target = os.environ['RUST_TARGET']
+
+ if rustc_target is None:
+ die("Don't know how to translate {} for rustc".format(host_or_target.alias))
+
+- return rustc_target
++ return ensure_unicode(rustc_target, system_encoding)
+
+
+ @imports('os')
diff --git a/skip/firefox/fix-webrtc-glibcisms.patch b/skip/firefox/fix-webrtc-glibcisms.patch
new file mode 100644
index 0000000..4f9043b
--- /dev/null
+++ b/skip/firefox/fix-webrtc-glibcisms.patch
@@ -0,0 +1,20 @@
+--- a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
++++ b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
+@@ -18,7 +18,7 @@
+ #define WEBRTC_GLIBC_PREREQ(a, b) 0
+ #endif
+
+-#if WEBRTC_GLIBC_PREREQ(2, 16)
++#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
+ #include <sys/auxv.h>
+ #else
+ #include <errno.h>
+@@ -40,7 +40,7 @@
+ int architecture = 0;
+ uint64_t hwcap = 0;
+ const char* platform = NULL;
+-#if WEBRTC_GLIBC_PREREQ(2, 16)
++#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
+ hwcap = getauxval(AT_HWCAP);
+ platform = (const char*)getauxval(AT_PLATFORM);
+ #else
diff --git a/skip/firefox/mallinfo.patch b/skip/firefox/mallinfo.patch
new file mode 100644
index 0000000..7916a20
--- /dev/null
+++ b/skip/firefox/mallinfo.patch
@@ -0,0 +1,20 @@
+diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
+index 865e1b5430..9a00dafecb 100644
+--- a/xpcom/base/nsMemoryReporterManager.cpp
++++ b/xpcom/base/nsMemoryReporterManager.cpp
+@@ -124,6 +124,7 @@ static MOZ_MUST_USE nsresult ResidentUniqueDistinguishedAmount(int64_t* aN) {
+ return GetProcSelfSmapsPrivate(aN);
+ }
+
++#ifdef __GLIBC__
+ # ifdef HAVE_MALLINFO
+ # define HAVE_SYSTEM_HEAP_REPORTER 1
+ static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
+@@ -143,6 +144,7 @@ static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
+ return NS_OK;
+ }
+ # endif
++#endif
+
+ #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
+ defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
diff --git a/skip/firefox/no-ccache-stats.patch b/skip/firefox/no-ccache-stats.patch
new file mode 100644
index 0000000..8ef8049
--- /dev/null
+++ b/skip/firefox/no-ccache-stats.patch
@@ -0,0 +1,11 @@
+prevents a call to ccache
+--- a/python/mozbuild/mozbuild/controller/building.py
++++ b/python/mozbuild/mozbuild/controller/building.py
+@@ -586,6 +586,7 @@
+ )
+
+ def ccache_stats(self):
++ return None
+ ccache_stats = None
+
+ ccache = mozfile.which("ccache")
diff --git a/skip/firefox/sandbox-fork.patch b/skip/firefox/sandbox-fork.patch
new file mode 100644
index 0000000..c7222ab
--- /dev/null
+++ b/skip/firefox/sandbox-fork.patch
@@ -0,0 +1,15 @@
+make SYS_fork non-fatal, musl uses it for fork(2)
+
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1253,6 +1253,10 @@
+ // usually do something reasonable on error.
+ case __NR_clone:
+ return ClonePolicy(Error(EPERM));
++#ifdef __NR_fork
++ case __NR_fork:
++ return Error(ENOSYS);
++#endif
+
+ # ifdef __NR_fadvise64
+ case __NR_fadvise64:
diff --git a/skip/firefox/sandbox-largefile.patch b/skip/firefox/sandbox-largefile.patch
new file mode 100644
index 0000000..f1cf28b
--- /dev/null
+++ b/skip/firefox/sandbox-largefile.patch
@@ -0,0 +1,17 @@
+--- a/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:41:14.556378950 +0100
++++ b/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:40:23.595806444 +0100
+@@ -68,7 +68,13 @@
+
+ // The headers define O_LARGEFILE as 0 on x86_64, but we need the
+ // actual value because it shows up in file flags.
+-#define O_LARGEFILE_REAL 00100000
++#if defined(__x86_64__) || defined(__i386__) || defined(__mips__)
++#define O_LARGEFILE_REAL 0100000
++#elif defined(__powerpc__)
++#define O_LARGEFILE_REAL 0200000
++#else
++#define O_LARGEFILE_REAL O_LARGEFILE
++#endif
+
+ // Not part of UAPI, but userspace sees it in F_GETFL; see bug 1650751.
+ #define FMODE_NONOTIFY 0x4000000
diff --git a/skip/firefox/sandbox-sched_setscheduler.patch b/skip/firefox/sandbox-sched_setscheduler.patch
new file mode 100644
index 0000000..3163c9e
--- /dev/null
+++ b/skip/firefox/sandbox-sched_setscheduler.patch
@@ -0,0 +1,16 @@
+upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1694,10 +1694,10 @@
+ return Allow();
+ case __NR_sched_get_priority_min:
+ case __NR_sched_get_priority_max:
++ case __NR_sched_setscheduler:
+ return Allow();
+ case __NR_sched_getparam:
+- case __NR_sched_getscheduler:
+- case __NR_sched_setscheduler: {
++ case __NR_sched_getscheduler: {
+ Arg<pid_t> pid(0);
+ return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
+ }
diff --git a/skip/firefox/stab.h b/skip/firefox/stab.h
new file mode 100644
index 0000000..6f70af3
--- /dev/null
+++ b/skip/firefox/stab.h
@@ -0,0 +1,71 @@
+/* $OpenBSD: stab.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */
+/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1991 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)stab.h 5.2 (Berkeley) 4/4/91
+ */
+
+#ifndef _STAB_H_
+#define _STAB_H_
+
+/*
+ * The following are symbols used by various debuggers and by the Pascal
+ * compiler. Each of them must have one (or more) of the bits defined by
+ * the N_STAB mask set.
+ */
+
+#define N_GSYM 0x20 /* global symbol */
+#define N_FNAME 0x22 /* F77 function name */
+#define N_FUN 0x24 /* procedure name */
+#define N_STSYM 0x26 /* data segment variable */
+#define N_LCSYM 0x28 /* bss segment variable */
+#define N_MAIN 0x2a /* main function name */
+#define N_PC 0x30 /* global Pascal symbol */
+#define N_RSYM 0x40 /* register variable */
+#define N_SLINE 0x44 /* text segment line number */
+#define N_DSLINE 0x46 /* data segment line number */
+#define N_BSLINE 0x48 /* bss segment line number */
+#define N_SSYM 0x60 /* structure/union element */
+#define N_SO 0x64 /* main source file name */
+#define N_LSYM 0x80 /* stack variable */
+#define N_BINCL 0x82 /* include file beginning */
+#define N_SOL 0x84 /* included source file name */
+#define N_PSYM 0xa0 /* parameter variable */
+#define N_EINCL 0xa2 /* include file end */
+#define N_ENTRY 0xa4 /* alternate entry point */
+#define N_LBRAC 0xc0 /* left bracket */
+#define N_EXCL 0xc2 /* deleted include file */
+#define N_RBRAC 0xe0 /* right bracket */
+#define N_BCOMM 0xe2 /* begin common */
+#define N_ECOMM 0xe4 /* end common */
+#define N_ECOML 0xe8 /* end common (local name) */
+#define N_LENG 0xfe /* length of preceding entry */
+
+#endif /* !_STAB_H_ */
diff --git a/skip/firefox/zstandard.patch b/skip/firefox/zstandard.patch
new file mode 100644
index 0000000..ae6266d
--- /dev/null
+++ b/skip/firefox/zstandard.patch
@@ -0,0 +1,8 @@
+--- a/python/sites/mach.txt
++++ b/python/sites/mach.txt
+@@ -134,4 +134,4 @@
+ # We aren't (yet) able to pin packages in automation, so we have to
+ # support down to the oldest locally-installed version (5.4.2).
+ pypi-optional:psutil>=5.4.2,<=5.8.0:telemetry will be missing some data
+-pypi-optional:zstandard>=0.11.1,<=0.17.0:zstd archives will not be possible to extract
++pypi-optional:zstandard>=0.11.1,<=0.18.0:zstd archives will not be possible to extract
diff --git a/skip/guitarix/guitarix-0.43.1-glib2.patch b/skip/guitarix/guitarix-0.43.1-glib2.patch
new file mode 100644
index 0000000..41ae018
--- /dev/null
+++ b/skip/guitarix/guitarix-0.43.1-glib2.patch
@@ -0,0 +1,15 @@
+diff -ruN a/src/headers/gx_system.h b/src/headers/gx_system.h
+--- a/src/headers/gx_system.h 2021-12-10 18:53:33.000000000 +0100
++++ b/src/headers/gx_system.h 2022-04-28 11:23:16.176694581 +0200
+@@ -112,7 +112,11 @@
+ }
+
+ inline bool atomic_compare_and_exchange(volatile int *p, int oldv, int newv) {
++#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 68 && GLIB_MICRO_VERSION < 1)
+ return g_atomic_int_compare_and_exchange(p, oldv, newv);
++#else
++ return g_atomic_int_compare_and_exchange(const_cast<int*>(p), oldv, newv);
++#endif
+ }
+
+ template <class T>
diff --git a/skip/guitarix/guitarix.xibuild b/skip/guitarix/guitarix.xibuild
new file mode 100644
index 0000000..ece8baa
--- /dev/null
+++ b/skip/guitarix/guitarix.xibuild
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+NAME="guitarix"
+DESC="A simple mono guitar amplifier and FX for JACK using Faust"
+
+MAKEDEPS="make atkmm cairo cairomm glibmm gtkmm3 libsigc++ libx11 pangomm lv2 fftw gperf gtk3 intltool liblo lilv waf "
+
+PKG_VER=0.44.1
+SOURCE="https://download.sourceforge.net/project/guitarix/guitarix/guitarix2-$PKG_VER.tar.xz"
+ADDITIONAL="guitarix-0.43.1-glib2.patch "
+
+build () {
+ waf configure \
+ --prefix=/usr \
+ --enable-nls \
+ --ladspa \
+ --new-ladspa \
+ --shared-lib \
+ --lib-dev \
+ --cxxflags='-flto' \
+ --ldflags="$LDFLAGS"
+ waf build -vv
+}
+
+package () {
+ waf install --destdir="$PKG_DEST"
+}
diff --git a/skip/heimdal/005_all_heimdal-suid_fix.patch b/skip/heimdal/005_all_heimdal-suid_fix.patch
new file mode 100644
index 0000000..0524db6
--- /dev/null
+++ b/skip/heimdal/005_all_heimdal-suid_fix.patch
@@ -0,0 +1,20 @@
+--- appl/su/Makefile.am 2005-06-16 18:27:46.000000000 +0200
++++ b/appl/su/Makefile.am 2005-06-27 23:25:21.000000000 +0200
+@@ -7,6 +7,7 @@
+ bin_PROGRAMS = su
+ bin_SUIDS = su
+ su_SOURCES = su.c supaths.h
++su_LDFLAGS = -Wl,-z,now
+ man_MANS = su.1
+
+ LDADD = $(LIB_kafs) \
+--- appl/otp/Makefile.am 2005-06-16 18:28:46.000000000 +0200
++++ b/appl/otp/Makefile.am 2005-06-27 23:25:40.000000000 +0200
+@@ -8,6 +8,7 @@
+ bin_SUIDS = otp
+ otp_SOURCES = otp.c otp_locl.h
+ otpprint_SOURCES = otpprint.c otp_locl.h
++otp_LDFLAGS = -Wl,-z,now
+
+ man_MANS = otp.1 otpprint.1
+
diff --git a/skip/heimdal/CVE-2018-16860.patch b/skip/heimdal/CVE-2018-16860.patch
new file mode 100644
index 0000000..6424b9e
--- /dev/null
+++ b/skip/heimdal/CVE-2018-16860.patch
@@ -0,0 +1,147 @@
+From c6257cc2c842c0faaeb4ef34e33890ee88c4cbba Mon Sep 17 00:00:00 2001
+From: Isaac Boukris <iboukris@gmail.com>
+Date: Tue, 14 May 2019 09:03:18 -0400
+Subject: [PATCH] CVE-2018-16860 Heimdal KDC: Reject PA-S4U2Self with unkeyed
+ checksum
+
+S4U2Self is an extension to Kerberos used in Active Directory to allow
+a service to request a kerberos ticket to itself from the Kerberos Key
+Distribution Center (KDC) for a non-Kerberos authenticated user
+(principal in Kerboros parlance). This is useful to allow internal
+code paths to be standardized around Kerberos.
+
+S4U2Proxy (constrained-delegation) is an extension of this mechanism
+allowing this impersonation to a second service over the network. It
+allows a privileged server that obtained a S4U2Self ticket to itself
+to then assert the identity of that principal to a second service and
+present itself as that principal to get services from the second
+service.
+
+There is a flaw in Samba's AD DC in the Heimdal KDC. When the Heimdal
+KDC checks the checksum that is placed on the S4U2Self packet by the
+server to protect the requested principal against modification, it
+does not confirm that the checksum algorithm that protects the user
+name (principal) in the request is keyed. This allows a
+man-in-the-middle attacker who can intercept the request to the KDC to
+modify the packet by replacing the user name (principal) in the
+request with any desired user name (principal) that exists in the KDC
+and replace the checksum protecting that name with a CRC32 checksum
+(which requires no prior knowledge to compute).
+
+This would allow a S4U2Self ticket requested on behalf of user name
+(principal) user@EXAMPLE.COM to any service to be changed to a
+S4U2Self ticket with a user name (principal) of
+Administrator@EXAMPLE.COM. This ticket would then contain the PAC of
+the modified user name (principal).
+
+==================
+CVSSv3 calculation
+==================
+
+CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H (7.5)
+
+=========================
+Workaround and Mitigation
+=========================
+
+If server does not take privileged actions based on Kerberos tickets
+obtained by S4U2Self nor obtains Kerberos tickets via further
+S4U2Proxy requests then this issue cannot be exploited.
+
+Note that the path to an exploit is not generic, the KDC is not harmed
+by the malicious checksum, it is the client service requesting the
+ticket being mislead, because it trusted the KDC to return the correct
+ticket and PAC.
+
+It is out of scope for Samba to describe all of the possible tool
+chains that might be vulnerable. Here are two examples of possible
+exploits in order to explain the issue more clearly.
+
+1). SFU2Self might be used by a web service authenticating an end user
+via OAuth, Shibboleth, or other protocols to obtain a S4U2Self
+Kerberos service ticket for use by any Kerberos service principal the
+web service has a keytab for. One example is acquiring an AFS token
+by requesting an afs/cell@REALM service ticket for a client via
+SFU2Self. With this exploit an organization that deploys a KDC built
+from Heimdal (be it Heimdal directly or vendor versions such as found
+in Samba) is vulnerable to privilege escalation attacks.
+
+2). If a server authenticates users using X509 certificates, and then
+uses S4U2Self to obtain a Kerberos service ticket on behalf of the
+user (principal) in order to authorize access to local resources, a
+man-in-the-middle attacker could allow a non-privilaged user to access
+privilaged resources being protected by the server, or privilaged
+resources being protected by a second server, if the first server uses
+the S4U2Proxy extension in order to get a new Kerberos service ticket
+to obtain access to the second server.
+
+In both these scenarios under conditions allowing man-in-the-middle
+active network protocol manipulation, a malicious user could
+authenticate using the non-Kerborized credentials of an unprivileged
+user, and then elevate its privileges by intercepting the packet from
+the server to the KDC and changing the requested user name (principal).
+
+The only Samba clients that use S4U2Self are:
+
+- the "net ads kerberos pac dump" (debugging) tool.
+
+- the CIFS proxy in the deprecated/developer-only NTVFS file
+server. Note this code is not compiled or enabled by default.
+
+In particular, winbindd does *not* use S4U2Self.
+
+Finally, MIT Kerberos and so therefore the experimental MIT KDC backend
+for Samba AD is understood not to be impacted.
+
+===============
+Further Reading
+===============
+
+There is more detail on and a description of the protocols in
+
+[MS-SFU]: Kerberos Protocol Extensions: Service for User and Constrained
+Delegation Protocol
+https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-sfu/
+
+=======
+Credits
+=======
+
+Originally reported by Isaac Boukris and Andrew Bartlett of the Samba
+Team and Catalyst.
+
+Patches provided by Isaac Boukris.
+
+Advisory written by Andrew Bartlett of the Samba Team and Catalyst,
+with contributions from Isaac Boukris, Jeffrey Altman and Jeremy
+Allison.
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=13685
+Change-Id: I4ac69ebf0503eb999a7d497a2c30fe4d293a8cc8
+Signed-off-by: Isaac Boukris <iboukris@gmail.com>
+Reviewed-by: Andrew Bartlett <abartlet@samba.org>
+Signed-off-by: Andrew Bartlett <abartlet@samba.org>
+Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
+Signed-off-by: Jeffrey Altman <jaltman@auristor.com>
+---
+ kdc/krb5tgs.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/kdc/krb5tgs.c b/kdc/krb5tgs.c
+index 8318bc0025..14943077a4 100644
+--- a/kdc/krb5tgs.c
++++ b/kdc/krb5tgs.c
+@@ -2031,6 +2031,13 @@ tgs_build_reply(krb5_context context,
+ goto out;
+ }
+
++ if (!krb5_checksum_is_keyed(context, self.cksum.cksumtype)) {
++ free_PA_S4U2Self(&self);
++ kdc_log(context, config, 0, "Reject PA-S4U2Self with unkeyed checksum");
++ ret = KRB5KRB_AP_ERR_INAPP_CKSUM;
++ goto out;
++ }
++
+ ret = _krb5_s4u2self_to_checksumdata(context, &self, &datack);
+ if (ret)
+ goto out;
diff --git a/skip/heimdal/autoconf-270.patch b/skip/heimdal/autoconf-270.patch
new file mode 100644
index 0000000..05cdc09
--- /dev/null
+++ b/skip/heimdal/autoconf-270.patch
@@ -0,0 +1,27 @@
+commit 22352b90e78e2d162b98b5ef6c84672c397be40a
+Author: Lars Wendler <polynomial-c@gentoo.org>
+Date: Wed Mar 17 17:49:18 2021 +0100
+
+ autoconf-2.70 fix
+
+ autoconf-2.70 and newer are more strict with quoting etc. and thus generate
+ a broken configure file:
+
+ configure: 20855: Syntax error: ")" unexpected (expecting "fi")
+
+ Gentoo-bug: https://bugs.gentoo.org/776241
+ Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+
+diff --git a/cf/check-var.m4 b/cf/check-var.m4
+index 2fd7bca6f..71d6f70ca 100644
+--- a/cf/check-var.m4
++++ b/cf/check-var.m4
+@@ -20,7 +20,7 @@ AC_MSG_RESULT($ac_foo)
+ if test "$ac_foo" = yes; then
+ AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1,
+ [Define if you have the `]$1[' variable.])
+- m4_ifval([$2], AC_CHECK_DECLS([$1],[],[],[$2]))
++ m4_ifval([$2], [AC_CHECK_DECLS([$1],[],[],[$2])])
+ fi
+ ])
+
diff --git a/skip/heimdal/heimdal-kadmind.initd b/skip/heimdal/heimdal-kadmind.initd
new file mode 100755
index 0000000..73f2381
--- /dev/null
+++ b/skip/heimdal/heimdal-kadmind.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/heimdal/files/heimdal-kadmind,v 1.3 2004/09/13 22:44:54 solar Exp $
+
+depend() {
+ need net
+ use heimdal-kdc
+ after logger
+}
+
+start() {
+ ebegin "Starting heimdal kadmind"
+ /usr/sbin/kadmind &
+ echo $! > /var/run/heimdal-kadmind.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping heimdal kadmind"
+ start-stop-daemon --stop --quiet --exec \
+ /usr/sbin/kadmind
+ eend $?
+}
diff --git a/skip/heimdal/heimdal-kdc.initd b/skip/heimdal/heimdal-kdc.initd
new file mode 100755
index 0000000..32288c4
--- /dev/null
+++ b/skip/heimdal/heimdal-kdc.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/heimdal/files/heimdal-kdc,v 1.2 2004/09/13 15:40:34 dragonheart Exp $
+
+depend() {
+ need net
+ after logger
+}
+
+start() {
+ ebegin "Starting heimdal kdc"
+ start-stop-daemon --start --quiet --exec \
+ /usr/sbin/kdc -- --detach
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping heimdal kdc"
+ start-stop-daemon --stop --quiet --exec \
+ /usr/sbin/kdc
+ eend $?
+}
diff --git a/skip/heimdal/heimdal-kpasswdd.initd b/skip/heimdal/heimdal-kpasswdd.initd
new file mode 100755
index 0000000..5fc21e0
--- /dev/null
+++ b/skip/heimdal/heimdal-kpasswdd.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/heimdal/files/heimdal-kpasswdd,v 1.3 2004/09/13 22:44:54 solar Exp $
+
+depend() {
+ need net
+ use heimdal-kdc
+ after logger
+}
+
+start() {
+ ebegin "Starting heimdal kpasswdd"
+ start-stop-daemon --background --start --quiet --exec \
+ /usr/sbin/kpasswdd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping heimdal kpasswdd"
+ start-stop-daemon --stop --quiet --exec \
+ /usr/sbin/kpasswdd
+ eend $?
+}
diff --git a/skip/heimdal/heimdal.xibuild b/skip/heimdal/heimdal.xibuild
new file mode 100644
index 0000000..0fcba4b
--- /dev/null
+++ b/skip/heimdal/heimdal.xibuild
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+NAME="heimdal"
+DESC="Implementation of Kerberos 5"
+
+MAKEDEPS="xipkg openssl e2fsprogs autoconf automake bash gawk libtool ncurses perl readline sqlite3 texinfo perl-json gdbm "
+
+PKG_VER=7.7.0
+SOURCE="https://github.com/heimdal/heimdal/releases/download/heimdal-$PKG_VER/heimdal-$PKG_VER.tar.gz"
+
+ADDITIONAL="
+005_all_heimdal-suid_fix.patch
+CVE-2018-16860.patch
+autoconf-270.patch
+heimdal-kadmind.initd
+heimdal-kdc.initd
+heimdal-kpasswdd.initd
+heimdal_missing-include.patch
+silence-include-headers-redirect-warnings.patch
+"
+
+prepare() {
+ [ -e /usr/lib/libasn1.so ] && xi -yl remove heimdal
+ apply_patches
+ sh ./autogen.sh
+}
+
+build() {
+ export LDFLAGS="$LDFLAGS -Wl,--as-needed"
+
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --enable-shared=yes \
+ --without-x \
+ --without-berkeley-db \
+ --with-readline-lib=/usr/lib \
+ --with-readline-include=/usr/include/readline \
+ --with-sqlite3=/usr \
+ --without-openssl \
+ --with-db-type-preference=
+
+ # make sure we use system version
+ rm -r lib/sqlite lib/com_err
+
+ # workarount a parallell build issue
+ make -C lib/asn1 der-protos.h der-private.h
+ make -C lib/kadm5 kadm5-protos.h kadm5-private.h kadm5_err.h
+ make -C lib/krb5 krb5-protos.h krb5-private.h krb5_err.h krb_err.h \
+ heim_err.h k524_err.h
+ make -C lib/hx509 hx509-private.h hx509-protos.h
+ make
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" exec_prefix=/usr sysconfdir=/etc \
+ mandir=/usr/share/man infodir=/usr/share/info datadir=/var/lib/heimdal \
+ localstatedir=/var/lib/heimdal libexecdir=/usr/sbin install
+
+
+ install -m755 -D "$BUILD_ROOT"/heimdal-kadmind.initd \
+ "$PKG_DEST"/etc/init.d/heimdal-kadmind
+ install -m755 -D "$BUILD_ROOT"/heimdal-kdc.initd \
+ "$PKG_DEST"/etc/init.d/heimdal-kdc
+ install -m755 -D "$BUILD_ROOT"/heimdal-kpasswdd.initd \
+ "$PKG_DEST"/etc/init.d/heimdal-kpasswdd
+
+ for i in 1 3 5 8; do
+ rm -rf "$PKG_DEST"/usr/share/man/cat$i
+ done
+
+ # Remove conflicts
+ # e2fsprogs
+ rm -f "$PKG_DEST"/usr/bin/compile_et \
+ "$PKG_DEST"/usr/share/man/man1/compile_et.1
+
+ # Compress info pages
+ for page in heimdal hx509; do
+ gzip -9 "$PKG_DEST"/usr/share/info/$page.info
+ done
+}
diff --git a/skip/heimdal/heimdal_missing-include.patch b/skip/heimdal/heimdal_missing-include.patch
new file mode 100644
index 0000000..8cca906
--- /dev/null
+++ b/skip/heimdal/heimdal_missing-include.patch
@@ -0,0 +1,11 @@
+--- lib/base/test_base.c 2011-09-30 15:58:45.000000000 +0300
++++ b/lib/base/test_base.c 2011-12-27 23:04:50.482955923 +0200
+@@ -39,6 +39,8 @@
+ #include "heimbase.h"
+ #include "heimbasepriv.h"
+
++#include <stdlib.h>
++
+ static void
+ memory_free(heim_object_t obj)
+ {
diff --git a/skip/heimdal/silence-include-headers-redirect-warnings.patch b/skip/heimdal/silence-include-headers-redirect-warnings.patch
new file mode 100644
index 0000000..4505096
--- /dev/null
+++ b/skip/heimdal/silence-include-headers-redirect-warnings.patch
@@ -0,0 +1,80 @@
+From 2eb67c91834a21e68c90380254c7c10ffe03a7ca Mon Sep 17 00:00:00 2001
+From: Leonardo Arena <rnalrd@alpinelinux.org>
+Date: Thu, 14 Apr 2022 08:47:15 +0000
+Subject: [PATCH] silence include header warnings
+
+---
+ cf/roken-frag.m4 | 1 -
+ configure | 2 +-
+ lib/ipc/hi_locl.h | 2 +-
+ lib/krb5/krb5_locl.h | 2 +-
+ lib/roken/getifaddrs.c | 2 +-
+ 5 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/cf/roken-frag.m4 b/cf/roken-frag.m4
+index f22b43a..589b2cc 100644
+--- a/cf/roken-frag.m4
++++ b/cf/roken-frag.m4
+@@ -73,7 +73,6 @@ AC_CHECK_HEADERS([\
+ stdint.h \
+ sys/auxv.h \
+ sys/bswap.h \
+- sys/errno.h \
+ sys/ioctl.h \
+ sys/mman.h \
+ sys/param.h \
+diff --git a/configure b/configure
+index 4cefc43..bc3bf78 100755
+--- a/configure
++++ b/configure
+@@ -17965,7 +17965,7 @@ for ac_header in \
+ stdint.h \
+ sys/auxv.h \
+ sys/bswap.h \
+- sys/errno.h \
++ errno.h \
+ sys/ioctl.h \
+ sys/mman.h \
+ sys/param.h \
+diff --git a/lib/ipc/hi_locl.h b/lib/ipc/hi_locl.h
+index 7efe6ca..3195b44 100644
+--- a/lib/ipc/hi_locl.h
++++ b/lib/ipc/hi_locl.h
+@@ -41,7 +41,7 @@
+ #include <sys/un.h>
+ #endif
+
+-#include <sys/poll.h>
++#include <poll.h>
+
+ #include <ctype.h>
+ #include <stdio.h>
+diff --git a/lib/krb5/krb5_locl.h b/lib/krb5/krb5_locl.h
+index b64f3a9..f62c40d 100644
+--- a/lib/krb5/krb5_locl.h
++++ b/lib/krb5/krb5_locl.h
+@@ -44,7 +44,7 @@
+ #include <ctype.h>
+
+ #ifdef HAVE_POLL_H
+-#include <sys/poll.h>
++#include <poll.h>
+ #endif
+
+ #include <krb5-types.h>
+diff --git a/lib/roken/getifaddrs.c b/lib/roken/getifaddrs.c
+index cc949b0..a82adc5 100644
+--- a/lib/roken/getifaddrs.c
++++ b/lib/roken/getifaddrs.c
+@@ -120,7 +120,7 @@ struct mbuf;
+ #include <linux/rtnetlink.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <netpacket/packet.h>
+ #include <net/ethernet.h> /* the L2 protocols */
+ #include <sys/uio.h>
+--
+2.35.1
+
diff --git a/skip/leveldb/leveldb.xibuild b/skip/leveldb/leveldb.xibuild
new file mode 100644
index 0000000..d3805c9
--- /dev/null
+++ b/skip/leveldb/leveldb.xibuild
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+NAME="leveldb"
+DESC="A fast and lightweight key/value database library by Google"
+
+MAKEDEPS="cmake snappy"
+
+PKG_VER=1.23
+SOURCE="https://github.com/google/leveldb/archive/$PKG_VER.tar.gz"
+
+build() {
+ mkdir build && cd build
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=MinSizeRel \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DLEVELDB_BUILD_TESTS=ON \
+ -DLEVELDB_INSTALL=ON \
+ -DBUILD_SHARED_LIBS=ON
+ make
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+ mkdir -p "$PKG_DEST"/usr/share/doc
+ cp -a ../doc "$PKG_DEST"/usr/share/doc/leveldb
+}
+
diff --git a/skip/libetonyek/libetonyek.xibuild b/skip/libetonyek/libetonyek.xibuild
new file mode 100644
index 0000000..5df35af
--- /dev/null
+++ b/skip/libetonyek/libetonyek.xibuild
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+NAME="libetonyek"
+DESC="Import filter and tools for Apple Keynote presentations"
+
+MAKEDEPS=" glm boost librevenge libxml2 zlib liblangtag gperf doxygen mdds"
+
+PKG_VER=0.1.10
+SOURCE="https://dev-www.libreoffice.org/src/libetonyek/libetonyek-$PKG_VER.tar.xz"
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --disable-werror \
+ --with-mdds=1.5 \
+ --disable-static
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+}
diff --git a/skip/liblangtag/liblangtag.xibuild b/skip/liblangtag/liblangtag.xibuild
new file mode 100644
index 0000000..48bec7b
--- /dev/null
+++ b/skip/liblangtag/liblangtag.xibuild
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+NAME="liblangtag"
+DESC="Interface library to access/deal with tags for identifying languages"
+
+MAKEDEPS="glib gobject-introspection libtool libxml2 gtk-doc"
+
+SOURCE="http://bitbucket.org/tagoh/liblangtag.git"
+
+prepare () {
+ autoreconf -vif
+}
+
+build() {
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ make -k check
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+}
+
diff --git a/skip/libreoffice/autoconf-boost-macros.patch b/skip/libreoffice/autoconf-boost-macros.patch
new file mode 100644
index 0000000..41dda98
--- /dev/null
+++ b/skip/libreoffice/autoconf-boost-macros.patch
@@ -0,0 +1,152 @@
+Fix language context when testing linking against boost, by moving
+the AC_LANG_PUSH and AC_LANG_POP macros into a macro-wide scope for the
+AX_BOOST_FOO macros.
+
+Upstream: Pending
+--- libreoffice-7.2.2.2.orig/m4/ax_boost_date_time.m4
++++ libreoffice-7.2.2.2/m4/ax_boost_date_time.m4
+@@ -62,15 +62,15 @@
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
++ AC_LANG_PUSH([C++])
++
+ AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
+ ax_cv_boost_date_time,
+- [AC_LANG_PUSH([C++])
+- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
++ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
+ [[using namespace boost::gregorian; date d(2002,Jan,10);
+ return 0;
+ ]])],
+ ax_cv_boost_date_time=yes, ax_cv_boost_date_time=no)
+- AC_LANG_POP([C++])
+ ])
+ if test "x$ax_cv_boost_date_time" = "xyes"; then
+ AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
+@@ -110,4 +110,6 @@
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+ fi
++
++ AC_LANG_POP([C++])
+ ])
+--- libreoffice-7.2.2.2.orig/m4/ax_boost_filesystem.m4
++++ libreoffice-7.2.2.2/m4/ax_boost_filesystem.m4
+@@ -67,15 +67,15 @@
+ LIBS="$LIBS $BOOST_SYSTEM_LIB"
+ export LIBS
+
++ AC_LANG_PUSH([C++])
++
+ AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
+ ax_cv_boost_filesystem,
+- [AC_LANG_PUSH([C++])
+- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
++ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
+ [[using namespace boost::filesystem;
+ path my_path( "foo/bar/data.txt" );
+ return 0;]])],
+ ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
+- AC_LANG_POP([C++])
+ ])
+ if test "x$ax_cv_boost_filesystem" = "xyes"; then
+ AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
+@@ -115,4 +115,6 @@
+ LDFLAGS="$LDFLAGS_SAVED"
+ LIBS="$LIBS_SAVED"
+ fi
++
++ AC_LANG_POP([C++])
+ ])
+--- libreoffice-7.2.2.2.orig/m4/ax_boost_iostreams.m4
++++ libreoffice-7.2.2.2/m4/ax_boost_iostreams.m4
+@@ -61,10 +61,11 @@
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
++ AC_LANG_PUSH([C++])
++
+ AC_CACHE_CHECK(whether the Boost::IOStreams library is available,
+ ax_cv_boost_iostreams,
+- [AC_LANG_PUSH([C++])
+- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/iostreams/filtering_stream.hpp>
++ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/iostreams/filtering_stream.hpp>
+ @%:@include <boost/range/iterator_range.hpp>
+ ]],
+ [[std::string input = "Hello World!";
+@@ -73,7 +74,6 @@
+ return 0;
+ ]])],
+ ax_cv_boost_iostreams=yes, ax_cv_boost_iostreams=no)
+- AC_LANG_POP([C++])
+ ])
+ if test "x$ax_cv_boost_iostreams" = "xyes"; then
+ AC_DEFINE(HAVE_BOOST_IOSTREAMS,,[define if the Boost::IOStreams library is available])
+@@ -113,4 +113,6 @@
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+ fi
++
++ AC_LANG_POP([C++])
+ ])
+--- libreoffice-7.2.2.2.orig/m4/ax_boost_locale.m4
++++ libreoffice-7.2.2.2/m4/ax_boost_locale.m4
+@@ -62,9 +62,11 @@
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
++ AC_LANG_PUSH([C++])
++
+ AC_CACHE_CHECK(whether the Boost::Locale library is available,
+ ax_cv_boost_locale,
+- [AC_LANG_PUSH([C++])
++ [
+ CXXFLAGS_SAVE=$CXXFLAGS
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/locale.hpp>]],
+@@ -72,7 +74,6 @@
+ std::locale::global(gen(""));]])],
+ ax_cv_boost_locale=yes, ax_cv_boost_locale=no)
+ CXXFLAGS=$CXXFLAGS_SAVE
+- AC_LANG_POP([C++])
+ ])
+ if test "x$ax_cv_boost_locale" = "xyes"; then
+ AC_SUBST(BOOST_CPPFLAGS)
+@@ -116,4 +117,6 @@
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+ fi
++
++ AC_LANG_POP([C++])
+ ])
+--- libreoffice-7.2.2.2.orig/m4/ax_boost_system.m4
++++ libreoffice-7.2.2.2/m4/ax_boost_system.m4
+@@ -64,9 +64,11 @@
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
++ AC_LANG_PUSH([C++])
++
+ AC_CACHE_CHECK(whether the Boost::System library is available,
+ ax_cv_boost_system,
+- [AC_LANG_PUSH([C++])
++ [
+ CXXFLAGS_SAVE=$CXXFLAGS
+ CXXFLAGS=
+
+@@ -74,7 +76,6 @@
+ [[boost::system::error_category *a = 0;]])],
+ ax_cv_boost_system=yes, ax_cv_boost_system=no)
+ CXXFLAGS=$CXXFLAGS_SAVE
+- AC_LANG_POP([C++])
+ ])
+ if test "x$ax_cv_boost_system" = "xyes"; then
+ AC_SUBST(BOOST_CPPFLAGS)
+@@ -118,4 +119,6 @@
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+ fi
++
++ AC_LANG_POP([C++])
+ ])
diff --git a/skip/libreoffice/disable-liborcus-unittest.patch b/skip/libreoffice/disable-liborcus-unittest.patch
new file mode 100644
index 0000000..318d508
--- /dev/null
+++ b/skip/libreoffice/disable-liborcus-unittest.patch
@@ -0,0 +1,13 @@
+--- a/sc/qa/unit/subsequent_filters-test.cxx
++++ b/sc/qa/unit/subsequent_filters-test.cxx
+@@ -2546,7 +2546,9 @@
+ CPPUNIT_ASSERT_MESSAGE("Style Name1 : Doesn't have Attribute background, but it should have.",
+ pStyleSheet->GetItemSet().HasItem(ATTR_BACKGROUND, &pItem));
+ const SvxBrushItem* pBackground = static_cast<const SvxBrushItem*>(pItem);
+- CPPUNIT_ASSERT_EQUAL(Color(254, 255, 204), pBackground->GetColor());
++ /* This test fails with liborcus >= 0.13.3
++ * CPPUNIT_ASSERT_EQUAL(Color(254, 255, 204), pBackground->GetColor());
++ */
+
+ CPPUNIT_ASSERT_MESSAGE("Style Name1 : Doesn't have Attribute border, but it should have.",
+ pStyleSheet->GetItemSet().HasItem(ATTR_BORDER, &pItem));
diff --git a/skip/libreoffice/fix-execinfo.patch b/skip/libreoffice/fix-execinfo.patch
new file mode 100644
index 0000000..84f3687
--- /dev/null
+++ b/skip/libreoffice/fix-execinfo.patch
@@ -0,0 +1,34 @@
+--- a/sal/osl/unx/backtrace.h
++++ b/sal/osl/unx/backtrace.h
+@@ -20,7 +20,7 @@
+ #ifndef INCLUDED_SAL_OSL_UNX_BACKTRACE_H
+ #define INCLUDED_SAL_OSL_UNX_BACKTRACE_H
+
+-#if defined (LINUX)
++#if defined (LINUX) && defined (__GLIBC__)
+
+ #include <execinfo.h>
+
+--- a/sal/osl/unx/signal.cxx
++++ b/sal/osl/unx/signal.cxx
+@@ -36,7 +36,7 @@
+
+ #endif /* MACOSX */
+
+-#ifdef LINUX
++#if defined(LINUX) && defined(__GLIBC__)
+ #include <execinfo.h>
+ #include <link.h>
+ #define INCLUDE_BACKTRACE
+
+--- a/sal/osl/unx/backtrace.c
++++ b/sal/osl/unx/backtrace.c
+@@ -279,7 +279,7 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
+ }
+ }
+
+-#elif !defined LINUX && !defined MACOSX && !defined IOS
++#elif !defined LINUX && !defined MACOSX && !defined IOS && !defined(__GLIBC__)
+
+ int backtrace( void **buffer, int max_frames )
+ {
diff --git a/skip/libreoffice/libreoffice-base.xibuild b/skip/libreoffice/libreoffice-base.xibuild
new file mode 100644
index 0000000..b38a445
--- /dev/null
+++ b/skip/libreoffice/libreoffice-base.xibuild
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+DEPS="libreoffice-common"
+DESC="LibreOffice - Database frontend"
+
+splitname="base"
+
+package () {
+ libreoffice_split $splitname
+ add_from_main usr/lib/libreoffice/share/xdg/$splitname.desktop
+}
diff --git a/skip/libreoffice/libreoffice-calc.xibuild b/skip/libreoffice/libreoffice-calc.xibuild
new file mode 100644
index 0000000..c7bc5b2
--- /dev/null
+++ b/skip/libreoffice/libreoffice-calc.xibuild
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+DEPS="libreoffice-common"
+DESC="LibreOffice - Spreadsheet"
+
+splitname="calc"
+
+package () {
+ libreoffice_split $splitname
+ add_from_main usr/lib/libreoffice/share/xdg/$splitname.desktop
+}
diff --git a/skip/libreoffice/libreoffice-common.xibuild b/skip/libreoffice/libreoffice-common.xibuild
new file mode 100644
index 0000000..b726db5
--- /dev/null
+++ b/skip/libreoffice/libreoffice-common.xibuild
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+DEPS="libreoffice-common"
+DESC="LibreOffice - Common Files"
+
+splitname="common"
+
+package () {
+ libreoffice_split $splitname
+}
diff --git a/skip/libreoffice/libreoffice-draw.xibuild b/skip/libreoffice/libreoffice-draw.xibuild
new file mode 100644
index 0000000..cc73569
--- /dev/null
+++ b/skip/libreoffice/libreoffice-draw.xibuild
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+DEPS="libreoffice-common"
+DESC="LibreOffice - Drawing application"
+
+splitname="draw"
+
+package () {
+ libreoffice_split $splitname
+ add_from_main usr/lib/libreoffice/share/xdg/$splitname.desktop
+}
diff --git a/skip/libreoffice/libreoffice-impress.xibuild b/skip/libreoffice/libreoffice-impress.xibuild
new file mode 100644
index 0000000..482203c
--- /dev/null
+++ b/skip/libreoffice/libreoffice-impress.xibuild
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+DEPS="libreoffice-common"
+DESC="LibreOffice - Presentation application"
+
+splitname="impress"
+
+package () {
+ libreoffice_split $splitname
+ add_from_main usr/lib/libreoffice/share/xdg/$splitname.desktop
+}
diff --git a/skip/libreoffice/libreoffice-math.xibuild b/skip/libreoffice/libreoffice-math.xibuild
new file mode 100644
index 0000000..8b4d0a4
--- /dev/null
+++ b/skip/libreoffice/libreoffice-math.xibuild
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+DEPS="libreoffice-common"
+DESC="LibreOffice - Equation Editor"
+
+splitname="math"
+
+package () {
+ libreoffice_split $splitname
+ add_from_main usr/lib/libreoffice/share/xdg/$splitname.desktop
+}
diff --git a/skip/libreoffice/libreoffice-postgres.xibuild b/skip/libreoffice/libreoffice-postgres.xibuild
new file mode 100644
index 0000000..2cac487
--- /dev/null
+++ b/skip/libreoffice/libreoffice-postgres.xibuild
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+DEPS="libreoffice-common"
+DESC="LibreOffice - Connector for postgresql database"
+
+splitname="postgresql"
+
+package () {
+ libreoffice_split $splitname
+}
diff --git a/skip/libreoffice/libreoffice-sdk.xibuild b/skip/libreoffice/libreoffice-sdk.xibuild
new file mode 100644
index 0000000..2106fb0
--- /dev/null
+++ b/skip/libreoffice/libreoffice-sdk.xibuild
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+DEPS="libreoffice-common"
+DESC="LibreOffice - SDK"
+
+splitname="sdk"
+
+package () {
+ libreoffice_split $splitname
+}
diff --git a/skip/libreoffice/libreoffice-writer.xibuild b/skip/libreoffice/libreoffice-writer.xibuild
new file mode 100644
index 0000000..e2c1b74
--- /dev/null
+++ b/skip/libreoffice/libreoffice-writer.xibuild
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+DEPS="libreoffice-common"
+DESC="LibreOffice - Word Processor"
+
+splitname="writer"
+
+package () {
+ libreoffice_split $splitname
+ add_from_main usr/lib/libreoffice/share/xdg/$splitname.desktop
+}
diff --git a/skip/libreoffice/libreoffice.xibuild b/skip/libreoffice/libreoffice.xibuild
new file mode 100644
index 0000000..2cdf242
--- /dev/null
+++ b/skip/libreoffice/libreoffice.xibuild
@@ -0,0 +1,136 @@
+#!/bin/sh
+
+NAME="libreoffice"
+DESC="LibreOffice - Meta package for the full office suite"
+
+MAKEDEPS="apache-ant apr autoconf automake bison bluez boost box2d clucene cppunit cups doxygen findutils flex freetype2 glew glm glu gperf gpgme gst-plugins-base gstreamer gtk3 harfbuzz hunspell hyphen icu junit kconfig lcms2 libabw libcdr libepubgen libetonyek libexecinfo libexttextcat libfreehand libjpeg-turbo libmspub libmwaw libnumbertext libodfgen liborcus libpagemaker libqxp libstaroffice libvisio libwpd libwpg libwps libxml2 libxrandr libxrender libxslt libzmf mdds mythes neon nss libldap openssl perl perl-archive-zip poppler python qt5-qtbase redland sed tar ucpp unixodbc vigra xmlsec xz zip zxing-cpp adoptopenjdk11"
+
+PKG_VER=7.2.6.2
+
+addsrcurl="https://dev-www.libreoffice.org/src"
+case $PKG_VER in
+*.*.*.*) v=${PKG_VER%.*};;
+*.*.*) v=$PKG_VER;;
+esac
+
+SOURCE="https://download.documentfoundation.org/libreoffice/src/$v/libreoffice-$PKG_VER.tar.xz"
+ADDITIONAL="
+ https://download.documentfoundation.org/libreoffice/src/$v/libreoffice-dictionaries-$PKG_VER.tar.xz
+ https://download.documentfoundation.org/libreoffice/src/$v/libreoffice-translations-$PKG_VER.tar.xz
+ $addsrcurl/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
+ $addsrcurl/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
+ $addsrcurl/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
+ $addsrcurl/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
+ $addsrcurl/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
+ $addsrcurl/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
+ $addsrcurl/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
+ $addsrcurl/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
+ $addsrcurl/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
+ $addsrcurl/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
+ $addsrcurl/beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip
+ $addsrcurl/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
+ $addsrcurl/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
+ $addsrcurl/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
+ $addsrcurl/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
+ $addsrcurl/commons-logging-1.2-src.tar.gz
+ $addsrcurl/dtoa-20180411.tgz
+ $addsrcurl/lxml-4.1.1.tgz
+ $addsrcurl/pdfium-4500.tar.bz2
+ $addsrcurl/skia-m90-45c57e116ee0ce214bdf78405a4762722e4507d9.tar.xz
+ $addsrcurl/QR-Code-generator-1.4.0.tar.gz
+ $addsrcurl/libcmis-0.5.2.tar.xz
+ https://dev-www.libreoffice.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll
+ https://dev-www.libreoffice.org/extern/f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf
+
+autoconf-boost-macros.patch
+disable-liborcus-unittest.patch
+fix-execinfo.patch
+linux-musl.patch
+musl-libintl.patch
+musl-stacksize.patch
+pld-skia-patches.patch
+poppler-22.03.patch
+remove-backtrace.patch
+skia-freetype2.11.diff
+"
+
+unpack() {
+ mkdir -p "$BUILD_ROOT"
+ for u in libreoffice-*.tar.xz; do
+ unxz -c "$s" | tar -C "$BUILD_ROOT" -x
+ done
+}
+
+prepare() {
+ unpack
+ mv "$BUILD_ROOT/skia-freetype2.11.diff" external/skia/"skia-freetype2.11.patch"
+
+ apply_patches
+ NOCONFIGURE=1 ./autogen.sh
+}
+
+build() {
+ export CFLAGS="$CFLAGS -O2"
+ export CPPFLAGS="$CPPFLAGS -O2"
+ export CXXFLAGS="$CXXFLAGS -O2"
+
+ # boost-1.59
+ export CPPFLAGS="$CPPFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED"
+
+ export JAVA_HOME=/usr/lib/jvm/adoptopenjdk11
+ java_conf="
+ "
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --disable-online-update \
+ --disable-fetch-external \
+ --disable-dependency-tracking \
+ --enable-release-build \
+ --enable-split-app-modules \
+ --enable-python=system \
+ --with-tls=nss \
+ --with-system-libs \
+ --with-system-dicts \
+ --with-system-ucpp \
+ --with-external-dict-dir=/usr/share/hunspell \
+ --with-external-hyph-dir=/usr/share/hyphen \
+ --with-external-tar="$BUILD_ROOT" \
+ --without-system-jars \
+ --without-system-libcmis \
+ --without-junit \
+ --without-fonts \
+ --without-system-sane \
+ --without-myspell-dicts \
+ --disable-firebird-sdbc \
+ --disable-coinmp \
+ --disable-lpsolve \
+ --enable-gtk3 \
+ --enable-odk \
+ --enable-skia \
+ --enable-gtk3-kde5 \
+ --enable-kf5 \
+ --enable-qt5 \
+ --with-jdk-home=$JAVA_HOME \
+ --with-ant-home=/usr/share/java/apache-ant \
+ --with-java
+
+ make build-nocheck
+}
+
+package() {
+ make DESTDIR="$PKG_DEST"/../all distro-pack-install
+}
+
+libreoffice_split() {
+ local i
+ grep "^[^% ]" $BUILD_ROOT/file-lists/${1}_list.txt | sort -u | while IFS= read -r i; do
+ [ "$i" ] || continue
+ dirname="$(dirname $i)"
+ [ -d "$PKG_DEST/$dirname" ] || install -dm755 "$PKG_DEST/$dirname"
+ add_from_main $i
+ done
+}
diff --git a/skip/libreoffice/linux-musl.patch b/skip/libreoffice/linux-musl.patch
new file mode 100644
index 0000000..9e192bc
--- /dev/null
+++ b/skip/libreoffice/linux-musl.patch
@@ -0,0 +1,60 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -612,7 +612,7 @@
+ fi
+ ;;
+
+-linux-gnu*|k*bsd*-gnu*)
++linux-gnu*|linux-musl*|k*bsd*-gnu*)
+ using_freetype_fontconfig=yes
+ using_x11=yes
+ build_skia=yes
+@@ -4353,7 +4353,7 @@
+ esac
+ ;;
+
+-linux-gnu*)
++linux-gnu*|linux-musl*)
+ COM=GCC
+ USING_X11=TRUE
+ OS=LINUX
+@@ -7672,7 +7672,7 @@
+ test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+ ;;
+
+- linux-gnu*)
++ linux-gnu*|linux-musl*)
+ JAVAINC="-I$JAVA_HOME/include"
+ JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
+ test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+@@ -10260,21 +10260,6 @@
+ AC_SUBST(ENABLE_LIBNUMBERTEXT)
+ AC_SUBST(LIBNUMBERTEXT_CFLAGS)
+
+-dnl ***************************************
+-dnl testing libc version for Linux...
+-dnl ***************************************
+-if test "$_os" = "Linux"; then
+- AC_MSG_CHECKING([whether libc is >= 2.1.1])
+- exec 6>/dev/null # no output
+- AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
+- exec 6>&1 # output on again
+- if test "$HAVE_LIBC"; then
+- AC_MSG_RESULT([yes])
+- else
+- AC_MSG_ERROR([no, upgrade libc])
+- fi
+-fi
+-
+ dnl =========================================
+ dnl Check for uuidgen
+ dnl =========================================
+@@ -12812,7 +12812,7 @@
+
+ case "$host_os" in
+
+- aix*|dragonfly*|freebsd*|linux-gnu*|*netbsd*|openbsd*)
++ aix*|dragonfly*|freebsd*|linux-gnu*|linux-musl*|*netbsd*|openbsd*)
+ if test "$ENABLE_JAVA" != ""; then
+ pathmunge "$JAVA_HOME/bin" "after"
+ fi
diff --git a/skip/libreoffice/musl-libintl.patch b/skip/libreoffice/musl-libintl.patch
new file mode 100644
index 0000000..ceaaaff
--- /dev/null
+++ b/skip/libreoffice/musl-libintl.patch
@@ -0,0 +1,15 @@
+diff --git a/unotools/Library_utl.mk b/unotools/Library_utl.mk
+index 0bfcbad..99acee1 100644
+--- a/unotools/Library_utl.mk
++++ b/unotools/Library_utl.mk
+@@ -16,6 +16,10 @@ $(eval $(call gb_Library_use_externals,utl,\
+ boost_locale \
+ ))
+
++$(eval $(call gb_Library_add_libs,utl,\
++ -lintl \
++))
++
+ $(eval $(call gb_Library_use_custom_headers,utl,\
+ officecfg/registry \
+ ))
diff --git a/skip/libreoffice/musl-stacksize.patch b/skip/libreoffice/musl-stacksize.patch
new file mode 100644
index 0000000..5e72205
--- /dev/null
+++ b/skip/libreoffice/musl-stacksize.patch
@@ -0,0 +1,40 @@
+--- a/sal/osl/unx/thread.cxx
++++ b/sal/osl/unx/thread.cxx
+@@ -250,7 +250,7 @@
+ short nFlags)
+ {
+ Thread_Impl* pImpl;
+-#if defined OPENBSD || ((defined MACOSX || defined LINUX) && !ENABLE_RUNTIME_OPTIMIZATIONS)
++#if defined OPENBSD || ((defined MACOSX || defined LINUX) && !ENABLE_RUNTIME_OPTIMIZATIONS) || (defined LINUX && !defined __GLIBC__)
+ pthread_attr_t attr;
+ size_t stacksize;
+ #endif
+
+@@ -266,7 +266,7 @@
+
+ pthread_mutex_lock (&(pImpl->m_Lock));
+
+-#if defined OPENBSD || ((defined MACOSX || defined LINUX) && !ENABLE_RUNTIME_OPTIMIZATIONS)
++#if defined OPENBSD || ((defined MACOSX || defined LINUX) && !ENABLE_RUNTIME_OPTIMIZATIONS) || (defined LINUX && !defined __GLIBC__)
+ if (pthread_attr_init(&attr) != 0)
+ return nullptr;
+
+@@ -283,7 +283,7 @@
+
+ if ((nRet = pthread_create (
+ &(pImpl->m_hThread),
+-#if defined OPENBSD || ((defined MACOSX || defined LINUX) && !ENABLE_RUNTIME_OPTIMIZATIONS)
++#if defined OPENBSD || ((defined MACOSX || defined LINUX) && !ENABLE_RUNTIME_OPTIMIZATIONS) || (defined LINUX && !defined __GLIBC__)
+ &attr,
+ #else
+ PTHREAD_ATTR_DEFAULT,
+
+@@ -301,7 +301,7 @@
+ return nullptr;
+ }
+
+-#if defined OPENBSD || ((defined MACOSX || defined LINUX) && !ENABLE_RUNTIME_OPTIMIZATIONS)
++#if defined OPENBSD || ((defined MACOSX || defined LINUX) && !ENABLE_RUNTIME_OPTIMIZATIONS) || (defined LINUX && !defined __GLIBC__)
+ pthread_attr_destroy(&attr);
+ #endif
+
diff --git a/skip/libreoffice/pld-skia-patches.patch b/skip/libreoffice/pld-skia-patches.patch
new file mode 100644
index 0000000..b54dfe4
--- /dev/null
+++ b/skip/libreoffice/pld-skia-patches.patch
@@ -0,0 +1,10 @@
+--- libreoffice-7.2.2.2/external/skia/UnpackedTarball_skia.mk.orig 2021-08-10 19:27:48.000000000 +0200
++++ libreoffice-7.2.2.2/external/skia/UnpackedTarball_skia.mk 2021-08-12 18:09:22.813517161 +0200
+@@ -41,6 +41,7 @@
+ fix-warnings.patch.1 \
+ disable-freetype-colrv1.1 \
+ windows-libraries-system32.patch.1 \
++ skia-freetype2.11.patch \
+
+ $(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
+
diff --git a/skip/libreoffice/poppler-22.03.patch b/skip/libreoffice/poppler-22.03.patch
new file mode 100644
index 0000000..daa16a2
--- /dev/null
+++ b/skip/libreoffice/poppler-22.03.patch
@@ -0,0 +1,39 @@
+Patch-Source: https://github.com/archlinux/svntogit-packages/blob/2c89c1f968a5f8a6f260a4b91f19f43fae433520/trunk/poppler-22.03.0.patch
+edited to add <memory> import
+diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+index ad6320139..e5f6d9c68 100644
+--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
++++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+@@ -28,6 +28,8 @@
+ #include <config_folders.h> //LIBO_SHARE_FOLDER
+ #endif
+
++#include <memory>
++
+ FILE* g_binary_out=stderr;
+
+ static const char *ownerPassword = "\001";
+@@ -138,6 +138,15 @@ int main(int argc, char **argv)
+ _setmode( _fileno( g_binary_out ), _O_BINARY );
+ #endif
+
++#if POPPLER_CHECK_VERSION(22, 3, 0)
++ PDFDoc aDoc( std::make_unique<GooString>(pFileName),
++ GooString(pOwnerPasswordStr),
++ GooString(pUserPasswordStr) );
++
++ PDFDoc aErrDoc( std::make_unique<GooString>(pErrFileName),
++ GooString(pOwnerPasswordStr),
++ GooString(pUserPasswordStr) );
++#else
+ PDFDoc aDoc( pFileName,
+ pOwnerPasswordStr,
+ pUserPasswordStr );
+@@ -145,6 +154,7 @@ int main(int argc, char **argv)
+ PDFDoc aErrDoc( pErrFileName,
+ pOwnerPasswordStr,
+ pUserPasswordStr );
++#endif
+
+ // Check various permissions for aDoc.
+ PDFDoc &rDoc = aDoc.isOk()? aDoc: aErrDoc;
diff --git a/skip/libreoffice/remove-backtrace.patch b/skip/libreoffice/remove-backtrace.patch
new file mode 100644
index 0000000..f4eda53
--- /dev/null
+++ b/skip/libreoffice/remove-backtrace.patch
@@ -0,0 +1,163 @@
+diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
+index d783c84e3..555efd664 100644
+--- a/sal/Library_sal.mk
++++ b/sal/Library_sal.mk
+@@ -156,7 +156,6 @@ endif
+
+ ifneq ($(OS),WNT)
+ $(eval $(call gb_Library_add_exception_objects,sal,\
+- sal/osl/unx/backtraceapi \
+ sal/osl/unx/conditn \
+ sal/osl/unx/file \
+ sal/osl/unx/file_error_transl \
+diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
+index c493f4ddf..f8f4fab62 100644
+--- a/sal/osl/all/log.cxx
++++ b/sal/osl/all/log.cxx
+@@ -283,9 +283,6 @@ void sal_detail_log(
+ ? nStrLen : 0));
+ }
+ s << message;
+- if (backtraceDepth != 0) {
+- s << " at:\n" << osl::detail::backtraceAsString(backtraceDepth);
+- }
+
+ #if defined ANDROID
+ int android_log_level;
+diff --git a/sal/osl/unx/backtraceapi.cxx b/sal/osl/unx/backtraceapi.cxx
+deleted file mode 100644
+index d11128353..000000000
+--- a/sal/osl/unx/backtraceapi.cxx
++++ /dev/null
+@@ -1,72 +0,0 @@
+-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+-/*
+- * This file is part of the LibreOffice project.
+- *
+- * This Source Code Form is subject to the terms of the Mozilla Public
+- * License, v. 2.0. If a copy of the MPL was not distributed with this
+- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+- */
+-
+-#include <sal/config.h>
+-
+-#include <cassert>
+-#include <cstdlib>
+-#include <limits>
+-#include <memory>
+-
+-#include <o3tl/runtimetooustring.hxx>
+-#include <rtl/ustrbuf.hxx>
+-#include <rtl/ustring.hxx>
+-#include <sal/types.h>
+-#include <sal/backtrace.hxx>
+-
+-#include "backtrace.h"
+-#include <backtraceasstring.hxx>
+-
+-namespace {
+-
+-struct FreeGuard {
+- FreeGuard(char ** theBuffer): buffer(theBuffer) {}
+-
+- ~FreeGuard() { std::free(buffer); }
+-
+- char ** buffer;
+-};
+-
+-}
+-
+-OUString osl::detail::backtraceAsString(sal_uInt32 maxDepth) {
+- std::unique_ptr<sal::BacktraceState> backtrace = sal::backtrace_get( maxDepth );
+- return sal::backtrace_to_string( backtrace.get());
+-}
+-
+-std::unique_ptr<sal::BacktraceState> sal::backtrace_get(sal_uInt32 maxDepth)
+-{
+- assert(maxDepth != 0);
+- auto const maxInt = static_cast<unsigned int>(
+- std::numeric_limits<int>::max());
+- if (maxDepth > maxInt) {
+- maxDepth = static_cast<sal_uInt32>(maxInt);
+- }
+- auto b1 = new void *[maxDepth];
+- int n = backtrace(b1, static_cast<int>(maxDepth));
+- return std::unique_ptr<BacktraceState>(new BacktraceState{ b1, n });
+-}
+-
+-OUString sal::backtrace_to_string(BacktraceState* backtraceState)
+-{
+- FreeGuard b2(backtrace_symbols(backtraceState->buffer, backtraceState->nDepth));
+- if (b2.buffer == nullptr) {
+- return OUString();
+- }
+- OUStringBuffer b3;
+- for (int i = 0; i != backtraceState->nDepth; ++i) {
+- if (i != 0) {
+- b3.append("\n");
+- }
+- b3.append(o3tl::runtimeToOUString(b2.buffer[i]));
+- }
+- return b3.makeStringAndClear();
+-}
+-
+-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+diff --git a/svl/source/notify/lstner.cxx b/svl/source/notify/lstner.cxx
+index 40a59960a..3efcc004c 100644
+--- a/svl/source/notify/lstner.cxx
++++ b/svl/source/notify/lstner.cxx
+@@ -80,13 +80,6 @@ void SfxListener::StartListening(SfxBroadcaster& rBroadcaster, DuplicateHandling
+ {
+ bool bListeningAlready = IsListening( rBroadcaster );
+
+-#ifdef DBG_UTIL
+- if (bListeningAlready && eDuplicateHanding == DuplicateHandling::Unexpected)
+- {
+- auto f = maCallStacks.find( &rBroadcaster );
+- SAL_WARN("svl", "previous StartListening call came from: " << sal::backtrace_to_string(f->second.get()));
+- }
+-#endif
+ assert(!(bListeningAlready && eDuplicateHanding == DuplicateHandling::Unexpected) && "duplicate listener, try building with DBG_UTIL to find the other insert site.");
+
+ if (!bListeningAlready || eDuplicateHanding != DuplicateHandling::Prevent)
+diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
+index 3f4253cd2..8af3ee184 100644
+--- a/sw/source/core/attr/calbck.cxx
++++ b/sw/source/core/attr/calbck.cxx
+@@ -170,18 +170,6 @@ bool SwModify::GetInfo( SfxPoolItem& rInfo ) const
+ void SwModify::Add( SwClient* pDepend )
+ {
+ DBG_TESTSOLARMUTEX();
+-#ifdef DBG_UTIL
+- // You should not EVER use SwModify directly in new code:
+- // - Preexisting SwModifys should only ever be used via sw::BroadcastingModify.
+- // This includes sw::BroadcastMixin, which is the long-term target (without
+- // SwModify).
+- // - New classes should use sw::BroadcastMixin alone.
+- if(!dynamic_cast<sw::BroadcastingModify*>(this))
+- {
+- auto pBT = sal::backtrace_get(20);
+- SAL_WARN("sw.core", "Modify that is not broadcasting used!\n" << sal::backtrace_to_string(pBT.get()));
+- }
+-#endif
+
+ if(pDepend->m_pRegisteredIn == this)
+ return;
+diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
+index 4f7b18ba3..fbd2eb361 100644
+--- a/sw/source/core/docnode/node.cxx
++++ b/sw/source/core/docnode/node.cxx
+@@ -1164,13 +1164,6 @@ void SwContentNode::SwClientNotify( const SwModify&, const SfxHint& rHint)
+ // This makes the crude "WhichId" type divert from the true type, which is bad.
+ // Thus we are asserting here, but falling back to an proper
+ // hint instead. so that we at least will not spread such poison further.
+-#ifdef DBG_UTIL
+- if(pLegacyHint->m_pNew != pLegacyHint->m_pOld)
+- {
+- auto pBT = sal::backtrace_get(20);
+- SAL_WARN("sw.core", "UpdateAttr not matching! " << sal::backtrace_to_string(pBT.get()));
+- }
+-#endif
+ assert(pLegacyHint->m_pNew == pLegacyHint->m_pOld);
+ assert(dynamic_cast<const SwUpdateAttr*>(pLegacyHint->m_pNew));
+ const SwUpdateAttr aFallbackHint(0,0,0);
diff --git a/skip/libreoffice/skia-freetype2.11.diff b/skip/libreoffice/skia-freetype2.11.diff
new file mode 100644
index 0000000..97be7f2
--- /dev/null
+++ b/skip/libreoffice/skia-freetype2.11.diff
@@ -0,0 +1,37 @@
+--- skia/src/ports/SkFontHost_FreeType_common.cpp.orig 2021-03-01 15:53:09.178606791 +0100
++++ skia/src/ports/SkFontHost_FreeType_common.cpp 2021-08-12 17:48:32.358901987 +0200
+@@ -665,8 +665,13 @@
+ canvas->drawPaint(paint);
+ break;
+ }
++#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
++ case FT_COLR_PAINTFORMAT_TRANSFORM: {
++ SkMatrix transform = ToSkMatrix(colrv1_paint.u.transform.affine);
++#else
+ case FT_COLR_PAINTFORMAT_TRANSFORMED: {
+ SkMatrix transform = ToSkMatrix(colrv1_paint.u.transformed.affine);
++#endif
+
+ canvas->concat(transform);
+ break;
+@@ -760,12 +765,20 @@
+ traverse_result = colrv1_start_glyph(canvas, palette, face, paint.u.colr_glyph.glyphID,
+ FT_COLOR_NO_ROOT_TRANSFORM);
+ break;
++#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
++ case FT_COLR_PAINTFORMAT_TRANSFORM:
++#else
+ case FT_COLR_PAINTFORMAT_TRANSFORMED:
++#endif
+ canvas->saveLayer(nullptr, nullptr);
+ // Traverse / draw operation will apply transform.
+ colrv1_draw_paint(canvas, palette, face, paint);
+ traverse_result =
++#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
++ colrv1_traverse_paint(canvas, palette, face, paint.u.transform.paint);
++#else
+ colrv1_traverse_paint(canvas, palette, face, paint.u.transformed.paint);
++#endif
+ canvas->restore();
+ break;
+ case FT_COLR_PAINTFORMAT_ROTATE:
diff --git a/skip/lsp-plugins/lsp-plugins.xibuild b/skip/lsp-plugins/lsp-plugins.xibuild
new file mode 100644
index 0000000..6f494b9
--- /dev/null
+++ b/skip/lsp-plugins/lsp-plugins.xibuild
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+NAME="lsp-plugins"
+DESC="Collection of free plugins compatible with LADSPA, LV2 and LinuxVST"
+
+MAKEDEPS="cairo jack ladspa libsndfile libxrandr lv2 mesa"
+
+PKG_VER=1.2.3
+SOURCE="https://github.com/sadko4u/lsp-plugins/releases/download/$PKG_VER/lsp-plugins-src-$PKG_VER.tar.gz"
+
+ADDITIONAL="
+null.patch
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ export CFLAGS="$CFLAGS -O2 -flto=auto -Wno-alloc-size-larger-than"
+ export CXXFLAGS="$CFLAGS -O2 -flto=auto -Wno-alloc-size-larger-than"
+ make \
+ PREFIX=/usr \
+ ADD_FEATURES=xdg \
+ config
+ make PREFIX=/usr
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" PREFIX=/usr install
+}
+
diff --git a/skip/lsp-plugins/null.patch b/skip/lsp-plugins/null.patch
new file mode 100644
index 0000000..6521e1f
--- /dev/null
+++ b/skip/lsp-plugins/null.patch
@@ -0,0 +1,13 @@
+diff --git a/modules/lsp-plugin-fw/include/lsp-plug.in/plug-fw/wrap/common/libpath.h b/modules/lsp-plugin-fw/include/lsp-plug.in/plug-fw/wrap/common/libpath.h
+index 9571a2e..2c484df 100644
+--- a/modules/lsp-plugin-fw/include/lsp-plug.in/plug-fw/wrap/common/libpath.h
++++ b/modules/lsp-plugin-fw/include/lsp-plug.in/plug-fw/wrap/common/libpath.h
+@@ -241,7 +241,7 @@ namespace lsp
+ // Open file for reading
+ FILE *fd = fopen("/proc/self/maps", "r");
+ if (fd == NULL)
+- return NULL;
++ return false;
+
+ char *line = NULL;
+ ssize_t len = 0;
diff --git a/skip/luakit/luakit.xibuild b/skip/luakit/luakit.xibuild
new file mode 100644
index 0000000..25d4b13
--- /dev/null
+++ b/skip/luakit/luakit.xibuild
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+NAME="luakit"
+DESC="Fast, small, webkit based browser framework extensible by Lua"
+
+MAKEDEPS="webkit2gtk luajit"
+
+PKG_VER=2.3
+SOURCE="https://github.com/luakit/luakit/archive/$PKG_VER.tar.gz"
+
+build() {
+ make PREFIX=/usr USE_LUAJIT=1 DEVELOPMENT_PATHS=0
+}
+
+check() {
+ make run-tests
+}
+
+package() {
+ make PREFIX=/usr DESTDIR="$PKG_DEST" install
+ mkdir -p "$PKG_DEST"/usr/share/doc/"luakit"
+ mv "$PKG_DEST"/usr/share/"luakit"/doc/* "$PKG_DEST"/usr/share/doc/"luakit"
+ rmdir "$PKG_DEST"/usr/share/"luakit"/doc
+}
+
diff --git a/skip/mingw-w64-gcc/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch b/skip/mingw-w64-gcc/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch
new file mode 100644
index 0000000..fc60b54
--- /dev/null
+++ b/skip/mingw-w64-gcc/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch
@@ -0,0 +1,53 @@
+From 05b0bb43124b041da360ba9adcbaab8430be6d18 Mon Sep 17 00:00:00 2001
+From: Liu Hao <lh_mouse@126.com>
+Date: Wed, 6 May 2020 21:49:18 +0800
+Subject: [PATCH] libgomp: Don't hard-code MS printf attributes
+
+---
+ libgomp/libgomp.h | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
+index c98c1452bd4..0cc8443f6c2 100644
+--- a/libgomp/libgomp.h
++++ b/libgomp/libgomp.h
+@@ -69,6 +69,13 @@
+ # endif
+ #endif
+
++#include <stdio.h>
++#ifdef __MINGW_PRINTF_FORMAT
++#define PRINTF_FORMAT __MINGW_PRINTF_FORMAT
++#else
++#define PRINTF_FORMAT printf
++#endif
++
+ #ifdef HAVE_ATTRIBUTE_VISIBILITY
+ # pragma GCC visibility push(hidden)
+ #endif
+@@ -180,7 +187,7 @@ extern void gomp_aligned_free (void *);
+
+ extern void gomp_vdebug (int, const char *, va_list);
+ extern void gomp_debug (int, const char *, ...)
+- __attribute__ ((format (printf, 2, 3)));
++ __attribute__ ((format (PRINTF_FORMAT, 2, 3)));
+ #define gomp_vdebug(KIND, FMT, VALIST) \
+ do { \
+ if (__builtin_expect (gomp_debug_var, 0)) \
+@@ -193,11 +200,11 @@ extern void gomp_debug (int, const char *, ...)
+ } while (0)
+ extern void gomp_verror (const char *, va_list);
+ extern void gomp_error (const char *, ...)
+- __attribute__ ((format (printf, 1, 2)));
++ __attribute__ ((format (PRINTF_FORMAT, 1, 2)));
+ extern void gomp_vfatal (const char *, va_list)
+ __attribute__ ((noreturn));
+ extern void gomp_fatal (const char *, ...)
+- __attribute__ ((noreturn, format (printf, 1, 2)));
++ __attribute__ ((noreturn, format (PRINTF_FORMAT, 1, 2)));
+
+ struct gomp_task;
+ struct gomp_taskgroup;
+--
+2.26.2
+
diff --git a/skip/mingw-w64-gcc/mingw-w64-gcc.xibuild b/skip/mingw-w64-gcc/mingw-w64-gcc.xibuild
new file mode 100644
index 0000000..285a7cb
--- /dev/null
+++ b/skip/mingw-w64-gcc/mingw-w64-gcc.xibuild
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+NAME="mingw-w64-gcc"
+DESC="Cross GCC for the MinGW-w64 cross-compiler"
+
+MAKEDEPS=" zlib mpc1 gmp mpfr"
+
+PKG_VER=12.2.0
+SOURCE="https://ftp.gnu.org/gnu/gcc/gcc-$PKG_VER/gcc-$PKG_VER.tar.xz"
+
+islver=0.25
+
+ADDITIONAL="
+http://libisl.sourceforge.io/isl-$islver.tar.bz2
+0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch
+"
+target="x86_64-w64-mingw32"
+
+prepare() {
+ apply_patches
+
+ # link isl for in-tree builds
+ tar xf isl-$islver.tar.bz2
+ ln -sf isl-$islver isl
+
+ mkdir -p "$_gccdir"
+}
+
+build() {
+ export CFLAGS="$CFLAGS -O2"
+ export CXXFLAGS="$CXXFLAGS -O2"
+ export CPPFLAGS="$CPPFLAGS -O2"
+ "$BUILD_ROOT"/configure \
+ --prefix=/usr \
+ --target=$target \
+ --libexecdir=/usr/libexec \
+ --disable-dw2-exceptions \
+ --disable-multilib \
+ --disable-nls \
+ --disable-sjlj-exceptions \
+ --disable-werror \
+ --enable-checking=release \
+ --enable-cloog-backend=isl \
+ --enable-fully-dynamic-string \
+ --enable-languages=c,lto,c++ \
+ --enable-libgomp \
+ --enable-libstdcxx-time=yes \
+ --enable-lto \
+ --enable-shared \
+ --enable-static \
+ --enable-threads=posix \
+ --with-system-zlib
+ make
+}
+
+package() {
+ cd "$_gccdir"
+ make DESTDIR="$PKG_DEST" install
+
+ #$target-strip "$PKG_DEST"/usr/$target/lib/*.dll
+
+ ln -s $target-gcc "$PKG_DEST"/usr/bin/$target-cc
+
+ # Move DLLs
+ mkdir -p "$PKG_DEST"/usr/$target/bin
+ mv "$PKG_DEST"/usr/$target/lib/*.dll "$PKG_DEST"/usr/$target/bin
+
+ # Unnecessary files
+ rm -rf "$PKG_DEST"/usr/share
+ rm "$PKG_DEST"/usr/lib/libcc1.*
+}
+
diff --git a/skip/pandoc/cabal.config b/skip/pandoc/cabal.config
new file mode 100644
index 0000000..19f0515
--- /dev/null
+++ b/skip/pandoc/cabal.config
@@ -0,0 +1,223 @@
+--2.19.1
+constraints: Cabal ==3.4.1.0,
+ Glob ==0.10.2,
+ HUnit ==1.6.2.0,
+ HsYAML ==0.2.1.1,
+ JuicyPixels ==3.3.8,
+ OneTuple ==0.3.1,
+ QuickCheck ==2.14.2,
+ SHA ==1.6.4.4,
+ StateVar ==1.2.2,
+ aeson ==2.1.0.0,
+ aeson-pretty ==0.8.9,
+ ansi-terminal ==0.11.3,
+ ansi-wl-pprint ==0.6.9,
+ appar ==0.1.8,
+ array ==0.5.4.0,
+ asn1-encoding ==0.9.6,
+ asn1-parse ==0.9.5,
+ asn1-types ==0.3.4,
+ assoc ==1.0.2,
+ async ==2.2.4,
+ attoparsec ==0.14.4,
+ attoparsec-iso8601 ==1.0.2.1,
+ auto-update ==0.1.6,
+ base ==4.15.1.0,
+ base-compat ==0.12.2,
+ base-compat-batteries ==0.12.2,
+ base-orphans ==0.8.7,
+ base16-bytestring ==1.0.2.0,
+ base64 ==0.4.2.4,
+ base64-bytestring ==1.2.1.0,
+ basement ==0.0.15,
+ bifunctors ==5.5.12,
+ binary ==0.8.8.0,
+ bitvec ==1.1.3.0,
+ blaze-builder ==0.4.2.2,
+ blaze-html ==0.9.1.2,
+ blaze-markup ==0.8.2.8,
+ boring ==0.2,
+ bsb-http-chunked ==0.0.0.4,
+ byteorder ==1.0.4,
+ bytestring ==0.10.12.1,
+ cabal-doctest ==1.0.9,
+ call-stack ==0.4.0,
+ case-insensitive ==1.2.1.0,
+ cereal ==0.5.8.3,
+ citeproc ==0.8.0.1,
+ cmdargs ==0.10.21,
+ colour ==2.3.6,
+ commonmark ==0.2.2,
+ commonmark-extensions ==0.2.3.2,
+ commonmark-pandoc ==0.2.1.2,
+ comonad ==5.0.8,
+ conduit ==1.3.4.2,
+ conduit-extra ==1.3.6,
+ connection ==0.3.1,
+ constraints ==0.13.4,
+ containers ==0.6.4.1,
+ contravariant ==1.5.5,
+ cookie ==0.4.5,
+ cryptonite ==0.30,
+ data-default ==0.7.1.1,
+ data-default-class ==0.1.2.0,
+ data-default-instances-containers ==0.0.1,
+ data-default-instances-dlist ==0.0.1,
+ data-default-instances-old-locale ==0.0.1,
+ data-fix ==0.3.2,
+ dec ==0.0.5,
+ deepseq ==1.4.5.0,
+ digest ==0.0.1.3,
+ directory ==1.3.6.2,
+ distributive ==0.6.2.1,
+ dlist ==1.0,
+ doclayout ==0.4,
+ doctemplates ==0.10.0.2,
+ easy-file ==0.2.2,
+ emojis ==0.1.2,
+ exceptions ==0.10.4,
+ fast-logger ==3.1.1,
+ file-embed ==0.0.15.0,
+ filepath ==1.4.2.1,
+ generically ==0.1,
+ ghc-bignum ==1.1,
+ ghc-boot-th ==9.0.2,
+ ghc-prim ==0.7.0,
+ gridtables ==0.0.3.0,
+ haddock-library ==1.11.0,
+ happy ==1.20.0,
+ hashable ==1.4.1.0,
+ haskell-lexer ==1.1,
+ hourglass ==0.2.12,
+ hsc2hs ==0.68.8,
+ hslua ==2.2.1,
+ hslua-aeson ==2.2.1,
+ hslua-classes ==2.2.0,
+ hslua-core ==2.2.1,
+ hslua-marshalling ==2.2.1,
+ hslua-module-doclayout ==1.0.4,
+ hslua-module-path ==1.0.3,
+ hslua-module-system ==1.0.2,
+ hslua-module-text ==1.0.2,
+ hslua-module-version ==1.0.2,
+ hslua-objectorientation ==2.2.1,
+ hslua-packaging ==2.2.1,
+ http-api-data ==0.4.3,
+ http-client ==0.7.13.1,
+ http-client-tls ==0.3.6.1,
+ http-date ==0.0.11,
+ http-media ==0.8.0.0,
+ http-types ==0.12.3,
+ http2 ==3.0.3,
+ indexed-traversable ==0.1.2,
+ indexed-traversable-instances ==0.1.1.1,
+ integer-gmp ==1.1,
+ integer-logarithms ==1.0.3.1,
+ iproute ==1.7.12,
+ ipynb ==0.2,
+ jira-wiki-markup ==1.4.0,
+ libyaml ==0.1.2,
+ lpeg ==1.0.3,
+ lua ==2.2.1,
+ memory ==0.17.0,
+ mime-types ==0.1.0.9,
+ mmorph ==1.2.0,
+ monad-control ==1.0.3.1,
+ mono-traversable ==1.0.15.3,
+ mtl ==2.2.2,
+ network ==3.1.2.7,
+ network-byte-order ==0.1.6,
+ network-uri ==2.6.4.1,
+ old-locale ==1.0.0.7,
+ old-time ==1.1.0.3,
+ optparse-applicative ==0.17.0.0,
+ pandoc-lua-marshal ==0.1.7,
+ pandoc-types ==1.22.2.1,
+ parsec ==3.1.14.0,
+ pem ==0.2.4,
+ pretty ==1.1.3.6,
+ pretty-show ==1.10,
+ primitive ==0.7.4.0,
+ process ==1.6.13.2,
+ psqueues ==0.2.7.3,
+ random ==1.2.1.1,
+ resourcet ==1.2.6,
+ rts ==1.0.2,
+ safe ==0.3.19,
+ scientific ==0.3.7.0,
+ semialign ==1.2.0.1,
+ semigroupoids ==5.3.7,
+ servant ==0.19,
+ servant-server ==0.19.1,
+ simple-sendfile ==0.2.30,
+ singleton-bool ==0.1.6,
+ skylighting ==0.13,
+ skylighting-core ==0.13,
+ skylighting-format-ansi ==0.1,
+ skylighting-format-blaze-html ==0.1,
+ skylighting-format-latex ==0.1,
+ socks ==0.6.1,
+ some ==1.0.4,
+ sop-core ==0.5.0.2,
+ split ==0.2.3.5,
+ splitmix ==0.1.0.4,
+ stm ==2.5.0.0,
+ streaming-commons ==0.2.2.4,
+ strict ==0.4.0.1,
+ string-conversions ==0.4.0.1,
+ syb ==0.7.2.1,
+ tagged ==0.8.6.1,
+ tagsoup ==0.14.8,
+ template-haskell ==2.17.0.0,
+ temporary ==1.3,
+ texmath ==0.12.5.2,
+ text ==1.2.5.0,
+ text-conversions ==0.3.1.1,
+ text-short ==0.1.5,
+ th-abstraction ==0.4.4.0,
+ th-compat ==0.1.4,
+ th-lift ==0.8.2,
+ th-lift-instances ==0.1.19,
+ these ==1.1.1.1,
+ time ==1.9.3,
+ time-compat ==1.9.6.1,
+ time-manager ==0.0.0,
+ tls ==1.6.0,
+ transformers ==0.5.6.2,
+ transformers-base ==0.4.6,
+ transformers-compat ==0.7.2,
+ type-equality ==1,
+ typed-process ==0.2.10.1,
+ unicode-collation ==0.1.3.2,
+ unicode-data ==0.3.0,
+ unicode-transforms ==0.4.0.1,
+ uniplate ==1.6.13,
+ unix ==2.7.2.2,
+ unix-compat ==0.6,
+ unix-time ==0.4.7,
+ unliftio ==0.2.22.0,
+ unliftio-core ==0.2.0.1,
+ unordered-containers ==0.2.19.1,
+ utf8-string ==1.0.2,
+ uuid-types ==1.0.5,
+ vault ==0.3.1.5,
+ vector ==0.13.0.0,
+ vector-algorithms ==0.9.0.1,
+ vector-stream ==0.1.0.0,
+ wai ==3.2.3,
+ wai-app-static ==3.1.7.4,
+ wai-extra ==3.1.12.1,
+ wai-logger ==2.4.0,
+ warp ==3.3.22,
+ witherable ==0.4.2,
+ word8 ==0.1.3,
+ x509 ==1.7.7,
+ x509-store ==1.6.9,
+ x509-system ==1.6.7,
+ x509-validation ==1.6.12,
+ xml ==1.3.14,
+ xml-conduit ==1.9.1.1,
+ xml-types ==0.3.8,
+ yaml ==0.11.8.0,
+ zip-archive ==0.4.2.1,
+ zlib ==0.6.3.0
diff --git a/skip/pandoc/cabal.project.freeze b/skip/pandoc/cabal.project.freeze
deleted file mode 100644
index c532ee0..0000000
--- a/skip/pandoc/cabal.project.freeze
+++ /dev/null
@@ -1,249 +0,0 @@
-active-repositories: hackage.haskell.org:merge
-constraints: any.Cabal ==3.4.0.0,
- any.Diff ==0.4.0,
- any.Glob ==0.10.2,
- any.HsYAML ==0.2.1.0,
- HsYAML -exe,
- any.JuicyPixels ==3.3.6,
- JuicyPixels -mmap,
- any.OneTuple ==0.3.1,
- any.QuickCheck ==2.14.2,
- QuickCheck -old-random +templatehaskell,
- any.SHA ==1.6.4.4,
- SHA -exe,
- any.StateVar ==1.2.2,
- any.aeson ==2.0.2.0,
- aeson -bytestring-builder -cffi +ordered-keymap,
- any.aeson-pretty ==0.8.9,
- aeson-pretty -lib-only,
- any.ansi-terminal ==0.11.1,
- ansi-terminal -example,
- any.ansi-wl-pprint ==0.6.9,
- ansi-wl-pprint -example,
- any.appar ==0.1.8,
- any.array ==0.5.4.0,
- any.asn1-encoding ==0.9.6,
- any.asn1-parse ==0.9.5,
- any.asn1-types ==0.3.4,
- any.assoc ==1.0.2,
- any.async ==2.2.4,
- async -bench,
- any.attoparsec ==0.14.3,
- attoparsec -developer,
- any.base ==4.15.0.0,
- any.base-compat ==0.12.1,
- any.base-compat-batteries ==0.12.1,
- any.base-orphans ==0.8.6,
- any.base16-bytestring ==1.0.2.0,
- any.base64-bytestring ==1.2.1.0,
- any.basement ==0.0.12,
- any.bifunctors ==5.5.11,
- bifunctors +semigroups +tagged,
- any.binary ==0.8.8.0,
- any.blaze-builder ==0.4.2.2,
- any.blaze-html ==0.9.1.2,
- any.blaze-markup ==0.8.2.8,
- any.byteorder ==1.0.4,
- any.bytestring ==0.10.12.1,
- any.cabal-doctest ==1.0.9,
- any.call-stack ==0.4.0,
- any.case-insensitive ==1.2.1.0,
- any.cereal ==0.5.8.2,
- cereal -bytestring-builder,
- any.citeproc ==0.6,
- citeproc -executable -icu,
- any.clock ==0.8.2,
- clock -llvm,
- any.cmdargs ==0.10.21,
- cmdargs +quotation -testprog,
- any.colour ==2.3.6,
- any.commonmark ==0.2.1.1,
- any.commonmark-extensions ==0.2.2.1,
- any.commonmark-pandoc ==0.2.1.1,
- any.comonad ==5.0.8,
- comonad +containers +distributive +indexed-traversable,
- any.conduit ==1.3.4.2,
- any.conduit-extra ==1.3.5,
- any.connection ==0.3.1,
- any.containers ==0.6.4.1,
- any.contravariant ==1.5.5,
- contravariant +semigroups +statevar +tagged,
- any.cookie ==0.4.5,
- any.cryptonite ==0.29,
- cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse +use_target_attributes,
- any.data-default ==0.7.1.1,
- any.data-default-class ==0.1.2.0,
- any.data-default-instances-containers ==0.0.1,
- any.data-default-instances-dlist ==0.0.1,
- any.data-default-instances-old-locale ==0.0.1,
- any.data-fix ==0.3.2,
- any.deepseq ==1.4.5.0,
- any.digest ==0.0.1.3,
- digest -bytestring-in-base,
- any.directory ==1.3.6.1,
- any.distributive ==0.6.2.1,
- distributive +semigroups +tagged,
- any.dlist ==1.0,
- dlist -werror,
- any.doclayout ==0.3.1.1,
- any.doctemplates ==0.10.0.1,
- any.emojis ==0.1.2,
- any.errors ==2.3.0,
- any.exceptions ==0.10.4,
- any.file-embed ==0.0.15.0,
- any.filepath ==1.4.2.1,
- any.ghc-bignum ==1.0,
- any.ghc-bignum-orphans ==0.1.1,
- any.ghc-boot-th ==9.0.1,
- any.ghc-prim ==0.7.0,
- any.haddock-library ==1.10.0,
- any.happy ==1.20.0,
- any.hashable ==1.4.0.1,
- hashable +containers +integer-gmp -random-initial-seed,
- any.haskell-lexer ==1.1,
- any.hourglass ==0.2.12,
- any.hsc2hs ==0.68.8,
- hsc2hs -in-ghc-tree,
- any.hslua ==2.0.1,
- any.hslua-classes ==2.0.0,
- any.hslua-core ==2.0.0.2,
- any.hslua-marshalling ==2.0.1,
- any.hslua-module-path ==1.0.0,
- any.hslua-module-system ==1.0.0,
- any.hslua-module-text ==1.0.0,
- any.hslua-module-version ==1.0.0,
- any.hslua-objectorientation ==2.0.1,
- any.hslua-packaging ==2.0.0,
- any.http-client ==0.7.9,
- http-client +network-uri,
- any.http-client-tls ==0.3.5.3,
- any.http-types ==0.12.3,
- any.indexed-traversable ==0.1.2,
- any.indexed-traversable-instances ==0.1.1,
- any.integer-gmp ==1.1,
- any.integer-logarithms ==1.0.3.1,
- integer-logarithms -check-bounds +integer-gmp,
- any.iproute ==1.7.12,
- any.ipynb ==0.1.0.2,
- any.jira-wiki-markup ==1.4.0,
- any.libyaml ==0.1.2,
- libyaml -no-unicode -system-libyaml,
- any.lpeg ==1.0.1,
- lpeg -rely-on-shared-lpeg-library,
- any.lua ==2.0.2,
- lua +allow-unsafe-gc -apicheck +export-dynamic +hardcode-reg-keys -lua_32bits -pkg-config -system-lua,
- any.memory ==0.16.0,
- memory +support_basement +support_bytestring +support_deepseq +support_foundation,
- any.mime-types ==0.1.0.9,
- any.mono-traversable ==1.0.15.3,
- any.mtl ==2.2.2,
- any.network ==3.1.2.5,
- network -devel,
- any.network-uri ==2.6.4.1,
- any.old-locale ==1.0.0.7,
- any.optparse-applicative ==0.16.1.0,
- optparse-applicative +process,
- pandoc +embed_data_files -trypandoc,
- any.pandoc-types ==1.22.1,
- any.parsec ==3.1.14.0,
- any.pem ==0.2.4,
- any.pretty ==1.1.3.6,
- any.pretty-show ==1.10,
- any.primitive ==0.7.3.0,
- any.process ==1.6.11.0,
- any.random ==1.2.1,
- any.resourcet ==1.2.4.3,
- any.rts ==1.0,
- any.safe ==0.3.19,
- any.scientific ==0.3.7.0,
- scientific -bytestring-builder -integer-simple,
- any.semialign ==1.2.0.1,
- semialign +semigroupoids,
- any.semigroupoids ==5.3.6,
- semigroupoids +comonad +containers +contravariant +distributive +tagged +unordered-containers,
- any.skylighting ==0.12.1,
- skylighting -executable,
- any.skylighting-core ==0.12.1,
- skylighting-core -executable,
- any.socks ==0.6.1,
- any.split ==0.2.3.4,
- any.splitmix ==0.1.0.4,
- splitmix -optimised-mixer,
- any.stm ==2.5.0.0,
- any.streaming-commons ==0.2.2.3,
- streaming-commons -use-bytestring-builder,
- any.strict ==0.4.0.1,
- strict +assoc,
- any.syb ==0.7.2.1,
- any.tagged ==0.8.6.1,
- tagged +deepseq +transformers,
- any.tagsoup ==0.14.8,
- any.tasty ==1.4.2.1,
- tasty +clock +unix,
- any.tasty-bench ==0.3.1,
- tasty-bench -debug +tasty,
- any.tasty-golden ==2.3.4,
- tasty-golden -build-example,
- any.tasty-hunit ==0.10.0.3,
- any.tasty-lua ==1.0.0,
- any.tasty-quickcheck ==0.10.2,
- any.template-haskell ==2.17.0.0,
- any.temporary ==1.3,
- any.texmath ==0.12.3.2,
- texmath -executable +network-uri,
- any.text ==1.2.4.1,
- any.text-conversions ==0.3.1,
- any.text-short ==0.1.4,
- text-short -asserts,
- any.th-abstraction ==0.4.3.0,
- any.th-compat ==0.1.3,
- any.th-lift ==0.8.2,
- any.th-lift-instances ==0.1.18,
- any.these ==1.1.1.1,
- these +assoc,
- any.time ==1.9.3,
- any.time-compat ==1.9.6.1,
- time-compat -old-locale,
- any.tls ==1.5.5,
- tls +compat -hans +network,
- any.transformers ==0.5.6.2,
- any.transformers-compat ==0.7.1,
- transformers-compat -five +five-three -four +generic-deriving +mtl -three -two,
- any.typed-process ==0.2.8.0,
- any.unbounded-delays ==0.1.1.1,
- any.unicode-collation ==0.1.3.1,
- unicode-collation -doctests -executable,
- any.unicode-data ==0.1.0.1,
- unicode-data -ucd2haskell,
- any.unicode-transforms ==0.3.8,
- unicode-transforms -bench-show -dev -has-icu -has-llvm -use-gauge,
- any.uniplate ==1.6.13,
- any.unix ==2.7.2.2,
- any.unix-compat ==0.5.3,
- unix-compat -old-time,
- any.unliftio-core ==0.2.0.1,
- any.unordered-containers ==0.2.16.0,
- unordered-containers -debug,
- any.utf8-string ==1.0.2,
- any.uuid-types ==1.0.5,
- any.vector ==0.12.3.1,
- vector +boundschecks -internalchecks -unsafechecks -wall,
- any.vector-algorithms ==0.8.0.4,
- vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks,
- any.wcwidth ==0.0.2,
- wcwidth -cli +split-base,
- any.witherable ==0.4.2,
- any.x509 ==1.7.5,
- any.x509-store ==1.6.7,
- any.x509-system ==1.6.6,
- any.x509-validation ==1.6.11,
- any.xml ==1.3.14,
- any.xml-conduit ==1.9.1.1,
- any.xml-types ==0.3.8,
- any.yaml ==0.11.7.0,
- yaml +no-examples +no-exe,
- any.zip-archive ==0.4.1,
- zip-archive -executable,
- any.zlib ==0.6.2.3,
- zlib -bundled-c-zlib -non-blocking-ffi -pkg-config
-index-state: hackage.haskell.org 2021-12-11T21:58:01Z
diff --git a/skip/pandoc/pandoc.xibuild b/skip/pandoc/pandoc.xibuild
index fd6988c..12d2406 100644
--- a/skip/pandoc/pandoc.xibuild
+++ b/skip/pandoc/pandoc.xibuild
@@ -3,36 +3,63 @@
NAME="pandoc"
DESC="universal markup converter"
-MAKEDEPS="cabal"
-DEPS="gmp libffi musl zlib "
+MAKEDEPS=" ghc cabal zlib libffi"
-PKG_VER=2.16.2
+PKG_VER=2.19.1
SOURCE="https://hackage.haskell.org/package/pandoc-$PKG_VER/pandoc-$PKG_VER.tar.gz"
-ADDITIONAL="cabal.project.freeze "
-prepare () {
- cp "$srcdir/cabal.project.freeze" .
+ADDITIONAL="
+cabal.config
+"
+
+cabal_update() {
+ echo "Freezing pandoc dependencies"
+
+ # Resolve deps and generate fresh cabal.config with version constraints.
+ cabal update
+ (
+ cd "$BUILD_ROOT"
+ cabal v1-freeze --shadow-installed-packages
+
+ # Add version tag at the first line.
+ sed -i "1i--$PKG_VER" "cabal.config"
+
+ mv "cabal.config" "$startdir/"
+ )
+}
+
+prepare() {
+ apply_patches
+
+ if [ "$(head -n 1 "$BUILD_ROOT/cabal.config")" != "--$PKG_VER" ]; then
+ die "Requirements file is outdated, run 'abuild cabal_update'"
+ fi
+
+ ln -sf "$BUILD_ROOT/cabal.config" "$BUILD_ROOT/cabal.project.freeze"
+}
+
+build() {
cabal update
+ cabal install --only-dependencies
cabal configure \
--prefix='/usr' \
--enable-tests \
--enable-split-sections \
--ghc-option="-split-sections" \
- --ghc-option="-j" \
- --ghc-option="-O1" \
--flags="+embed_data_files -trypandoc +static"
+ cabal build --jobs=${JOBS:-1}
}
-build () {
- cabal install --only-dependencies
- cabal build --jobs=${JOBS:-1}
+check() {
+ cabal test --jobs=${JOBS:-1}
}
-package () {
- bindir="$PKG_DEST/usr/bin"
- mkdir -p "$bindir"
+package() {
+ _bindir="$PKG_DEST/usr/bin"
+ mkdir -p "$_bindir"
cabal install \
- --installdir="$bindir" \
+ --installdir="$_bindir" \
--install-method=copy
install -Dm644 man/pandoc.1 "$PKG_DEST"/usr/share/man/man1/pandoc.1
}
+
diff --git a/skip/php8/.php8.xibuild.swp b/skip/php8/.php8.xibuild.swp
new file mode 100644
index 0000000..ffdb8e4
--- /dev/null
+++ b/skip/php8/.php8.xibuild.swp
Binary files differ
diff --git a/skip/php8/atomic-lsapi.patch b/skip/php8/atomic-lsapi.patch
new file mode 100644
index 0000000..39cf182
--- /dev/null
+++ b/skip/php8/atomic-lsapi.patch
@@ -0,0 +1,82 @@
+Patch-Source: https://github.com/php/php-src/pull/7997
+
+diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
+index 2208bbd47b..42dd320356 100644
+--- a/sapi/litespeed/lsapilib.c
++++ b/sapi/litespeed/lsapilib.c
+@@ -443,7 +443,7 @@ static void lsapi_close_connection(LSAPI_Request *pReq)
+ if (s_busy_workers)
+ __sync_fetch_and_sub(s_busy_workers, 1);
+ if (s_worker_status)
+- __sync_lock_test_and_set(&s_worker_status->m_state, LSAPI_STATE_IDLE);
++ __atomic_test_and_set(&s_worker_status->m_state, LSAPI_STATE_IDLE);
+ }
+
+
+@@ -1587,7 +1587,7 @@ int LSAPI_Accept_r( LSAPI_Request * pReq )
+ else
+ {
+ if (s_worker_status)
+- __sync_lock_test_and_set(&s_worker_status->m_state,
++ __atomic_test_and_set(&s_worker_status->m_state,
+ LSAPI_STATE_CONNECTED);
+ if (s_busy_workers)
+ __sync_fetch_and_add(s_busy_workers, 1);
+@@ -3315,7 +3315,7 @@ static int lsapi_prefork_server_accept( lsapi_prefork_server * pServer,
+ if (pthread_atfork_func)
+ (*pthread_atfork_func)(NULL, NULL, set_skip_write);
+
+- __sync_lock_test_and_set(&s_worker_status->m_state,
++ __atomic_test_and_set(&s_worker_status->m_state,
+ LSAPI_STATE_CONNECTED);
+ if (s_busy_workers)
+ __sync_add_and_fetch(s_busy_workers, 1);
+@@ -3402,7 +3402,7 @@ int LSAPI_Postfork_Child(LSAPI_Request * pReq)
+ if (pthread_atfork_func)
+ (*pthread_atfork_func)(NULL, NULL, set_skip_write);
+
+- __sync_lock_test_and_set(&s_worker_status->m_state,
++ __atomic_test_and_set(&s_worker_status->m_state,
+ LSAPI_STATE_CONNECTED);
+ if (s_busy_workers)
+ __sync_add_and_fetch(s_busy_workers, 1);
+@@ -3651,7 +3651,7 @@ int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq )
+ if (fd == pReq->m_fdListen)
+ {
+ if (s_worker_status)
+- __sync_lock_test_and_set(&s_worker_status->m_state,
++ __atomic_test_and_set(&s_worker_status->m_state,
+ LSAPI_STATE_ACCEPTING);
+ if (s_accepting_workers)
+ __sync_fetch_and_add(s_accepting_workers, 1);
+@@ -3662,7 +3662,7 @@ int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq )
+ if (s_accepting_workers)
+ __sync_fetch_and_sub(s_accepting_workers, 1);
+ if (s_worker_status)
+- __sync_lock_test_and_set(&s_worker_status->m_state,
++ __atomic_test_and_set(&s_worker_status->m_state,
+ LSAPI_STATE_IDLE);
+ }
+
+@@ -3711,7 +3711,7 @@ int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq )
+ if ( pReq->m_fd != -1 )
+ {
+ if (s_worker_status)
+- __sync_lock_test_and_set(&s_worker_status->m_state,
++ __atomic_test_and_set(&s_worker_status->m_state,
+ LSAPI_STATE_CONNECTED);
+ if (s_busy_workers)
+ __sync_fetch_and_add(s_busy_workers, 1);
+diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
+index 42dd320356..0932ebaaa8 100644
+--- a/sapi/litespeed/lsapilib.c
++++ b/sapi/litespeed/lsapilib.c
+@@ -3390,7 +3390,7 @@ int LSAPI_Postfork_Child(LSAPI_Request * pReq)
+ {
+ int max_children = g_prefork_server->m_iMaxChildren;
+ s_pid = getpid();
+- __sync_lock_test_and_set(&pReq->child_status->m_pid, s_pid);
++ __atomic_test_and_set(&pReq->child_status->m_pid, s_pid);
+ s_worker_status = pReq->child_status;
+
+ setsid();
diff --git a/skip/php8/disabled-tests.list b/skip/php8/disabled-tests.list
new file mode 100644
index 0000000..6b6540f
--- /dev/null
+++ b/skip/php8/disabled-tests.list
@@ -0,0 +1,213 @@
+#
+# Tests that we don't need to run
+#
+
+# Windows tests
+ext/standard/tests/file/windows_mb_path/*
+ext/standard/tests/file/*win32*.phpt
+ext/standard/tests/dir/*win32*.phpt
+
+# Require database or slow as dblib
+ext/mysqli/tests/*
+ext/odbc/tests/*
+ext/pdo/tests/*.phpt
+ext/pdo_dblib/tests/*
+ext/pdo_mysql/tests/*
+ext/pdo_odbc/tests/*
+ext/pdo_pgsql/tests/*
+ext/pgsql/tests/*
+
+#
+# Tests that fail and probably should not...
+#
+
+# Too many tests fail! Some of them bogus, some not.
+# THIS SHOULD BE REALLY FIXED!
+ext/openssl/tests/bug46127.phpt
+ext/openssl/tests/bug48182.phpt
+ext/openssl/tests/bug54992.phpt
+ext/openssl/tests/bug65538_001.phpt
+ext/openssl/tests/bug65538_003.phpt
+ext/openssl/tests/bug65729.phpt
+ext/openssl/tests/bug68265.phpt
+ext/openssl/tests/bug68879.phpt
+ext/openssl/tests/bug68920.phpt
+ext/openssl/tests/bug69215.phpt
+ext/openssl/tests/bug72333.phpt
+ext/openssl/tests/bug73072.phpt
+ext/openssl/tests/bug74159.phpt
+ext/openssl/tests/bug76705.phpt
+ext/openssl/tests/bug77390.phpt
+ext/openssl/tests/capture_peer_cert_001.phpt
+ext/openssl/tests/openssl_peer_fingerprint_basic.phpt
+ext/openssl/tests/peer_verification.phpt
+ext/openssl/tests/san_peer_matching.phpt
+ext/openssl/tests/session_meta_capture.phpt
+ext/openssl/tests/session_meta_capture_tlsv13.phpt
+ext/openssl/tests/sni_server.phpt
+ext/openssl/tests/sni_server_key_cert.phpt
+ext/openssl/tests/stream_crypto_flags_001.phpt
+ext/openssl/tests/stream_crypto_flags_002.phpt
+ext/openssl/tests/stream_crypto_flags_003.phpt
+ext/openssl/tests/stream_crypto_flags_004.phpt
+ext/openssl/tests/stream_security_level.phpt
+ext/openssl/tests/stream_verify_peer_name_001.phpt
+ext/openssl/tests/stream_verify_peer_name_002.phpt
+ext/openssl/tests/stream_verify_peer_name_003.phpt
+ext/openssl/tests/streams_crypto_method.phpt
+ext/openssl/tests/tls_min_v1.0_max_v1.1_wrapper.phpt
+ext/openssl/tests/tls_wrapper.phpt
+ext/openssl/tests/tls_wrapper_with_tls_v1.3.phpt
+ext/openssl/tests/tlsv1.0_wrapper.phpt
+ext/openssl/tests/tlsv1.1_wrapper.phpt
+ext/openssl/tests/tlsv1.2_wrapper.phpt
+ext/openssl/tests/tlsv1.3_wrapper.phpt
+
+# Needs to open tls socket
+ext/openssl/tests/bug62890.phpt
+
+# Broken tests, missing config.
+sapi/fpm/tests/socket-ipv4-fallback.phpt
+
+# Fails in chroot (on Travis).
+sapi/cli/tests/cli_process_title_unix.phpt
+
+# Error messages in different order.
+sapi/cgi/tests/005.phpt
+
+# Fails on ppc64le.
+sapi/phpdbg/tests/watch_006.phpt
+
+# Not stable enchant-2 library support - 15/29
+ext/enchant/tests/broker_dict_exists.phpt
+ext/enchant/tests/broker_free_02.phpt
+ext/enchant/tests/broker_free_dict.phpt
+ext/enchant/tests/broker_request_dict.phpt
+ext/enchant/tests/broker_request_dict_01.phpt
+ext/enchant/tests/broker_set_ordering.phpt
+ext/enchant/tests/dict_add_to_personal.phpt
+ext/enchant/tests/dict_add_to_session.phpt
+ext/enchant/tests/dict_check.phpt
+ext/enchant/tests/dict_describe.phpt
+ext/enchant/tests/dict_get_error.phpt
+ext/enchant/tests/dict_is_in_session.phpt
+ext/enchant/tests/dict_quick_check_01.phpt
+ext/enchant/tests/dict_store_replacement.phpt
+ext/enchant/tests/dict_suggest.phpt
+
+# Wrong charset, conversion from `UTF-8' to `ASCII//TRANSLIT' is not allowed.
+ext/iconv/tests/iconv_basic_001.phpt
+
+# Wrong charset, conversion from `UTF-8' to `UTF-8//IGNORE' is not allowed.
+ext/iconv/tests/bug48147.phpt
+
+# stream_filter_append(): unable to create or locate filter "convert.iconv.ucs-2/utf-8//IGNORE"
+ext/iconv/tests/bug76249.phpt
+
+# for ICU <= 57.1
+ext/intl/tests/spoofchecker_001.phpt
+ext/intl/tests/timezone_IDforWindowsID_basic.phpt
+ext/intl/tests/timezone_windowsID_basic.phpt
+
+# Class 'Phar' not found.
+ext/opcache/tests/issue0115.phpt
+ext/opcache/tests/issue0149.phpt
+
+# Fails in CI - Insufficient privileges. https://gitlab.alpinelinux.org/alpine/aports/-/issues/12692#note_169663
+ext/pcntl/tests/pcntl_unshare_01.phpt
+ext/pcntl/tests/pcntl_unshare_02.phpt
+ext/pcntl/tests/pcntl_unshare_03.phpt
+ext/pcntl/tests/pcntl_unshare_04.phpt
+
+# Randomly fails.
+ext/pcntl/tests/002.phpt
+# Randomly fails on arm7
+ext/standard/tests/file/bug60120.phpt
+
+# Call to undefined function session_start().
+ext/session/tests/session_regenerate_id_cookie.phpt
+
+# Class 'SoapServer' not found.
+ext/soap/tests/bug73037.phpt
+
+# Incorrect results.
+ext/soap/tests/server009.phpt
+
+# Failing tests related to locale and/or iconv.
+ext/date/tests/009.phpt
+ext/iconv/tests/bug52211.phpt
+ext/intl/tests/bug67052.phpt
+ext/json/tests/bug41403.phpt
+ext/pcre/tests/ctype_back_to_c.phpt
+ext/pcre/tests/locales.phpt
+ext/soap/tests/bugs/bug39815.phpt
+ext/standard/tests/array/locale_sort.phpt
+ext/standard/tests/strings/htmlentities02.phpt
+ext/standard/tests/strings/htmlentities03.phpt
+ext/standard/tests/strings/setlocale_basic1.phpt
+ext/standard/tests/strings/setlocale_basic2.phpt
+ext/standard/tests/strings/setlocale_basic3.phpt
+ext/standard/tests/strings/setlocale_error.phpt
+ext/standard/tests/strings/setlocale_variation1.phpt
+ext/standard/tests/strings/setlocale_variation2.phpt
+ext/standard/tests/strings/setlocale_variation3.phpt
+ext/standard/tests/strings/setlocale_variation4.phpt
+ext/standard/tests/strings/setlocale_variation5.phpt
+ext/standard/tests/strings/sprintf_f_3.phpt
+ext/standard/tests/strings/strtoupper.phpt
+ext/standard/tests/time/strptime_basic.phpt
+ext/standard/tests/time/strptime_parts.phpt
+tests/basic/consistent_float_string_casts.phpt
+ext/standard/tests/strings/locale_independent_float_to_string.phpt
+tests/lang/bug30638.phpt
+Zend/tests/lc_ctype_inheritance.phpt
+
+# setlocale() does not affect result of nl_langinfo(CODESET) always returns UTF-8
+ext/fileinfo/tests/bug74170.phpt
+ext/standard/tests/strings/bug79986.phpt
+
+# Wrong results
+ext/pcre/tests/bug79846.phpt
+ext/pcre/tests/bug80118.phpt
+# compilation failed https://gitlab.alpinelinux.org/alpine/aports/-/issues/13116
+ext/pcre/tests/bug70345.phpt
+
+# no xml header displayed
+ext/tidy/tests/020.phpt
+
+# float formatting
+ext/standard/tests/strings/printf_h_H.phpt
+
+# fails on armv7
+ext/standard/tests/strings/chunk_split_variation2_32bit.phpt
+
+# fails on arch64, ppc64le, s390x
+ext/standard/tests/array/range.phpt
+
+
+#
+# Tests that fail for known reason and/or we don't need to worry about them
+#
+
+# Fails due to unsupported JP charsets.
+ext/iconv/tests/eucjp2iso2022jp.phpt
+ext/iconv/tests/iconv_mime_encode.phpt
+
+# Requires running SNMP server.
+ext/snmp/tests/*
+
+# Expects permissions on /etc to be 40755
+ext/standard/tests/file/006_error.phpt
+
+# Fails probably due to differencies in musl.
+ext/sockets/tests/socket_create_pair-wrongparams.phpt
+
+# Fail due to libxml2 upgrade to 2.9.12
+# See: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12692
+ext/dom/tests/DOMDocument_loadXML_error1.phpt
+ext/dom/tests/DOMDocument_load_error1.phpt
+ext/dom/tests/bug43364.phpt
+ext/dom/tests/bug80268.phpt
+ext/libxml/tests/bug61367-read.phpt
+ext/libxml/tests/libxml_disable_entity_loader.phpt
+sapi/fpm/tests/bug68391-conf-include-order.phpt
diff --git a/skip/php8/fix-tests-devserver.patch b/skip/php8/fix-tests-devserver.patch
new file mode 100644
index 0000000..5447980
--- /dev/null
+++ b/skip/php8/fix-tests-devserver.patch
@@ -0,0 +1,23 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Mon, 01 May 2017 01:33:00 +0200
+Subject: [PATCH] Fix tests failing due to extra message from built-in web server
+
+Remove messages like:
+
+ PHP 7.1.4 Development Server started at Mon May 1 00:42:39 2017
+
+from test outputs, because tests do not expect them. I have no clue what
+happens here...
+
+--- a/run-tests.php
++++ b/run-tests.php
+@@ -2563,6 +2563,9 @@
+ // Does the output match what is expected?
+ $output = preg_replace("/\r\n/", "\n", trim($out));
+
++ // Remove message from built-in development server.
++ $output = preg_replace("/^PHP [0-9.]+ Development Server started at .*\n\n?/m", "", $output);
++
+ /* when using CGI, strip the headers from the output */
+ $headers = [];
+
diff --git a/skip/php8/includedir.patch b/skip/php8/includedir.patch
new file mode 100644
index 0000000..a835815
--- /dev/null
+++ b/skip/php8/includedir.patch
@@ -0,0 +1,41 @@
+--- a/scripts/Makefile.frag
++++ b/scripts/Makefile.frag
+@@ -2,7 +2,7 @@
+ # Build environment install
+ #
+
+-phpincludedir = $(includedir)/php
++phpincludedir = $(includedir)/php8
+ phpbuilddir = $(libdir)/build
+
+ BUILD_FILES = \
+--- a/ext/pdo/Makefile.frag
++++ b/ext/pdo/Makefile.frag
+@@ -1,4 +1,4 @@
+-phpincludedir=$(prefix)/include/php
++phpincludedir=$(prefix)/include/php8
+
+ PDO_HEADER_FILES= \
+ php_pdo.h \
+--- a/scripts/php-config.in
++++ b/scripts/php-config.in
+@@ -6,7 +6,7 @@
+ exec_prefix="@exec_prefix@"
+ version="@PHP_VERSION@"
+ vernum="@PHP_VERSION_ID@"
+-include_dir="@includedir@/php"
++include_dir="@includedir@/php8"
+ includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM -I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib"
+ ldflags="@PHP_LDFLAGS@"
+ libs="@EXTRA_LIBS@"
+--- a/scripts/phpize.in
++++ b/scripts/phpize.in
+@@ -5,7 +5,7 @@
+ datarootdir='@datarootdir@'
+ exec_prefix="`eval echo @exec_prefix@`"
+ phpdir="`eval echo @libdir@`/build"
+-includedir="`eval echo @includedir@`/php"
++includedir="`eval echo @includedir@`/php8"
+ builddir="`pwd`"
+ SED="@SED@"
+
diff --git a/skip/php8/install-pear.patch b/skip/php8/install-pear.patch
new file mode 100644
index 0000000..1c9f07f
--- /dev/null
+++ b/skip/php8/install-pear.patch
@@ -0,0 +1,14 @@
+--- ./pear/Makefile.frag.orig 2013-04-12 07:02:27.041602514 +0000
++++ ./pear/Makefile.frag 2013-04-12 07:04:09.065836822 +0000
+@@ -1,7 +1,10 @@
+ peardir=$(PEAR_INSTALLDIR)
+
++# help the built php to find xml extension so we can install pear
++PEAR_INSTALL_XML_FLAGS = -d extension="$(top_builddir)/modules/xml.so" -d extension="$(top_builddir)/modules/phar.so"
++
+ # Skip all php.ini files altogether
+-PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dopen_basedir= -derror_reporting=1803 -dmemory_limit=-1 -ddetect_unicode=0
++PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dopen_basedir= -derror_reporting=1803 -dmemory_limit=-1 -ddetect_unicode=0 $(PEAR_INSTALL_XML_FLAGS)
+
+ WGET = `which wget 2>/dev/null`
+ FETCH = `which fetch 2>/dev/null`
diff --git a/skip/php8/php8-fpm-version-suffix.patch b/skip/php8/php8-fpm-version-suffix.patch
new file mode 100644
index 0000000..50e1345
--- /dev/null
+++ b/skip/php8/php8-fpm-version-suffix.patch
@@ -0,0 +1,79 @@
+--- a/sapi/fpm/fpm/fpm_conf.c
++++ b/sapi/fpm/fpm/fpm_conf.c
+@@ -1262,7 +1262,7 @@
+ }
+
+ if (!fpm_global_config.error_log) {
+- fpm_global_config.error_log = strdup("log/php-fpm.log");
++ fpm_global_config.error_log = strdup("log/php8/error.log");
+ }
+
+ #ifdef HAVE_SYSTEMD
+@@ -1273,7 +1273,7 @@
+
+ #ifdef HAVE_SYSLOG_H
+ if (!fpm_global_config.syslog_ident) {
+- fpm_global_config.syslog_ident = strdup("php-fpm");
++ fpm_global_config.syslog_ident = strdup("php-fpm8");
+ }
+
+ if (fpm_global_config.syslog_facility < 0) {
+@@ -1777,7 +1777,7 @@
+ if (fpm_globals.prefix == NULL) {
+ spprintf(&tmp, 0, "%s/php-fpm.conf", PHP_SYSCONFDIR);
+ } else {
+- spprintf(&tmp, 0, "%s/etc/php-fpm.conf", fpm_globals.prefix);
++ spprintf(&tmp, 0, "%s/etc/php8/php-fpm.conf", fpm_globals.prefix);
+ }
+
+ if (!tmp) {
+
+--- a/sapi/fpm/php-fpm.conf.in
++++ b/sapi/fpm/php-fpm.conf.in
+@@ -16,3 +16,3 @@
+ ; Default Value: none
+-;pid = run/php-fpm.pid
++;pid = run/php-fpm8.pid
+
+@@ -22,4 +22,4 @@
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+-; Default Value: log/php-fpm.log
+-;error_log = log/php-fpm.log
++; Default Value: log/php8/error.log
++;error_log = log/php8/error.log
+
+@@ -35,4 +35,4 @@
+ ; which must suit common needs.
+-; Default Value: php-fpm
+-;syslog.ident = php-fpm
++; Default Value: php-fpm8
++;syslog.ident = php-fpm8
+
+--- a/sapi/fpm/www.conf.in
++++ b/sapi/fpm/www.conf.in
+@@ -273,7 +273,7 @@
+
+ ; The access log file
+ ; Default: not set
+-;access.log = log/$pool.access.log
++;access.log = log/php8/$pool.access.log
+
+ ; The access log format.
+ ; The following syntax is allowed
+@@ -337,7 +337,7 @@
+ ; The log file for slow requests
+ ; Default Value: not set
+ ; Note: slowlog is mandatory if request_slowlog_timeout is set
+-;slowlog = log/$pool.log.slow
++;slowlog = log/php8/$pool.slow.log
+
+ ; The timeout for serving a single request after which a PHP backtrace will be
+ ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+@@ -450,6 +450,6 @@
+ ; specified at startup with the -d argument
+ ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
+ ;php_flag[display_errors] = off
+-;php_admin_value[error_log] = /var/log/fpm-php.www.log
++;php_admin_value[error_log] = /var/log/php8/$pool.error.log
+ ;php_admin_flag[log_errors] = on
+ ;php_admin_value[memory_limit] = 32M
diff --git a/skip/php8/php8-fpm.initd b/skip/php8/php8-fpm.initd
new file mode 100644
index 0000000..f498581
--- /dev/null
+++ b/skip/php8/php8-fpm.initd
@@ -0,0 +1,93 @@
+#!/sbin/openrc-run
+
+# If you want to run separate master process per pool, then create a symlink
+# to this runscript for each pool. In that mode, the php-fpm daemon is started
+# as nobody by default. You can override the user (and group) by declaring
+# variable "user" and optionally "group" in conf.d file, or in the $fpm_config
+# file (the former has precedence).
+
+: ${name:="PHP FastCGI Process Manager"}
+
+command="/usr/sbin/php-fpm8"
+command_background="yes"
+start_stop_daemon_args="--quiet"
+pidfile="/run/$RC_SVCNAME/php-fpm.pid"
+retry="SIGTERM/20"
+
+# configtest is here only for backward compatibility
+extra_commands="checkconfig configtest"
+extra_started_commands="reload reopen"
+description_checkconfig="Run php-fpm config check"
+description_reload="Gracefully reload workers and config"
+description_reopen="Reopen log files"
+
+required_files="$fpm_config"
+
+depend() {
+ need net
+ use apache2 lighttpd nginx
+}
+
+init_vars() {
+ # Defaults for single master process with multiple pools
+ if [ "$RC_SVCNAME" = "php-fpm8" ]; then
+ : ${fpm_config:="/etc/php8/php-fpm.conf"}
+ : ${user:="root"}
+ # Defaults for master process per pool
+ else
+ : ${fpm_config="/etc/php8/php-fpm.d/${RC_SVCNAME#php-fpm8.}.conf"}
+ : ${user:="$(conf_get user)"}
+ : ${user:="nobody"}
+ : ${group:="$(conf_get group)"}
+ fi
+ command_args="--nodaemonize --fpm-config $fpm_config"
+ start_stop_daemon_args="$start_stop_daemon_args
+ --user $user ${group:+"--group $group"}"
+}
+
+start_pre() {
+ checkconfig || return 1
+
+ # If unix socket is used (instead of TCP/IP), then ensure that the
+ # directory exists and has correct privileges.
+ local listen="$(conf_get listen)"
+ if [ "${listen:0:1}" = "/" ]; then
+ checkpath -d -o $user:$group "$(dirname "$listen")"
+ fi
+
+ checkpath -d "$(dirname "$pidfile")"
+}
+
+reload() {
+ ebegin "Reloading $name"
+ start-stop-daemon --signal USR2 --pidfile "$pidfile"
+ eend $?
+}
+
+reopen() {
+ ebegin "Reopening $name log files"
+ start-stop-daemon --signal USR1 --pidfile "$pidfile"
+ eend $?
+}
+
+checkconfig() {
+ init_vars
+ ebegin "Checking $fpm_config"
+
+ local out
+ out="$(su -s /bin/sh -c "$command --test --fpm-config $fpm_config" $user 2>&1)" || {
+ printf "%s\n" "$out"
+ eend 1 "failed, please correct errors above"
+ return 1
+ }
+}
+
+configtest() {
+ ewarn "configtest is deprecated, use checkconfig instead"
+ checkconfig
+}
+
+conf_get() {
+ local key="$1"
+ sed -nE "s/^${key}\s*=\s*\"?([^\";]+).*/\1/p" "$fpm_config" | head -n 1
+}
diff --git a/skip/php8/php8-fpm.logrotate b/skip/php8/php8-fpm.logrotate
new file mode 100644
index 0000000..10b5bf3
--- /dev/null
+++ b/skip/php8/php8-fpm.logrotate
@@ -0,0 +1,13 @@
+/var/log/php8/*.log {
+ rotate 7
+ daily
+ missingok
+ notifempty
+ delaycompress
+ compress
+ dateext
+ sharedscripts
+ postrotate
+ /etc/init.d/php-fpm8 --ifstarted --quiet reopen
+ endscript
+}
diff --git a/skip/php8/php8-module.conf b/skip/php8/php8-module.conf
new file mode 100644
index 0000000..2ffe005
--- /dev/null
+++ b/skip/php8/php8-module.conf
@@ -0,0 +1,13 @@
+LoadModule php_module modules/mod_php8.so
+
+DirectoryIndex index.php index.html
+
+<FilesMatch \.php$>
+ SetHandler application/x-httpd-php
+</FilesMatch>
+
+# Uncomment the following to allow .phps files to be handled by the php source filter,
+# and displayed as syntax-highlighted source code
+#<FilesMatch "\.phps$">
+# SetHandler application/x-httpd-php-source
+#</FilesMatch>
diff --git a/skip/php8/php8.xibuild b/skip/php8/php8.xibuild
new file mode 100644
index 0000000..535c340
--- /dev/null
+++ b/skip/php8/php8.xibuild
@@ -0,0 +1,215 @@
+#!/bin/sh
+
+NAME="php8"
+DESC="The PHP8 language runtime engine"
+
+MAKEDEPS="autoconf pcre2 re2c apache2 argon2 aspell bison bzip2 curl enchant2 freetds freetype2 gdbm gettext gmp icu imap krb5 libedit libical libjpeg-turbo libpng libpq lmdb oniguruma libsodium libwebp libxml2 libxpm libxslt libzip net-snmp libldap sqlite3 tidyhtml unixodbc zlib"
+
+PKG_VER=8.1.10
+suffix=8
+SOURCE="https://php.net/distributions/php-$PKG_VER.tar.xz"
+
+ADDITIONAL="
+atomic-lsapi.patch
+disabled-tests.list
+fix-tests-devserver.patch
+includedir.patch
+install-pear.patch
+php8-fpm-version-suffix.patch
+php8-fpm.initd
+php8-fpm.logrotate
+php8-module.conf
+sharedir.patch
+xfail-openssl-1.1-test.patch
+"
+
+prepare() {
+ apply_patches
+
+ # https://bugs.php.net/63362 - Not needed but installed headers.
+ # Drop some Windows specific headers to avoid installation,
+ # before build to ensure they are really not needed.
+ rm -f TSRM/tsrm_win32.h \
+ TSRM/tsrm_config.w32.h \
+ Zend/zend_config.w32.h \
+ ext/mysqlnd/config-win.h \
+ ext/standard/winver.h
+
+ # Fix some bogus permissions.
+ find . -name '*.[ch]' -exec chmod 644 {} \;
+
+ # XXX: Delete failing tests.
+ sed -n '/^[^#]/p' "$BUILD_ROOT"/disabled-tests.list | while read -r item; do
+ rm -r $item # do it in this way to apply globbing...
+ done
+
+ autoconf
+}
+
+# Notes:
+# * gd-jis-conv breaks any non-latin font rendering (vakartel).
+# * libxml cannot be build as shared.
+# * -D_LARGEFILE_SOURCE and -D_FILE_OFFSET_BITS=64 (https://www.php.net/manual/en/intro.filesystem.php andypost)
+# * -O2 optimize for apps usage (andypost)
+_build() {
+ export CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+ export CXXFLAGS="$CXXFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
+ local without_pcre_jit
+ [ "$CARCH" = "s390x" ] && without_pcre_jit="--without-pcre-jit"
+
+ EXTENSION_DIR=$_extension_dir ./configure \
+
+
+ --prefix=/usr \
+ --program-suffix=$suffix \
+ --libdir=$_libdir \
+ --datadir=/usr/share/php8 \
+ --sysconfdir=/etc/php8 \
+ --localstatedir=/var \
+ --with-layout=GNU \
+ --with-pic \
+ --with-config-file-path=/etc/php8 \
+ --with-config-file-scan-dir=$_extension_confd \
+ --disable-short-tags \
+ \
+ --enable-bcmath=shared \
+ --with-bz2=shared \
+ --enable-calendar=shared \
+ --enable-ctype=shared \
+ --with-curl=shared \
+ --enable-dba=shared \
+ --with-dbmaker=shared \
+ --with-gdbm \
+ --with-lmdb \
+ --enable-dom=shared \
+ --with-enchant=shared \
+ --enable-exif=shared \
+ --with-ffi=shared \
+ --enable-fileinfo=shared \
+ --enable-ftp=shared \
+ --enable-gd=shared \
+ --with-freetype \
+ --with-jpeg \
+ --with-webp \
+ --with-xpm \
+ --disable-gd-jis-conv \
+ --with-gettext=shared \
+ --with-gmp=shared \
+ --with-iconv=shared \
+ --with-imap=shared \
+ --with-imap-ssl \
+ --enable-intl=shared \
+ --with-ldap=shared \
+ --with-ldap-sasl \
+ --with-libedit \
+ --with-libxml \
+ --enable-mbstring=shared \
+ --with-mysqli=shared,mysqlnd \
+ --with-mysql-sock=/run/mysqld/mysqld.sock \
+ --enable-mysqlnd=shared \
+ --enable-opcache=shared \
+ --with-openssl=shared \
+ --with-kerberos \
+ --with-system-ciphers \
+ --with-password-argon2 \
+ --enable-pcntl=shared \
+ --with-external-pcre \
+ $without_pcre_jit \
+ --enable-pdo=shared \
+ --with-pdo-dblib=shared,/usr \
+ --with-pdo-mysql=shared,mysqlnd \
+ --with-pdo-odbc=shared,unixODBC,/usr \
+ --with-pdo-pgsql=shared \
+ --with-pdo-sqlite=shared \
+ --with-pgsql=shared \
+ --enable-phar=shared \
+ --enable-posix=shared \
+ --with-pspell=shared \
+ --without-readline \
+ --enable-session=shared \
+ --enable-shmop=shared \
+ --enable-simplexml=shared \
+ --with-snmp=shared \
+ --enable-soap=shared \
+ --with-sodium=shared \
+ --enable-sockets=shared \
+ --with-sqlite3=shared \
+ --enable-sysvmsg=shared \
+ --enable-sysvsem=shared \
+ --enable-sysvshm=shared \
+ --with-tidy=shared \
+ --enable-tokenizer=shared \
+ --with-unixODBC=shared,/usr \
+ --enable-xml=shared \
+ --enable-xmlreader=shared \
+ --enable-xmlwriter=shared \
+ --with-xsl=shared \
+ --with-zip=shared \
+ --with-zlib \
+ "$@"
+ make
+}
+
+build() {
+ # build phpcgi and apache2 SAPIs first
+ # because not fixed https://bugs.php.net/bug.php?id=52419
+ # apache2 module
+ _build --disable-phpdbg \
+ --disable-cli \
+ --with-apxs2
+ mv libs/libphp.so sapi/apache2handler/mod_php$suffix.so
+
+ _build --enable-phpdbg \
+ --with-pear=/usr/share/php8 \
+ --enable-fpm \
+ --enable-litespeed \
+ --enable-embed
+}
+
+check() {
+ # PHP is so stupid that it's not able to resolve dependencies
+ # between extensions and load them in correct order, so we must
+ # help it...
+ # opcache is Zend extension, it's handled specially in Makefile
+ local php_modules=$(_extensions_by_load_order \
+ | grep -vx opcache \
+ | xargs -n 1 printf "'$BUILD_ROOT/modules/%s.la' ")
+ sed -i "/^PHP_TEST_SHARED_EXTENSIONS/,/extension=/ \
+ s|in \$(PHP_MODULES)\"*|in $php_modules|" Makefile
+
+ # XXX: Few tests fail on the named platforms.
+ # Ignore it for now and continue build even on test failures.
+ local allow_fail='no'
+ case "$CARCH" in
+ x86 | s390x ) allow_fail='yes'
+ esac
+
+ TESTS="${TESTS:- --show-diff}" NO_INTERACTION=1 REPORT_EXIT_STATUS=1 \
+ SKIP_SLOW_TESTS=1 SKIP_ONLINE_TESTS=1 TEST_TIMEOUT=10 \
+ TZ='' LANG='' LC_ALL='' \
+ TRAVIS=true SKIP_IO_CAPTURE_TESTS=1 \
+ make test || [ "$allow_fail" = yes ]
+
+ echo 'NOTE: We have skipped quite a lot tests, see disabled-tests.list.'
+}
+
+package() {
+ make -j1 INSTALL_ROOT="$PKG_DEST" install
+
+ install -Dm644 php.ini-production "$PKG_DEST"/etc/php8/php.ini
+
+ local file; for file in pear peardev pecl; do
+ sed -i -e "s|/usr/bin/php|/usr/bin/php$suffix|g" \
+ -e "s|PHP=php|PHP=php$suffix|" \
+ "$PKG_DEST"/usr/bin/$file
+ done
+
+ find "$PKG_DEST" -name '.*' -print0 | xargs -0 rm -rf
+ rmdir "$PKG_DEST"/var/run
+
+ if [ "$_default_php" = yes ]; then
+ ln -s php$suffix "$PKG_DEST"/usr/bin/php
+ fi
+}
+
diff --git a/skip/php8/sharedir.patch b/skip/php8/sharedir.patch
new file mode 100644
index 0000000..7d5c104
--- /dev/null
+++ b/skip/php8/sharedir.patch
@@ -0,0 +1,11 @@
+--- a/php.ini-production
++++ b/php.ini-production
+@@ -742,7 +742,7 @@
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ; UNIX: "/path1:/path2"
+-;include_path = ".:/php/includes"
++include_path = ".:/usr/share/php8"
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
diff --git a/skip/php8/xfail-openssl-1.1-test.patch b/skip/php8/xfail-openssl-1.1-test.patch
new file mode 100644
index 0000000..f607cc1
--- /dev/null
+++ b/skip/php8/xfail-openssl-1.1-test.patch
@@ -0,0 +1,13 @@
+diff --git a/ext/openssl/tests/openssl_error_string_basic.phpt b/ext/openssl/tests/openssl_error_string_basic.phpt
+index e4ea264b3b..fd1f7ef9d3 100644
+--- a/ext/openssl/tests/openssl_error_string_basic.phpt
++++ b/ext/openssl/tests/openssl_error_string_basic.phpt
+@@ -2,6 +2,8 @@
+ openssl_error_string() tests
+ --SKIPIF--
+ <?php if (!extension_loaded("openssl")) print "skip"; ?>
++--XFAIL--
++Somehow unstable
+ --FILE--
+ <?php
+ // helper function to check openssl errors
diff --git a/skip/python-pyqtwebengine/python-pyqtwebengine.xibuild b/skip/python-pyqtwebengine/python-pyqtwebengine.xibuild
new file mode 100644
index 0000000..cbc2bf8
--- /dev/null
+++ b/skip/python-pyqtwebengine/python-pyqtwebengine.xibuild
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+MAKEDEPS="python python-toml qt5-qtwebengine"
+DEPS="python"
+
+PKG_VER=5.15.6
+SOURCE="https://pypi.python.org/packages/source/P/PyQtWebEngine/PyQtWebEngine-$PKG_VER.tar.gz"
+MAKEDEPS="python"
+DESC="Python bindings for the Qt WebEngine framework"
+
+build() {
+ sip-build \
+ --no-make \
+ --qmake /usr/lib/qt5/bin/qmake \
+ --api-dir /usr/share/qt5/qsci/api/python
+ make -C build
+}
+
+
+check() {
+ make -C build check
+}
+
+package () {
+ make DESTDIR="$PKG_VER" INSTALL_ROOT="$PKG_VER" -C build install -j1
+}
diff --git a/skip/python-pyside2/python-3.10.patch b/skip/python-pyside2/python-3.10.patch
new file mode 100644
index 0000000..0e8b0f2
--- /dev/null
+++ b/skip/python-pyside2/python-3.10.patch
@@ -0,0 +1,119 @@
+# Based on:
+# https://github.com/pyside/pyside-setup/commit/81e9cff884d6
+# https://github.com/pyside/pyside-setup/commit/2530cb3f165a
+
+diff -upr pyside-setup-opensource-src-5.15.2.orig/build_scripts/config.py pyside-setup-opensource-src-5.15.2/build_scripts/config.py
+--- pyside-setup-opensource-src-5.15.2.orig/build_scripts/config.py 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/build_scripts/config.py 2021-12-01 15:15:52.323808457 +0200
+@@ -93,6 +93,7 @@ class Config(object):
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
++ 'Programming Language :: Python :: 3.10',
+ ]
+
+ self.setup_script_dir = None
+diff -upr pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.cpp pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/pep384impl.cpp
+--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.cpp 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/pep384impl.cpp 2021-12-01 15:17:21.444888977 +0200
+@@ -751,14 +751,14 @@ _Pep_PrivateMangle(PyObject *self, PyObj
+ #endif // IS_PY2
+ Shiboken::AutoDecRef privateobj(PyObject_GetAttr(
+ reinterpret_cast<PyObject *>(Py_TYPE(self)), Shiboken::PyMagicName::name()));
+-#ifndef Py_LIMITED_API
+- return _Py_Mangle(privateobj, name);
+-#else
+- // For some reason, _Py_Mangle is not in the Limited API. Why?
+- size_t plen = PyUnicode_GET_LENGTH(privateobj);
++
++ // PYSIDE-1436: _Py_Mangle is no longer exposed; implement it always.
++ // The rest of this function is our own implementation of _Py_Mangle.
++ // Please compare the original function in compile.c .
++ size_t plen = PyUnicode_GET_LENGTH(privateobj.object());
+ /* Strip leading underscores from class name */
+ size_t ipriv = 0;
+- while (PyUnicode_READ_CHAR(privateobj, ipriv) == '_')
++ while (PyUnicode_READ_CHAR(privateobj.object(), ipriv) == '_')
+ ipriv++;
+ if (ipriv == plen) {
+ Py_INCREF(name);
+@@ -787,7 +787,6 @@ _Pep_PrivateMangle(PyObject *self, PyObj
+ if (amount > big_stack)
+ free(resbuf);
+ return result;
+-#endif // else Py_LIMITED_API
+ }
+
+ /*****************************************************************************
+diff -upr pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.h pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/pep384impl.h
+--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.h 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/pep384impl.h 2021-12-01 15:13:58.899521842 +0200
+@@ -40,6 +40,11 @@
+ #ifndef PEP384IMPL_H
+ #define PEP384IMPL_H
+
++// PYSIDE-1436: Adapt to Python 3.10
++#if PY_VERSION_HEX < 0x030900A4
++# define Py_SET_REFCNT(obj, refcnt) ((Py_REFCNT(obj) = (refcnt)), (void)0)
++#endif
++
+ extern "C"
+ {
+
+@@ -327,7 +332,7 @@ LIBSHIBOKEN_API PyObject *PyRun_String(c
+ // But this is no problem as we check it's validity for every version.
+
+ #define PYTHON_BUFFER_VERSION_COMPATIBLE (PY_VERSION_HEX >= 0x03030000 && \
+- PY_VERSION_HEX < 0x0309FFFF)
++ PY_VERSION_HEX < 0x030AFFFF)
+ #if !PYTHON_BUFFER_VERSION_COMPATIBLE
+ # error Please check the buffer compatibility for this python version!
+ #endif
+diff -upr pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/sbkstring.cpp pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/sbkstring.cpp
+--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/sbkstring.cpp 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/sbkstring.cpp 2021-12-01 15:14:47.703201473 +0200
+@@ -247,7 +247,7 @@ static void finalizeStaticStrings()
+ {
+ auto &set = staticStrings();
+ for (PyObject *ob : set) {
+- Py_REFCNT(ob) = 1;
++ Py_SET_REFCNT(ob, 1);
+ Py_DECREF(ob);
+ }
+ set.clear();
+diff -upr pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py pyside-setup-opensource-src-5.15.2/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py 2021-12-01 15:15:14.560100869 +0200
+@@ -300,6 +300,7 @@ type_map.update({
+ "zero(object)": None,
+ "zero(str)": "",
+ "zero(typing.Any)": None,
++ "zero(Any)": None,
+ })
+
+ type_map.update({
+diff -upr pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py pyside-setup-opensource-src-5.15.2/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py
+--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py 2021-12-01 15:25:43.267843740 +0200
+@@ -43,10 +43,11 @@ import sys
+ import re
+ import warnings
+ import types
++import typing
+ import keyword
+ import functools
+ from shibokensupport.signature.mapping import (type_map, update_mapping,
+- namespace, typing, _NotCalled, ResultVariable, ArrayLikeVariable)
++ namespace, _NotCalled, ResultVariable, ArrayLikeVariable)
+ from shibokensupport.signature.lib.tool import (SimpleNamespace,
+ build_brace_pattern)
+
+@@ -222,7 +223,7 @@ def _resolve_arraytype(thing, line):
+ def to_string(thing):
+ if isinstance(thing, str):
+ return thing
+- if hasattr(thing, "__name__"):
++ if hasattr(thing, "__name__") and thing.__module__ != "typing":
+ dot = "." in str(thing)
+ name = get_name(thing)
+ return thing.__module__ + "." + name if dot else name
diff --git a/skip/python-pyside2/python-pyside2.xibuild b/skip/python-pyside2/python-pyside2.xibuild
new file mode 100644
index 0000000..d2652e8
--- /dev/null
+++ b/skip/python-pyside2/python-pyside2.xibuild
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+NAME="python-pyside2"
+DESC="Enables the use of Qt5 APIs in Python applications"
+
+MAKEDEPS=" cmake libshiboken2 qt5-qt3d qt5-qtbase qt5-qtcharts qt5-qtdatavis3d qt5-qtdeclarative qt5-qtlocation qt5-qtmultimedia qt5-qtquickcontrols2 qt5-qtremoteobjects qt5-qtscript qt5-qtscxml qt5-qtsensors qt5-qtserialport qt5-qtspeech qt5-qtsvg qt5-qttools qt5-qtwebchannel qt5-qtwebsockets qt5-qtx11extras qt5-qtxmlpatterns shiboken2 py3-setuptools qt5-qtwebengine"
+
+PKG_VER=5.15.2
+SOURCE="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-$PKG_VER-src/pyside-setup-opensource-src-$PKG_VER.tar.xz"
+
+ADDITIONAL="
+python-3.10.patch
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=None \
+ -DPYTHON_EXECUTABLE=/usr/bin/python3 \
+ -DBUILD_TESTS=OFF \
+ sources/pyside2
+ cmake --build build
+}
+
+package() {
+ DESTDIR="$PKG_DEST" cmake --install build
+
+ # Install egg info
+ export PATH="/usr/lib/qt5/bin:$PATH"
+ python3 setup.py egg_info --build-type=pyside2
+ pythonpath="$(python3 -c "from sysconfig import get_path; print(get_path('platlib'))")"
+ cp -r PySide2.egg-info "$PKG_DEST/$pythonpath"
+}
+
diff --git a/skip/qt5-qt3d/qt5-qt3d.xibuild b/skip/qt5-qt3d/qt5-qt3d.xibuild
new file mode 100644
index 0000000..538eefc
--- /dev/null
+++ b/skip/qt5-qt3d/qt5-qt3d.xibuild
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+NAME="qt5-qt3d"
+DESC="C++ and QML APIs for easy inclusion of 3D graphics"
+
+MAKEDEPS=" qt5-qtbase qt5-qtdeclarative vulkan-headers"
+
+PKG_VER=5.15.5_git20220617
+_commit="3cc801c4ae41ff3f155258c4bf7e21bb5b3f6a3d"
+SOURCE="https://invent.kde.org/qt/qt/qt3d/-/archive/$_commit/qt3d-$_commit.tar.gz"
+
+prepare() {
+ apply_patches
+
+ # We need to make the build system think we're running in a git repository
+ # so it correctly symlinks during the build
+ mkdir .git
+}
+
+build() {
+ qmake-qt5
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make INSTALL_ROOT="$PKG_DEST" install
+
+ # Drop QMAKE_PRL_BUILD_DIR because reference the build dir
+ find "$PKG_DEST/usr/lib" -type f -name '*.prl' \
+ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
+}
diff --git a/skip/qt5-qtwebengine/0001-pretend-to-stay-at-5.15.3.patch b/skip/qt5-qtwebengine/0001-pretend-to-stay-at-5.15.3.patch
new file mode 100644
index 0000000..a67a399
--- /dev/null
+++ b/skip/qt5-qtwebengine/0001-pretend-to-stay-at-5.15.3.patch
@@ -0,0 +1,8 @@
+--- a/.qmake.conf
++++ b/.qmake.conf
+@@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD)
+ load(qt_build_config)
+ CONFIG += warning_clean
+
+-MODULE_VERSION = 5.15.11
++MODULE_VERSION = 5.15.3
diff --git a/skip/qt5-qtwebengine/0010-chromium-musl-Match-syscalls-to-match-musl.patch b/skip/qt5-qtwebengine/0010-chromium-musl-Match-syscalls-to-match-musl.patch
new file mode 100644
index 0000000..524d75d
--- /dev/null
+++ b/skip/qt5-qtwebengine/0010-chromium-musl-Match-syscalls-to-match-musl.patch
@@ -0,0 +1,44 @@
+From ce23b6a6e5a5ebae15dedeebf7044ac9a0249a80 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 7 Jul 2017 15:24:49 -0700
+Subject: [PATCH] chromium: musl: Match syscalls to match musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ chromium/third_party/lss/linux_syscall_support.h | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h
+index 80a3e56..1e57b1a 100644
+--- a/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
++++ b/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
+@@ -824,6 +824,14 @@ struct kernel_statfs {
+ #endif
+
+
++#undef stat64
++#undef fstat64
++
++#ifndef __NR_fstatat
++#define __NR_fstatat __NR_fstatat64
++#endif
++
++
+ #if defined(__x86_64__)
+ #ifndef ARCH_SET_GS
+ #define ARCH_SET_GS 0x1001
+@@ -1258,6 +1266,14 @@ struct kernel_statfs {
+ #ifndef __NR_getrandom
+ #define __NR_getrandom 318
+ #endif
++
++#ifndef __NR_pread
++#define __NR_pread __NR_pread64
++#endif
++#ifndef __NR_pwrite
++#define __NR_pwrite __NR_pwrite64
++#endif
++
+ /* End of x86-64 definitions */
+ #elif defined(__mips__)
+ #if _MIPS_SIM == _MIPS_SIM_ABI32
diff --git a/skip/qt5-qtwebengine/default-pthread-stacksize.patch b/skip/qt5-qtwebengine/default-pthread-stacksize.patch
new file mode 100644
index 0000000..e0ca792
--- /dev/null
+++ b/skip/qt5-qtwebengine/default-pthread-stacksize.patch
@@ -0,0 +1,23 @@
+--- ./src/3rdparty/chromium/base/threading/platform_thread_linux.cc
++++ ./src/3rdparty/chromium/base/threading/platform_thread_linux.cc
+@@ -186,7 +186,8 @@
+
+ size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
+ #if !defined(THREAD_SANITIZER)
+- return 0;
++ // use 2mb to avoid running out of space. This is what android uses
++ return 2 * (1 << 20);
+ #else
+ // ThreadSanitizer bloats the stack heavily. Evidence has been that the
+ // default stack size isn't enough for some browser tests.
+--- ./src/3rdparty/chromium/base/threading/platform_thread_unittest.cc.orig
++++ ./src/3rdparty/chromium/base/threading/platform_thread_unittest.cc
+@@ -411,7 +411,7 @@
+ ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && \
+ !defined(THREAD_SANITIZER)) || \
+ (defined(OS_ANDROID) && !defined(ADDRESS_SANITIZER))
+- EXPECT_EQ(0u, stack_size);
++ EXPECT_EQ(2u << 20, stack_size);
+ #else
+ EXPECT_GT(stack_size, 0u);
+ EXPECT_LT(stack_size, 20u * (1 << 20));
diff --git a/skip/qt5-qtwebengine/ffmpeg5.patch b/skip/qt5-qtwebengine/ffmpeg5.patch
new file mode 100644
index 0000000..ea721d1
--- /dev/null
+++ b/skip/qt5-qtwebengine/ffmpeg5.patch
@@ -0,0 +1,151 @@
+Patch-Source: https://github.com/archlinux/svntogit-packages/blob/e8ab98ca62f23ee9633111596977c55ece224d2c/trunk/qt5-webengine-ffmpeg5.patch
+diff --git a/chromium/media/ffmpeg/ffmpeg_common.h b/chromium/media/ffmpeg/ffmpeg_common.h
+index 2734a485cbd..70b1877a43c 100644
+--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h
++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h
+@@ -29,6 +29,7 @@ extern "C" {
+ #include <libavformat/avformat.h>
+ #include <libavformat/avio.h>
+ #include <libavutil/avutil.h>
++#include <libavutil/channel_layout.h>
+ #include <libavutil/imgutils.h>
+ #include <libavutil/log.h>
+ #include <libavutil/mastering_display_metadata.h>
+diff --git a/chromium/media/filters/audio_file_reader.cc b/chromium/media/filters/audio_file_reader.cc
+index cb81d920def..bd73908d0ca 100644
+--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc
++++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc
+@@ -85,7 +85,7 @@ bool AudioFileReader::OpenDemuxer() {
+ }
+
+ bool AudioFileReader::OpenDecoder() {
+- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
++ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+ if (codec) {
+ // MP3 decodes to S16P which we don't support, tell it to use S16 instead.
+ if (codec_context_->sample_fmt == AV_SAMPLE_FMT_S16P)
+diff --git a/chromium/media/filters/ffmpeg_audio_decoder.cc b/chromium/media/filters/ffmpeg_audio_decoder.cc
+index 0d825ed791b..72fac6167ef 100644
+--- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
++++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
+@@ -329,7 +329,7 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) {
+ }
+ }
+
+- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
++ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+ if (!codec ||
+ avcodec_open2(codec_context_.get(), codec, &codec_options) < 0) {
+ DLOG(ERROR) << "Could not initialize audio decoder: "
+diff --git a/chromium/media/filters/ffmpeg_demuxer.cc b/chromium/media/filters/ffmpeg_demuxer.cc
+index d34db63f3ef..427565b00c1 100644
+--- a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
++++ b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
+@@ -98,12 +98,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) {
+
+ // Next try to use the first DTS value, for codecs where we know PTS == DTS
+ // (excludes all H26x codecs). The start time must be returned in PTS.
+- if (stream->first_dts != kNoFFmpegTimestamp &&
++ if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
+ stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
+ stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
+ stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
+ const base::TimeDelta first_pts =
+- ConvertFromTimeBase(stream->time_base, stream->first_dts);
++ ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
+ if (first_pts < start_time)
+ start_time = first_pts;
+ }
+@@ -408,11 +408,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+ scoped_refptr<DecoderBuffer> buffer;
+
+ if (type() == DemuxerStream::TEXT) {
+- int id_size = 0;
++ size_t id_size = 0;
+ uint8_t* id_data = av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
+
+- int settings_size = 0;
++ size_t settings_size = 0;
+ uint8_t* settings_data = av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
+
+@@ -424,7 +424,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+ buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
+ side_data.data(), side_data.size());
+ } else {
+- int side_data_size = 0;
++ size_t side_data_size = 0;
+ uint8_t* side_data = av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
+
+@@ -485,7 +485,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+ packet->size - data_offset);
+ }
+
+- int skip_samples_size = 0;
++ size_t skip_samples_size = 0;
+ const uint32_t* skip_samples_ptr =
+ reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
+diff --git a/chromium/media/filters/ffmpeg_glue.cc b/chromium/media/filters/ffmpeg_glue.cc
+index 0ef3521473d..8483ecc348f 100644
+--- a/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc
++++ b/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc
+@@ -59,7 +59,6 @@ static int64_t AVIOSeekOperation(void* opaque, int64_t offset, int whence) {
+ }
+
+ void FFmpegGlue::InitializeFFmpeg() {
+- av_register_all();
+ }
+
+ static void LogContainer(bool is_local_file,
+@@ -95,9 +94,6 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol* protocol) {
+ // Enable fast, but inaccurate seeks for MP3.
+ format_context_->flags |= AVFMT_FLAG_FAST_SEEK;
+
+- // Ensures we can read out various metadata bits like vp8 alpha.
+- format_context_->flags |= AVFMT_FLAG_KEEP_SIDE_DATA;
+-
+ // Ensures format parsing errors will bail out. From an audit on 11/2017, all
+ // instances were real failures. Solves bugs like http://crbug.com/710791.
+ format_context_->error_recognition |= AV_EF_EXPLODE;
+diff --git a/chromium/media/filters/ffmpeg_video_decoder.cc b/chromium/media/filters/ffmpeg_video_decoder.cc
+index ef12477ee89..7996606f5f9 100644
+--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
+@@ -391,7 +391,7 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
+ if (decode_nalus_)
+ codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS;
+
+- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
++ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+ if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) {
+ ReleaseFFmpegResources();
+ return false;
+diff --git a/chromium/media/filters/media_file_checker.cc b/chromium/media/filters/media_file_checker.cc
+index 59c2a2fc618..1a9872c7acb 100644
+--- a/src/3rdparty/chromium/media/filters/media_file_checker.cc
++++ b/src/3rdparty/chromium/media/filters/media_file_checker.cc
+@@ -68,7 +68,7 @@ bool MediaFileChecker::Start(base::TimeDelta check_time) {
+ auto context = AVStreamToAVCodecContext(format_context->streams[i]);
+ if (!context)
+ continue;
+- AVCodec* codec = avcodec_find_decoder(cp->codec_id);
++ const AVCodec* codec = avcodec_find_decoder(cp->codec_id);
+ if (codec && avcodec_open2(context.get(), codec, nullptr) >= 0) {
+ auto loop = std::make_unique<FFmpegDecodingLoop>(context.get());
+ stream_contexts[i] = {std::move(context), std::move(loop)};
+diff --git a/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+index 9002b874611..d12fade8b63 100644
+--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
++++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+@@ -203,7 +203,7 @@ int32_t H264DecoderImpl::InitDecode(const VideoCodec* codec_settings,
+ // a pointer |this|.
+ av_context_->opaque = this;
+
+- AVCodec* codec = avcodec_find_decoder(av_context_->codec_id);
++ const AVCodec* codec = avcodec_find_decoder(av_context_->codec_id);
+ if (!codec) {
+ // This is an indication that FFmpeg has not been initialized or it has not
+ // been compiled/initialized with the correct set of codecs.
diff --git a/skip/qt5-qtwebengine/fix-chromium-build.patch b/skip/qt5-qtwebengine/fix-chromium-build.patch
new file mode 100644
index 0000000..8b26238
--- /dev/null
+++ b/skip/qt5-qtwebengine/fix-chromium-build.patch
@@ -0,0 +1,79 @@
+diff --git a/src/3rdparty/chromium/v8/src/compiler/backend/arm64/code-generator-arm64.cc b/src/3rdparty/chromium/v8/src/compiler/backend/arm64/code-generator-arm64.cc
+index 1c02aa69a..69e5e58de 100644
+--- a/src/3rdparty/chromium/v8/src/compiler/backend/arm64/code-generator-arm64.cc
++++ b/src/3rdparty/chromium/v8/src/compiler/backend/arm64/code-generator-arm64.cc
+@@ -375,6 +375,74 @@ Condition FlagsConditionToCondition(FlagsCondition condition) {
+ UNREACHABLE();
+ }
+
++class WasmOutOfLineTrap : public OutOfLineCode {
++ public:
++ WasmOutOfLineTrap(CodeGenerator* gen, Instruction* instr)
++ : OutOfLineCode(gen), gen_(gen), instr_(instr) {}
++ void Generate() override {
++ Arm64OperandConverter i(gen_, instr_);
++ TrapId trap_id =
++ static_cast<TrapId>(i.InputInt32(instr_->InputCount() - 1));
++ GenerateCallToTrap(trap_id);
++ }
++
++ protected:
++ CodeGenerator* gen_;
++
++ void GenerateWithTrapId(TrapId trap_id) { GenerateCallToTrap(trap_id); }
++
++ private:
++ void GenerateCallToTrap(TrapId trap_id) {
++ if (trap_id == TrapId::kInvalid) {
++ // We cannot test calls to the runtime in cctest/test-run-wasm.
++ // Therefore we emit a call to C here instead of a call to the runtime.
++ __ CallCFunction(ExternalReference::wasm_call_trap_callback_for_testing(),
++ 0);
++ __ LeaveFrame(StackFrame::WASM);
++ auto call_descriptor = gen_->linkage()->GetIncomingDescriptor();
++ int pop_count = static_cast<int>(call_descriptor->StackParameterCount());
++ pop_count += (pop_count & 1); // align
++ __ Drop(pop_count);
++ __ Ret();
++ } else {
++ gen_->AssembleSourcePosition(instr_);
++ // A direct call to a wasm runtime stub defined in this module.
++ // Just encode the stub index. This will be patched when the code
++ // is added to the native module and copied into wasm code space.
++ __ Call(static_cast<Address>(trap_id), RelocInfo::WASM_STUB_CALL);
++ ReferenceMap* reference_map =
++ gen_->zone()->New<ReferenceMap>(gen_->zone());
++ gen_->RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
++ __ AssertUnreachable(AbortReason::kUnexpectedReturnFromWasmTrap);
++ }
++ }
++
++ Instruction* instr_;
++};
++
++class WasmProtectedInstructionTrap final : public WasmOutOfLineTrap {
++ public:
++ WasmProtectedInstructionTrap(CodeGenerator* gen, int pc, Instruction* instr)
++ : WasmOutOfLineTrap(gen, instr), pc_(pc) {}
++
++ void Generate() override {
++ gen_->AddProtectedInstructionLanding(pc_, __ pc_offset());
++ GenerateWithTrapId(TrapId::kTrapMemOutOfBounds);
++ }
++
++ private:
++ int pc_;
++};
++
++void EmitOOLTrapIfNeeded(Zone* zone, CodeGenerator* codegen,
++ InstructionCode opcode, Instruction* instr, int pc) {
++ const MemoryAccessMode access_mode =
++ static_cast<MemoryAccessMode>(MiscField::decode(opcode));
++ if (access_mode == kMemoryAccessProtected) {
++ zone->New<WasmProtectedInstructionTrap>(codegen, pc, instr);
++ }
++}
++
+ void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen,
+ InstructionCode opcode, Instruction* instr,
+ Arm64OperandConverter const& i) {
diff --git a/skip/qt5-qtwebengine/fix-strncpy-error.patch b/skip/qt5-qtwebengine/fix-strncpy-error.patch
new file mode 100644
index 0000000..11294de
--- /dev/null
+++ b/skip/qt5-qtwebengine/fix-strncpy-error.patch
@@ -0,0 +1,10 @@
+--- build/src/3rdparty/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc 2022-07-07 22:23:50.602954227 +0100
++++ build2/src/3rdparty/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc 2022-07-11 12:57:26.005060552 +0100
+@@ -8,6 +8,7 @@
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ #include <unistd.h>
++#include <cstring>
+
+ #include "base/files/file_util.h"
+ #include "base/files/scoped_file.h"
diff --git a/skip/qt5-qtwebengine/musl-hacks.patch b/skip/qt5-qtwebengine/musl-hacks.patch
new file mode 100644
index 0000000..3c94b19
--- /dev/null
+++ b/skip/qt5-qtwebengine/musl-hacks.patch
@@ -0,0 +1,13 @@
+diff --git a/src/3rdparty/chromium/net/socket/udp_socket_posix.cc b/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
+index dbc8c5aaf..077bbde33 100644
+--- a/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
++++ b/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
+@@ -1152,7 +1152,7 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers(
+ 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) {
diff --git a/skip/qt5-qtwebengine/musl-sandbox.patch b/skip/qt5-qtwebengine/musl-sandbox.patch
new file mode 100644
index 0000000..ad01ea8
--- /dev/null
+++ b/skip/qt5-qtwebengine/musl-sandbox.patch
@@ -0,0 +1,181 @@
+diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+index 348ab6e8c..2eac6ef82 100644
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+@@ -127,21 +127,11 @@ namespace sandbox {
+ // present (as in newer versions of posix_spawn).
+ 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 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);
++ 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;
+
+ // The following two flags are the two important flags in any vfork-emulating
+ // clone call. EPERM any clone call that contains both of them.
+@@ -151,7 +141,7 @@ ResultExpr RestrictCloneToThreadsAndEPERMFork() {
+ AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0,
+ (flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags);
+
+- return If(IsAndroid() ? android_test : glibc_test, Allow())
++ return If(thread_clone_ok, Allow())
+ .ElseIf(is_fork_or_clone_vfork, Error(EPERM))
+ .Else(CrashSIGSYSClone());
+ }
+diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+index 6e2bd4fee..9f9e4ad8a 100644
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -392,6 +392,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.
+@@ -404,7 +405,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:
+@@ -514,6 +514,8 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
+ case __NR_mlock:
+ case __NR_munlock:
+ case __NR_munmap:
++ case __NR_mremap:
++ case __NR_membarrier:
+ return true;
+ case __NR_madvise:
+ case __NR_mincore:
+@@ -531,7 +533,6 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
+ case __NR_modify_ldt:
+ #endif
+ case __NR_mprotect:
+- case __NR_mremap:
+ case __NR_msync:
+ case __NR_munlockall:
+ case __NR_readahead:
+diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h b/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h
+index 59d0eab8e..7ae700213 100644
+--- a/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h
++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h
+@@ -1119,4 +1119,8 @@
+ #define __NR_rseq 293
+ #endif
+
++#if !defined(__NR_membarrier)
++#define __NR_membarrier 283
++#endif
++
+ #endif // SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_
+diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h b/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
+index 1addd5384..d8811ce87 100644
+--- a/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
+@@ -1441,6 +1441,11 @@
+ #define __NR_io_pgetevents (__NR_SYSCALL_BASE+399)
+ #endif
+
++#if !defined(__NR_membarrier)
++#define __NR_membarrier (__NR_SYSCALL_BASE+389)
++#endif
++
++
+ // ARM private syscalls.
+ #if !defined(__ARM_NR_BASE)
+ #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
+diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/mips64_linux_syscalls.h b/src/3rdparty/chromium/sandbox/linux/system_headers/mips64_linux_syscalls.h
+index ec75815a8..612fcfaa9 100644
+--- a/src/3rdparty/chromium/sandbox/linux/system_headers/mips64_linux_syscalls.h
++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/mips64_linux_syscalls.h
+@@ -1271,4 +1271,8 @@
+ #define __NR_memfd_create (__NR_Linux + 314)
+ #endif
+
++#if !defined(__NR_membarrier)
++#define __NR_membarrier (__NR_Linux + 318)
++#endif
++
+ #endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS64_LINUX_SYSCALLS_H_
+diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h b/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
+index ddbf97f3d..1742acd4c 100644
+--- a/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
+@@ -1433,4 +1433,8 @@
+ #define __NR_memfd_create (__NR_Linux + 354)
+ #endif
+
++#if !defined(__NR_membarrier)
++#define __NR_membarrier (__NR_Linux + 358)
++#endif
++
+ #endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_
+diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h b/src/3rdparty/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h
+index a6afc62d9..6ab7740de 100644
+--- a/src/3rdparty/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h
++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h
+@@ -1710,5 +1710,10 @@
+ #define __NR_clone3 435
+ #endif
+
++#if !defined(__NR_membarrier)
++#define __NR_membarrier 375
++#endif
++
++
+ #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_
+
+
+diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h b/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h
+index 349504aee..6a6d4756f 100644
+--- a/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h
++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h
+@@ -1350,5 +1350,10 @@
+ #define __NR_rseq 334
+ #endif
+
++#if !defined(__NR_membarrier)
++#define __NR_membarrier 324
++#endif
++
++
+ #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_
+
+diff --git a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc b/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+index 9fe9575eb..fa1a946f6 100644
+--- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
++++ b/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+@@ -93,11 +93,11 @@ ResultExpr RendererProcessPolicy::EvaluateSyscall(int sysno) const {
+ case __NR_sysinfo:
+ case __NR_times:
+ case __NR_uname:
+- return Allow();
+- case __NR_sched_getaffinity:
+ case __NR_sched_getparam:
+ case __NR_sched_getscheduler:
+ case __NR_sched_setscheduler:
++ return Allow();
++ case __NR_sched_getaffinity:
+ return RestrictSchedTarget(GetPolicyPid(), sysno);
+ case __NR_prlimit64:
+ // See crbug.com/662450 and setrlimit comment above.
diff --git a/skip/qt5-qtwebengine/nasm.patch b/skip/qt5-qtwebengine/nasm.patch
new file mode 100644
index 0000000..1d58af6
--- /dev/null
+++ b/skip/qt5-qtwebengine/nasm.patch
@@ -0,0 +1,13 @@
+diff --git a/src/3rdparty/chromium/third_party/nasm/config/config-linux.h b/src/3rdparty/chromium/third_party/nasm/config/config-linux.h
+index 7eb7c20ff..3bdc2eb39 100644
+--- a/src/3rdparty/chromium/third_party/nasm/config/config-linux.h
++++ b/src/3rdparty/chromium/third_party/nasm/config/config-linux.h
+@@ -139,7 +139,7 @@
+ #define HAVE_ACCESS 1
+
+ /* Define to 1 if you have the `canonicalize_file_name' function. */
+-#define HAVE_CANONICALIZE_FILE_NAME 1
++// #define HAVE_CANONICALIZE_FILE_NAME 1
+
+ /* Define to 1 if you have the `cpu_to_le16' intrinsic function. */
+ /* #undef HAVE_CPU_TO_LE16 */
diff --git a/skip/qt5-qtwebengine/qt-chromium-python3.patch b/skip/qt5-qtwebengine/qt-chromium-python3.patch
new file mode 100644
index 0000000..41fcb7e
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-chromium-python3.patch
@@ -0,0 +1,1752 @@
+diff -upr b/src/3rdparty/chromium/build/print_python_deps.py a/src/3rdparty/chromium/build/print_python_deps.py
+--- b/src/3rdparty/chromium/build/print_python_deps.py 2022-03-08 18:21:43.709419882 +0100
++++ a/src/3rdparty/chromium/build/print_python_deps.py 2022-03-08 18:23:26.572870672 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.7
++#!/usr/bin/python
+ # Copyright 2016 The Chromium Authors. All rights reserved.
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+@@ -80,7 +80,7 @@ def _GetTargetPythonVersion(module):
+ if shebang.startswith('#!'):
+ # Examples:
+ # '#!/usr/bin/python'
+- # '#!/usr/bin/python2.7'
++ # '#!/usr/bin/python'
+ # '#!/usr/bin/python3'
+ # '#!/usr/bin/env python3'
+ # '#!/usr/bin/env vpython'
+@@ -152,7 +152,7 @@ def main():
+
+ # Trybots run with vpython as default Python, but with a different config
+ # from //.vpython. To make the is_vpython test work, and to match the behavior
+- # of dev machines, the shebang line must be run with python2.7.
++ # of dev machines, the shebang line must be run with python.
+ #
+ # E.g. $HOME/.vpython-root/dd50d3/bin/python
+ # E.g. /b/s/w/ir/cache/vpython/ab5c79/bin/python
+diff -upr b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py
+--- b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py 2022-03-08 18:21:44.576087412 +0100
++++ a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py 2022-03-08 18:23:26.572870672 +0100
+@@ -7,7 +7,7 @@
+ Converts a given ASCII proto into a binary resource.
+
+ """
+-
++from __future__ import print_function
+ import abc
+ import imp
+ import optparse
+@@ -196,12 +196,12 @@ class BinaryProtoGenerator:
+ self._ImportProtoModules(opts.path)
+
+ if not self.VerifyArgs(opts):
+- print "Wrong arguments"
++ print("Wrong arguments")
+ return 1
+
+ try:
+ self._GenerateBinaryProtos(opts)
+ except Exception as e:
+- print "ERROR: Failed to render binary version of %s:\n %s\n%s" % (
+- opts.infile, str(e), traceback.format_exc())
++ print("ERROR: Failed to render binary version of %s:\n %s\n%s" %
++ (opts.infile, str(e), traceback.format_exc()))
+ return 1
+diff -upr b/src/3rdparty/chromium/content/browser/tracing/generate_trace_viewer_grd.py a/src/3rdparty/chromium/content/browser/tracing/generate_trace_viewer_grd.py
+--- b/src/3rdparty/chromium/content/browser/tracing/generate_trace_viewer_grd.py 2022-03-08 18:21:44.936087771 +0100
++++ a/src/3rdparty/chromium/content/browser/tracing/generate_trace_viewer_grd.py 2022-03-08 18:23:26.572870672 +0100
+@@ -74,7 +74,7 @@ def main(argv):
+ for filename in parsed_args.source_files:
+ add_file_to_grd(doc, os.path.basename(filename))
+
+- with open(parsed_args.output_filename, 'w') as output_file:
++ with open(parsed_args.output_filename, 'wb') as output_file:
+ output_file.write(doc.toxml(encoding='UTF-8'))
+
+
+diff -upr b/src/3rdparty/chromium/mojo/public/tools/bindings/BUILD.gn a/src/3rdparty/chromium/mojo/public/tools/bindings/BUILD.gn
+--- b/src/3rdparty/chromium/mojo/public/tools/bindings/BUILD.gn 2022-03-08 18:21:45.622755122 +0100
++++ a/src/3rdparty/chromium/mojo/public/tools/bindings/BUILD.gn 2022-03-08 18:23:26.572870672 +0100
+@@ -2,9 +2,11 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+
++import("//build/config/python.gni")
+ import("//mojo/public/tools/bindings/mojom.gni")
+ import("//third_party/jinja2/jinja2.gni")
+
++# TODO(crbug.com/1194274): Investigate nondeterminism in Py3 builds.
+ action("precompile_templates") {
+ sources = mojom_generator_sources
+ sources += [
+diff -upr b/src/3rdparty/chromium/mojo/public/tools/bindings/gen_data_files_list.py a/src/3rdparty/chromium/mojo/public/tools/bindings/gen_data_files_list.py
+--- b/src/3rdparty/chromium/mojo/public/tools/bindings/gen_data_files_list.py 2022-03-08 18:21:45.622755122 +0100
++++ a/src/3rdparty/chromium/mojo/public/tools/bindings/gen_data_files_list.py 2022-03-08 18:23:26.572870672 +0100
+@@ -18,7 +18,6 @@ import os
+ import re
+ import sys
+
+-from cStringIO import StringIO
+ from optparse import OptionParser
+
+ sys.path.insert(
+@@ -41,12 +40,9 @@ def main():
+ pattern = re.compile(options.pattern)
+ files = [f for f in os.listdir(options.directory) if pattern.match(f)]
+
+- stream = StringIO()
+- for f in files:
+- print(f, file=stream)
++ contents = '\n'.join(f for f in files) + '\n'
++ WriteFile(contents, options.output)
+
+- WriteFile(stream.getvalue(), options.output)
+- stream.close()
+
+ if __name__ == '__main__':
+ sys.exit(main())
+diff -upr b/src/3rdparty/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py a/src/3rdparty/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py
+--- b/src/3rdparty/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py 2022-03-08 18:21:45.629421795 +0100
++++ a/src/3rdparty/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py 2022-03-08 18:23:26.572870672 +0100
+@@ -25,6 +25,10 @@ sys.path.append(os.path.join(os.path.dir
+ 'build', 'android', 'gyp'))
+ from util import build_utils
+
++# TODO(crbug.com/1174969): Remove this once Python2 is obsoleted.
++if sys.version_info.major != 2:
++ basestring = str
++ long = int
+
+ GENERATOR_PREFIX = 'java'
+
+diff -upr b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/generator.py a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/generator.py
+--- b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/generator.py 2022-03-08 18:21:45.632755132 +0100
++++ a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/generator.py 2022-03-08 18:23:26.572870672 +0100
+@@ -136,9 +136,14 @@ class Stylizer(object):
+
+ def WriteFile(contents, full_path):
+ # If |contents| is same with the file content, we skip updating.
++ if not isinstance(contents, bytes):
++ data = contents.encode('utf8')
++ else:
++ data = contents
++
+ if os.path.isfile(full_path):
+ with open(full_path, 'rb') as destination_file:
+- if destination_file.read() == contents:
++ if destination_file.read() == data:
+ return
+
+ # Make sure the containing directory exists.
+@@ -146,11 +151,8 @@ def WriteFile(contents, full_path):
+ fileutil.EnsureDirectoryExists(full_dir)
+
+ # Dump the data to disk.
+- with open(full_path, "wb") as f:
+- if not isinstance(contents, bytes):
+- f.write(contents.encode('utf-8'))
+- else:
+- f.write(contents)
++ with open(full_path, 'wb') as f:
++ f.write(data)
+
+
+ def AddComputedData(module):
+diff -upr b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/module.py a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/module.py
+--- b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/module.py 2022-03-08 18:21:45.632755132 +0100
++++ a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/module.py 2022-03-08 18:23:26.572870672 +0100
+@@ -398,7 +398,8 @@ class Field(object):
+
+
+ class StructField(Field):
+- pass
++ def __hash__(self):
++ return super(Field, self).__hash__()
+
+
+ class UnionField(Field):
+diff -upr b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py
+--- b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py 2022-03-08 18:21:45.632755132 +0100
++++ a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py 2022-03-08 18:23:26.572870672 +0100
+@@ -75,9 +75,9 @@ def PrecompileTemplates(generator_module
+ os.path.dirname(module.__file__), generator.GetTemplatePrefix())
+ ]))
+ jinja_env.filters.update(generator.GetFilters())
+- jinja_env.compile_templates(
+- os.path.join(output_dir, "%s.zip" % generator.GetTemplatePrefix()),
+- extensions=["tmpl"],
+- zip="stored",
+- py_compile=True,
+- ignore_errors=False)
++ jinja_env.compile_templates(os.path.join(
++ output_dir, "%s.zip" % generator.GetTemplatePrefix()),
++ extensions=["tmpl"],
++ zip="stored",
++ py_compile=sys.version_info.major < 3,
++ ignore_errors=False)
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py 2022-03-08 18:21:46.709422871 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py 2022-03-08 18:23:26.576204010 +0100
+@@ -344,7 +344,7 @@ def make_default_value_expr(idl_type, de
+ """
+ assert default_value.is_type_compatible_with(idl_type)
+
+- class DefaultValueExpr:
++ class DefaultValueExpr(object):
+ _ALLOWED_SYMBOLS_IN_DEPS = ("isolate")
+
+ def __init__(self, initializer_expr, initializer_deps,
+@@ -502,7 +502,7 @@ def make_v8_to_blink_value(blink_var_nam
+ assert isinstance(blink_var_name, str)
+ assert isinstance(v8_value_expr, str)
+ assert isinstance(idl_type, web_idl.IdlType)
+- assert (argument_index is None or isinstance(argument_index, (int, long)))
++ assert (argument_index is None or isinstance(argument_index, int))
+ assert (default_value is None
+ or isinstance(default_value, web_idl.LiteralConstant))
+
+@@ -622,7 +622,7 @@ def make_v8_to_blink_value_variadic(blin
+ """
+ assert isinstance(blink_var_name, str)
+ assert isinstance(v8_array, str)
+- assert isinstance(v8_array_start_index, (int, long))
++ assert isinstance(v8_array_start_index, int)
+ assert isinstance(idl_type, web_idl.IdlType)
+
+ pattern = ("auto&& ${{{_1}}} = "
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py 2022-03-08 18:21:46.709422871 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py 2022-03-08 18:23:26.576204010 +0100
+@@ -177,7 +177,7 @@ def generate_callback_interface(callback
+ prop_install_mode=PropInstallMode.UNCONDITIONAL,
+ trampoline_var_name=None,
+ attribute_entries=[],
+- constant_entries=filter(is_unconditional, constant_entries),
++ constant_entries=list(filter(is_unconditional, constant_entries)),
+ exposed_construct_entries=[],
+ operation_entries=[])
+ (install_interface_template_decl, install_interface_template_def,
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py 2022-03-08 18:21:46.709422871 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py 2022-03-08 18:23:26.576204010 +0100
+@@ -503,13 +503,13 @@ class CompositeNode(CodeNode):
+ gensym_kwargs = {}
+ template_vars = {}
+ for arg in args:
+- assert isinstance(arg, (CodeNode, int, long, str))
++ assert isinstance(arg, (CodeNode, int, str))
+ gensym = CodeNode.gensym()
+ gensym_args.append("${{{}}}".format(gensym))
+ template_vars[gensym] = arg
+ for key, value in kwargs.items():
+- assert isinstance(key, (int, long, str))
+- assert isinstance(value, (CodeNode, int, long, str))
++ assert isinstance(key, (int, str))
++ assert isinstance(value, (CodeNode, int, str))
+ gensym = CodeNode.gensym()
+ gensym_kwargs[key] = "${{{}}}".format(gensym)
+ template_vars[gensym] = value
+@@ -602,7 +602,7 @@ class ListNode(CodeNode):
+ def insert(self, index, node):
+ if node is None:
+ return
+- assert isinstance(index, (int, long))
++ assert isinstance(index, int)
+ assert isinstance(node, CodeNode)
+ assert node.outer is None and node.prev is None
+
+@@ -721,7 +721,7 @@ class SymbolScopeNode(SequenceNode):
+ if not scope_chains:
+ return counts
+
+- self_index = iter(scope_chains).next().index(self)
++ self_index = next(iter(scope_chains)).index(self)
+ scope_chains = map(
+ lambda scope_chain: scope_chain[self_index + 1:], scope_chains)
+ scope_to_likeliness = {}
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py 2022-03-08 18:21:46.709422871 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py 2022-03-08 18:23:26.576204010 +0100
+@@ -109,7 +109,7 @@ def expr_and(terms):
+
+ if any(term.is_always_false for term in terms):
+ return _Expr(False)
+- terms = filter(lambda x: not x.is_always_true, terms)
++ terms = list(filter(lambda x: not x.is_always_true, terms))
+ if not terms:
+ return _Expr(True)
+ if len(terms) == 1:
+@@ -124,7 +124,7 @@ def expr_or(terms):
+
+ if any(term.is_always_true for term in terms):
+ return _Expr(True)
+- terms = filter(lambda x: not x.is_always_false, terms)
++ terms = list(filter(lambda x: not x.is_always_false, terms))
+ if not terms:
+ return _Expr(False)
+ if len(terms) == 1:
+@@ -222,7 +222,7 @@ def expr_from_exposure(exposure,
+ elif exposure.only_in_secure_contexts is False:
+ secure_context_term = _Expr(True)
+ else:
+- terms = map(ref_enabled, exposure.only_in_secure_contexts)
++ terms = list(map(ref_enabled, exposure.only_in_secure_contexts))
+ secure_context_term = expr_or(
+ [_Expr("${is_in_secure_context}"),
+ expr_not(expr_and(terms))])
+@@ -275,10 +275,11 @@ def expr_from_exposure(exposure,
+
+ # [ContextEnabled]
+ if exposure.context_enabled_features:
+- terms = map(
+- lambda feature: _Expr(
+- "${{context_feature_settings}}->is{}Enabled()".format(
+- feature)), exposure.context_enabled_features)
++ terms = list(
++ map(
++ lambda feature: _Expr(
++ "${{context_feature_settings}}->is{}Enabled()".format(
++ feature)), exposure.context_enabled_features))
+ context_enabled_terms.append(
+ expr_and([_Expr("${context_feature_settings}"),
+ expr_or(terms)]))
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py 2022-03-08 18:21:46.709422871 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py 2022-03-08 18:23:26.576204010 +0100
+@@ -23,7 +23,7 @@ class _TemplateFormatter(string.Formatte
+ self._template_formatter_indexing_count_ = 0
+
+ def get_value(self, key, args, kwargs):
+- if isinstance(key, (int, long)):
++ if isinstance(key, int):
+ return args[key]
+ assert isinstance(key, str)
+ if not key:
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py 2022-03-08 18:21:46.709422871 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py 2022-03-08 18:23:26.576204010 +0100
+@@ -116,4 +116,4 @@ def write_code_node_to_file(code_node, f
+ # stderr=format_result.error_message))
+ #
+ # web_idl.file_io.write_to_file_if_changed(filepath, format_result.contents)
+- web_idl.file_io.write_to_file_if_changed(filepath, rendered_text)
++ web_idl.file_io.write_to_file_if_changed(filepath, rendered_text.encode('utf-8'))
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py 2022-03-08 18:21:46.709422871 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py 2022-03-08 18:23:26.576204010 +0100
+@@ -993,7 +993,7 @@ def make_dict_trace_func(cg_context):
+ _2 = _blink_member_name(member).value_var
+ return TextNode(_format(pattern, _1=_1, _2=_2))
+
+- body.extend(map(make_trace_member_node, own_members))
++ body.extend(list(map(make_trace_member_node, own_members)))
+ body.append(TextNode("BaseClass::Trace(visitor);"))
+
+ return func_decl, func_def
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py 2022-03-08 18:21:46.709422871 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py 2022-03-08 18:23:26.579537347 +0100
+@@ -582,7 +582,7 @@ def _make_blink_api_call(code_node,
+ overriding_args=None):
+ assert isinstance(code_node, SymbolScopeNode)
+ assert isinstance(cg_context, CodeGenContext)
+- assert num_of_args is None or isinstance(num_of_args, (int, long))
++ assert num_of_args is None or isinstance(num_of_args, int)
+ assert (overriding_args is None
+ or (isinstance(overriding_args, (list, tuple))
+ and all(isinstance(arg, str) for arg in overriding_args)))
+@@ -1196,8 +1196,10 @@ def make_overload_dispatcher(cg_context)
+ did_use_break = did_use_break or can_fail
+
+ conditional = expr_or(
+- map(lambda item: expr_from_exposure(item.function_like.exposure),
+- items))
++ list(
++ map(
++ lambda item: expr_from_exposure(item.function_like.exposure
++ ), items)))
+ if not conditional.is_always_true:
+ node = CxxUnlikelyIfNode(cond=conditional, body=node)
+
+@@ -4642,7 +4644,7 @@ class _PropEntryConstructorGroup(_PropEn
+ def __init__(self, is_context_dependent, exposure_conditional, world,
+ constructor_group, ctor_callback_name, ctor_func_length):
+ assert isinstance(ctor_callback_name, str)
+- assert isinstance(ctor_func_length, (int, long))
++ assert isinstance(ctor_func_length, int)
+
+ _PropEntryBase.__init__(self, is_context_dependent,
+ exposure_conditional, world, constructor_group)
+@@ -4670,7 +4672,7 @@ class _PropEntryOperationGroup(_PropEntr
+ op_func_length,
+ no_alloc_direct_callback_name=None):
+ assert isinstance(op_callback_name, str)
+- assert isinstance(op_func_length, (int, long))
++ assert isinstance(op_func_length, int)
+
+ _PropEntryBase.__init__(self, is_context_dependent,
+ exposure_conditional, world, operation_group)
+@@ -5175,9 +5177,9 @@ def make_install_interface_template(cg_c
+ ])
+
+ if class_like.identifier == "CSSStyleDeclaration":
+- css_properties = filter(
+- lambda attr: "CSSProperty" in attr.extended_attributes,
+- class_like.attributes)
++ css_properties = list(
++ filter(lambda attr: "CSSProperty" in attr.extended_attributes,
++ class_like.attributes))
+ if css_properties:
+ prop_name_list = "".join(
+ map(lambda attr: "\"{}\", ".format(attr.identifier),
+@@ -5567,8 +5569,8 @@ ${instance_object} = ${v8_context}->Glob
+ "V8DOMConfiguration::InstallConstants(${isolate}, "
+ "${interface_template}, ${prototype_template}, "
+ "kConstantCallbackTable, base::size(kConstantCallbackTable));")
+- constant_callback_entries = filter(lambda entry: entry.const_callback_name,
+- constant_entries)
++ constant_callback_entries = list(filter(lambda entry: entry.const_callback_name,
++ constant_entries))
+ install_properties(table_name, constant_callback_entries,
+ _make_constant_callback_registration_table,
+ installer_call_text)
+@@ -5584,8 +5586,8 @@ ${instance_object} = ${v8_context}->Glob
+ "V8DOMConfiguration::InstallConstants(${isolate}, "
+ "${interface_template}, ${prototype_template}, "
+ "kConstantValueTable, base::size(kConstantValueTable));")
+- constant_value_entries = filter(
+- lambda entry: not entry.const_callback_name, constant_entries)
++ constant_value_entries = list(filter(
++ lambda entry: not entry.const_callback_name, constant_entries))
+ install_properties(table_name, constant_value_entries,
+ _make_constant_value_registration_table,
+ installer_call_text)
+@@ -6336,8 +6338,8 @@ def make_v8_context_snapshot_api(cg_cont
+ assert isinstance(component, web_idl.Component)
+
+ derived_interfaces = cg_context.interface.deriveds
+- derived_names = map(lambda interface: interface.identifier,
+- derived_interfaces)
++ derived_names = list(
++ map(lambda interface: interface.identifier, derived_interfaces))
+ derived_names.append(cg_context.interface.identifier)
+ if not ("Window" in derived_names or "HTMLDocument" in derived_names):
+ return None, None
+@@ -6411,9 +6413,11 @@ def _make_v8_context_snapshot_get_refere
+ collect_callbacks(named_properties_object_callback_defs)
+ collect_callbacks(cross_origin_property_callback_defs)
+
+- entry_nodes = map(
+- lambda name: TextNode("reinterpret_cast<intptr_t>({}),".format(name)),
+- filter(None, callback_names))
++ entry_nodes = list(
++ map(
++ lambda name: TextNode("reinterpret_cast<intptr_t>({}),".format(name
++ )),
++ filter(None, callback_names)))
+ table_node = ListNode([
+ TextNode("using namespace ${class_name}Callbacks;"),
+ TextNode("static const intptr_t kReferenceTable[] = {"),
+@@ -6451,10 +6455,11 @@ def _make_v8_context_snapshot_install_pr
+ class_name=None,
+ prop_install_mode=PropInstallMode.V8_CONTEXT_SNAPSHOT,
+ trampoline_var_name=None,
+- attribute_entries=filter(selector, attribute_entries),
+- constant_entries=filter(selector, constant_entries),
+- exposed_construct_entries=filter(selector, exposed_construct_entries),
+- operation_entries=filter(selector, operation_entries))
++ attribute_entries=list(filter(selector, attribute_entries)),
++ constant_entries=list(filter(selector, constant_entries)),
++ exposed_construct_entries=list(
++ filter(selector, exposed_construct_entries)),
++ operation_entries=list(filter(selector, operation_entries)))
+
+ return func_decl, func_def
+
+@@ -6810,11 +6815,11 @@ def generate_interface(interface_identif
+ class_name=impl_class_name,
+ prop_install_mode=PropInstallMode.UNCONDITIONAL,
+ trampoline_var_name=tp_install_unconditional_props,
+- attribute_entries=filter(is_unconditional, attribute_entries),
+- constant_entries=filter(is_unconditional, constant_entries),
+- exposed_construct_entries=filter(is_unconditional,
+- exposed_construct_entries),
+- operation_entries=filter(is_unconditional, operation_entries))
++ attribute_entries=list(filter(is_unconditional, attribute_entries)),
++ constant_entries=list(filter(is_unconditional, constant_entries)),
++ exposed_construct_entries=list(
++ filter(is_unconditional, exposed_construct_entries)),
++ operation_entries=list(filter(is_unconditional, operation_entries)))
+ (install_context_independent_props_decl,
+ install_context_independent_props_def,
+ install_context_independent_props_trampoline) = make_install_properties(
+@@ -6823,11 +6828,14 @@ def generate_interface(interface_identif
+ class_name=impl_class_name,
+ prop_install_mode=PropInstallMode.CONTEXT_INDEPENDENT,
+ trampoline_var_name=tp_install_context_independent_props,
+- attribute_entries=filter(is_context_independent, attribute_entries),
+- constant_entries=filter(is_context_independent, constant_entries),
+- exposed_construct_entries=filter(is_context_independent,
+- exposed_construct_entries),
+- operation_entries=filter(is_context_independent, operation_entries))
++ attribute_entries=list(
++ filter(is_context_independent, attribute_entries)),
++ constant_entries=list(filter(is_context_independent,
++ constant_entries)),
++ exposed_construct_entries=list(
++ filter(is_context_independent, exposed_construct_entries)),
++ operation_entries=list(
++ filter(is_context_independent, operation_entries)))
+ (install_context_dependent_props_decl, install_context_dependent_props_def,
+ install_context_dependent_props_trampoline) = make_install_properties(
+ cg_context,
+@@ -6835,11 +6843,13 @@ def generate_interface(interface_identif
+ class_name=impl_class_name,
+ prop_install_mode=PropInstallMode.CONTEXT_DEPENDENT,
+ trampoline_var_name=tp_install_context_dependent_props,
+- attribute_entries=filter(is_context_dependent, attribute_entries),
+- constant_entries=filter(is_context_dependent, constant_entries),
+- exposed_construct_entries=filter(is_context_dependent,
+- exposed_construct_entries),
+- operation_entries=filter(is_context_dependent, operation_entries))
++ attribute_entries=list(filter(is_context_dependent,
++ attribute_entries)),
++ constant_entries=list(filter(is_context_dependent, constant_entries)),
++ exposed_construct_entries=list(
++ filter(is_context_dependent, exposed_construct_entries)),
++ operation_entries=list(filter(is_context_dependent,
++ operation_entries)))
+ (install_interface_template_decl, install_interface_template_def,
+ install_interface_template_trampoline) = make_install_interface_template(
+ cg_context,
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py 2022-03-08 18:21:46.709422871 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py 2022-03-08 18:23:26.579537347 +0100
+@@ -105,7 +105,7 @@ class MakoRenderer(object):
+ on_error = self._caller_stack_on_error
+ if (len(current) <= len(on_error)
+ and all(current[i] == on_error[i]
+- for i in xrange(len(current)))):
++ for i in range(len(current)))):
+ pass # Error happened in a deeper caller.
+ else:
+ self._caller_stack_on_error = list(self._caller_stack)
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py 2022-03-08 18:23:26.579537347 +0100
+@@ -70,8 +70,13 @@ def gn_format(contents, filename=None):
+
+
+ def _invoke_format_command(command_line, filename, contents):
+- proc = subprocess.Popen(
+- command_line, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
++ kwargs = {}
++ if sys.version_info.major != 2:
++ kwargs['encoding'] = 'utf-8'
++ proc = subprocess.Popen(command_line,
++ stdin=subprocess.PIPE,
++ stdout=subprocess.PIPE,
++ **kwargs)
+ stdout_output, stderr_output = proc.communicate(input=contents)
+ exit_code = proc.wait()
+
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py 2022-03-08 18:23:26.579537347 +0100
+@@ -2,6 +2,7 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+
++import functools
+ import multiprocessing
+
+ from .package_initializer import package_initializer
+@@ -76,7 +77,7 @@ class TaskQueue(object):
+ if not report_progress:
+ return
+
+- done_count = reduce(
++ done_count = functools.reduce(
+ lambda count, worker_task: count + bool(worker_task.ready()),
+ self._worker_tasks, 0)
+ report_progress(len(self._worker_tasks), done_count)
+@@ -85,4 +86,4 @@ class TaskQueue(object):
+ def _task_queue_run_tasks(tasks):
+ for task in tasks:
+ func, args, kwargs = task
+- apply(func, args, kwargs)
++ func(*args, **kwargs)
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py 2022-03-08 18:23:26.579537347 +0100
+@@ -13,6 +13,7 @@ import re
+ import sys
+
+ from idl_types import set_ancestors, IdlType
++from itertools import groupby
+ from v8_globals import includes
+ from v8_interface import constant_filters
+ from v8_types import set_component_dirs
+@@ -43,6 +44,7 @@ TEMPLATES_DIR = os.path.normpath(
+ # after path[0] == invoking script dir
+ sys.path.insert(1, THIRD_PARTY_DIR)
+ import jinja2
++from jinja2.filters import make_attrgetter, environmentfilter
+
+
+ def generate_indented_conditional(code, conditional):
+@@ -88,6 +90,13 @@ def runtime_enabled_if(code, name):
+ return generate_indented_conditional(code, function)
+
+
++@environmentfilter
++def do_stringify_key_group_by(environment, value, attribute):
++ expr = make_attrgetter(environment, attribute)
++ key = lambda item: '' if expr(item) is None else str(expr(item))
++ return groupby(sorted(value, key=key), expr)
++
++
+ def initialize_jinja_env(cache_dir):
+ jinja_env = jinja2.Environment(
+ loader=jinja2.FileSystemLoader(TEMPLATES_DIR),
+@@ -117,6 +126,7 @@ def initialize_jinja_env(cache_dir):
+ })
+ jinja_env.filters.update(constant_filters())
+ jinja_env.filters.update(method_filters())
++ jinja_env.filters["stringifykeygroupby"] = do_stringify_key_group_by
+ return jinja_env
+
+
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py 2022-03-08 18:23:26.579537347 +0100
+@@ -80,7 +80,7 @@ def read_idl_file(reader, idl_filename):
+ assert len(interfaces) == 1, (
+ "Expected one interface in file %r, found %d" %
+ (idl_filename, len(interfaces)))
+- return (interfaces.values()[0], includes)
++ return (list(interfaces.values())[0], includes)
+
+
+ def interface_is_global(interface):
+@@ -281,7 +281,7 @@ def main():
+
+ info_provider = create_component_info_provider(
+ os.path.normpath(options.info_dir), options.target_component)
+- idl_filenames = map(str.strip, open(options.idl_files_list))
++ idl_filenames = list(map(str.strip, open(options.idl_files_list)))
+
+ generate_origin_trial_features(info_provider, options, idl_filenames)
+ return 0
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py 2022-03-08 18:23:26.582870685 +0100
+@@ -394,7 +394,8 @@ class IdlInterface(object):
+ else:
+ raise ValueError('Unrecognized node class: %s' % child_class)
+
+- if len(filter(None, [self.iterable, self.maplike, self.setlike])) > 1:
++ if len(list(filter(None,
++ [self.iterable, self.maplike, self.setlike]))) > 1:
+ raise ValueError(
+ 'Interface can only have one of iterable<>, maplike<> and setlike<>.'
+ )
+@@ -512,6 +513,9 @@ class IdlAttribute(TypedObject):
+ def accept(self, visitor):
+ visitor.visit_attribute(self)
+
++ def __lt__(self, other):
++ return self.name < other.name
++
+
+ ################################################################################
+ # Constants
+@@ -852,7 +856,7 @@ class IdlIncludes(object):
+ ################################################################################
+
+
+-class Exposure:
++class Exposure(object):
+ """An Exposure holds one Exposed or RuntimeEnabled condition.
+ Each exposure has two properties: exposed and runtime_enabled.
+ Exposure(e, r) corresponds to [Exposed(e r)]. Exposure(e) corresponds to
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py 2022-03-08 18:23:26.582870685 +0100
+@@ -55,8 +55,8 @@ def validate_blink_idl_definitions(idl_f
+ definitions. There is no filename convention in this case.
+ - Otherwise, an IDL file is invalid.
+ """
+- targets = (
+- definitions.interfaces.values() + definitions.dictionaries.values())
++ targets = (list(definitions.interfaces.values()) +
++ list(definitions.dictionaries.values()))
+ number_of_targets = len(targets)
+ if number_of_targets > 1:
+ raise Exception(
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py 2022-03-08 18:23:26.582870685 +0100
+@@ -349,7 +349,7 @@ class IdlUnionType(IdlTypeBase):
+ return True
+
+ def single_matching_member_type(self, predicate):
+- matching_types = filter(predicate, self.flattened_member_types)
++ matching_types = list(filter(predicate, self.flattened_member_types))
+ if len(matching_types) > 1:
+ raise ValueError('%s is ambiguous.' % self.name)
+ return matching_types[0] if matching_types else None
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/utilities.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/utilities.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/utilities.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/utilities.py 2022-03-08 18:23:26.582870685 +0100
+@@ -196,8 +196,9 @@ class ComponentInfoProviderModules(Compo
+
+ @property
+ def callback_functions(self):
+- return dict(self._component_info_core['callback_functions'].items() +
+- self._component_info_modules['callback_functions'].items())
++ return dict(
++ list(self._component_info_core['callback_functions'].items()) +
++ list(self._component_info_modules['callback_functions'].items()))
+
+ @property
+ def specifier_for_export(self):
+@@ -209,8 +210,8 @@ class ComponentInfoProviderModules(Compo
+
+
+ def load_interfaces_info_overall_pickle(info_dir):
+- with open(os.path.join(info_dir,
+- 'interfaces_info.pickle')) as interface_info_file:
++ with open(os.path.join(info_dir, 'interfaces_info.pickle'),
++ mode='rb') as interface_info_file:
+ return pickle.load(interface_info_file)
+
+
+@@ -236,23 +237,20 @@ def merge_dict_recursively(target, diff)
+
+ def create_component_info_provider_core(info_dir):
+ interfaces_info = load_interfaces_info_overall_pickle(info_dir)
+- with open(
+- os.path.join(info_dir, 'core',
+- 'component_info_core.pickle')) as component_info_file:
++ with open(os.path.join(info_dir, 'core', 'component_info_core.pickle'),
++ mode='rb') as component_info_file:
+ component_info = pickle.load(component_info_file)
+ return ComponentInfoProviderCore(interfaces_info, component_info)
+
+
+ def create_component_info_provider_modules(info_dir):
+ interfaces_info = load_interfaces_info_overall_pickle(info_dir)
+- with open(
+- os.path.join(info_dir, 'core',
+- 'component_info_core.pickle')) as component_info_file:
++ with open(os.path.join(info_dir, 'core', 'component_info_core.pickle'),
++ mode='rb') as component_info_file:
+ component_info_core = pickle.load(component_info_file)
+- with open(
+- os.path.join(
+- info_dir, 'modules',
+- 'component_info_modules.pickle')) as component_info_file:
++ with open(os.path.join(info_dir, 'modules',
++ 'component_info_modules.pickle'),
++ mode='rb') as component_info_file:
+ component_info_modules = pickle.load(component_info_file)
+ return ComponentInfoProviderModules(interfaces_info, component_info_core,
+ component_info_modules)
+@@ -356,7 +354,7 @@ def write_pickle_file(pickle_filename, d
+ pickle_filename = abs(pickle_filename)
+ # If |data| is same with the file content, we skip updating.
+ if os.path.isfile(pickle_filename):
+- with open(pickle_filename) as pickle_file:
++ with open(pickle_filename, 'rb') as pickle_file:
+ try:
+ if pickle.load(pickle_file) == data:
+ return
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py 2022-03-08 18:23:26.582870685 +0100
+@@ -189,7 +189,7 @@ def context_enabled_features(attributes)
+ return sorted([
+ member for member in members
+ if member.get(KEY) and not member.get('exposed_test')
+- ])
++ ], key=lambda item: item['name'])
+
+ def member_filter_by_name(members, name):
+ return [member for member in members if member[KEY] == name]
+@@ -612,7 +612,8 @@ def interface_context(interface, interfa
+ sorted(
+ origin_trial_features(interface, context['constants'],
+ context['attributes'], context['methods']) +
+- context_enabled_features(context['attributes'])),
++ context_enabled_features(context['attributes']),
++ key=lambda item: item['name']),
+ })
+ if context['optional_features']:
+ includes.add('platform/bindings/v8_per_context_data.h')
+@@ -1356,9 +1357,9 @@ def resolution_tests_methods(effective_o
+
+ # Extract argument and IDL type to simplify accessing these in each loop.
+ arguments = [method['arguments'][index] for method in methods]
+- arguments_methods = zip(arguments, methods)
++ arguments_methods = list(zip(arguments, methods))
+ idl_types = [argument['idl_type_object'] for argument in arguments]
+- idl_types_methods = zip(idl_types, methods)
++ idl_types_methods = list(zip(idl_types, methods))
+
+ # We can’t do a single loop through all methods or simply sort them, because
+ # a method may be listed in multiple steps of the resolution algorithm, and
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py 2022-03-08 18:23:26.582870685 +0100
+@@ -46,6 +46,10 @@ import v8_types
+ import v8_utilities
+ from v8_utilities import (has_extended_attribute_value, is_unforgeable)
+
++# TODO: Remove this once Python2 is obsoleted.
++if sys.version_info.major != 2:
++ basestring = str
++
+
+ def method_is_visible(method, interface_is_partial):
+ if 'overloads' in method:
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py 2022-03-08 18:23:26.582870685 +0100
+@@ -271,7 +271,7 @@ EXPOSED_WORKERS = set([
+ ])
+
+
+-class ExposureSet:
++class ExposureSet(object):
+ """An ExposureSet is a collection of Exposure instructions."""
+
+ def __init__(self, exposures=None):
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py 2022-03-08 18:21:46.712756208 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py 2022-03-08 18:23:26.582870685 +0100
+@@ -91,11 +91,13 @@ class CallbackInterface(UserDefinedType,
+ for operation_ir in ir.operations
+ ])
+ self._operation_groups = tuple([
+- OperationGroup(
+- operation_group_ir,
+- filter(lambda x: x.identifier == operation_group_ir.identifier,
+- self._operations),
+- owner=self) for operation_group_ir in ir.operation_groups
++ OperationGroup(operation_group_ir,
++ list(
++ filter(
++ lambda x: x.identifier == operation_group_ir
++ .identifier, self._operations)),
++ owner=self)
++ for operation_group_ir in ir.operation_groups
+ ])
+
+ @property
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py 2022-03-08 18:21:46.716089544 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py 2022-03-08 18:23:26.582870685 +0100
+@@ -156,4 +156,4 @@ class Database(object):
+ return self._view_by_kind(Database._Kind.UNION)
+
+ def _view_by_kind(self, kind):
+- return self._impl.find_by_kind(kind).values()
++ return list(self._impl.find_by_kind(kind).values())
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py 2022-03-08 18:21:46.716089544 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py 2022-03-08 18:23:26.582870685 +0100
+@@ -8,8 +8,11 @@ from .runtime_enabled_features import Ru
+ class _Feature(str):
+ """Represents a runtime-enabled feature."""
+
++ def __new__(cls, value):
++ return str.__new__(cls, value)
++
+ def __init__(self, value):
+- str.__init__(self, value)
++ str.__init__(self)
+ self._is_context_dependent = (
+ RuntimeEnabledFeatures.is_context_dependent(self))
+
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py 2022-03-08 18:21:46.716089544 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py 2022-03-08 18:23:26.586204022 +0100
+@@ -71,8 +71,9 @@ class FunctionLike(WithIdentifier):
+ def num_of_required_arguments(self):
+ """Returns the number of required arguments."""
+ return len(
+- filter(lambda arg: not (arg.is_optional or arg.is_variadic),
+- self.arguments))
++ list(
++ filter(lambda arg: not (arg.is_optional or arg.is_variadic),
++ self.arguments)))
+
+
+ class OverloadGroup(WithIdentifier):
+@@ -171,8 +172,7 @@ class OverloadGroup(WithIdentifier):
+ Returns the effective overload set.
+ https://heycam.github.io/webidl/#compute-the-effective-overload-set
+ """
+- assert argument_count is None or isinstance(argument_count,
+- (int, long))
++ assert argument_count is None or isinstance(argument_count, int)
+
+ N = argument_count
+ S = []
+@@ -188,21 +188,21 @@ class OverloadGroup(WithIdentifier):
+
+ S.append(
+ OverloadGroup.EffectiveOverloadItem(
+- X, map(lambda arg: arg.idl_type, X.arguments),
+- map(lambda arg: arg.optionality, X.arguments)))
++ X, list(map(lambda arg: arg.idl_type, X.arguments)),
++ list(map(lambda arg: arg.optionality, X.arguments))))
+
+ if X.is_variadic:
+- for i in xrange(n, max(maxarg, N)):
+- t = map(lambda arg: arg.idl_type, X.arguments)
+- o = map(lambda arg: arg.optionality, X.arguments)
+- for _ in xrange(n, i + 1):
++ for i in range(n, max(maxarg, N)):
++ t = list(map(lambda arg: arg.idl_type, X.arguments))
++ o = list(map(lambda arg: arg.optionality, X.arguments))
++ for _ in range(n, i + 1):
+ t.append(X.arguments[-1].idl_type)
+ o.append(X.arguments[-1].optionality)
+ S.append(OverloadGroup.EffectiveOverloadItem(X, t, o))
+
+- t = map(lambda arg: arg.idl_type, X.arguments)
+- o = map(lambda arg: arg.optionality, X.arguments)
+- for i in xrange(n - 1, -1, -1):
++ t = list(map(lambda arg: arg.idl_type, X.arguments))
++ o = list(map(lambda arg: arg.optionality, X.arguments))
++ for i in range(n - 1, -1, -1):
+ if X.arguments[i].optionality == IdlType.Optionality.REQUIRED:
+ break
+ S.append(OverloadGroup.EffectiveOverloadItem(X, t[:i], o[:i]))
+@@ -222,7 +222,7 @@ class OverloadGroup(WithIdentifier):
+ for item in items)
+ assert len(items) > 1
+
+- for index in xrange(len(items[0].type_list)):
++ for index in range(len(items[0].type_list)):
+ # Assume that the given items are valid, and we only need to test
+ # the two types.
+ if OverloadGroup.are_distinguishable_types(
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py 2022-03-08 18:21:46.716089544 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py 2022-03-08 18:23:26.586204022 +0100
+@@ -149,8 +149,8 @@ class IdlCompiler(object):
+ for old_ir in old_irs:
+ new_ir = make_copy(old_ir)
+ self._ir_map.add(new_ir)
+- new_ir.attributes = filter(not_disabled, new_ir.attributes)
+- new_ir.operations = filter(not_disabled, new_ir.operations)
++ new_ir.attributes = list(filter(not_disabled, new_ir.attributes))
++ new_ir.operations = list(filter(not_disabled, new_ir.operations))
+
+ def _record_defined_in_partial_and_mixin(self):
+ old_irs = self._ir_map.irs_of_kinds(
+@@ -231,7 +231,7 @@ class IdlCompiler(object):
+ only_to_members_of_partial_or_mixin=False)
+ propagate_to_exposure(propagate)
+
+- map(process_member_like, ir.iter_all_members())
++ list(map(process_member_like, ir.iter_all_members()))
+
+ def process_member_like(ir):
+ propagate = functools.partial(propagate_extattr, ir=ir)
+@@ -257,7 +257,7 @@ class IdlCompiler(object):
+
+ self._ir_map.move_to_new_phase()
+
+- map(process_interface_like, old_irs)
++ list(map(process_interface_like, old_irs))
+
+ def _determine_blink_headers(self):
+ irs = self._ir_map.irs_of_kinds(
+@@ -422,9 +422,9 @@ class IdlCompiler(object):
+ assert not new_interface.deriveds
+ derived_set = identifier_to_derived_set.get(
+ new_interface.identifier, set())
+- new_interface.deriveds = map(
+- lambda id_: self._ref_to_idl_def_factory.create(id_),
+- sorted(derived_set))
++ new_interface.deriveds = list(
++ map(lambda id_: self._ref_to_idl_def_factory.create(id_),
++ sorted(derived_set)))
+
+ def _supplement_missing_html_constructor_operation(self):
+ # Temporary mitigation of misuse of [HTMLConstructor]
+@@ -553,7 +553,8 @@ class IdlCompiler(object):
+ self._ir_map.add(new_ir)
+
+ for group in new_ir.iter_all_overload_groups():
+- exposures = map(lambda overload: overload.exposure, group)
++ exposures = list(map(lambda overload: overload.exposure,
++ group))
+
+ # [Exposed]
+ if any(not exposure.global_names_and_features
+@@ -653,8 +654,8 @@ class IdlCompiler(object):
+ constructs = set()
+ for global_name in global_names:
+ constructs.update(exposed_map.get(global_name, []))
+- new_ir.exposed_constructs = map(
+- self._ref_to_idl_def_factory.create, sorted(constructs))
++ new_ir.exposed_constructs = list(
++ map(self._ref_to_idl_def_factory.create, sorted(constructs)))
+
+ assert not new_ir.legacy_window_aliases
+ if new_ir.identifier != 'Window':
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py 2022-03-08 18:21:46.716089544 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py 2022-03-08 18:23:26.586204022 +0100
+@@ -180,8 +180,9 @@ class Interface(UserDefinedType, WithExt
+ self._constructor_groups = tuple([
+ ConstructorGroup(
+ group_ir,
+- filter(lambda x: x.identifier == group_ir.identifier,
+- self._constructors),
++ list(
++ filter(lambda x: x.identifier == group_ir.identifier,
++ self._constructors)),
+ owner=self) for group_ir in ir.constructor_groups
+ ])
+ assert len(self._constructor_groups) <= 1
+@@ -192,8 +193,9 @@ class Interface(UserDefinedType, WithExt
+ self._named_constructor_groups = tuple([
+ ConstructorGroup(
+ group_ir,
+- filter(lambda x: x.identifier == group_ir.identifier,
+- self._named_constructors),
++ list(
++ filter(lambda x: x.identifier == group_ir.identifier,
++ self._named_constructors)),
+ owner=self) for group_ir in ir.named_constructor_groups
+ ])
+ self._operations = tuple([
+@@ -203,22 +205,23 @@ class Interface(UserDefinedType, WithExt
+ self._operation_groups = tuple([
+ OperationGroup(
+ group_ir,
+- filter(lambda x: x.identifier == group_ir.identifier,
+- self._operations),
++ list(
++ filter(lambda x: x.identifier == group_ir.identifier,
++ self._operations)),
+ owner=self) for group_ir in ir.operation_groups
+ ])
+ self._exposed_constructs = tuple(ir.exposed_constructs)
+ self._legacy_window_aliases = tuple(ir.legacy_window_aliases)
+ self._indexed_and_named_properties = None
+- indexed_and_named_property_operations = filter(
+- lambda x: x.is_indexed_or_named_property_operation,
+- self._operations)
++ indexed_and_named_property_operations = list(
++ filter(lambda x: x.is_indexed_or_named_property_operation,
++ self._operations))
+ if indexed_and_named_property_operations:
+ self._indexed_and_named_properties = IndexedAndNamedProperties(
+ indexed_and_named_property_operations, owner=self)
+ self._stringifier = None
+- stringifier_operation_irs = filter(lambda x: x.is_stringifier,
+- ir.operations)
++ stringifier_operation_irs = list(
++ filter(lambda x: x.is_stringifier, ir.operations))
+ if stringifier_operation_irs:
+ assert len(stringifier_operation_irs) == 1
+ op_ir = make_copy(stringifier_operation_irs[0])
+@@ -231,8 +234,9 @@ class Interface(UserDefinedType, WithExt
+ attribute = None
+ if operation.stringifier_attribute:
+ attr_id = operation.stringifier_attribute
+- attributes = filter(lambda x: x.identifier == attr_id,
+- self._attributes)
++ attributes = list(
++ filter(lambda x: x.identifier == attr_id,
++ self._attributes))
+ assert len(attributes) == 1
+ attribute = attributes[0]
+ self._stringifier = Stringifier(operation, attribute, owner=self)
+@@ -578,8 +582,9 @@ class Iterable(WithDebugInfo):
+ self._operation_groups = tuple([
+ OperationGroup(
+ group_ir,
+- filter(lambda x: x.identifier == group_ir.identifier,
+- self._operations),
++ list(
++ filter(lambda x: x.identifier == group_ir.identifier,
++ self._operations)),
+ owner=owner) for group_ir in ir.operation_groups
+ ])
+
+@@ -666,8 +671,9 @@ class Maplike(WithDebugInfo):
+ self._operation_groups = tuple([
+ OperationGroup(
+ group_ir,
+- filter(lambda x: x.identifier == group_ir.identifier,
+- self._operations),
++ list(
++ filter(lambda x: x.identifier == group_ir.identifier,
++ self._operations)),
+ owner=owner) for group_ir in ir.operation_groups
+ ])
+
+@@ -755,8 +761,9 @@ class Setlike(WithDebugInfo):
+ self._operation_groups = tuple([
+ OperationGroup(
+ group_ir,
+- filter(lambda x: x.identifier == group_ir.identifier,
+- self._operations),
++ list(
++ filter(lambda x: x.identifier == group_ir.identifier,
++ self._operations)),
+ owner=owner) for group_ir in ir.operation_groups
+ ])
+
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py 2022-03-08 18:21:46.716089544 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py 2022-03-08 18:23:26.586204022 +0100
+@@ -2,6 +2,8 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+
++import sys
++
+ from .argument import Argument
+ from .ast_group import AstGroup
+ from .attribute import Attribute
+@@ -30,6 +32,11 @@ from .operation import Operation
+ from .typedef import Typedef
+
+
++# TODO: Remove this once Python2 is obsoleted.
++if sys.version_info.major != 2:
++ long = int
++
++
+ def load_and_register_idl_definitions(filepaths, register_ir,
+ create_ref_to_idl_def, idl_type_factory):
+ """
+@@ -160,7 +167,7 @@ class _IRBuilder(object):
+ child_nodes = list(node.GetChildren())
+ extended_attributes = self._take_extended_attributes(child_nodes)
+
+- members = map(self._build_interface_member, child_nodes)
++ members = list(map(self._build_interface_member, child_nodes))
+ attributes = []
+ constants = []
+ operations = []
+@@ -302,7 +309,7 @@ class _IRBuilder(object):
+ child_nodes = list(node.GetChildren())
+ inherited = self._take_inheritance(child_nodes)
+ extended_attributes = self._take_extended_attributes(child_nodes)
+- own_members = map(self._build_dictionary_member, child_nodes)
++ own_members = list(map(self._build_dictionary_member, child_nodes))
+
+ return Dictionary.IR(
+ identifier=Identifier(node.GetName()),
+@@ -336,7 +343,7 @@ class _IRBuilder(object):
+
+ child_nodes = list(node.GetChildren())
+ extended_attributes = self._take_extended_attributes(child_nodes)
+- members = map(self._build_interface_member, child_nodes)
++ members = list(map(self._build_interface_member, child_nodes))
+ constants = []
+ operations = []
+ for member in members:
+@@ -456,8 +463,8 @@ class _IRBuilder(object):
+ assert len(child_nodes) == 1
+ child = child_nodes[0]
+ if child.GetClass() == 'Arguments':
+- arguments = map(build_extattr_argument,
+- child.GetChildren())
++ arguments = list(
++ map(build_extattr_argument, child.GetChildren()))
+ elif child.GetClass() == 'Call':
+ assert len(child.GetChildren()) == 1
+ grand_child = child.GetChildren()[0]
+@@ -486,7 +493,9 @@ class _IRBuilder(object):
+
+ assert node.GetClass() == 'ExtAttributes'
+ return ExtendedAttributes(
+- filter(None, map(build_extended_attribute, node.GetChildren())))
++ list(
++ filter(None, map(build_extended_attribute,
++ node.GetChildren()))))
+
+ def _build_inheritance(self, node):
+ assert node.GetClass() == 'Inherit'
+@@ -506,7 +515,7 @@ class _IRBuilder(object):
+
+ def _build_iterable(self, node):
+ assert node.GetClass() == 'Iterable'
+- types = map(self._build_type, node.GetChildren())
++ types = list(map(self._build_type, node.GetChildren()))
+ assert len(types) == 1 or len(types) == 2
+ if len(types) == 1: # value iterator
+ key_type, value_type = (None, types[0])
+@@ -584,7 +593,7 @@ class _IRBuilder(object):
+ def _build_maplike(self, node, interface_identifier):
+ assert node.GetClass() == 'Maplike'
+ assert isinstance(interface_identifier, Identifier)
+- types = map(self._build_type, node.GetChildren())
++ types = list(map(self._build_type, node.GetChildren()))
+ assert len(types) == 2
+ key_type, value_type = types
+ is_readonly = bool(node.GetProperty('READONLY'))
+@@ -676,7 +685,7 @@ class _IRBuilder(object):
+ def _build_setlike(self, node, interface_identifier):
+ assert node.GetClass() == 'Setlike'
+ assert isinstance(interface_identifier, Identifier)
+- types = map(self._build_type, node.GetChildren())
++ types = list(map(self._build_type, node.GetChildren()))
+ assert len(types) == 1
+ value_type = types[0]
+ is_readonly = bool(node.GetProperty('READONLY'))
+@@ -838,7 +847,7 @@ class _IRBuilder(object):
+
+ def build_union_type(node, extended_attributes):
+ return self._idl_type_factory.union_type(
+- member_types=map(self._build_type, node.GetChildren()),
++ member_types=list(map(self._build_type, node.GetChildren())),
+ is_optional=is_optional,
+ extended_attributes=extended_attributes,
+ debug_info=self._build_debug_info(node))
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py 2022-03-08 18:21:46.716089544 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py 2022-03-08 18:23:26.586204022 +0100
+@@ -3,6 +3,13 @@
+ # found in the LICENSE file.
+
+
++import sys
++
++# TODO: Remove this once Python2 is obsoleted.
++if sys.version_info.major != 2:
++ long = int
++ basestring = str
++
+ def make_copy(obj, memo=None):
+ """
+ Creates a copy of the given object, which should be an IR or part of IR.
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py 2022-03-08 18:21:46.716089544 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py 2022-03-08 18:23:26.586204022 +0100
+@@ -107,11 +107,13 @@ class Namespace(UserDefinedType, WithExt
+ for operation_ir in ir.operations
+ ])
+ self._operation_groups = tuple([
+- OperationGroup(
+- operation_group_ir,
+- filter(lambda x: x.identifier == operation_group_ir.identifier,
+- self._operations),
+- owner=self) for operation_group_ir in ir.operation_groups
++ OperationGroup(operation_group_ir,
++ list(
++ filter(
++ lambda x: x.identifier == operation_group_ir
++ .identifier, self._operations)),
++ owner=self)
++ for operation_group_ir in ir.operation_groups
+ ])
+
+ @property
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl a/src/3rdparty/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl
+--- b/src/3rdparty/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl 2022-03-08 18:21:46.716089544 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl 2022-03-08 18:23:26.586204022 +0100
+@@ -59,9 +59,9 @@ void {{v8_class}}::ToImpl(v8::Isolate* i
+ DCHECK(executionContext);
+ {% endif %}{# has_origin_trial_members #}
+ {% endif %}{# members #}
+- {% for origin_trial_test, origin_trial_member_list in members | groupby('origin_trial_feature_name') %}
++ {% for origin_trial_test, origin_trial_member_list in members | stringifykeygroupby('origin_trial_feature_name') %}
+ {% filter origin_trial_enabled(origin_trial_test, "executionContext") %}
+- {% for feature_name, member_list in origin_trial_member_list | groupby('runtime_enabled_feature_name') %}
++ {% for feature_name, member_list in origin_trial_member_list | stringifykeygroupby('runtime_enabled_feature_name') %}
+ {% filter runtime_enabled(feature_name) %}
+ {% for member in member_list %}
+ v8::Local<v8::Value> {{member.v8_value}};
+@@ -147,9 +147,9 @@ bool toV8{{cpp_class}}(const {{cpp_class
+ DCHECK(executionContext);
+ {% endif %}{# has_origin_trial_members #}
+ {% endif %}{# members #}
+- {% for origin_trial_test, origin_trial_member_list in members | groupby('origin_trial_feature_name') %}
++ {% for origin_trial_test, origin_trial_member_list in members | stringifykeygroupby('origin_trial_feature_name') %}
+ {% filter origin_trial_enabled(origin_trial_test, "executionContext") %}
+- {% for feature_name, member_list in origin_trial_member_list | groupby('runtime_enabled_feature_name') %}
++ {% for feature_name, member_list in origin_trial_member_list | stringifykeygroupby('runtime_enabled_feature_name') %}
+ {% filter runtime_enabled(feature_name) %}
+ {% for member in member_list %}
+ v8::Local<v8::Value> {{member.v8_value}};
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py 2022-03-08 18:21:46.719422881 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py 2022-03-08 18:23:26.586204022 +0100
+@@ -71,7 +71,7 @@ class Expansion(object):
+ def enabled_longhands(self):
+ include = lambda longhand: not longhand[
+ 'runtime_flag'] or self.is_enabled(longhand['runtime_flag'])
+- return filter(include, self._longhands)
++ return list(filter(include, self._longhands))
+
+ @property
+ def index(self):
+@@ -87,8 +87,9 @@ class Expansion(object):
+
+ def create_expansions(longhands):
+ flags = collect_runtime_flags(longhands)
+- expansions = map(lambda mask: Expansion(longhands, flags, mask),
+- range(1 << len(flags)))
++ expansions = list(
++ map(lambda mask: Expansion(longhands, flags, mask),
++ range(1 << len(flags))))
+ assert len(expansions) > 0
+ # We generate 2^N expansions for N flags, so enforce some limit.
+ assert len(flags) <= 4, 'Too many runtime flags for a single shorthand'
+@@ -114,14 +115,14 @@ class StylePropertyShorthandWriter(json5
+
+ self._longhand_dictionary = defaultdict(list)
+ for property_ in json5_properties.shorthands:
+- property_['longhand_enum_keys'] = map(enum_key_for_css_property,
+- property_['longhands'])
+- property_['longhand_property_ids'] = map(id_for_css_property,
+- property_['longhands'])
+-
+- longhands = map(
+- lambda name: json5_properties.properties_by_name[name],
+- property_['longhands'])
++ property_['longhand_enum_keys'] = list(
++ map(enum_key_for_css_property, property_['longhands']))
++ property_['longhand_property_ids'] = list(
++ map(id_for_css_property, property_['longhands']))
++
++ longhands = list(
++ map(lambda name: json5_properties.properties_by_name[name],
++ property_['longhands']))
+ property_['expansions'] = create_expansions(longhands)
+ for longhand_enum_key in property_['longhand_enum_keys']:
+ self._longhand_dictionary[longhand_enum_key].append(property_)
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py 2022-03-08 18:21:46.719422881 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py 2022-03-08 18:23:26.586204022 +0100
+@@ -42,8 +42,8 @@ class CSSPropertyInstancesWriter(json5_g
+ aliases = self._css_properties.aliases
+
+ # Lists of PropertyClassData.
+- self._property_classes_by_id = map(self.get_class, properties)
+- self._alias_classes_by_id = map(self.get_class, aliases)
++ self._property_classes_by_id = list(map(self.get_class, properties))
++ self._alias_classes_by_id = list(map(self.get_class, aliases))
+
+ # Sort by enum value.
+ self._property_classes_by_id.sort(key=lambda t: t.enum_value)
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py 2022-03-08 18:21:46.722756218 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py 2022-03-08 18:23:26.586204022 +0100
+@@ -95,7 +95,7 @@ def main():
+
+ open(args.output_file, 'wb').write(
+ generate_gperf(gperf_path,
+- open(infile).read(), gperf_args))
++ open(infile).read(), gperf_args).encode('utf-8'))
+
+
+ if __name__ == '__main__':
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_file.py a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_file.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_file.py 2022-03-08 18:21:46.722756218 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_file.py 2022-03-08 18:23:26.586204022 +0100
+@@ -66,7 +66,7 @@ class InFile(object):
+ self._defaults = defaults
+ self._valid_values = copy.deepcopy(
+ valid_values if valid_values else {})
+- self._parse(map(str.strip, lines))
++ self._parse(list(map(str.strip, lines)))
+
+ @classmethod
+ def load_from_files(self, file_paths, defaults, valid_values,
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_generator.py a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_generator.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_generator.py 2022-03-08 18:21:46.722756218 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_generator.py 2022-03-08 18:23:26.589537360 +0100
+@@ -32,10 +32,15 @@ import os
+ import os.path
+ import shlex
+ import shutil
++import sys
+ import optparse
+
+ from in_file import InFile
+
++# TODO: Remove this once Python2 is obsoleted.
++if sys.version_info.major != 2:
++ basestring = str
++
+
+ #########################################################
+ # This is now deprecated - use json5_generator.py instead
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py
+--- b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py 2022-03-08 18:21:46.722756218 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py 2022-03-08 18:23:26.589537360 +0100
+@@ -138,7 +138,7 @@ class RuntimeFeatureWriter(BaseRuntimeFe
+ except Exception:
+ # If trouble unpickling, overwrite
+ pass
+- with open(os.path.abspath(file_name), 'w') as pickle_file:
++ with open(os.path.abspath(file_name), 'wb') as pickle_file:
+ pickle.dump(features_map, pickle_file)
+
+ def _template_inputs(self):
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl
+--- b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl 2022-03-08 18:21:46.722756218 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl 2022-03-08 18:23:26.589537360 +0100
+@@ -26,7 +26,7 @@ using {{namespace}}FunctionMap = HashMap
+
+ static {{namespace}}FunctionMap* g_{{namespace|lower}}_constructors = nullptr;
+
+-{% for tag in tags|sort if not tag.noConstructor %}
++{% for tag in tags|sort(attribute='name') if not tag.noConstructor %}
+ static {{namespace}}Element* {{namespace}}{{tag.name.to_upper_camel_case()}}Constructor(
+ Document& document, const CreateElementFlags flags) {
+ {% if tag.runtimeEnabled %}
+@@ -52,7 +52,7 @@ static void Create{{namespace}}FunctionM
+ // Empty array initializer lists are illegal [dcl.init.aggr] and will not
+ // compile in MSVC. If tags list is empty, add check to skip this.
+ static const Create{{namespace}}FunctionMapData data[] = {
+- {% for tag in tags|sort if not tag.noConstructor %}
++ {% for tag in tags|sort(attribute='name') if not tag.noConstructor %}
+ { {{cpp_namespace}}::{{tag|symbol}}Tag, {{namespace}}{{tag.name.to_upper_camel_case()}}Constructor },
+ {% endfor %}
+ };
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.cc.tmpl a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.cc.tmpl
+--- b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.cc.tmpl 2022-03-08 18:21:46.726089554 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.cc.tmpl 2022-03-08 18:23:26.589537360 +0100
+@@ -22,7 +22,7 @@ HTMLTypeMap CreateHTMLTypeMap() {
+ const char* name;
+ HTMLElementType type;
+ } kTags[] = {
+- {% for tag in tags|sort %}
++ {% for tag in tags|sort(attribute='name') %}
+ { "{{tag.name}}", HTMLElementType::k{{tag.js_interface}} },
+ {% endfor %}
+ };
+@@ -42,7 +42,7 @@ HTMLElementType htmlElementTypeForTag(co
+ if (it == html_type_map.end())
+ return HTMLElementType::kHTMLUnknownElement;
+
+- {% for tag in tags|sort %}
++ {% for tag in tags|sort(attribute='name') %}
+ {% if tag.runtimeEnabled %}
+ if (tagName == "{{tag.name}}") {
+ if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled(document->GetExecutionContext())) {
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl
+--- b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl 2022-03-08 18:21:46.726089554 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl 2022-03-08 18:23:26.589537360 +0100
+@@ -15,7 +15,7 @@ namespace blink {
+ class Document;
+
+ // Type checking.
+-{% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %}
++{% for tag in tags|sort(attribute='name') if not tag.multipleTagNames and not tag.noTypeHelpers %}
+ class {{tag.interface}};
+ template <>
+ inline bool IsElementOfType<const {{tag.interface}}>(const Node& node) {
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl
+--- b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl 2022-03-08 18:21:46.726089554 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl 2022-03-08 18:23:26.589537360 +0100
+@@ -25,7 +25,7 @@
+
+
+ {% macro trie_leaf(index, object, return_macro, lowercase_data) %}
+-{% set name, value = object.items()[0] %}
++{% set name, value = (object.items()|list)[0] %}
+ {% if name|length %}
+ if (
+ {%- for c in name -%}
+@@ -45,7 +45,7 @@ return {{ return_macro(value) }};
+
+
+ {% macro trie_switch(trie, index, return_macro, lowercase_data) %}
+-{% if trie|length == 1 and trie.values()[0] is string %}
++{% if trie|length == 1 and (trie.values()|list)[0] is string %}
+ {{ trie_leaf(index, trie, return_macro, lowercase_data) -}}
+ {% else %}
+ {% if lowercase_data %}
+diff -upr b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl
+--- b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl 2022-03-08 18:21:46.726089554 +0100
++++ a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl 2022-03-08 18:23:26.589537360 +0100
+@@ -24,12 +24,12 @@ namespace {{cpp_namespace}} {
+ {{symbol_export}}extern const WTF::AtomicString& {{namespace_prefix}}NamespaceURI;
+
+ // Tags
+-{% for tag in tags|sort %}
++{% for tag in tags|sort(attribute='name') %}
+ {{symbol_export}}extern const blink::{{namespace}}QualifiedName& {{tag|symbol}}Tag;
+ {% endfor %}
+
+ // Attributes
+-{% for attr in attrs|sort %}
++{% for attr in attrs|sort(attribute='name') %}
+ {{symbol_export}}extern const blink::QualifiedName& {{attr|symbol}}Attr;
+ {% endfor %}
+
+diff -upr b/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py a/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py
+--- b/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py 2022-03-08 18:21:48.266091088 +0100
++++ a/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py 2022-03-08 18:23:26.589537360 +0100
+@@ -201,6 +201,10 @@ def _compute_python_dependencies(root_di
+
+ paths = set()
+ for path in module_paths:
++ # Builtin/namespaced modules may return None for the file path.
++ if not path:
++ continue
++
+ path = os.path.abspath(path)
+
+ if not path.startswith(root_dir):
+diff -upr b/src/3rdparty/chromium/third_party/devtools-frontend/src/BUILD.gn a/src/3rdparty/chromium/third_party/devtools-frontend/src/BUILD.gn
+--- b/src/3rdparty/chromium/third_party/devtools-frontend/src/BUILD.gn 2022-03-08 18:21:48.312757801 +0100
++++ a/src/3rdparty/chromium/third_party/devtools-frontend/src/BUILD.gn 2022-03-08 18:23:26.589537360 +0100
+@@ -2,6 +2,8 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+
++import("//build/config/python.gni")
++
+ import("//third_party/blink/public/public_features.gni")
+ import("./all_devtools_files.gni")
+ import("./all_devtools_modules.gni")
+diff -upr b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py
+--- b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py 2022-03-08 18:21:50.282759764 +0100
++++ a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py 2022-03-08 18:23:26.589537360 +0100
+@@ -45,7 +45,8 @@ def rollup(input_path, output_path, file
+ ['--format', 'iife', '-n', 'InspectorOverlay'] + ['--input', target] +
+ ['--plugin', rollup_plugin],
+ stdout=subprocess.PIPE,
+- stderr=subprocess.PIPE)
++ stderr=subprocess.PIPE,
++ text=True)
+ out, error = rollup_process.communicate()
+ if not out:
+ raise Exception("rollup failed: " + error)
+diff -upr b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py
+--- b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py 2022-03-08 18:21:50.282759764 +0100
++++ a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py 2022-03-08 18:23:26.589537360 +0100
+@@ -10,7 +10,7 @@ Builds applications in release mode:
+ and the application loader into a single script.
+ """
+
+-from cStringIO import StringIO
++from io import StringIO
+ from os import path
+ from os.path import join
+ import copy
+@@ -145,8 +145,7 @@ class ReleaseBuilder(object):
+ resource_content = read_file(path.join(self.application_dir, resource_name))
+ if not (resource_name.endswith('.html')
+ or resource_name.endswith('md')):
+- resource_content += resource_source_url(resource_name).encode(
+- 'utf-8')
++ resource_content += resource_source_url(resource_name)
+ resource_content = resource_content.replace('\\', '\\\\')
+ resource_content = resource_content.replace('\n', '\\n')
+ resource_content = resource_content.replace('"', '\\"')
+@@ -173,7 +172,9 @@ class ReleaseBuilder(object):
+ def _concatenate_application_script(self, output):
+ output.write('Root.allDescriptors.push(...%s);' % self._release_module_descriptors())
+ if self.descriptors.extends:
+- output.write('Root.applicationDescriptor.modules.push(...%s);' % json.dumps(self.descriptors.application.values()))
++ output.write(
++ 'Root.applicationDescriptor.modules.push(...%s);' %
++ json.dumps(list(self.descriptors.application.values())))
+ else:
+ output.write('Root.applicationDescriptor = %s;' % self.descriptors.application_json())
+
+diff -upr b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py
+--- b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py 2022-03-08 18:21:50.282759764 +0100
++++ a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py 2022-03-08 18:23:26.589537360 +0100
+@@ -123,7 +123,7 @@ def main(argv):
+
+ try:
+ os.makedirs(path.join(output_directory, 'Images'))
+- except OSError, e:
++ except OSError as e:
+ if e.errno != errno.EEXIST:
+ raise e
+
+@@ -147,7 +147,7 @@ def main(argv):
+ shutil.copy(path.join(dirname, filename), path.join(output_directory, 'Images'))
+ add_file_to_grd(doc, path.join('Images', filename))
+
+- with open(parsed_args.output_filename, 'w') as output_file:
++ with open(parsed_args.output_filename, 'wb') as output_file:
+ output_file.write(doc.toxml(encoding='UTF-8'))
+
+
+diff -upr b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py
+--- b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py 2022-03-08 18:21:50.282759764 +0100
++++ a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py 2022-03-08 18:23:26.589537360 +0100
+@@ -7,6 +7,8 @@
+ Utilities for the modular DevTools build.
+ """
+
++from __future__ import print_function
++
+ import collections
+ from os import path
+ import os
+@@ -40,7 +42,7 @@ def load_and_parse_json(filename):
+ try:
+ return json.loads(read_file(filename))
+ except:
+- print 'ERROR: Failed to parse %s' % filename
++ print('ERROR: Failed to parse %s' % filename)
+ raise
+
+ class Descriptors:
+@@ -57,7 +59,7 @@ class Descriptors:
+
+ def application_json(self):
+ result = dict()
+- result['modules'] = self.application.values()
++ result['modules'] = list(self.application.values())
+ return json.dumps(result)
+
+ def all_compiled_files(self):
+diff -upr b/src/3rdparty/chromium/third_party/jinja2/tests.py a/src/3rdparty/chromium/third_party/jinja2/tests.py
+--- b/src/3rdparty/chromium/third_party/jinja2/tests.py 2022-03-08 18:21:51.709427852 +0100
++++ a/src/3rdparty/chromium/third_party/jinja2/tests.py 2022-03-08 18:23:26.589537360 +0100
+@@ -10,7 +10,7 @@
+ """
+ import operator
+ import re
+-from collections import Mapping
++from collections.abc import Mapping
+ from jinja2.runtime import Undefined
+ from jinja2._compat import text_type, string_types, integer_types
+ import decimal
+diff -upr b/src/3rdparty/chromium/tools/metrics/ukm/gen_builders.py a/src/3rdparty/chromium/tools/metrics/ukm/gen_builders.py
+--- b/src/3rdparty/chromium/tools/metrics/ukm/gen_builders.py 2022-03-08 18:21:55.126097923 +0100
++++ a/src/3rdparty/chromium/tools/metrics/ukm/gen_builders.py 2022-03-08 18:23:26.589537360 +0100
+@@ -48,9 +48,10 @@ def ReadFilteredData(path):
+ data = ukm_model.UKM_XML_TYPE.Parse(ukm_file.read())
+ event_tag = ukm_model._EVENT_TYPE.tag
+ metric_tag = ukm_model._METRIC_TYPE.tag
+- data[event_tag] = filter(ukm_model.IsNotObsolete, data[event_tag])
++ data[event_tag] = list(filter(ukm_model.IsNotObsolete, data[event_tag]))
+ for event in data[event_tag]:
+- event[metric_tag] = filter(ukm_model.IsNotObsolete, event[metric_tag])
++ event[metric_tag] = list(
++ filter(ukm_model.IsNotObsolete, event[metric_tag]))
+ return data
+
+
+diff -upr b/src/3rdparty/chromium/ui/ozone/generate_constructor_list.py a/src/3rdparty/chromium/ui/ozone/generate_constructor_list.py
+--- b/src/3rdparty/chromium/ui/ozone/generate_constructor_list.py 2022-03-08 18:21:55.569431698 +0100
++++ a/src/3rdparty/chromium/ui/ozone/generate_constructor_list.py 2022-03-08 18:23:26.589537360 +0100
+@@ -45,12 +45,15 @@ Example Output: ./ui/ozone/generate_cons
+ } // namespace ui
+ """
+
++try:
++ from StringIO import StringIO # for Python 2
++except ImportError:
++ from io import StringIO # for Python 3
+ import optparse
+ import os
+ import collections
+ import re
+ import sys
+-import string
+
+
+ def GetTypedefName(typename):
+@@ -68,7 +71,7 @@ def GetConstructorName(typename, platfor
+ This is just "Create" + typename + platform.
+ """
+
+- return 'Create' + typename + string.capitalize(platform)
++ return 'Create' + typename + platform.capitalize()
+
+
+ def GenerateConstructorList(out, namespace, export, typenames, platforms,
+@@ -163,12 +166,14 @@ def main(argv):
+ sys.exit(1)
+
+ # Write to standard output or file specified by --output_cc.
+- out_cc = sys.stdout
++ out_cc = getattr(sys.stdout, 'buffer', sys.stdout)
+ if options.output_cc:
+ out_cc = open(options.output_cc, 'wb')
+
+- GenerateConstructorList(out_cc, options.namespace, options.export,
++ out_cc_str = StringIO()
++ GenerateConstructorList(out_cc_str, options.namespace, options.export,
+ typenames, platforms, includes, usings)
++ out_cc.write(out_cc_str.getvalue().encode('utf-8'))
+
+ if options.output_cc:
+ out_cc.close()
+diff -upr b/src/3rdparty/chromium/ui/ozone/generate_ozone_platform_list.py a/src/3rdparty/chromium/ui/ozone/generate_ozone_platform_list.py
+--- b/src/3rdparty/chromium/ui/ozone/generate_ozone_platform_list.py 2022-03-08 18:21:55.569431698 +0100
++++ a/src/3rdparty/chromium/ui/ozone/generate_ozone_platform_list.py 2022-03-08 18:23:26.592870697 +0100
+@@ -49,12 +49,15 @@ Example Output: ./generate_ozone_platfor
+
+ """
+
++try:
++ from StringIO import StringIO # for Python 2
++except ImportError:
++ from io import StringIO # for Python 3
+ import optparse
+ import os
+ import collections
+ import re
+ import sys
+-import string
+
+
+ def GetConstantName(name):
+@@ -63,7 +66,7 @@ def GetConstantName(name):
+ We just capitalize the platform name and prepend "CreateOzonePlatform".
+ """
+
+- return 'kPlatform' + string.capitalize(name)
++ return 'kPlatform' + name.capitalize()
+
+
+ def GeneratePlatformListText(out, platforms):
+@@ -149,9 +152,9 @@ def main(argv):
+ platforms.insert(0, options.default)
+
+ # Write to standard output or file specified by --output_{cc,h}.
+- out_cc = sys.stdout
+- out_h = sys.stdout
+- out_txt = sys.stdout
++ out_cc = getattr(sys.stdout, 'buffer', sys.stdout)
++ out_h = getattr(sys.stdout, 'buffer', sys.stdout)
++ out_txt = getattr(sys.stdout, 'buffer', sys.stdout)
+ if options.output_cc:
+ out_cc = open(options.output_cc, 'wb')
+ if options.output_h:
+@@ -159,9 +162,16 @@ def main(argv):
+ if options.output_txt:
+ out_txt = open(options.output_txt, 'wb')
+
+- GeneratePlatformListText(out_txt, platforms)
+- GeneratePlatformListHeader(out_h, platforms)
+- GeneratePlatformListSource(out_cc, platforms)
++ out_txt_str = StringIO()
++ out_h_str = StringIO()
++ out_cc_str = StringIO()
++
++ GeneratePlatformListText(out_txt_str, platforms)
++ out_txt.write(out_txt_str.getvalue().encode('utf-8'))
++ GeneratePlatformListHeader(out_h_str, platforms)
++ out_h.write(out_h_str.getvalue().encode('utf-8'))
++ GeneratePlatformListSource(out_cc_str, platforms)
++ out_cc.write(out_cc_str.getvalue().encode('utf-8'))
+
+ if options.output_cc:
+ out_cc.close()
diff --git a/skip/qt5-qtwebengine/qt-musl-crashpad.patch b/skip/qt5-qtwebengine/qt-musl-crashpad.patch
new file mode 100644
index 0000000..0dd9789
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-crashpad.patch
@@ -0,0 +1,13 @@
+diff --git a/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h b/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
+index 5b55c24..08cec52 100644
+--- a/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
++++ b/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
+@@ -273,7 +273,7 @@ union FloatContext {
+ "Size mismatch");
+ #elif defined(ARCH_CPU_ARMEL)
+ static_assert(sizeof(f32_t::fpregs) == sizeof(user_fpregs), "Size mismatch");
+-#if !defined(__GLIBC__)
++#if defined(OS_ANDROID)
+ static_assert(sizeof(f32_t::vfp) == sizeof(user_vfp), "Size mismatch");
+ #endif
+ #elif defined(ARCH_CPU_ARM64)
diff --git a/skip/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch b/skip/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch
new file mode 100644
index 0000000..a58a688
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch
@@ -0,0 +1,103 @@
+--- a/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc
++++ b/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc
+@@ -8,6 +8,7 @@
+ #include <dlfcn.h>
+ #include <malloc.h>
+
++#if defined(__GLIBC__)
+ // This translation unit defines a default dispatch for the allocator shim which
+ // routes allocations to libc functions.
+ // The code here is strongly inspired from tcmalloc's libc_override_glibc.h.
+@@ -87,3 +88,92 @@ const AllocatorDispatch AllocatorDispatc
+ nullptr, /* aligned_free_function */
+ nullptr, /* next */
+ };
++
++#else // defined(__GLIBC__)
++
++#include <dlfcn.h>
++
++extern "C" {
++// Declare function pointers to the memory functions
++typedef void* (*t_libc_malloc)(size_t size);
++typedef void* (*t_libc_calloc)(size_t n, size_t size);
++typedef void* (*t_libc_realloc)(void* address, size_t size);
++typedef void* (*t_libc_memalign)(size_t alignment, size_t size);
++typedef void (*t_libc_free)(void* ptr);
++typedef size_t (*t_libc_malloc_usable_size)(void* ptr);
++
++// Static instances of pointers to libc.so dl symbols
++static t_libc_malloc libc_malloc = NULL;
++static t_libc_calloc libc_calloc = NULL;
++static t_libc_realloc libc_realloc = NULL;
++static t_libc_memalign libc_memalign = NULL;
++static t_libc_free libc_free = NULL;
++static t_libc_malloc_usable_size libc_malloc_usable_size = NULL;
++
++// resolve the symbols in libc.so
++void musl_libc_memory_init(void)
++{
++ libc_malloc = (t_libc_malloc) dlsym(RTLD_NEXT, "malloc");
++ libc_calloc = (t_libc_calloc) dlsym(RTLD_NEXT, "calloc");
++ libc_realloc = (t_libc_realloc) dlsym(RTLD_NEXT, "realloc");
++ libc_memalign = (t_libc_memalign) dlsym(RTLD_NEXT, "memalign");
++ libc_free = (t_libc_free) dlsym(RTLD_NEXT, "free");
++ libc_malloc_usable_size = (t_libc_malloc_usable_size) dlsym(RTLD_NEXT, "malloc_usable_size");
++}
++} // extern "C"
++
++namespace {
++
++using base::allocator::AllocatorDispatch;
++
++void* MuslMalloc(const AllocatorDispatch*, size_t size, void* context) {
++ if (!libc_malloc)
++ musl_libc_memory_init();
++ return (*libc_malloc)(size);
++}
++
++void* MuslCalloc(const AllocatorDispatch*, size_t n, size_t size, void* context) {
++ if (!libc_calloc)
++ musl_libc_memory_init();
++ return (*libc_calloc)(n, size);
++}
++
++void* MuslRealloc(const AllocatorDispatch*, void* address, size_t size, void* context) {
++ if (!libc_realloc)
++ musl_libc_memory_init();
++ return (*libc_realloc)(address, size);
++}
++
++void* MuslMemalign(const AllocatorDispatch*, size_t alignment, size_t size, void* context) {
++ if (!libc_memalign)
++ musl_libc_memory_init();
++ return (*libc_memalign)(alignment, size);
++}
++
++void MuslFree(const AllocatorDispatch*, void* address, void* context) {
++ if (!libc_free)
++ musl_libc_memory_init();
++ (*libc_free)(address);
++}
++
++size_t MuslGetSizeEstimate(const AllocatorDispatch*, void* address, void* context) {
++ // TODO(siggi, primiano): malloc_usable_size may need redirection in the
++ // presence of interposing shims that divert allocations.
++ if (!libc_malloc_usable_size)
++ musl_libc_memory_init();
++ return (*libc_malloc_usable_size)(address);
++}
++
++} // namespace
++
++const AllocatorDispatch AllocatorDispatch::default_dispatch = {
++ &MuslMalloc, /* alloc_function */
++ &MuslCalloc, /* alloc_zero_initialized_function */
++ &MuslMemalign, /* alloc_aligned_function */
++ &MuslRealloc, /* realloc_function */
++ &MuslFree, /* free_function */
++ &MuslGetSizeEstimate, /* get_size_estimate_function */
++ nullptr, /* next */
++};
++
++#endif
diff --git a/skip/qt5-qtwebengine/qt-musl-elf-arm.patch b/skip/qt5-qtwebengine/qt-musl-elf-arm.patch
new file mode 100644
index 0000000..9253c41
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-elf-arm.patch
@@ -0,0 +1,13 @@
+diff --git a/src/3rdparty/chromium/v8/src/base/cpu.cc b/src/3rdparty/chromium/v8/src/base/cpu.cc
+index f1c48fa13..ba8389c8c 100644
+--- a/src/3rdparty/chromium/v8/src/base/cpu.cc
++++ b/src/3rdparty/chromium/v8/src/base/cpu.cc
+@@ -20,7 +20,7 @@
+ #if V8_OS_QNX
+ #include <sys/syspage.h> // cpuinfo
+ #endif
+-#if V8_OS_LINUX && (V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64)
++#if V8_OS_LINUX && (V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64 || V8_HOST_ARCH_ARM)
+ #include <elf.h>
+ #endif
+ #if V8_OS_AIX
diff --git a/skip/qt5-qtwebengine/qt-musl-execinfo.patch b/skip/qt5-qtwebengine/qt-musl-execinfo.patch
new file mode 100644
index 0000000..01a5c94
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-execinfo.patch
@@ -0,0 +1,108 @@
+diff --git a/src/3rdparty/chromium/base/debug/stack_trace.cc b/src/3rdparty/chromium/base/debug/stack_trace.cc
+index d8ca822d9..f6f3d9c69 100644
+--- a/src/3rdparty/chromium/base/debug/stack_trace.cc
++++ b/src/3rdparty/chromium/base/debug/stack_trace.cc
+@@ -225,14 +225,14 @@ std::string StackTrace::ToString() const {
+ }
+ 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();
+ }
+
+ std::ostream& operator<<(std::ostream& os, const StackTrace& s) {
+-#if !defined(__UCLIBC__) & !defined(_AIX)
++#if defined(__GLIBC__) & !defined(_AIX)
+ s.OutputToStream(&os);
+ #else
+ os << "StackTrace::OutputToStream not implemented.";
+diff --git a/src/3rdparty/chromium/base/debug/stack_trace_posix.cc b/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
+index f4ddf9c1e..aef993613 100644
+--- a/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
++++ b/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
+@@ -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
+
+@@ -88,7 +88,7 @@ void DemangleSymbols(std::string* text) {
+ // 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.
+@@ -123,7 +123,7 @@ void DemangleSymbols(std::string* text) {
+ search_from = mangled_start + 2;
+ }
+ }
+-#endif // !defined(__UCLIBC__) && !defined(_AIX)
++#endif // defined(__GLIBC__) && !defined(_AIX)
+ }
+ #endif // !defined(USE_SYMBOLIZE)
+
+@@ -135,7 +135,7 @@ class BacktraceOutputHandler {
+ 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.
+@@ -218,7 +218,7 @@ void ProcessBacktrace(void* const* trace,
+ }
+ #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
+@@ -834,7 +834,7 @@ size_t CollectStackTrace(void** trace, size_t count) {
+ // 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));
+@@ -847,13 +847,13 @@ void StackTrace::PrintWithPrefix(const char* prefix_string) const {
+ // 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);
+diff --git a/src/3rdparty/chromium/base/logging.cc b/src/3rdparty/chromium/base/logging.cc
+index 4c4bfa6af..0ca5c2159 100644
+--- a/src/3rdparty/chromium/base/logging.cc
++++ b/src/3rdparty/chromium/base/logging.cc
+@@ -548,7 +548,7 @@ LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
+
+ LogMessage::~LogMessage() {
+ size_t stack_start = stream_.tellp();
+-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
++#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) && \
+ !defined(OS_AIX)
+ if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
+ // Include a stack trace on a fatal, unless a debugger is attached.
diff --git a/skip/qt5-qtwebengine/qt-musl-mallinfo.patch b/skip/qt5-qtwebengine/qt-musl-mallinfo.patch
new file mode 100644
index 0000000..c7b7f27
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-mallinfo.patch
@@ -0,0 +1,43 @@
+diff --git a/src/3rdparty/chromium/base/process/process_metrics_posix.cc b/src/3rdparty/chromium/base/process/process_metrics_posix.cc
+index 9d12c427b..9030de9f6 100644
+--- a/src/3rdparty/chromium/base/process/process_metrics_posix.cc
++++ b/src/3rdparty/chromium/base/process/process_metrics_posix.cc
+@@ -119,14 +119,14 @@ size_t ProcessMetrics::GetMallocUsage() {
+ 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(OS_LINUX) && 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 //if defined(OS_FUCHSIA) // also musl doesn't do this.
+ // TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
+ return 0;
+ #endif
+diff --git a/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc b/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
+index c327f4865..2717eca5a 100644
+--- a/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
++++ b/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
+@@ -132,7 +132,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
+ }
+ #elif defined(OS_FUCHSIA)
+ // TODO(fuchsia): Port, see https://crbug.com/706592.
+-#else
++#elif defined(__GLIBC__)
+ struct mallinfo info = mallinfo();
+ // In case of Android's jemalloc |arena| is 0 and the outer pages size is
+ // reported by |hblkhd|. In case of dlmalloc the total is given by
+@@ -142,6 +142,8 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
+
+ // Total allocated space is given by |uordblks|.
+ allocated_objects_size = info.uordblks;
++#else
++ // musl libc does not support mallinfo()
+ #endif
+
+ MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc");
diff --git a/skip/qt5-qtwebengine/qt-musl-off_t.patch b/skip/qt5-qtwebengine/qt-musl-off_t.patch
new file mode 100644
index 0000000..6b44789
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-off_t.patch
@@ -0,0 +1,10 @@
+--- a/src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h
++++ b/src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h
+@@ -21,6 +21,7 @@ typedef unsigned __int64 uint64_t;
+ #define ots_htons(x) _byteswap_ushort (x)
+ #else
+ #include <arpa/inet.h>
++#include <sys/types.h>
+ #include <stdint.h>
+ #define ots_ntohl(x) ntohl (x)
+ #define ots_ntohs(x) ntohs (x)
diff --git a/skip/qt5-qtwebengine/qt-musl-pread-pwrite.patch b/skip/qt5-qtwebengine/qt-musl-pread-pwrite.patch
new file mode 100644
index 0000000..623f609
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-pread-pwrite.patch
@@ -0,0 +1,20 @@
+diff --git a/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h b/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
+index 5d9c2e8..e81e7b4 100644
+--- a/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
++++ b/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
+@@ -1835,6 +1835,15 @@ struct kernel_statfs {
+ /* End of s390/s390x definitions */
+ #endif
+
++#ifndef __GLIBC__
++ /* For Musl libc pread/pread is the same as pread64/pwrite64 */
++#ifndef __NR_pread
++#define __NR_pread __NR_pread64
++#endif
++#ifndef __NR_pwrite
++#define __NR_pwrite __NR_pwrite64
++#endif
++#endif /* ifndef __GLIBC__ */
+
+ /* After forking, we must make sure to only call system calls. */
+ #if defined(__BOUNDED_POINTERS__)
diff --git a/skip/qt5-qtwebengine/qt-musl-pvalloc.patch b/skip/qt5-qtwebengine/qt-musl-pvalloc.patch
new file mode 100644
index 0000000..d5caf38
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-pvalloc.patch
@@ -0,0 +1,14 @@
+--- qtwebengine/src/core/api/qtbug-61521.cpp 2017-11-29 09:42:29.000000000 +0100
++++ qtwebengine/src/core/api/qtbug-61521.cpp 2018-01-28 06:49:29.454175725 +0100
+@@ -111,7 +111,11 @@
+ }
+
+ SHIM_HIDDEN void* ShimPvalloc(size_t size) {
++#if defined(__GLIBC__)
+ return pvalloc(size);
++#else
++ return valloc((size+4095)&~4095);
++#endif
+ }
+
+ SHIM_HIDDEN int ShimPosixMemalign(void** r, size_t a, size_t s) {
diff --git a/skip/qt5-qtwebengine/qt-musl-resolve.patch b/skip/qt5-qtwebengine/qt-musl-resolve.patch
new file mode 100644
index 0000000..386062e
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-resolve.patch
@@ -0,0 +1,61 @@
+--- a/src/3rdparty/chromium/net/dns/dns_reloader.cc
++++ b/src/3rdparty/chromium/net/dns/dns_reloader.cc
+@@ -9,6 +9,10 @@
+
+ #include <resolv.h>
+
++#if !defined(__GLIBC__)
++#include "resolv_compat.h"
++#endif
++
+ #include "base/lazy_instance.h"
+ #include "base/macros.h"
+ #include "base/notreached.h"
+--- a/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc
++++ b/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc
+@@ -8,6 +8,10 @@
+ #include <string>
+ #include <type_traits>
+
++#if !defined(__GLIBC__)
++#include "resolv_compat.h"
++#endif
++
+ #include "base/bind.h"
+ #include "base/files/file.h"
+ #include "base/files/file_path.h"
+diff --git a/src/3rdparty/chromium/net/dns/resolv_compat.h b/src/3rdparty/chromium/net/dns/resolv_compat.h
+new file mode 100644
+index 0000000..4f0e852
+--- /dev/null
++++ b/src/3rdparty/chromium/net/dns/resolv_compat.h
+@@ -0,0 +1,29 @@
++#if !defined(__GLIBC__)
++/***************************************************************************
++ * resolv_compat.h
++ *
++ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc
++ * Note: res_init() is actually deprecated according to
++ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html
++ **************************************************************************/
++#include <string.h>
++
++static inline int res_ninit(res_state statp)
++{
++ int rc = res_init();
++ if (statp != &_res) {
++ memcpy(statp, &_res, sizeof(*statp));
++ }
++ return rc;
++}
++
++static inline int res_nclose(res_state statp)
++{
++ if (!statp)
++ return -1;
++ if (statp != &_res) {
++ memset(statp, 0, sizeof(*statp));
++ }
++ return 0;
++}
++#endif
diff --git a/skip/qt5-qtwebengine/qt-musl-siginfo_t.patch b/skip/qt5-qtwebengine/qt-musl-siginfo_t.patch
new file mode 100644
index 0000000..b071563
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-siginfo_t.patch
@@ -0,0 +1,18 @@
+There's a subtle difference in the internal name of siginfo_t fields
+between glibc and musl. The structure itself is equivalent, so it
+should suffice to add a macro to rename the field.
+
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc
+@@ -25,6 +25,11 @@
+ #include "sandbox/linux/system_headers/linux_seccomp.h"
+ #include "sandbox/linux/system_headers/linux_signal.h"
+
++// musl libc defines siginfo_t __si_fields instead of _sifields
++#if !defined(__GLIBC__)
++#define _sifields __si_fields
++#endif
++
+ namespace {
+
+ struct arch_sigsys {
diff --git a/skip/qt5-qtwebengine/qt-musl-stackstart.patch b/skip/qt5-qtwebengine/qt-musl-stackstart.patch
new file mode 100644
index 0000000..2214af4
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-stackstart.patch
@@ -0,0 +1,22 @@
+diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
+index 1aaaa1c60..f49152fa6 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
+@@ -29,7 +29,7 @@ size_t GetUnderestimatedStackSize() {
+ // 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).
+@@ -97,7 +97,7 @@ return Threading::ThreadStackSize();
+ }
+
+ 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;
diff --git a/skip/qt5-qtwebengine/qt-musl-sysreg-for__WORDSIZE.patch b/skip/qt5-qtwebengine/qt-musl-sysreg-for__WORDSIZE.patch
new file mode 100644
index 0000000..de9377e
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-sysreg-for__WORDSIZE.patch
@@ -0,0 +1,14 @@
+diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
+index d03c7a8..d43fda0 100644
+--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
++++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
+@@ -37,6 +37,9 @@
+ #include <limits.h>
+ #include <link.h>
+ #include <stddef.h>
++#ifndef __GLIBC__
++#include <sys/reg.h>
++#endif
+
+ #include "common/memory_range.h"
+
diff --git a/skip/qt5-qtwebengine/qt-musl-thread-stacksize.patch b/skip/qt5-qtwebengine/qt-musl-thread-stacksize.patch
new file mode 100644
index 0000000..80c3d34
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-thread-stacksize.patch
@@ -0,0 +1,26 @@
+diff --git a/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc b/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc
+index 02bf49b..05ee182 100644
+--- a/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc
++++ b/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc
+@@ -13,7 +13,7 @@ namespace pp {
+ namespace {
+
+ // Use 2MB default stack size for Native Client, otherwise use system default.
+-#if defined(__native_client__)
++#if defined(__native_client__) || !defined(__GLIBC__)
+ const size_t kDefaultStackSize = 2 * 1024 * 1024;
+ #else
+ const size_t kDefaultStackSize = 0;
+diff --git a/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc b/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
+index cf7f3ec..e06a5ce 100644
+--- a/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
++++ b/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
+@@ -854,7 +854,7 @@ void Thread::Start() {
+ #if V8_OS_MACOSX
+ // Default on Mac OS X is 512kB -- bump up to 1MB
+ stack_size = 1 * 1024 * 1024;
+-#elif V8_OS_AIX
++#elif V8_OS_AIX || !defined(__GLIBC__)
+ // Default on AIX is 96kB -- bump up to 2MB
+ stack_size = 2 * 1024 * 1024;
+ #endif
diff --git a/skip/qt5-qtwebengine/qt-musl-tid-caching.patch b/skip/qt5-qtwebengine/qt-musl-tid-caching.patch
new file mode 100644
index 0000000..acbee25
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt-musl-tid-caching.patch
@@ -0,0 +1,81 @@
+--- ./src/3rdparty/chromium/sandbox/linux/services/namespace_sandbox.cc.orig
++++ ./src/3rdparty/chromium/sandbox/linux/services/namespace_sandbox.cc
+@@ -209,6 +209,70 @@
+ return base::LaunchProcess(argv, launch_options_copy);
+ }
+
++#if defined(__aarch64__) || defined(__arm__)
++#define TLS_ABOVE_TP
++#endif
++
++struct musl_pthread
++{
++ /* Part 1 -- these fields may be external or
++ * internal (accessed via asm) ABI. Do not change. */
++ struct pthread *self;
++#ifndef TLS_ABOVE_TP
++ uintptr_t *dtv;
++#endif
++ struct pthread *prev, *next; /* non-ABI */
++ uintptr_t sysinfo;
++#ifndef TLS_ABOVE_TP
++#ifdef CANARY_PAD
++ uintptr_t canary_pad;
++#endif
++ uintptr_t canary;
++#endif
++
++/* Part 2 -- implementation details, non-ABI. */
++ int tid;
++ int errno_val;
++ volatile int detach_state;
++ volatile int cancel;
++ volatile unsigned char canceldisable, cancelasync;
++ unsigned char tsd_used:1;
++ unsigned char dlerror_flag:1;
++ unsigned char *map_base;
++ size_t map_size;
++ void *stack;
++ size_t stack_size;
++ size_t guard_size;
++ void *result;
++ struct __ptcb *cancelbuf;
++ void **tsd;
++ struct {
++ volatile void *volatile head;
++ long off;
++ volatile void *volatile pending;
++ } robust_list;
++ int h_errno_val;
++ volatile int timer_id;
++ locale_t locale;
++ volatile int killlock[1];
++ char *dlerror_buf;
++ void *stdio_locks;
++
++ /* Part 3 -- the positions of these fields relative to
++ * the end of the structure is external and internal ABI. */
++#ifdef TLS_ABOVE_TP
++ uintptr_t canary;
++ uintptr_t *dtv;
++#endif
++};
++
++void MaybeUpdateMuslTidCache()
++{
++ pid_t real_tid = sys_gettid();
++ pid_t* cached_tid_location = &reinterpret_cast<struct musl_pthread*>(pthread_self())->tid;
++ *cached_tid_location = real_tid;
++}
++
+ // static
+ pid_t NamespaceSandbox::ForkInNewPidNamespace(bool drop_capabilities_in_child) {
+ const pid_t pid =
+@@ -226,6 +290,7 @@
+ #if defined(LIBC_GLIBC)
+ MaybeUpdateGlibcTidCache();
+ #endif
++ MaybeUpdateMuslTidCache();
+ return 0;
+ }
+
diff --git a/skip/qt5-qtwebengine/qt5-qtwebengine.xibuild b/skip/qt5-qtwebengine/qt5-qtwebengine.xibuild
new file mode 100644
index 0000000..99a440f
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt5-qtwebengine.xibuild
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+NAME="qt5-qtwebengine"
+DESC="Qt5 - QtWebEngine components"
+
+MAKEDEPS=" ffmpeg glib gst-plugins-base gstreamer icu libxcomposite libxext libxkbcommon libxkbfile libxrender libxslt mesa ninja alsa-lib bison flex fontconfig gperf gzip harfbuzz jsoncpp libevent libjpeg-turbo libpng libsrtp libvpx libwebp libxcursor libxi libxml2 libxrandr libxslt libxtst linux-headers nodejs nss opus pcre protobuf pulseaudio sndio qt5-qtbase qt5-qtdeclarative qt5-qtwebchannel re2 ruby snappy sqlite3 yasm zlib python"
+
+PKG_VER=5.15.11
+_commit="c107eb20a25157836fcf3be91566d8ea38490f40"
+_chromium_commit="9d42f3a5802d427c0e9358b2a0469f18285558c0"
+_catapult_commit="5eedfe23148a234211ba477f76fc2ea2e8529189"
+SOURCE="https://invent.kde.org/qt/qt/qtwebengine/-/archive/$_commit.tar.gz"
+
+ADDITIONAL="
+ https://invent.kde.org/qt/qt/qtwebengine-chromium/-/archive/$_chromium_commit.tar.gz
+ https://dev.alpinelinux.org/archive/qt5-qtwebengine/catapult-$_catapult_commit.tar.gz
+0001-pretend-to-stay-at-5.15.3.patch
+0010-chromium-musl-Match-syscalls-to-match-musl.patch
+default-pthread-stacksize.patch
+ffmpeg5.patch
+fix-chromium-build.patch
+musl-hacks.patch
+musl-sandbox.patch
+nasm.patch
+qt-chromium-python3.patch
+qt-musl-crashpad.patch
+qt-musl-dispatch_to_musl.patch
+qt-musl-elf-arm.patch
+qt-musl-execinfo.patch
+qt-musl-mallinfo.patch
+qt-musl-off_t.patch
+qt-musl-pread-pwrite.patch
+qt-musl-pvalloc.patch
+qt-musl-resolve.patch
+qt-musl-siginfo_t.patch
+qt-musl-stackstart.patch
+qt-musl-sysreg-for__WORDSIZE.patch
+qt-musl-thread-stacksize.patch
+qt-musl-tid-caching.patch
+qt5-webengine-gcc12.patch
+remove-glibc-check.patch
+sndio.patch
+support-python3.patch
+"
+
+prepare() {
+ tar xf $_chromium_commit.tar.gz
+ tar xf catapult-$_catapult_commit.tar.gz
+ rmdir "$BUILD_ROOT/src/3rdparty"
+ mv "$BUILD_ROOT/qtwebengine-chromium-$_chromium_commit" "$BUILD_ROOT/src/3rdparty"
+ mkdir "$BUILD_ROOT"/.git "$BUILD_ROOT/src/3rdparty/chromium/.git"
+
+ # update vendored catapult version to python3 compatible version.
+ rm -r "$BUILD_ROOT/src/3rdparty/chromium/third_party/catapult"
+ mv "$BUILD_ROOT"/catapult "$BUILD_ROOT/src/3rdparty/chromium/third_party/catapult"
+
+ apply_patches
+}
+
+build() {
+ qmake-qt5 QMAKE_EXTRA_ARGS+="-webengine-sndio -system-ffmpeg -system-opus -system-webp -proprietary-codecs" CONFIG+=force_debug_info
+ make
+}
+
+package() {
+ make install INSTALL_ROOT="$PKG_DEST"
+ sed -i -e 's:-L/home[^ ]\+::g' "$PKG_DEST"/usr/lib/pkgconfig/*.pc
+
+ # Drop QMAKE_PRL_BUILD_DIR because reference the build dir
+ find "$PKG_DEST/usr/lib" -type f -name '*.prl' \
+ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
+
+ install -d "$PKG_DEST"/usr/share/licenses
+ ln -s /usr/share/licenses/qt5-base "$PKG_DEST"/usr/share/licenses/qt5-qtwebengine
+}
+
diff --git a/skip/qt5-qtwebengine/qt5-webengine-gcc12.patch b/skip/qt5-qtwebengine/qt5-webengine-gcc12.patch
new file mode 100644
index 0000000..c86351e
--- /dev/null
+++ b/skip/qt5-qtwebengine/qt5-webengine-gcc12.patch
@@ -0,0 +1,13 @@
+diff --git a/chromium/third_party/skia/src/utils/SkParseColor.cpp b/chromium/third_party/skia/src/utils/SkParseColor.cpp
+index 7260365b2c6..b5a6aae3596 100644
+--- a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
++++ b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
+@@ -8,6 +8,8 @@
+
+ #include "include/utils/SkParse.h"
+
++#include <iterator>
++
+ static constexpr const char* gColorNames[] = {
+ "aliceblue",
+ "antiquewhite",
diff --git a/skip/qt5-qtwebengine/remove-glibc-check.patch b/skip/qt5-qtwebengine/remove-glibc-check.patch
new file mode 100644
index 0000000..1d94b6b
--- /dev/null
+++ b/skip/qt5-qtwebengine/remove-glibc-check.patch
@@ -0,0 +1,78 @@
+Qt checks if glibc is available and if not disables large part of Qt5WebEngine and thus cripples functionality.
+However these parts work fine with Musl so there is no need to disable them.
+Just remove the check so it builds again. Since 5.15.1 is the last version of Qt to be released with this build system it'll be obsolete with Qt6 and there is no real point in fixing this upstream.
+
+
+diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri
+index e7f869a1..de18523d 100644
+--- a/src/buildtools/config/support.pri
++++ b/src/buildtools/config/support.pri
+@@ -189,15 +189,6 @@ defineTest(qtwebengine_checkForHostPkgCfg) {
+ return(true)
+ }
+
+-defineTest(qtwebengine_checkForGlibc) {
+- module = $$1
+- !qtConfig(webengine-system-glibc) {
+- qtwebengine_skipBuild("A suitable version >= 2.27 of libc required to build $${module} could not be found.")
+- return(false)
+- }
+- return(true)
+-}
+-
+ defineTest(qtwebengine_checkForKhronos) {
+ module = $$1
+ !qtConfig(webengine-system-khr) {
+diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
+index 88d1790c..8623f6d7 100644
+--- a/src/buildtools/configure.json
++++ b/src/buildtools/configure.json
+@@ -264,18 +264,6 @@
+ "label": "system gn",
+ "type": "detectGn"
+ },
+- "webengine-glibc": {
+- "label": "glibc > 2.16",
+- "type": "compile",
+- "test": {
+- "include": "features.h",
+- "tail": [
+- "#if __GLIBC__ < 2 || __GLIBC_MINOR__ < 17",
+- "#error glibc versions below 2.17 are not supported",
+- "#endif"
+- ]
+- }
+- },
+ "webengine-gperf": {
+ "label": "gperf",
+ "type": "detectGperf"
+@@ -379,7 +367,6 @@
+ && (!config.sanitizer || features.webengine-sanitizer)
+ && (!config.linux || features.pkg-config)
+ && (!config.linux || features.webengine-host-pkg-config)
+- && (!config.linux || features.webengine-system-glibc)
+ && (!config.linux || features.webengine-system-khr)
+ && (!config.linux || features.webengine-system-nss)
+ && (!config.linux || features.webengine-system-dbus)
+@@ -517,11 +504,6 @@
+ "condition": "config.unix && !config.darwin && libs.webengine-nss",
+ "output": [ "privateFeature" ]
+ },
+- "webengine-system-glibc": {
+- "label": "glibc",
+- "condition": "config.linux && tests.webengine-glibc",
+- "output": [ "privateFeature" ]
+- },
+ "webengine-system-x11" : {
+ "label": "x11",
+ "condition": "config.unix && libs.webengine-x11",
+@@ -782,8 +764,7 @@
+ "webengine-system-fontconfig",
+ "webengine-system-dbus",
+ "webengine-system-nss",
+- "webengine-system-khr",
+- "webengine-system-glibc"
++ "webengine-system-khr"
+ ]
+ },
+ {
diff --git a/skip/qt5-qtwebengine/sndio.patch b/skip/qt5-qtwebengine/sndio.patch
new file mode 100644
index 0000000..771e630
--- /dev/null
+++ b/skip/qt5-qtwebengine/sndio.patch
@@ -0,0 +1,142 @@
+from void-packages, 0101,0102-sndio.patch
+--- a/src/core/configure.json 2020-03-24 10:16:30.000000000 +0100
++++ - 2020-04-06 14:28:00.591236926 +0200
+@@ -21,6 +21,7 @@
+ "webengine-printing-and-pdf": "boolean",
+ "webengine-proprietary-codecs": "boolean",
+ "webengine-pulseaudio": "boolean",
++ "webengine-sndio": "boolean",
+ "webengine-spellchecker": "boolean",
+ "webengine-native-spellchecker": "boolean",
+ "webengine-extensions": "boolean",
+@@ -31,6 +32,7 @@
+ "webengine-kerberos": "boolean",
+ "alsa": { "type": "boolean", "name": "webengine-alsa" },
+ "pulseaudio": { "type": "boolean", "name": "webengine-pulseaudio" },
++ "sndio": { "type": "boolean", "name": "webengine-sndio" },
+ "ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
+ "opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } },
+ "webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } },
+@@ -68,7 +70,13 @@
+ "sources": [
+ { "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" }
+ ]
+- }
++ },
++ "sndio": {
++ "label": "sndio",
++ "sources": [
++ { "type": "pkgConfig", "args": "libsndio >= 1.5.0 libsndio" }
++ ]
++ }
+ },
+ "tests" : {
+ "webengine-host-compiler": {
+@@ -136,6 +144,10 @@
+ "condition": "libs.webengine-pulseaudio",
+ "output": [ "privateFeature" ]
+ },
++ "webengine-sndio": {
++ "label": "Use sndio",
++ "output": [ "privateFeature" ]
++ },
+ "webengine-pepper-plugins": {
+ "label": "Pepper Plugins",
+ "purpose": "Enables use of Pepper Flash plugins.",
+@@ -308,6 +320,11 @@
+ "condition": "config.unix"
+ },
+ {
++ "type": "feature",
++ "args": "webengine-sndio",
++ "condition": "config.unix"
++ },
++ {
+ "type": "feature",
+ "args": "webengine-sanitizer",
+ "condition": "config.sanitizer"
+--- a/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
++++ b/src/3rdparty/chromium/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;
+--- a/src/3rdparty/chromium/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
+--- a/src/3rdparty/chromium/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 &&
+--- a/src/3rdparty/chromium/media/audio/BUILD.gn 2021-02-23 16:36:59.000000000 +0100
++++ - 2021-03-07 22:00:34.889682069 +0100
+@@ -238,6 +238,17 @@
+ 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" ]
+ sources += [
diff --git a/skip/qt5-qtwebengine/support-python3.patch b/skip/qt5-qtwebengine/support-python3.patch
new file mode 100644
index 0000000..cc5e457
--- /dev/null
+++ b/skip/qt5-qtwebengine/support-python3.patch
@@ -0,0 +1,158 @@
+diff -upr a/configure.pri b/configure.pri
+--- a/configure.pri 2022-01-21 11:47:42.000000000 +0100
++++ b/configure.pri 2022-03-08 18:45:03.650823421 +0100
+@@ -7,20 +7,7 @@ QTWEBENGINE_SOURCE_TREE = $$PWD
+ equals(QMAKE_HOST.os, Windows): EXE_SUFFIX = .exe
+
+ defineTest(isPythonVersionSupported) {
+- python = $$system_quote($$system_path($$1))
+- python_version = $$system('$$python -c "import sys; print(sys.version_info[0:3])"')
+- python_version ~= s/[()]//g
+- python_version = $$split(python_version, ',')
+- python_major_version = $$first(python_version)
+- greaterThan(python_major_version, 2) {
+- qtLog("Python version 3 is not supported by Chromium.")
+- return(false)
+- }
+- python_minor_version = $$member(python_version, 1)
+- python_patch_version = $$member(python_version, 2)
+- greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true)
+- qtLog("Unsupported python version: $${python_major_version}.$${python_minor_version}.$${python_patch_version}.")
+- return(false)
++ return(true)
+ }
+
+ defineTest(qtConfTest_detectJumboBuild) {
+@@ -52,22 +39,22 @@ defineTest(qtConfReport_jumboBuild) {
+ qtConfReportPadded($${1}, $$mergeLimit)
+ }
+
+-defineTest(qtConfTest_detectPython2) {
+- python = $$qtConfFindInPath("python2$$EXE_SUFFIX")
++defineTest(qtConfTest_detectPython) {
++ python = $$qtConfFindInPath("python3$$EXE_SUFFIX")
+ isEmpty(python) {
+- qtLog("'python2$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.")
++ qtLog("'python3$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.")
+ python = $$qtConfFindInPath("python$$EXE_SUFFIX")
+ }
+ isEmpty(python) {
+- qtLog("'python$$EXE_SUFFIX' not found in PATH. Giving up.")
++ qtLog("'python3$$EXE_SUFFIX' and 'python$$EXE_SUFFIX' not found in PATH. Giving up.")
+ return(false)
+ }
+ !isPythonVersionSupported($$python) {
+- qtLog("A suitable Python 2 executable could not be located.")
++ qtLog("A suitable Python executable could not be located.")
+ return(false)
+ }
+
+- # Make tests.python2.location available in configure.json.
++ # Make tests.python.location available in configure.json.
+ $${1}.location = $$clean_path($$python)
+ export($${1}.location)
+ $${1}.cache += location
+diff -upr a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
+--- a/mkspecs/features/functions.prf 2022-01-21 11:47:42.000000000 +0100
++++ b/mkspecs/features/functions.prf 2022-03-08 18:45:34.740851611 +0100
+@@ -39,11 +39,11 @@ defineReplace(which) {
+
+ # Returns the unquoted path to the python executable.
+ defineReplace(pythonPath) {
+- isEmpty(QMAKE_PYTHON2) {
++ isEmpty(QMAKE_PYTHON) {
+ # Fallback for building QtWebEngine with Qt < 5.8
+- QMAKE_PYTHON2 = python
++ QMAKE_PYTHON = python3
+ }
+- return($$QMAKE_PYTHON2)
++ return($$QMAKE_PYTHON)
+ }
+
+ # Returns the python executable for use with shell / make targets.
+diff -upr a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri
+--- a/src/buildtools/config/support.pri 2022-01-21 11:47:42.000000000 +0100
++++ b/src/buildtools/config/support.pri 2022-03-08 18:44:25.677455634 +0100
+@@ -21,7 +21,7 @@ defineReplace(qtwebengine_checkWebEngine
+ !qtwebengine_checkForGperf(QtWebEngine):return(false)
+ !qtwebengine_checkForBison(QtWebEngine):return(false)
+ !qtwebengine_checkForFlex(QtWebEngine):return(false)
+- !qtwebengine_checkForPython2(QtWebEngine):return(false)
++ !qtwebengine_checkForPython(QtWebEngine):return(false)
+ !qtwebengine_checkForNodejs(QtWebEngine):return(false)
+ !qtwebengine_checkForSanitizer(QtWebEngine):return(false)
+ linux:!qtwebengine_checkForPkgCfg(QtWebEngine):return(false)
+@@ -51,7 +51,7 @@ defineReplace(qtwebengine_checkPdfError)
+ !qtwebengine_checkForGperf(QtPdf):return(false)
+ !qtwebengine_checkForBison(QtPdf):return(false)
+ !qtwebengine_checkForFlex(QtPdf):return(false)
+- !qtwebengine_checkForPython2(QtPdf):return(false)
++ !qtwebengine_checkForPython(QtPdf):return(false)
+ !qtwebengine_checkForSanitizer(QtPdf):return(false)
+ linux:!qtwebengine_checkForPkgCfg(QtPdf):return(false)
+ linux:!qtwebengine_checkForHostPkgCfg(QtPdf):return(false)
+@@ -147,10 +147,10 @@ defineTest(qtwebengine_checkForFlex) {
+ return(true)
+ }
+
+-defineTest(qtwebengine_checkForPython2) {
++defineTest(qtwebengine_checkForPython) {
+ module = $$1
+- !qtConfig(webengine-python2) {
+- qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build $${module}.")
++ !qtConfig(webengine-python) {
++ qtwebengine_skipBuild("Python is required to build $${module}.")
+ return(false)
+ }
+ return(true)
+diff -upr a/src/buildtools/configure.json b/src/buildtools/configure.json
+--- a/src/buildtools/configure.json 2022-01-21 11:47:42.000000000 +0100
++++ b/src/buildtools/configure.json 2022-03-08 18:44:25.677455634 +0100
+@@ -295,9 +295,9 @@
+ "label": "system ninja",
+ "type": "detectNinja"
+ },
+- "webengine-python2": {
+- "label": "python2",
+- "type": "detectPython2",
++ "webengine-python": {
++ "label": "python",
++ "type": "detectPython",
+ "log": "location"
+ },
+ "webengine-winversion": {
+@@ -374,7 +374,7 @@
+ && features.webengine-gperf
+ && features.webengine-bison
+ && features.webengine-flex
+- && features.webengine-python2
++ && features.webengine-python
+ && features.webengine-nodejs
+ && (!config.sanitizer || features.webengine-sanitizer)
+ && (!config.linux || features.pkg-config)
+@@ -400,7 +400,7 @@
+ && features.webengine-gperf
+ && features.webengine-bison
+ && features.webengine-flex
+- && features.webengine-python2
++ && features.webengine-python
+ && (!config.sanitizer || features.webengine-sanitizer)
+ && (!config.linux || features.pkg-config)
+ && (!config.linux || features.webengine-host-pkg-config)
+@@ -423,12 +423,12 @@
+ "autoDetect": "features.private_tests",
+ "output": [ "privateFeature" ]
+ },
+- "webengine-python2": {
+- "label": "python2",
+- "condition": "tests.webengine-python2",
++ "webengine-python": {
++ "label": "python",
++ "condition": "tests.webengine-python",
+ "output": [
+ "privateFeature",
+- { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" }
++ { "type": "varAssign", "name": "QMAKE_PYTHON", "value": "tests.webengine-python.location" }
+ ]
+ },
+ "webengine-gperf": {
diff --git a/skip/ripgrep/minimize-size.patch b/skip/ripgrep/minimize-size.patch
new file mode 100644
index 0000000..dbb008b
--- /dev/null
+++ b/skip/ripgrep/minimize-size.patch
@@ -0,0 +1,28 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Tue, 6 Apr 2021 00:24:00 +0200
+Subject: [PATCH] Reduce size of the binary
+
+Reduce size of the resulting binary: 4.6 -> 3.0 MiB (on x86_64).
+
+`opt-level="s"` provides the best size/performance ratio; the performance
+is close to the default opt-level (according to the benchmark), but the
+binary is significantly smaller.
+
+NOTE: ripgrep uses jemalloc allocator when building on musl libc.
+It adds about 200 kiB to the binary size, but provides 2x performance;
+so better keep it as-is.
+
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -78,7 +78,10 @@
+ pcre2 = ["grep/pcre2"]
+
+ [profile.release]
+-debug = 1
++lto = true
++codegen-units = 1
++panic = "abort"
++opt-level = "s"
+
+ [package.metadata.deb]
+ features = ["pcre2"]
diff --git a/skip/ripgrep/ripgrep.xibuild b/skip/ripgrep/ripgrep.xibuild
new file mode 100644
index 0000000..8820a83
--- /dev/null
+++ b/skip/ripgrep/ripgrep.xibuild
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+NAME="ripgrep"
+DESC="ripgrep combines the usability of The Silver Searcher with the raw speed of grep"
+
+MAKEDEPS=" cargo asciidoc jemalloc pcre2"
+
+PKG_VER=13.0.0
+SOURCE="https://github.com/BurntSushi/ripgrep/archive/$PKG_VER/ripgrep-$PKG_VER.tar.gz"
+
+ADDITIONAL="
+minimize-size.patch
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ cargo build --release --locked --features 'pcre2'
+}
+
+check() {
+ cargo test --release --locked --features 'pcre2'
+}
+
+package() {
+ install -Dm755 "target/release/rg" "$PKG_DEST/usr/bin/rg"
+ install -Dm644 "target/release/build/ripgrep-"*/out/rg.1 \
+ "$PKG_DEST/usr/share/man/man1/rg.1"
+
+ install -Dm644 "$BUILD_ROOT"/target/release/build/ripgrep-*/out/rg.fish \
+ -t "$PKG_DEST"/usr/share/fish/completions
+}
+
diff --git a/skip/ruby-kramdown/gemspec.patch b/skip/ruby-kramdown/gemspec.patch
new file mode 100644
index 0000000..f90f36b
--- /dev/null
+++ b/skip/ruby-kramdown/gemspec.patch
@@ -0,0 +1,18 @@
+--- a/Rakefile
++++ b/Rakefile
+@@ -116,15 +116,9 @@
+ end
+
+ PKG_FILES = FileList.new([
+- 'AUTHORS',
+ 'bin/*',
+- 'CONTRIBUTERS',
+- 'COPYING',
+ 'data/**/*',
+ 'lib/**/*.rb',
+- 'man/man1/kramdown.1',
+- 'README.md',
+- 'test/**/*',
+ 'VERSION',
+ ])
+
diff --git a/skip/ruby-kramdown/ruby-kramdown.xibuild b/skip/ruby-kramdown/ruby-kramdown.xibuild
new file mode 100644
index 0000000..10885f9
--- /dev/null
+++ b/skip/ruby-kramdown/ruby-kramdown.xibuild
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+NAME="ruby-kramdown"
+_gemname=kramdown
+DESC="A fast, pure Ruby Markdown superset converter"
+
+MAKEDEPS="ruby-rake"
+
+PKG_VER=2.3.2
+ver=REL_$(echo $PKG_VER | sed 's/\./_/g')
+SOURCE="https://github.com/gettalong/kramdown/archive/$ver/ruby-kramdown-$PKG_VER.tar.gz"
+
+ADDITIONAL="
+gemspec.patch
+"
+
+prepare() {
+ apply_patches &&
+ rm test/testcases/block/04_header/with_auto_ids.*
+}
+
+build() {
+ rake gemspec &&
+ gem build $_gemname.gemspec
+}
+
+check() {
+ rake test
+}
+
+package() {
+ local gemdir="$PKG_DEST/$(ruby -e 'puts Gem.default_dir')"
+
+ gem install \
+ --local \
+ --install-dir "$gemdir" \
+ --bindir "$PKG_DEST/usr/bin" \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ $_gemname
+
+ # Remove unnecessary files and rubbish...
+ cd "$gemdir"
+ rm -r cache build_info doc extensions
+}
+
diff --git a/skip/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/skip/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
deleted file mode 100644
index 30cb66f..0000000
--- a/skip/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Additions for build.rs by q66, necessary for our musl setup.
-
-From 1eb558f246269606c6d8d73824ef6b44fa10764e Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sat, 9 Sep 2017 00:14:16 -0500
-Subject: [PATCH 06/16] Prefer libgcc_eh over libunwind for musl
-
----
- src/libunwind/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
-index 9182e349b19..0377fbb58fc 100644
---- a/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -51,7 +51,7 @@
- #[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
- extern "C" {}
- } else {
-- #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
-+ #[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
- #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
- extern "C" {}
- }
diff --git a/skip/rust/0007-do-not-install-libunwind-source.patch b/skip/rust/0007-do-not-install-libunwind-source.patch
deleted file mode 100644
index e8ff8b7..0000000
--- a/skip/rust/0007-do-not-install-libunwind-source.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-From: Dominic Meiser <alpine@msrd0.de>
-Date: Tue, 22 Dec 2020 23:31:28 +0100
-Subject: [PATCH] Do not install libunwind source
-
-This was added in rustc 1.48, but is incompatible with the Alpine Linux package since it removes all bundled
-dependencies prior to building.
-
-diff -Naur rustc-1.48.0-src.orig/src/bootstrap/dist.rs rustc-1.48.0-src/src/bootstrap/dist.rs
---- rustc-1.48.0-src.orig/src/bootstrap/dist.rs 2020-12-22 16:39:30.504249113 +0100
-+++ rustc-1.48.0-src/src/bootstrap/dist.rs 2020-12-22 16:42:08.663006830 +0100
-@@ -1016,7 +1016,7 @@
- copy_src_dirs(
- builder,
- &builder.src,
-- &["library", "src/llvm-project/libunwind"],
-+ &["library"],
- &[
- // not needed and contains symlinks which rustup currently
- // chokes on when unpacking.
diff --git a/skip/rust/alpine-move-py-scripts-to-share.patch b/skip/rust/alpine-move-py-scripts-to-share.patch
deleted file mode 100644
index 21be36f..0000000
--- a/skip/rust/alpine-move-py-scripts-to-share.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/src/etc/rust-gdb
-+++ b/src/etc/rust-gdb
-@@ -12,7 +12,7 @@
-
- # Find out where the pretty printer Python module is
- RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
--GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
-+GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust/etc"
-
- # Run GDB with the additional arguments that load the pretty printers
- # Set the environment variable `RUST_GDB` to overwrite the call to a
- # Set the environment variable `RUST_GDB` to overwrite the call to a
---- a/src/etc/rust-lldb
-+++ b/src/etc/rust-lldb
-@@ -8,7 +8,7 @@
-
- # Find out where to look for the pretty printer Python module
- RUSTC_SYSROOT=$(rustc --print sysroot)
--RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb"
-+RUST_LLDB="$RUSTC_SYSROOT/share/rust/etc"
-
- lldb=lldb
- if [ -f "$RUST_LLDB" ]; then
diff --git a/skip/rust/alpine-target.patch b/skip/rust/alpine-target.patch
deleted file mode 100644
index 2392cdd..0000000
--- a/skip/rust/alpine-target.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-From: Shiz <hi@shiz.me>
-Updated by Rasmus Thomsen <oss@cogitri.dev> on 28th of July 2019
-Updated again by Ariadne Conill <ariadne@dereferenced.org> on 31 October 2020
-Date: Thu, 20 Aug 2017 01:52:36 +0200
-Last-Updated: Sat, 28 Oct 2017 20:23:00 +0200
-Subject: [PATCH] Add Alpine targets
-
-This adds `$arch-alpine-linux-musl` targets to Rust to encode our toolchain
-and distribution-specific quirks instead of polluting the main musl target of
-`$arch-unknown-linux-musl`.
-
---- /dev/null
-+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/aarch64_alpine_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::aarch64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "aarch64-alpine-linux-musl".to_string();
-+ base.options.vendor = "alpine".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.static_position_independent_executables = true;
-+ base.options.need_rpath = true;
-+
-+ base
-+}
---- /dev/null
-+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/armv6_alpine_linux_musleabihf.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::arm_unknown_linux_musleabihf::target();
-+
-+ base.llvm_target = "armv6-alpine-linux-musleabihf".to_string();
-+ base.options.vendor = "alpine".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.static_position_independent_executables = true;
-+ base.options.need_rpath = true;
-+
-+ base
-+}
---- /dev/null
-+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/armv7_alpine_linux_musleabihf.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::armv7_unknown_linux_musleabihf::target();
-+
-+ base.llvm_target = "armv7-alpine-linux-musleabihf".to_string();
-+ base.options.vendor = "alpine".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.static_position_independent_executables = true;
-+ base.options.need_rpath = true;
-+
-+ base
-+}
---- /dev/null
-+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/i586_alpine_linux_musl.rs
-@@ -0,0 +1,14 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::i686_unknown_linux_musl::target();
-+
-+ base.options.cpu = "pentium4".to_string();
-+ base.llvm_target = "i586-alpine-linux-musl".to_string();
-+ base.options.vendor = "alpine".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.static_position_independent_executables = true;
-+ base.options.need_rpath = true;
-+
-+ base
-+}
---- rustc-1.48.0-src.orig/compiler/rustc_target/src/spec/mod.rs
-+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/mod.rs
-@@ -490,6 +490,16 @@
- }
-
- supported_targets! {
-+ ("i586-alpine-linux-musl", i586_alpine_linux_musl),
-+ ("x86_64-alpine-linux-musl", x86_64_alpine_linux_musl),
-+ ("aarch64-alpine-linux-musl", aarch64_alpine_linux_musl),
-+ ("armv6-alpine-linux-musleabihf", armv6_alpine_linux_musleabihf),
-+ ("armv7-alpine-linux-musleabihf", armv7_alpine_linux_musleabihf),
-+ ("powerpc-alpine-linux-musl", powerpc_alpine_linux_musl),
-+ ("powerpc64-alpine-linux-musl", powerpc64_alpine_linux_musl),
-+ ("powerpc64le-alpine-linux-musl", powerpc64le_alpine_linux_musl),
-+ ("s390x-alpine-linux-musl", s390x_alpine_linux_musl),
-+ ("riscv64-alpine-linux-musl", riscv64_alpine_linux_musl),
- ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
- ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
- ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
---- /dev/null
-+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc64_alpine_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc64-alpine-linux-musl".to_string();
-+ base.options.vendor = "alpine".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.static_position_independent_executables = true;
-+ base.options.need_rpath = true;
-+
-+ base
-+}
---- /dev/null
-+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc64le_alpine_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc64le_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc64le-alpine-linux-musl".to_string();
-+ base.options.vendor = "alpine".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.static_position_independent_executables = true;
-+ base.options.need_rpath = true;
-+
-+ base
-+}
---- /dev/null
-+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc_alpine_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc-alpine-linux-musl".to_string();
-+ base.options.vendor = "alpine".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.static_position_independent_executables = true;
-+ base.options.need_rpath = true;
-+
-+ base
-+}
---- /dev/null
-+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/s390x_alpine_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::s390x_unknown_linux_musl::target();
-+
-+ base.llvm_target = "s390x-alpine-linux-musl".to_string();
-+ base.options.vendor = "alpine".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.static_position_independent_executables = true;
-+ base.options.need_rpath = true;
-+
-+ base
-+}
---- /dev/null
-+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/x86_64_alpine_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::x86_64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "x86_64-alpine-linux-musl".to_string();
-+ base.options.vendor = "alpine".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.static_position_independent_executables = true;
-+ base.options.need_rpath = true;
-+
-+ base
-+}
---- /dev/null
-+++ rustc-1.52.1-src/compiler/rustc_target/src/spec/riscv64_alpine_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::riscv64gc_unknown_linux_musl::target();
-+
-+ base.llvm_target = "riscv64-alpine-linux-musl".to_string();
-+ base.options.vendor = "alpine".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.static_position_independent_executables = true;
-+ base.options.need_rpath = true;
-+
-+ base
-+}
diff --git a/skip/rust/cargo.xibuild b/skip/rust/cargo.xibuild
deleted file mode 100644
index 8a9f47e..0000000
--- a/skip/rust/cargo.xibuild
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-DEPS="rust"
-DESC="Rust package manager"
-
-package () {
- add_from_main "usr/bin/cargo"
-}
diff --git a/skip/rust/check-rustc b/skip/rust/check-rustc
deleted file mode 100644
index d4b85be..0000000
--- a/skip/rust/check-rustc
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/sh
-# vim: set ts=4:
-set -eu
-
-RUSTC="$1"
-TMPDIR="$(pwd)/.tmp-${0##*/}-$RANDOM"
-failed=0
-
-unset RUST_BACKTRACE
-unset RUSTC_CRT_STATIC
-
-
-_rustc() {
- printf '\n$ rustc %s\n' "$*"
- "$RUSTC" "$@"
-}
-
-die() {
- printf '\033[1;31mERROR:\033[0m %s\n' "$1" >&2 # bold red
- exit 1
-}
-
-fail() {
- printf '\033[1;31mFAIL:\033[0m %s\n' "$1" >&2 # bold red
- failed=$(( failed + 1 ))
-}
-
-assert_dynamic() {
- readelf -l "$1" | grep -Fqw INTERP \
- && readelf -d "$1" | grep -Fqw NEEDED || {
- fail "$1 is not a dynamic executable!"
- readelf -ld "$1"
- }
-}
-
-assert_ok() {
- "$1" || fail "$1 exited with status $?"
-}
-
-assert_panic() {
- local status=0
- "$1" || status=$? && [ "$status" = 101 ] \
- || fail "$1 exited with status $status, but expected 101"
-}
-
-assert_pie() {
- readelf -d "$1" | grep -Fw FLAGS_1 | grep -Fqw PIE || {
- fail "$1 is not a PIE executable!"
- readelf -d "$1"
- }
-}
-
-assert_static() {
- test -f "$1" \
- && ! readelf -l "$1" | grep -Fqw INTERP \
- && ! readelf -d "$1" | grep -Fqw NEEDED || {
- fail "$1 is not a static executable!"
- readelf -ld "$1"
- }
-}
-
-
-#-------------------- M a i n --------------------
-
-test -d "$TMPDIR" && die "$TMPDIR already exists!"
-mkdir -p "$TMPDIR"
-trap "rm -R '$TMPDIR'" EXIT
-
-cd "$TMPDIR"
-
-cat >> hello_world.rs <<-EOF
- fn main() {
- println!("Hello, world!");
- }
-EOF
-
-_rustc hello_world.rs
-assert_ok ./hello_world
-assert_dynamic hello_world
-assert_pie hello_world
-rm -f hello_world
-
-_rustc -C target-feature=-crt-static hello_world.rs
-assert_ok ./hello_world
-assert_dynamic hello_world
-assert_pie hello_world
-rm -f hello_world
-
-_rustc -C target-feature=+crt-static hello_world.rs
-assert_ok ./hello_world
-assert_static hello_world
-assert_pie hello_world
-rm -f hello_world
-
-
-cat >> panic.rs <<-EOF
- fn main() {
- panic!("This should panic");
- }
-EOF
-
-_rustc -C target-feature=-crt-static panic.rs
-assert_panic ./panic
-
-_rustc -C target-feature=+crt-static panic.rs
-assert_panic ./panic
-
-
-[ "$failed" -eq 0 ] || die "$failed assertion(s) has failed"
diff --git a/skip/rust/install-template-shebang.patch b/skip/rust/install-template-shebang.patch
deleted file mode 100644
index e81b579..0000000
--- a/skip/rust/install-template-shebang.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-The script seems to be POSIX-sh (+ local) compatible.
-
---- a/src/tools/rust-installer/install-template.sh
-+++ b/src/tools/rust-installer/install-template.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- # Copyright 2014 The Rust Project Developers. See the COPYRIGHT
- # file at the top-level directory of this distribution and at
- # http://rust-lang.org/COPYRIGHT.
diff --git a/skip/rust/link-musl-dynamically.patch b/skip/rust/link-musl-dynamically.patch
deleted file mode 100644
index 55d02a3..0000000
--- a/skip/rust/link-musl-dynamically.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- rustc-1.58.0-src.orig/vendor/libc/src/unix/mod.rs
-+++ rustc-1.58.0-src/vendor/libc/src/unix/mod.rs
-@@ -329,11 +329,11 @@
- #[link(name = "c", cfg(not(target_feature = "crt-static")))]
- extern {}
- } else if #[cfg(target_env = "musl")] {
-+ #[link(name = "c")]
-+ extern {}
- #[cfg_attr(feature = "rustc-dep-of-std",
-- link(name = "c", kind = "static", modifiers = "-bundle",
-+ link(name = "gcc", kind = "static", modifiers = "-bundle",
- cfg(target_feature = "crt-static")))]
-- #[cfg_attr(feature = "rustc-dep-of-std",
-- link(name = "c", cfg(not(target_feature = "crt-static"))))]
- extern {}
- } else if #[cfg(target_os = "emscripten")] {
- #[link(name = "c")]
diff --git a/skip/rust/musl-fix-linux_musl_base.patch b/skip/rust/musl-fix-linux_musl_base.patch
deleted file mode 100644
index 1771ffe..0000000
--- a/skip/rust/musl-fix-linux_musl_base.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Jakub Jirutka <jakub@jirutka.cz>
-Date: Sat, 08 Aug 2016 15:06:00 +0200
-Subject: [PATCH] Fix linux_musl_base for native musl host
-
-See https://github.com/rust-lang/rust/pull/40113
-
---- a/compiler/rustc_target/src/spec/linux_musl_base.rs
-+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
-@@ -5,12 +5,9 @@
- let mut base = super::linux_base::opts();
-
- base.env = "musl".to_string();
-- base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
-- base.post_link_objects_fallback = crt_objects::post_musl_fallback();
-- base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
-
- // These targets statically link libc by default
-- base.crt_static_default = true;
-+ base.crt_static_default = false;
-
- base
- }
-
diff --git a/skip/rust/need-rpath.patch b/skip/rust/need-rpath.patch
deleted file mode 100644
index 5ab8377..0000000
--- a/skip/rust/need-rpath.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From: Shiz <hi@shiz.me>
-Date: Thu, 20 Aug 2017 01:48:22 +0200
-Subject: [PATCH] Add need_rpath target option to force RPATH generation
-
-This adds a `need_rpath` option to the target options in order to implicitly
-have the equivalent of `-C rpath` specified by default for final products
-(executables and dynamic libraries), so that RPATHs are always added.
-
-We have to skip this step in the bootstrap phase as it does its own manual
-RPATH additions, but unfortunately there's no clean way to detect this.
-As such, we have to resort to checking the `RUSTC_BOOTSTRAP` variable.
-Hacky hacky!
-
---- a/compiler/rustc_target/src/spec/mod.rs
-+++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -379,6 +379,8 @@
- pub allows_weak_linkage: bool,
- /// Whether the linker support rpaths or not. Defaults to false.
- pub has_rpath: bool,
-+ /// Whether to force rpath support on by default. Defaults to false.
-+ pub need_rpath: bool,
- /// Whether to disable linking to the default libraries, typically corresponds
- /// to `-nodefaultlibs`. Defaults to true.
- pub no_default_libraries: bool,
-@@ -519,6 +519,7 @@
- linker_is_gnu: false,
- allows_weak_linkage: true,
- has_rpath: false,
-+ need_rpath: false,
- no_default_libraries: true,
- position_independent_executables: false,
- static_position_independent_executables: false,
-@@ -776,6 +776,7 @@
- key!(linker_is_gnu, bool);
- key!(allows_weak_linkage, bool);
- key!(has_rpath, bool);
-+ key!(need_rpath, bool);
- key!(no_default_libraries, bool);
- key!(position_independent_executables, bool);
- key!(static_position_independent_executables, bool);
-@@ -980,6 +980,7 @@
- target_option_val!(linker_is_gnu);
- target_option_val!(allows_weak_linkage);
- target_option_val!(has_rpath);
-+ target_option_val!(need_rpath);
- target_option_val!(no_default_libraries);
- target_option_val!(position_independent_executables);
- target_option_val!(static_position_independent_executables);
---- a/compiler/rustc_codegen_ssa/src/back/link.rs.orig
-+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
-@@ -1675,7 +1675,10 @@
- // FIXME (#2397): At some point we want to rpath our guesses as to
- // where extern libraries might live, based on the
- // add_lib_search_paths
-- if sess.opts.cg.rpath {
-+ // XXX: hacky hacky
-+ let bootstrap = env::var("RUSTC_BOOTSTRAP").is_ok();
-+ if !bootstrap && !sess.crt_static(None) &&
-+ (sess.opts.cg.rpath || sess.target.options.need_rpath) {
- let libs = codegen_results
- .crate_info
- .used_crates
diff --git a/skip/rust/need-ssp_nonshared.patch b/skip/rust/need-ssp_nonshared.patch
deleted file mode 100644
index f1adf20..0000000
--- a/skip/rust/need-ssp_nonshared.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/library/std/src/sys/unix/mod.rs.orig 2021-02-11 18:34:14.479832268 +0100
-+++ b/library/std/src/sys/unix/mod.rs 2021-02-11 18:38:28.078987749 +0100
-@@ -243,6 +243,9 @@
- #[link(name = "log")]
- #[link(name = "gcc")]
- extern "C" {}
-+ } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
-+ #[link(name = "ssp_nonshared")]
-+ extern "C" {}
- } else if #[cfg(target_os = "freebsd")] {
- #[link(name = "execinfo")]
- #[link(name = "pthread")]
-
diff --git a/skip/rust/rust.xibuild b/skip/rust/rust.xibuild
deleted file mode 100644
index 1fb6930..0000000
--- a/skip/rust/rust.xibuild
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-MAKEDEPS="cmake libclang clang llvm curl"
-DEPS="libssh2 openssl"
-
-PKG_VER=1.63.0
-SOURCE=https://static.rust-lang.org/dist/rustc-$PKG_VER-src.tar.gz
-DESC="Systems programming language focused on safety, speed and concurrency"
-
-ADDITIONAL="
- 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
- 0007-do-not-install-libunwind-source.patch
- install-template-shebang.patch
- link-musl-dynamically.patch
- musl-fix-linux_musl_base.patch
- need-rpath.patch
- need-ssp_nonshared.patch
-"
-
-prepare () {
- apply_patches
- sed -i /LD_LIBRARY_PATH/d src/bootstrap/bootstrap.py
- sed -i 's/\("files":{\)[^}]*/\1/' vendor/libc/.cargo-checksum.json
-}
-
-build () {
- export CFLAGS="$CFLAGS -fPIE"
- export CXXFLAGS="$CFLAGS"
- target=x86_64-unknown-linux-musl
- build=x86_64-unknown-linux-musl
- ./configure \
- --build="$build" \
- --host="$target" \
- --target="$target" \
- --prefix="/usr" \
- --release-channel="stable" \
- --llvm-root="/usr/lib/" \
- --disable-docs \
- --enable-extended \
- --tools="analysis,cargo,src,rustfmt" \
- --enable-llvm-link-shared \
- --enable-option-checking \
- --enable-locked-deps \
- --enable-vendor \
- --set="rust.musl-root=/usr" \
- --set="rust.codegen-units=1" \
- --set="rust.codegen-units-std=1" \
- --set="rust.parallel-compiler=true" \
- --set="target.$target.llvm-config=/usr/bin/llvm-config" \
- --set="target.$target.musl-root=/usr" \
- --set="target.$target.crt-static=false" \
- --set="target.$target.cc=gcc" \
- --set="target.$target.cxx=g++" \
- --set="target.$target.ar=ar" \
- --set="target.$target.linker=gcc" \
- --set="target.$build.musl-root=/usr" \
- --set="target.$build.crt-static=false" \
- --set="target.$build.cc=gcc" \
- --set="target.$build.cxx=g++" \
- --set="target.$build.ar=ar" \
- --set="target.$build.linker=gcc" \
-
- sed 's/#deny-warnings = .*/deny-warnings = false/' -i config.toml
- sed 's|deny(warnings,|deny(|' -i src/bootstrap/lib.rs
-
- python ./x.py dist -v --jobs $JOBS
-
-}
-
-package () {
- export LIBSSH2_SYS_USE_PKG_CONFIG=1 &&
- DESTDIR=${PWD}/install python3 ./x.py install &&
- unset LIBSSH2_SYS_USE_PKG_CONFIG
-
- chown -R root:root install &&
- cp -a install/* $PKG_DEST
-}
diff --git a/skip/samba/add_missing___compar_fn_t.patch b/skip/samba/add_missing___compar_fn_t.patch
new file mode 100644
index 0000000..96b65e6
--- /dev/null
+++ b/skip/samba/add_missing___compar_fn_t.patch
@@ -0,0 +1,14 @@
+--- a/source4/dsdb/samdb/ldb_modules/count_attrs.c
++++ b/source4/dsdb/samdb/ldb_modules/count_attrs.c
+@@ -38,6 +38,11 @@
+ #define NULL_REQ_PSEUDO_N -2LL;
+ #define STAR_REQ_PSEUDO_N -4LL;
+
++#ifndef __COMPAR_FN_T
++#define __COMPAR_FN_T
++typedef int (*__compar_fn_t)(const void *, const void *);
++#endif
++
+ struct count_attrs_private {
+ struct tdb_wrap *requested;
+ struct tdb_wrap *duplicates;
diff --git a/skip/samba/getpwent_r.patch b/skip/samba/getpwent_r.patch
new file mode 100644
index 0000000..0ba5fcc
--- /dev/null
+++ b/skip/samba/getpwent_r.patch
@@ -0,0 +1,80 @@
+diff --git a/source4/torture/local/nss_tests.c b/source4/torture/local/nss_tests.c
+index 2cd6122..04f13c6 100644
+--- a/source4/torture/local/nss_tests.c
++++ b/source4/torture/local/nss_tests.c
+@@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct torture_context *tctx,
+ return true;
+ }
+
+-
+ static bool test_getgrgid(struct torture_context *tctx,
+ gid_t gid,
+ struct group *grp_p)
+@@ -333,6 +332,7 @@ static bool test_enum_passwd(struct torture_context *tctx,
+ return true;
+ }
+
++#if HAVE_GETPWENT_R
+ static bool test_enum_r_passwd(struct torture_context *tctx,
+ struct passwd **pwd_array_p,
+ size_t *num_pwd_p)
+@@ -383,6 +383,7 @@ static bool test_enum_r_passwd(struct torture_context *tctx,
+
+ return true;
+ }
++#endif
+
+ static bool torture_assert_passwd_equal(struct torture_context *tctx,
+ const struct passwd *p1,
+@@ -434,7 +435,7 @@ static bool test_passwd_r(struct torture_context *tctx)
+ struct passwd *pwd, pwd1, pwd2;
+ size_t num_pwd;
+
+- torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd),
++ torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd),
+ "failed to enumerate passwd");
+
+ for (i=0; i < num_pwd; i++) {
+@@ -462,7 +463,7 @@ static bool test_passwd_r_cross(struct torture_context *tctx)
+ struct passwd *pwd, pwd1, pwd2, pwd3, pwd4;
+ size_t num_pwd;
+
+- torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd),
++ torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd),
+ "failed to enumerate passwd");
+
+ for (i=0; i < num_pwd; i++) {
+@@ -533,6 +534,7 @@ static bool test_enum_group(struct torture_context *tctx,
+ return true;
+ }
+
++#if HAVE_GETGRENT_R
+ static bool test_enum_r_group(struct torture_context *tctx,
+ struct group **grp_array_p,
+ size_t *num_grp_p)
+@@ -583,6 +585,7 @@ static bool test_enum_r_group(struct torture_context *tctx,
+
+ return true;
+ }
++#endif
+
+ static bool torture_assert_group_equal(struct torture_context *tctx,
+ const struct group *g1,
+@@ -639,7 +642,7 @@ static bool test_group_r(struct torture_context *tctx)
+ struct group *grp, grp1, grp2;
+ size_t num_grp;
+
+- torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp),
++ torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp),
+ "failed to enumerate group");
+
+ for (i=0; i < num_grp; i++) {
+@@ -667,7 +670,7 @@ static bool test_group_r_cross(struct torture_context *tctx)
+ struct group *grp, grp1, grp2, grp3, grp4;
+ size_t num_grp;
+
+- torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp),
++ torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp),
+ "failed to enumerate group");
+
+ for (i=0; i < num_grp; i++) {
diff --git a/skip/samba/missing-headers.patch b/skip/samba/missing-headers.patch
new file mode 100644
index 0000000..58c26ae
--- /dev/null
+++ b/skip/samba/missing-headers.patch
@@ -0,0 +1,38 @@
+diff --git a/lib/param/loadparm.h b/lib/param/loadparm.h
+index b5d79b9..3f4eae0 100644
+--- a/lib/param/loadparm.h
++++ b/lib/param/loadparm.h
+@@ -31,6 +31,7 @@
+ #define _LOADPARM_H
+
+ #include <talloc.h>
++#include <time.h>
+
+ struct parmlist_entry {
+ struct parmlist_entry *prev, *next;
+diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c
+index 3b1ac9c..4044d75 100644
+--- a/source3/lib/system_smbd.c
++++ b/source3/lib/system_smbd.c
+@@ -27,6 +27,8 @@
+ #include "system/passwd.h"
+ #include "nsswitch/winbind_client.h"
+ #include "../lib/util/setid.h"
++#include <grp.h>
++#include <uuid/uuid.h>
+
+ #ifndef HAVE_GETGROUPLIST
+
+diff --git a/source4/torture/local/nss_tests.c b/source4/torture/local/nss_tests.c
+index 2cd6122..0c84ec2 100644
+--- a/source4/torture/local/nss_tests.c
++++ b/source4/torture/local/nss_tests.c
+@@ -20,6 +20,8 @@
+ */
+
+ #include "includes.h"
++#include <grp.h>
++#include <uuid/uuid.h>
+
+ #include "torture/torture.h"
+ #include "torture/local/proto.h"
diff --git a/skip/samba/musl_rm_unistd_incl.patch b/skip/samba/musl_rm_unistd_incl.patch
new file mode 100644
index 0000000..1f4aae2
--- /dev/null
+++ b/skip/samba/musl_rm_unistd_incl.patch
@@ -0,0 +1,37 @@
+--- a/lib/replace/replace.h
++++ b/lib/replace/replace.h
+@@ -168,10 +168,6 @@
+ #include <bsd/unistd.h>
+ #endif
+
+-#ifdef HAVE_UNISTD_H
+-#include <unistd.h>
+-#endif
+-
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
+--- a/lib/replace/system/network.h
++++ b/lib/replace/system/network.h
+@@ -31,10 +31,6 @@
+ #error "AC_LIBREPLACE_NETWORK_CHECKS missing in configure"
+ #endif
+
+-#ifdef HAVE_UNISTD_H
+-#include <unistd.h>
+-#endif
+-
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+--- a/source3/rpc_server/mdssvc/mdssvc.c
++++ b/source3/rpc_server/mdssvc/mdssvc.c
+@@ -18,6 +18,8 @@
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
++#include <unistd.h>
++
+ #include "includes.h"
+ #include "librpc/gen_ndr/auth.h"
+ #include "dbwrap/dbwrap.h"
diff --git a/skip/samba/musl_uintptr.patch b/skip/samba/musl_uintptr.patch
new file mode 100644
index 0000000..de7f285
--- /dev/null
+++ b/skip/samba/musl_uintptr.patch
@@ -0,0 +1,35 @@
+commit f81e5b71ce78f33250347914dacc75c8463bf102
+Author: Breno Leitao <breno.leitao@gmail.com>
+Date: Wed Mar 29 15:22:38 2017 -0300
+
+ include: Check for previous declaration of uintptr_t
+
+ Adding a extra check before declaring uintptr_t. Currently musl uses
+ macro __DEFINED_uintptr_t once it defines uintptr_t type. Checking
+ this macro before defining it, and, defining it when uintptr_t is
+ defined.
+
+ Signed-off-by: Breno Leitao <breno.leitao@gmail.com>
+
+diff --git a/third_party/cmocka/cmocka.h b/third_party/cmocka/cmocka.h
+index 303d0ae..a2bfc40 100644
+--- a/third_party/cmocka/cmocka.h
++++ b/third_party/cmocka/cmocka.h
+@@ -111,7 +111,7 @@
+ ((LargestIntegralType)(value))
+
+ /* Smallest integral type capable of holding a pointer. */
+-#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
++#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) && !defined(__DEFINED_uintptr_t)
+ # if defined(_WIN32)
+ /* WIN32 is an ILP32 platform */
+ typedef unsigned int uintptr_t;
+@@ -137,6 +137,8 @@
+
+ # define _UINTPTR_T
+ # define _UINTPTR_T_DEFINED
++# define __DEFINED_uintptr_t
++
+ #endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
+
+ /* Perform an unsigned cast to uintptr_t. */
diff --git a/skip/samba/netapp.patch b/skip/samba/netapp.patch
new file mode 100644
index 0000000..fea413c
--- /dev/null
+++ b/skip/samba/netapp.patch
@@ -0,0 +1,85 @@
+https://bugzilla.samba.org/show_bug.cgi?id=12776
+
+diff --git a/source3/include/client.h b/source3/include/client.h
+index db8260d..becdf77 100644
+--- a/source3/include/client.h
++++ b/source3/include/client.h
+@@ -61,6 +61,9 @@ struct cli_state {
+ char *server_os;
+ char *server_domain;
+
++ /* is server_os spinstream2? true/false/not-yet-checked(-1) */
++ int is_spinstream2;
++
+ char *share;
+ char *dev;
+
+diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
+index bc5c1b1..6d6b725 100644
+--- a/source3/libsmb/clientgen.c
++++ b/source3/libsmb/clientgen.c
+@@ -111,6 +111,7 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
+ if (!cli->server_os) {
+ goto error;
+ }
++ cli->is_spinstream2 = -1;
+ cli->server_type = talloc_strdup(cli, "");
+ if (!cli->server_type) {
+ goto error;
+@@ -467,6 +468,24 @@ time_t cli_state_server_time(struct cli_state *cli)
+ return t;
+ }
+
++bool cli_state_server_is_spinstream2(struct cli_state *cli)
++{
++ int *ret = &cli->is_spinstream2;
++ if (*ret == -1) {
++ if (*cli->server_os == '\0') {
++ DEBUG(1, ("when checking if server is SpinStream2:"
++ " server_os field is empty (should have"
++ " been sent in Session Setup protocol"
++ " response), so ... presuming not"));
++ *ret = 0;
++ }
++ else {
++ *ret = strequal(cli->server_os, "SpinStream2") ? 1 : 0;
++ }
++ }
++ return *ret == 1;
++}
++
+ struct cli_echo_state {
+ bool is_smb2;
+ };
+diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
+index 3987477..6371bc2 100644
+--- a/source3/libsmb/clireadwrite.c
++++ b/source3/libsmb/clireadwrite.c
+@@ -89,6 +89,13 @@ static size_t cli_write_max_bufsize(struct cli_state *cli,
+ useable_space = 0xFFFFFF - data_offset;
+ } else if (smb1cli_conn_capabilities(cli->conn) & CAP_LARGE_WRITEX) {
+ useable_space = 0x1FFFF - data_offset;
++ if (cli_state_server_is_spinstream2(cli))
++ /*
++ * SpinStream2 (NetApp OnTAP, up to 8.3.2, at least;
++ * XXX may need to be more discerning than this)
++ * can't handle writes > 64k
++ */
++ useable_space = MIN(useable_space, 64 * 1024);
+ } else {
+ return min_space;
+ }
+diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h
+index b453733..e334cc6 100644
+--- a/source3/libsmb/proto.h
++++ b/source3/libsmb/proto.h
+@@ -203,6 +203,7 @@ uint16_t cli_state_set_uid(struct cli_state *cli, uint16_t uid);
+ bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive);
+ uint32_t cli_state_available_size(struct cli_state *cli, uint32_t ofs);
+ time_t cli_state_server_time(struct cli_state *cli);
++bool cli_state_server_is_spinstream2(struct cli_state *cli);
+ struct tevent_req *cli_echo_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
+ struct cli_state *cli, uint16_t num_echos,
+ DATA_BLOB data);
+
+
diff --git a/skip/samba/netdb-defines.patch b/skip/samba/netdb-defines.patch
new file mode 100644
index 0000000..d7d6446
--- /dev/null
+++ b/skip/samba/netdb-defines.patch
@@ -0,0 +1,19 @@
+diff --git a/nsswitch/wins.c b/nsswitch/wins.c
+index dccb6dd..bb24acb 100644
+--- a/nsswitch/wins.c
++++ b/nsswitch/wins.c
+@@ -39,6 +39,14 @@ static pthread_mutex_t wins_nss_mutex = PTHREAD_MUTEX_INITIALIZER;
+ #define INADDRSZ 4
+ #endif
+
++#ifndef NETDB_INTERNAL
++#define NETDB_INTERNAL -1
++#endif
++
++#ifndef NETDB_SUCCESS
++#define NETDB_SUCCESS 0
++#endif
++
+ NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname,
+ struct hostent *he,
+ char *buffer,
diff --git a/skip/samba/pidl.patch b/skip/samba/pidl.patch
new file mode 100644
index 0000000..60359e5
--- /dev/null
+++ b/skip/samba/pidl.patch
@@ -0,0 +1,114 @@
+From 838457ac4f9f3f6c1bb5936738566210a62cbdc5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
+Date: Tue, 27 Aug 2019 15:25:13 +0200
+Subject: [PATCH] Revert "waf: install: Remove installation of PIDL and
+ manpages."
+
+This reverts commit e24e344d0da58013fd5fa404529fe1d25ef403bf.
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=14103
+
+Guenther
+
+Signed-off-by: Guenther Deschner <gd@samba.org>
+---
+ pidl/lib/wscript_build | 37 +++++++++++++++++++++++++++++++++++++
+ pidl/wscript | 38 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 75 insertions(+)
+ create mode 100644 pidl/lib/wscript_build
+
+diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build
+new file mode 100644
+index 00000000000..54b3170c4e2
+--- /dev/null
++++ b/pidl/lib/wscript_build
+@@ -0,0 +1,33 @@
++#!/usr/bin/env python
++
++# install the pidl modules
++bld.INSTALL_FILES(bld.env.PERL_LIB_INSTALL_DIR,
++ '''
++ Parse/Pidl.pm
++ Parse/Pidl/Samba4.pm
++ Parse/Pidl/CUtil.pm
++ Parse/Pidl/Expr.pm
++ Parse/Pidl/Wireshark/Conformance.pm
++ Parse/Pidl/Wireshark/NDR.pm
++ Parse/Pidl/ODL.pm
++ Parse/Pidl/Dump.pm
++ Parse/Pidl/Util.pm
++ Parse/Pidl/Samba4/Header.pm
++ Parse/Pidl/Samba4/COM/Header.pm
++ Parse/Pidl/Samba4/COM/Proxy.pm
++ Parse/Pidl/Samba4/COM/Stub.pm
++ Parse/Pidl/Samba4/TDR.pm
++ Parse/Pidl/Samba4/NDR/Server.pm
++ Parse/Pidl/Samba4/NDR/Client.pm
++ Parse/Pidl/Samba4/NDR/Parser.pm
++ Parse/Pidl/Samba4/Python.pm
++ Parse/Pidl/Samba4/Template.pm
++ Parse/Pidl/IDL.pm
++ Parse/Pidl/Typelist.pm
++ Parse/Pidl/Samba3/ClientNDR.pm
++ Parse/Pidl/Samba3/ServerNDR.pm
++ Parse/Pidl/Compat.pm
++ Parse/Pidl/NDR.pm
++ ''',
++ flat=False)
++
+diff --git a/pidl/wscript b/pidl/wscript
+index 01b71bd8b27..a2a15d36851 100644
+--- a/pidl/wscript
++++ b/pidl/wscript
+@@ -28,12 +28,51 @@
+ 1.05):
+ raise Errors.WafError('perl module "Parse::Yapp::Driver" not found')
+
++ # we need a recent version of MakeMaker to get the right man page names
++ if conf.CHECK_PERL_MANPAGE():
++ conf.env.PERLMAN1EXT = conf.CHECK_PERL_MANPAGE(section='1')
++ conf.env.PERLMAN3EXT = conf.CHECK_PERL_MANPAGE(section='3')
++ conf.DEFINE('HAVE_PERL_MAKEMAKER', 1)
++
+ # yapp is used for building the parser
+ if not conf.find_program('yapp', var='YAPP'):
+ raise Errors.WafError('yapp not found')
++ conf.find_program('pod2man', var='POD2MAN')
+
+ def build(bld):
++ bld.INSTALL_FILES('${BINDIR}', 'pidl', chmod=MODE_755, perl_fixup=True)
++
++ bld.RECURSE('lib')
++
++ if not bld.CONFIG_SET('HAVE_PERL_MAKEMAKER'):
++ return
++
++ pidl_manpages = {
++ 'pidl': 'man1/pidl.${PERLMAN1EXT}',
++ 'lib/Parse/Pidl/NDR.pm': 'man3/Parse::Pidl::NDR.${PERLMAN3EXT}',
++ 'lib/Parse/Pidl/Wireshark/Conformance.pm': 'man3/Parse::Pidl::Wireshark::Conformance.${PERLMAN3EXT}',
++ 'lib/Parse/Pidl/Dump.pm': 'man3/Parse::Pidl::Dump.${PERLMAN3EXT}',
++ 'lib/Parse/Pidl/Util.pm': 'man3/Parse::Pidl::Util.${PERLMAN3EXT}',
++ 'lib/Parse/Pidl/Wireshark/NDR.pm': 'man3/Parse::Pidl::Wireshark::NDR.${PERLMAN3EXT}'
++ }
++
++ for k in pidl_manpages.keys():
++ pidl_manpages[k] = bld.EXPAND_VARIABLES(pidl_manpages[k])
++
++ # use perl to build the manpages
++ bld.env.pidl_srcdir = os.path.join(bld.srcnode.abspath(), 'pidl')
+
++ bld.SET_BUILD_GROUP('final')
++ if 'POD2MAN' in bld.env and bld.env['POD2MAN'] != '':
++ for src in pidl_manpages.keys():
++ manpage = pidl_manpages[src]
++ section = manpage.rsplit( ".", 1)[1]
++ bld(rule='${POD2MAN} -c "Samba Documentation" -s %s ${SRC} ${TGT}' % section,
++ shell=True,
++ source=src,
++ install_path=os.path.dirname(bld.EXPAND_VARIABLES('${MANDIR}/'+manpage)),
++ target=os.path.basename(manpage))
++
+ # we want to prefer the git version of the parsers if we can.
+ # Only if the source has changed do we want to re-run yapp
+ # But we force the developer to use the pidl standalone build
diff --git a/skip/samba/samba-bgqd-include-signal-h.patch b/skip/samba/samba-bgqd-include-signal-h.patch
new file mode 100644
index 0000000..c066223
--- /dev/null
+++ b/skip/samba/samba-bgqd-include-signal-h.patch
@@ -0,0 +1,13 @@
+SIGTERM and SIGPIPE are used but undefined.
+diff --git a/source3/printing/samba-bgqd.c b/source3/printing/samba-bgqd.c
+index 8ac6ec5..09a5d12 100644
+--- a/source3/printing/samba-bgqd.c
++++ b/source3/printing/samba-bgqd.c
+@@ -41,6 +41,7 @@
+ #include "source3/auth/proto.h"
+ #include "source3/printing/queue_process.h"
+ #include "source3/lib/substitute.h"
++#include <signal.h>
+
+ static void watch_handler(struct tevent_req *req)
+ {
diff --git a/skip/samba/samba.confd b/skip/samba/samba.confd
new file mode 100644
index 0000000..902cb1a
--- /dev/null
+++ b/skip/samba/samba.confd
@@ -0,0 +1,9 @@
+# Add "winbindd" to daemon_list if you want start winbind from here as well
+daemon_list="smbd nmbd"
+# Use "samba" alone for role based samba4 services (eg: ad-dc).
+#daemon_list="samba"
+
+smbd_options="-D"
+nmbd_options="-D"
+#winbindd_options=""
+#samba_options=""
diff --git a/skip/samba/samba.initd b/skip/samba/samba.initd
new file mode 100644
index 0000000..71c7fb2
--- /dev/null
+++ b/skip/samba/samba.initd
@@ -0,0 +1,79 @@
+#!/sbin/openrc-run
+
+extra_started_commands="reload"
+piddir=${piddir:-"/run/samba"}
+
+DAEMON=${RC_SVCNAME#samba.}
+if [ "$DAEMON" != "$RC_SVCNAME" ]; then
+ daemon_list=$DAEMON
+fi
+
+depend() {
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath --directory "$piddir"
+}
+
+start_samba() {
+ start-stop-daemon --start --quiet --exec /usr/sbin/samba -- \
+ ${samba_options:-"-D"}
+}
+
+stop_samba() {
+ start-stop-daemon --stop --quiet --pidfile "$piddir"/samba.pid
+}
+
+start_smbd() {
+ start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- \
+ ${smbd_options:-"-D"}
+}
+
+stop_smbd() {
+ start-stop-daemon --stop --quiet --pidfile "$piddir"/smbd.pid
+}
+
+start_nmbd() {
+ start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- \
+ ${nmbd_options:-"-D"}
+}
+
+stop_nmbd() {
+ start-stop-daemon --stop --quiet --pidfile "$piddir"/nmbd.pid
+}
+
+start_winbindd() {
+ start-stop-daemon --start --quiet --exec /usr/sbin/winbindd -- \
+ $winbindd_options
+}
+
+stop_winbindd() {
+ start-stop-daemon --stop --quiet --pidfile "$piddir"/winbindd.pid
+}
+
+start() {
+ for i in $daemon_list; do
+ ebegin "Starting $i"
+ start_$i
+ eend $?
+ done
+}
+
+stop() {
+ for i in $daemon_list; do
+ ebegin "Stopping $i"
+ stop_$i
+ eend $?
+ done
+}
+
+reload() {
+ for i in $daemon_list; do
+ ebegin "Reloading $i"
+ killall -HUP $i
+ eend $?
+ done
+}
+
diff --git a/skip/samba/samba.logrotate b/skip/samba/samba.logrotate
new file mode 100644
index 0000000..88abb90
--- /dev/null
+++ b/skip/samba/samba.logrotate
@@ -0,0 +1,9 @@
+/var/log/samba/log.* /var/log/samba/*.log {
+ notifempty
+ missingok
+ sharedscripts
+ copytruncate
+ postrotate
+ /etc/init.d/samba --quiet --ifstarted reload
+ endscript
+}
diff --git a/skip/samba/samba.xibuild b/skip/samba/samba.xibuild
new file mode 100644
index 0000000..6b5354b
--- /dev/null
+++ b/skip/samba/samba.xibuild
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+NAME="samba"
+DESC="Tools to access a server's filespace and printers via SMB"
+
+MAKEDEPS="acl bind cups dbus docbook-xsl e2fsprogs fuse gnutls iniparser jansson ldb libarchive libcap libtirpc liburing pam musl-nscd ncurses libldap perl perl-parse-yapp popt python-tdb python-tevent python rpcgen subunit talloc tdb tevent zlib python-dnspython python-markdown tdb"
+
+PKG_VER=4.17.0
+SOURCE="
+ https://download.samba.org/pub/samba/stable/samba-$PKG_VER.tar.gz
+ "
+
+ADDITIONAL="
+add_missing___compar_fn_t.patch
+getpwent_r.patch
+missing-headers.patch
+musl_rm_unistd_incl.patch
+musl_uintptr.patch
+netapp.patch
+netdb-defines.patch
+pidl.patch
+samba-bgqd-include-signal-h.patch
+samba.confd
+samba.initd
+samba.logrotate
+winbind.post-install
+winbind.post-upgrade
+winbind.pre-install
+winbind.pre-upgrade
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ local _idmap_modules=idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2
+ local _pdb_modules=pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4
+ local _auth_modules=auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc/samba \
+ --with-configdir=/etc/samba \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib \
+ --enable-fhs \
+ --with-lockdir=/var/cache/samba \
+ --with-piddir=/run/samba \
+ --with-logfilebase=/var/log/samba \
+ --with-pam \
+ --without-systemd \
+ --with-ads \
+ --with-shared-modules=$_idmap_modules,$_pdb_modules,$_auth_modules,vfs_io_uring \
+ --enable-cups \
+ --without-gettext \
+ --bundled-libraries=NONE,ntdb,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,cmocka \
+ --disable-rpath-install \
+ --without-gpgme
+ make -j"$(nproc)"
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+
+ install -d "$PKG_DEST"/var/log/samba \
+ "$PKG_DEST"/usr/share/doc/samba
+ install -dm755 "$PKG_DEST"/var/lib/samba/sysvol
+ install -Dm644 examples/smb.conf.default \
+ "$PKG_DEST"/etc/samba/smb.conf
+ install -m744 packaging/printing/smbprint \
+ "$PKG_DEST"/usr/bin/smbprint
+ install -Dm644 "$BUILD_ROOT"/samba.logrotate \
+ "$PKG_DEST"/etc/logrotate.d/samba
+
+ install -Dm755 "$BUILD_ROOT/samba.initd" "$PKG_DEST/etc/init.d/samba"
+ install -Dm644 "$BUILD_ROOT/samba.confd" "$PKG_DEST/etc/conf.d/samba"
+}
diff --git a/skip/samba/winbind.post-install b/skip/samba/winbind.post-install
new file mode 100644
index 0000000..59abe0f
--- /dev/null
+++ b/skip/samba/winbind.post-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+chgrp winbind /var/cache/samba/winbindd_privileged
+chmod 750 /var/cache/samba/winbindd_privileged
+exit 0
+
diff --git a/skip/samba/winbind.post-upgrade b/skip/samba/winbind.post-upgrade
new file mode 100644
index 0000000..59abe0f
--- /dev/null
+++ b/skip/samba/winbind.post-upgrade
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+chgrp winbind /var/cache/samba/winbindd_privileged
+chmod 750 /var/cache/samba/winbindd_privileged
+exit 0
+
diff --git a/skip/samba/winbind.pre-install b/skip/samba/winbind.pre-install
new file mode 100644
index 0000000..ac4df3f
--- /dev/null
+++ b/skip/samba/winbind.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup -S winbind 2>/dev/null
+
+exit 0
diff --git a/skip/samba/winbind.pre-upgrade b/skip/samba/winbind.pre-upgrade
new file mode 100644
index 0000000..ac4df3f
--- /dev/null
+++ b/skip/samba/winbind.pre-upgrade
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup -S winbind 2>/dev/null
+
+exit 0
diff --git a/skip/thunderbird/allow-custom-rust-vendor.patch b/skip/thunderbird/allow-custom-rust-vendor.patch
new file mode 100644
index 0000000..218650f
--- /dev/null
+++ b/skip/thunderbird/allow-custom-rust-vendor.patch
@@ -0,0 +1,564 @@
+From a5a3db2d32ff1d359aef5ec586b91164570c1685 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Tue, 5 Nov 2019 09:56:15 -0800
+Subject: [PATCH 1/7] Support custom vendor strings.
+
+Add support for custom vendors, as in "x86_64-gentoo-linux-musl".
+
+Fixes #33.
+---
+ src/targets.rs | 108 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ src/triple.rs | 4 --
+ 2 files changed, 106 insertions(+), 6 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 6ae570e..90b2736 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -1,6 +1,8 @@
+ // This file defines all the identifier enums and target-aware logic.
+
+ use crate::triple::{Endianness, PointerWidth, Triple};
++use alloc::boxed::Box;
++use alloc::string::String;
+ use core::fmt;
+ use core::str::FromStr;
+
+@@ -292,7 +294,7 @@ impl Aarch64Architecture {
+
+ /// The "vendor" field, which in practice is little more than an arbitrary
+ /// modifier.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
++#[derive(Clone, Debug, PartialEq, Eq, Hash)]
+ #[allow(missing_docs)]
+ pub enum Vendor {
+ Unknown,
+@@ -306,6 +308,15 @@ pub enum Vendor {
+ Sun,
+ Uwp,
+ Wrs,
++
++ /// A custom vendor. "Custom" in this context means that the vendor is
++ /// not specifically recognized by upstream Autotools, LLVM, Rust, or other
++ /// relevant authorities on triple naming. It's useful for people building
++ /// and using locally patched toolchains.
++ ///
++ /// Outside of such patched environments, users of `target-lexicon` should
++ /// treat `Custom` the same as `Unknown` and ignore the string.
++ Custom(Box<String>),
+ }
+
+ /// The "operating system" field, which sometimes implies an environment, and
+@@ -717,6 +728,7 @@ impl fmt::Display for Vendor {
+ Vendor::Sun => "sun",
+ Vendor::Uwp => "uwp",
+ Vendor::Wrs => "wrs",
++ Vendor::Custom(ref name) => name,
+ };
+ f.write_str(s)
+ }
+@@ -738,7 +750,46 @@ impl FromStr for Vendor {
+ "sun" => Vendor::Sun,
+ "uwp" => Vendor::Uwp,
+ "wrs" => Vendor::Wrs,
+- _ => return Err(()),
++ custom => {
++ use alloc::borrow::ToOwned;
++
++ // A custom vendor. Since triple syntax is so loosely defined,
++ // be as conservative as we can to avoid potential ambiguities.
++ // We err on the side of being too strict here, as we can
++ // always relax it if needed.
++
++ // Don't allow empty string names.
++ if custom.is_empty() {
++ return Err(());
++ }
++
++ // Don't allow any other recognized name as a custom vendor,
++ // since vendors can be omitted in some contexts.
++ if Architecture::from_str(custom).is_ok()
++ || OperatingSystem::from_str(custom).is_ok()
++ || Environment::from_str(custom).is_ok()
++ || BinaryFormat::from_str(custom).is_ok()
++ {
++ return Err(());
++ }
++
++ // Require the first character to be an ascii lowercase.
++ if !custom.chars().nth(0).unwrap().is_ascii_lowercase() {
++ return Err(());
++ }
++
++ // Restrict the set of characters permitted in a custom vendor.
++ if custom
++ .find(|c: char| {
++ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
++ })
++ .is_some()
++ {
++ return Err(());
++ }
++
++ Vendor::Custom(Box::new(custom.to_owned()))
++ }
+ })
+ }
+ }
+@@ -1120,4 +1171,57 @@ mod tests {
+ assert_eq!(t.environment, Environment::Eabihf);
+ assert_eq!(t.binary_format, BinaryFormat::Elf);
+ }
++
++ #[test]
++ fn custom_vendors() {
++ assert!(Triple::from_str("x86_64--linux").is_err());
++ assert!(Triple::from_str("x86_64-42-linux").is_err());
++ assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err());
++ assert!(Triple::from_str("x86_64-^-linux").is_err());
++ assert!(Triple::from_str("x86_64- -linux").is_err());
++ assert!(Triple::from_str("x86_64-CustomVendor-linux").is_err());
++ assert!(Triple::from_str("x86_64-linux-linux").is_err());
++ assert!(Triple::from_str("x86_64-x86_64-linux").is_err());
++ assert!(Triple::from_str("x86_64-elf-linux").is_err());
++ assert!(Triple::from_str("x86_64-gnu-linux").is_err());
++ assert!(Triple::from_str("x86_64-linux-customvendor").is_err());
++ assert!(Triple::from_str("customvendor").is_err());
++ assert!(Triple::from_str("customvendor-x86_64").is_err());
++ assert!(Triple::from_str("x86_64-").is_err());
++ assert!(Triple::from_str("x86_64--").is_err());
++
++ let t = Triple::from_str("x86_64-customvendor-linux")
++ .expect("can't parse target with custom vendor");
++ assert_eq!(t.architecture, Architecture::X86_64);
++ assert_eq!(
++ t.vendor,
++ Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ );
++ assert_eq!(t.operating_system, OperatingSystem::Linux);
++ assert_eq!(t.environment, Environment::Unknown);
++ assert_eq!(t.binary_format, BinaryFormat::Elf);
++ assert_eq!(t.to_string(), "x86_64-customvendor-linux");
++
++ let t = Triple::from_str("x86_64-customvendor")
++ .expect("can't parse target with custom vendor");
++ assert_eq!(t.architecture, Architecture::X86_64);
++ assert_eq!(
++ t.vendor,
++ Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ );
++ assert_eq!(t.operating_system, OperatingSystem::Unknown);
++ assert_eq!(t.environment, Environment::Unknown);
++ assert_eq!(t.binary_format, BinaryFormat::Unknown);
++
++ assert_eq!(
++ Triple::from_str("unknown-foo"),
++ Ok(Triple {
++ architecture: Architecture::Unknown,
++ vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())),
++ operating_system: OperatingSystem::Unknown,
++ environment: Environment::Unknown,
++ binary_format: BinaryFormat::Unknown,
++ })
++ );
++ }
+ }
+diff --git a/src/triple.rs b/src/triple.rs
+index 36dcd9a..1abda26 100644
+--- a/third_party/rust/target-lexicon.0.9.0/src/triple.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/triple.rs
+@@ -322,10 +322,6 @@ mod tests {
+ Triple::from_str("foo"),
+ Err(ParseError::UnrecognizedArchitecture("foo".to_owned()))
+ );
+- assert_eq!(
+- Triple::from_str("unknown-foo"),
+- Err(ParseError::UnrecognizedVendor("foo".to_owned()))
+- );
+ assert_eq!(
+ Triple::from_str("unknown-unknown-foo"),
+ Err(ParseError::UnrecognizedOperatingSystem("foo".to_owned()))
+
+From 6f90d7274dce4e7f9bb120f6b36cf26881bde9a7 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Tue, 5 Nov 2019 10:33:56 -0800
+Subject: [PATCH 2/7] Add more tests.
+
+---
+ src/targets.rs | 30 ++++++++++++++++++++++++++++--
+ 1 file changed, 28 insertions(+), 2 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 90b2736..7d1f069 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -1174,6 +1174,7 @@ mod tests {
+
+ #[test]
+ fn custom_vendors() {
++ // Test various invalid cases.
+ assert!(Triple::from_str("x86_64--linux").is_err());
+ assert!(Triple::from_str("x86_64-42-linux").is_err());
+ assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err());
+@@ -1190,6 +1191,31 @@ mod tests {
+ assert!(Triple::from_str("x86_64-").is_err());
+ assert!(Triple::from_str("x86_64--").is_err());
+
++ // Test various Unicode things.
++ assert!(
++ Triple::from_str("x86_64-𝓬𝓾𝓼𝓽𝓸𝓶𝓿𝓮𝓷𝓭𝓸𝓻-linux").is_err(),
++ "unicode font hazard"
++ );
++ assert!(
++ Triple::from_str("x86_64-ćúśtőḿvéńdőŕ-linux").is_err(),
++ "diacritical mark stripping hazard"
++ );
++ assert!(
++ Triple::from_str("x86_64-customvendοr-linux").is_err(),
++ "homoglyph hazard"
++ );
++ assert!(Triple::from_str("x86_64-customvendor-linux").is_ok());
++ assert!(
++ Triple::from_str("x86_64-ffi-linux").is_err(),
++ "normalization hazard"
++ );
++ assert!(Triple::from_str("x86_64-ffi-linux").is_ok());
++ assert!(
++ Triple::from_str("x86_64-custom‍vendor-linux").is_err(),
++ "zero-width character hazard"
++ );
++
++ // Test some valid cases.
+ let t = Triple::from_str("x86_64-customvendor-linux")
+ .expect("can't parse target with custom vendor");
+ assert_eq!(t.architecture, Architecture::X86_64);
+@@ -1202,8 +1228,8 @@ mod tests {
+ assert_eq!(t.binary_format, BinaryFormat::Elf);
+ assert_eq!(t.to_string(), "x86_64-customvendor-linux");
+
+- let t = Triple::from_str("x86_64-customvendor")
+- .expect("can't parse target with custom vendor");
++ let t =
++ Triple::from_str("x86_64-customvendor").expect("can't parse target with custom vendor");
+ assert_eq!(t.architecture, Architecture::X86_64);
+ assert_eq!(
+ t.vendor,
+
+From c0e318b3c1be2d1965579f07dd563fb9cc0c4eb1 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Tue, 5 Nov 2019 12:56:31 -0800
+Subject: [PATCH 3/7] Use `.chars().any(...)` instead of
+ `.find(...).is_some()`.
+
+---
+ src/targets.rs | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 7d1f069..1078dd3 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon/src-0.9.0/targets.rs
+@@ -779,12 +779,9 @@ impl FromStr for Vendor {
+ }
+
+ // Restrict the set of characters permitted in a custom vendor.
+- if custom
+- .find(|c: char| {
+- !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
+- })
+- .is_some()
+- {
++ if custom.chars().any(|c: char| {
++ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
++ }) {
+ return Err(());
+ }
+
+
+From f319950528654c772193d9eb3bf40bc8df35fcae Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Thu, 7 Nov 2019 15:15:48 -0800
+Subject: [PATCH 4/7] Fix build.rs to generate the correct code to build
+ Vendors.
+
+---
+ build.rs | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/build.rs b/build.rs
+index a0ba3b7..446f9e7 100644
+--- a/third_party/rust/target-lexicon-0.9.0/build.rs
++++ b/third_party/rust/target-lexicon-0.9.0/build.rs
+@@ -32,6 +32,7 @@ mod parse_error {
+ }
+ }
+
++use self::targets::Vendor;
+ use self::triple::Triple;
+
+ fn main() {
+@@ -60,7 +61,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ " architecture: Architecture::{:?},",
+ triple.architecture
+ )?;
+- writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?;
++ writeln!(out, " vendor: {},", vendor_display(&triple.vendor))?;
+ writeln!(
+ out,
+ " operating_system: OperatingSystem::{:?},",
+@@ -90,7 +91,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ writeln!(out, "impl Vendor {{")?;
+ writeln!(out, " /// Return the vendor for the current host.")?;
+ writeln!(out, " pub const fn host() -> Self {{")?;
+- writeln!(out, " Vendor::{:?}", triple.vendor)?;
++ writeln!(out, " {}", vendor_display(&triple.vendor))?;
+ writeln!(out, " }}")?;
+ writeln!(out, "}}")?;
+ writeln!(out)?;
+@@ -160,3 +161,12 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+
+ Ok(())
+ }
++
++fn vendor_display(vendor: &Vendor) -> String {
++ match vendor {
++ Vendor::Custom(custom) => {
++ format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom)
++ }
++ known => format!("Vendor::{:?}", known),
++ }
++}
+
+From e558f6934535be3b8ccc9a99a33e861cb7431dfe Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Fri, 8 Nov 2019 12:10:34 -0800
+Subject: [PATCH 5/7] Fix custom vendors in `const fn` contexts.
+
+---
+ build.rs | 15 +++++++++++----
+ src/lib.rs | 4 ++--
+ src/targets.rs | 51 ++++++++++++++++++++++++++++++++++++++++++--------
+ 3 files changed, 56 insertions(+), 14 deletions(-)
+
+diff --git a/build.rs b/build.rs
+index 446f9e7..e88206e 100644
+--- a/third_party/rust/target-lexicon-0.9.0/build.rs
++++ b/third_party/rust/target-lexicon-0.9.0/build.rs
+@@ -53,6 +53,8 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ writeln!(out, "use crate::Aarch64Architecture::*;")?;
+ writeln!(out, "#[allow(unused_imports)]")?;
+ writeln!(out, "use crate::ArmArchitecture::*;")?;
++ writeln!(out, "#[allow(unused_imports)]")?;
++ writeln!(out, "use crate::CustomVendor;")?;
+ writeln!(out)?;
+ writeln!(out, "/// The `Triple` of the current host.")?;
+ writeln!(out, "pub const HOST: Triple = Triple {{")?;
+@@ -139,7 +141,11 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ " architecture: Architecture::{:?},",
+ triple.architecture
+ )?;
+- writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?;
++ writeln!(
++ out,
++ " vendor: {},",
++ vendor_display(&triple.vendor)
++ )?;
+ writeln!(
+ out,
+ " operating_system: OperatingSystem::{:?},",
+@@ -164,9 +170,10 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+
+ fn vendor_display(vendor: &Vendor) -> String {
+ match vendor {
+- Vendor::Custom(custom) => {
+- format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom)
+- }
++ Vendor::Custom(custom) => format!(
++ "Vendor::Custom(CustomVendor::Static({:?}))",
++ custom.as_str()
++ ),
+ known => format!("Vendor::{:?}", known),
+ }
+ }
+diff --git a/src/lib.rs b/src/lib.rs
+index 8d6da8d..70f6488 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/lib.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/lib.rs
+@@ -28,7 +28,7 @@ mod triple;
+ pub use self::host::HOST;
+ pub use self::parse_error::ParseError;
+ pub use self::targets::{
+- Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, Environment, OperatingSystem,
+- Vendor,
++ Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, CustomVendor, Environment,
++ OperatingSystem, Vendor,
+ };
+ pub use self::triple::{CallingConvention, Endianness, PointerWidth, Triple};
+diff --git a/src/targets.rs b/src/targets.rs
+index 1078dd3..7152020 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -4,6 +4,7 @@ use crate::triple::{Endianness, PointerWidth, Triple};
+ use alloc::boxed::Box;
+ use alloc::string::String;
+ use core::fmt;
++use core::hash::{Hash, Hasher};
+ use core::str::FromStr;
+
+ /// The "architecture" field, which in some cases also specifies a specific
+@@ -292,6 +293,39 @@ impl Aarch64Architecture {
+ }
+ }
+
++/// A string for a `Vendor::Custom` that can either be used in `const`
++/// contexts or hold dynamic strings.
++#[derive(Clone, Debug, Eq)]
++pub enum CustomVendor {
++ /// An owned `String`. This supports the general case.
++ Owned(Box<String>),
++ /// A static `str`, so that `CustomVendor` can be constructed in `const`
++ /// contexts.
++ Static(&'static str),
++}
++
++impl CustomVendor {
++ /// Extracts a string slice.
++ pub fn as_str(&self) -> &str {
++ match self {
++ CustomVendor::Owned(s) => s,
++ CustomVendor::Static(s) => s,
++ }
++ }
++}
++
++impl PartialEq for CustomVendor {
++ fn eq(&self, other: &Self) -> bool {
++ self.as_str() == other.as_str()
++ }
++}
++
++impl Hash for CustomVendor {
++ fn hash<H: Hasher>(&self, state: &mut H) {
++ self.as_str().hash(state)
++ }
++}
++
+ /// The "vendor" field, which in practice is little more than an arbitrary
+ /// modifier.
+ #[derive(Clone, Debug, PartialEq, Eq, Hash)]
+@@ -316,7 +350,7 @@ pub enum Vendor {
+ ///
+ /// Outside of such patched environments, users of `target-lexicon` should
+ /// treat `Custom` the same as `Unknown` and ignore the string.
+- Custom(Box<String>),
++ Custom(CustomVendor),
+ }
+
+ /// The "operating system" field, which sometimes implies an environment, and
+@@ -728,7 +762,7 @@ impl fmt::Display for Vendor {
+ Vendor::Sun => "sun",
+ Vendor::Uwp => "uwp",
+ Vendor::Wrs => "wrs",
+- Vendor::Custom(ref name) => name,
++ Vendor::Custom(ref name) => name.as_str(),
+ };
+ f.write_str(s)
+ }
+@@ -779,13 +813,14 @@ impl FromStr for Vendor {
+ }
+
+ // Restrict the set of characters permitted in a custom vendor.
+- if custom.chars().any(|c: char| {
++ fn is_prohibited_char(c: char) -> bool {
+ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
+- }) {
++ }
++ if custom.chars().any(is_prohibited_char) {
+ return Err(());
+ }
+
+- Vendor::Custom(Box::new(custom.to_owned()))
++ Vendor::Custom(CustomVendor::Owned(Box::new(custom.to_owned())))
+ }
+ })
+ }
+@@ -1218,7 +1253,7 @@ mod tests {
+ assert_eq!(t.architecture, Architecture::X86_64);
+ assert_eq!(
+ t.vendor,
+- Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ Vendor::Custom(CustomVendor::Static("customvendor"))
+ );
+ assert_eq!(t.operating_system, OperatingSystem::Linux);
+ assert_eq!(t.environment, Environment::Unknown);
+@@ -1230,7 +1265,7 @@ mod tests {
+ assert_eq!(t.architecture, Architecture::X86_64);
+ assert_eq!(
+ t.vendor,
+- Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ Vendor::Custom(CustomVendor::Static("customvendor"))
+ );
+ assert_eq!(t.operating_system, OperatingSystem::Unknown);
+ assert_eq!(t.environment, Environment::Unknown);
+@@ -1240,7 +1275,7 @@ mod tests {
+ Triple::from_str("unknown-foo"),
+ Ok(Triple {
+ architecture: Architecture::Unknown,
+- vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())),
++ vendor: Vendor::Custom(CustomVendor::Static("foo")),
+ operating_system: OperatingSystem::Unknown,
+ environment: Environment::Unknown,
+ binary_format: BinaryFormat::Unknown,
+
+From bc4b444133b8a5e56602f7c77c10ef3f1e7a7c78 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Mon, 18 Nov 2019 13:45:58 -0800
+Subject: [PATCH 6/7] Add a testcase with a BOM too, just in case.
+
+---
+ src/targets.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 7152020..9a4d990 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -1246,6 +1246,10 @@ mod tests {
+ Triple::from_str("x86_64-custom‍vendor-linux").is_err(),
+ "zero-width character hazard"
+ );
++ assert!(
++ Triple::from_str("x86_64-customvendor-linux").is_err(),
++ "BOM hazard"
++ );
+
+ // Test some valid cases.
+ let t = Triple::from_str("x86_64-customvendor-linux")
+
+From 721fbbe1c9cfd3adc9aaf011c62d6a36078f4133 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Mon, 18 Nov 2019 20:56:40 -0800
+Subject: [PATCH 7/7] Use an anonymous function instead of just a local
+ function.
+
+---
+ src/targets.rs | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 9a4d990..eb5a088 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -813,10 +813,9 @@ impl FromStr for Vendor {
+ }
+
+ // Restrict the set of characters permitted in a custom vendor.
+- fn is_prohibited_char(c: char) -> bool {
++ if custom.chars().any(|c: char| {
+ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
+- }
+- if custom.chars().any(is_prohibited_char) {
++ }) {
+ return Err(());
+ }
+
diff --git a/skip/thunderbird/avoid-redefinition.patch b/skip/thunderbird/avoid-redefinition.patch
new file mode 100644
index 0000000..af11c50
--- /dev/null
+++ b/skip/thunderbird/avoid-redefinition.patch
@@ -0,0 +1,15 @@
+Author: Rasmus Thomsen <oss@cogitri.dev>
+Reason: FF is mixing userspace net headers (net/if.h) and kernelspace ones
+(linux/if.h), leading to redefinitions. We need to include net/if.h before
+linux/if.h because linux/if.h has redifinition guards whereas net/if.h doesnt
+Upstream: No
+--- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c.orig 2020-07-28 19:24:32.359751046 +0200
++++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c 2020-07-28 19:24:37.856343751 +0200
+@@ -31,6 +31,7 @@
+ */
+
+ #if defined(LINUX)
++#include <net/if.h>
+ #include "addrs-netlink.h"
+ #include <csi_platform.h>
+ #include <assert.h>
diff --git a/skip/thunderbird/cbindgen-0.24.patch b/skip/thunderbird/cbindgen-0.24.patch
new file mode 100644
index 0000000..3011e8a
--- /dev/null
+++ b/skip/thunderbird/cbindgen-0.24.patch
@@ -0,0 +1,17 @@
+Description: Remove an extra constant definition that is now being generated by newer versions of cbindgen (0.24), and causing build failures because it is defined in several places.
+Author: Olivier Tilloy <olivier.tilloy@canonical.com>
+Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1773259
+Forwarded: not-needed
+
+--- a/gfx/webrender_bindings/webrender_ffi.h
++++ b/gfx/webrender_bindings/webrender_ffi.h
+@@ -73,8 +73,6 @@ struct WrPipelineInfo;
+ struct WrPipelineIdAndEpoch;
+ using WrPipelineIdEpochs = nsTArray<WrPipelineIdAndEpoch>;
+
+-const uint64_t ROOT_CLIP_CHAIN = ~0;
+-
+ } // namespace wr
+ } // namespace mozilla
+
+
diff --git a/skip/thunderbird/disable-moz-stackwalk.patch b/skip/thunderbird/disable-moz-stackwalk.patch
new file mode 100644
index 0000000..b6bc756
--- /dev/null
+++ b/skip/thunderbird/disable-moz-stackwalk.patch
@@ -0,0 +1,18 @@
+diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
+index 7d62921..adcfa44 100644
+--- a/mozglue/misc/StackWalk.cpp
++++ b/mozglue/misc/StackWalk.cpp
+@@ -33,13 +33,7 @@ using namespace mozilla;
+ # define MOZ_STACKWALK_SUPPORTS_MACOSX 0
+ #endif
+
+-#if (defined(linux) && \
+- ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
+- defined(HAVE__UNWIND_BACKTRACE)))
+-# define MOZ_STACKWALK_SUPPORTS_LINUX 1
+-#else
+ # define MOZ_STACKWALK_SUPPORTS_LINUX 0
+-#endif
+
+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+ # define HAVE___LIBC_STACK_END 1
diff --git a/skip/thunderbird/disable-neon-in-aom.patch b/skip/thunderbird/disable-neon-in-aom.patch
new file mode 100644
index 0000000..6df05a1
--- /dev/null
+++ b/skip/thunderbird/disable-neon-in-aom.patch
@@ -0,0 +1,39 @@
+Firefox (75) and AOM itself fail to build with NEON enabled. As such
+we should disable it for now.
+
+In file included from /home/buildozer/aports/community/firefox/src/firefox-75.0/third_party/aom/aom_dsp/arm/blend_a64_mask_neon.c:12:
+/home/buildozer/aports/community/firefox/src/firefox-75.0/third_party/aom/av1/common/arm/mem_neon.h: In function 'load_u8_8x8':
+/usr/lib/gcc/armv7-alpine-linux-musleabihf/9.3.0/include/arm_neon.h:10303:1: error: inlining failed in call to always_inline 'vld1_u8': target specific option mismatch
+10303 | vld1_u8 (const uint8_t * __a)
+ | ^~~~~~~
+--- a/media/libaom/moz.build 2020-04-09 08:20:14.608439591 +0200
++++ b/media/libaom/moz.build 2020-04-09 08:20:21.801745246 +0200
+@@ -42,26 +42,6 @@
+ ASFLAGS += [ '-I%s/media/libaom/config/linux/ia32/' % TOPSRCDIR ]
+ LOCAL_INCLUDES += [ '/media/libaom/config/linux/ia32/' ]
+ EXPORTS.aom += [ 'config/linux/ia32/config/aom_config.h' ]
+-elif CONFIG['CPU_ARCH'] == 'arm':
+- EXPORTS.aom += files['ARM_EXPORTS']
+- ASFLAGS += [
+- '-I%s/media/libaom/config/linux/arm/' % TOPSRCDIR,
+- '-I%s/libaom' % OBJDIR,
+- ]
+- LOCAL_INCLUDES += [ '/media/libaom/config/linux/arm/' ]
+- EXPORTS.aom += [ 'config/linux/arm/config/aom_config.h' ]
+-
+- SOURCES += files['ARM_SOURCES']
+-
+- for f in SOURCES:
+- if f.endswith('neon.c'):
+- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
+-
+- if CONFIG['OS_TARGET'] == 'Android':
+- # For cpu-features.h
+- LOCAL_INCLUDES += [
+- '%%%s/sources/android/cpufeatures' % CONFIG['ANDROID_NDK'],
+- ]
+ else:
+ # Generic C-only configuration
+ EXPORTS.aom += files['GENERIC_EXPORTS']
+
+
diff --git a/skip/thunderbird/distribution.ini b/skip/thunderbird/distribution.ini
new file mode 100644
index 0000000..22cedba
--- /dev/null
+++ b/skip/thunderbird/distribution.ini
@@ -0,0 +1,8 @@
+[Global]
+id=alpinelinux
+version=1.0
+about=Mozilla Thunderbird for Alpine Linux
+
+[Preferences]
+app.distributor=alpinelinux
+app.distributor.channel=thunderbird
diff --git a/skip/thunderbird/fix-fortify-system-wrappers.patch b/skip/thunderbird/fix-fortify-system-wrappers.patch
new file mode 100644
index 0000000..17cf7e3
--- /dev/null
+++ b/skip/thunderbird/fix-fortify-system-wrappers.patch
@@ -0,0 +1,13 @@
+The wrapper features.h gets pulled in by system headers causing thigns to
+break. We work around it by simply not wrap features.h
+
+--- ./config/system-headers.mozbuild.orig
++++ ./config/system-headers.mozbuild
+@@ -229,7 +229,6 @@
+ 'execinfo.h',
+ 'extras.h',
+ 'fcntl.h',
+- 'features.h',
+ 'fenv.h',
+ 'ffi.h',
+ 'fibdef.h',
diff --git a/skip/thunderbird/fix-libresolv-path.patch b/skip/thunderbird/fix-libresolv-path.patch
new file mode 100644
index 0000000..a164922
--- /dev/null
+++ b/skip/thunderbird/fix-libresolv-path.patch
@@ -0,0 +1,17 @@
+diff --git a/comm/mail/modules/DNS.jsm b/comm/mail/modules/DNS.jsm
+index c63972b6a8..32769c1de6 100644
+--- a/comm/mail/modules/DNS.jsm
++++ b/comm/mail/modules/DNS.jsm
+@@ -44,11 +44,7 @@ load_libresolv.prototype = {
+ } else if (os == "OpenBSD") {
+ candidates = [{ name: "c", suffix: "" }];
+ } else {
+- candidates = [
+- { name: "resolv.9", suffix: "" },
+- { name: "resolv", suffix: ".2" },
+- { name: "resolv", suffix: "" },
+- ];
++ candidates = [{ name: "c", suffix: "" }];
+ }
+ let tried = [];
+ for (let candidate of candidates) {
diff --git a/skip/thunderbird/fix-rust-target.patch b/skip/thunderbird/fix-rust-target.patch
new file mode 100644
index 0000000..9342063
--- /dev/null
+++ b/skip/thunderbird/fix-rust-target.patch
@@ -0,0 +1,31 @@
+Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's
+weird custom build system...
+
+--- a/build/moz.configure/rust.configure
++++ b/build/moz.configure/rust.configure
+@@ -225,7 +225,9 @@
+ data.setdefault(key, []).append(namespace(rust_target=t, target=info))
+ return data
+
+-
++@imports('os')
++@imports(_from='mozbuild.util', _import='ensure_unicode')
++@imports(_from='mozbuild.util', _import='system_encoding')
+ def detect_rustc_target(
+ host_or_target, compiler_info, arm_target, rust_supported_targets
+ ):
+@@ -340,13 +342,13 @@
+
+ return None
+
+- rustc_target = find_candidate(candidates)
++ rustc_target = os.environ['RUST_TARGET']
+
+ if rustc_target is None:
+ die("Don't know how to translate {} for rustc".format(host_or_target.alias))
+
+- return rustc_target
++ return ensure_unicode(rustc_target, system_encoding)
+
+
+ @imports('os')
diff --git a/skip/thunderbird/fix-tools.patch b/skip/thunderbird/fix-tools.patch
new file mode 100644
index 0000000..245d694
--- /dev/null
+++ b/skip/thunderbird/fix-tools.patch
@@ -0,0 +1,18 @@
+diff --git a/tools/profiler/core/platform-linux-android.cpp b/tools/profiler/core/platform-linux-android.cpp
+index 19d0a5c56d..b64b543066 100644
+--- a/tools/profiler/core/platform-linux-android.cpp
++++ b/tools/profiler/core/platform-linux-android.cpp
+@@ -506,8 +506,10 @@ static void PlatformInit(PSLockRef aLock) {}
+ ucontext_t sSyncUContext;
+
+ void Registers::SyncPopulate() {
+- if (!getcontext(&sSyncUContext)) {
+- PopulateRegsFromContext(*this, &sSyncUContext);
+- }
++ #if defined(__GLIBC__)
++ if (!getcontext(&sSyncUContext)) {
++ PopulateRegsFromContext(*this, &sSyncUContext);
++ }
++ #endif
+ }
+ #endif
diff --git a/skip/thunderbird/fix-webrtc-glibcisms.patch b/skip/thunderbird/fix-webrtc-glibcisms.patch
new file mode 100644
index 0000000..4f9043b
--- /dev/null
+++ b/skip/thunderbird/fix-webrtc-glibcisms.patch
@@ -0,0 +1,20 @@
+--- a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
++++ b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
+@@ -18,7 +18,7 @@
+ #define WEBRTC_GLIBC_PREREQ(a, b) 0
+ #endif
+
+-#if WEBRTC_GLIBC_PREREQ(2, 16)
++#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
+ #include <sys/auxv.h>
+ #else
+ #include <errno.h>
+@@ -40,7 +40,7 @@
+ int architecture = 0;
+ uint64_t hwcap = 0;
+ const char* platform = NULL;
+-#if WEBRTC_GLIBC_PREREQ(2, 16)
++#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
+ hwcap = getauxval(AT_HWCAP);
+ platform = (const char*)getauxval(AT_PLATFORM);
+ #else
diff --git a/skip/thunderbird/mallinfo.patch b/skip/thunderbird/mallinfo.patch
new file mode 100644
index 0000000..7916a20
--- /dev/null
+++ b/skip/thunderbird/mallinfo.patch
@@ -0,0 +1,20 @@
+diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
+index 865e1b5430..9a00dafecb 100644
+--- a/xpcom/base/nsMemoryReporterManager.cpp
++++ b/xpcom/base/nsMemoryReporterManager.cpp
+@@ -124,6 +124,7 @@ static MOZ_MUST_USE nsresult ResidentUniqueDistinguishedAmount(int64_t* aN) {
+ return GetProcSelfSmapsPrivate(aN);
+ }
+
++#ifdef __GLIBC__
+ # ifdef HAVE_MALLINFO
+ # define HAVE_SYSTEM_HEAP_REPORTER 1
+ static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
+@@ -143,6 +144,7 @@ static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
+ return NS_OK;
+ }
+ # endif
++#endif
+
+ #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
+ defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
diff --git a/skip/thunderbird/metainfo.patch b/skip/thunderbird/metainfo.patch
new file mode 100644
index 0000000..bb9730e
--- /dev/null
+++ b/skip/thunderbird/metainfo.patch
@@ -0,0 +1,12 @@
+Patch-Source: https://github.com/archlinux/svntogit-packages/blob/6d9588627d43ed7412d350ac33fa82e8551489a7/trunk/metainfo.patch
+diff -Naur thunderbird-78.9.1.orig/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml thunderbird-78.9.1/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml
+--- thunderbird-78.9.1.orig/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml 2021-04-17 02:05:05.808596043 +0000
++++ thunderbird-78.9.1/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml 2021-04-17 02:06:12.052455998 +0000
+@@ -1,6 +1,7 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <component type="desktop-application">
+ <id>net.thunderbird.Thunderbird</id>
++ <launchable type="desktop-id">thunderbird.desktop</launchable>
+ <metadata_license>CC0-1.0</metadata_license>
+ <name>Thunderbird</name>
+ <summary>Thunderbird is a free and open source email, newsfeed, chat, and calendaring client</summary>
diff --git a/skip/thunderbird/psutil.patch b/skip/thunderbird/psutil.patch
new file mode 100644
index 0000000..b49e11e
--- /dev/null
+++ b/skip/thunderbird/psutil.patch
@@ -0,0 +1,9 @@
+--- a/python/sites/mach.txt
++++ b/python/sites/mach.txt
+@@ -133,5 +133,5 @@
+ # Mach gracefully handles the case where `psutil` is unavailable.
+ # We aren't (yet) able to pin packages in automation, so we have to
+ # support down to the oldest locally-installed version (5.4.2).
+-pypi-optional:psutil>=5.4.2,<=5.8.0:telemetry will be missing some data
++pypi-optional:psutil>=5.4.2,<=5.10.0:telemetry will be missing some data
+ pypi-optional:zstandard>=0.11.1,<=0.17.0:zstd archives will not be possible to extract
diff --git a/skip/thunderbird/sandbox-fork.patch b/skip/thunderbird/sandbox-fork.patch
new file mode 100644
index 0000000..c7222ab
--- /dev/null
+++ b/skip/thunderbird/sandbox-fork.patch
@@ -0,0 +1,15 @@
+make SYS_fork non-fatal, musl uses it for fork(2)
+
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1253,6 +1253,10 @@
+ // usually do something reasonable on error.
+ case __NR_clone:
+ return ClonePolicy(Error(EPERM));
++#ifdef __NR_fork
++ case __NR_fork:
++ return Error(ENOSYS);
++#endif
+
+ # ifdef __NR_fadvise64
+ case __NR_fadvise64:
diff --git a/skip/thunderbird/sandbox-largefile.patch b/skip/thunderbird/sandbox-largefile.patch
new file mode 100644
index 0000000..f1cf28b
--- /dev/null
+++ b/skip/thunderbird/sandbox-largefile.patch
@@ -0,0 +1,17 @@
+--- a/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:41:14.556378950 +0100
++++ b/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:40:23.595806444 +0100
+@@ -68,7 +68,13 @@
+
+ // The headers define O_LARGEFILE as 0 on x86_64, but we need the
+ // actual value because it shows up in file flags.
+-#define O_LARGEFILE_REAL 00100000
++#if defined(__x86_64__) || defined(__i386__) || defined(__mips__)
++#define O_LARGEFILE_REAL 0100000
++#elif defined(__powerpc__)
++#define O_LARGEFILE_REAL 0200000
++#else
++#define O_LARGEFILE_REAL O_LARGEFILE
++#endif
+
+ // Not part of UAPI, but userspace sees it in F_GETFL; see bug 1650751.
+ #define FMODE_NONOTIFY 0x4000000
diff --git a/skip/thunderbird/sandbox-sched_setscheduler.patch b/skip/thunderbird/sandbox-sched_setscheduler.patch
new file mode 100644
index 0000000..3163c9e
--- /dev/null
+++ b/skip/thunderbird/sandbox-sched_setscheduler.patch
@@ -0,0 +1,16 @@
+upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1694,10 +1694,10 @@
+ return Allow();
+ case __NR_sched_get_priority_min:
+ case __NR_sched_get_priority_max:
++ case __NR_sched_setscheduler:
+ return Allow();
+ case __NR_sched_getparam:
+- case __NR_sched_getscheduler:
+- case __NR_sched_setscheduler: {
++ case __NR_sched_getscheduler: {
+ Arg<pid_t> pid(0);
+ return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
+ }
diff --git a/skip/thunderbird/stab.h b/skip/thunderbird/stab.h
new file mode 100644
index 0000000..6f70af3
--- /dev/null
+++ b/skip/thunderbird/stab.h
@@ -0,0 +1,71 @@
+/* $OpenBSD: stab.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */
+/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1991 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)stab.h 5.2 (Berkeley) 4/4/91
+ */
+
+#ifndef _STAB_H_
+#define _STAB_H_
+
+/*
+ * The following are symbols used by various debuggers and by the Pascal
+ * compiler. Each of them must have one (or more) of the bits defined by
+ * the N_STAB mask set.
+ */
+
+#define N_GSYM 0x20 /* global symbol */
+#define N_FNAME 0x22 /* F77 function name */
+#define N_FUN 0x24 /* procedure name */
+#define N_STSYM 0x26 /* data segment variable */
+#define N_LCSYM 0x28 /* bss segment variable */
+#define N_MAIN 0x2a /* main function name */
+#define N_PC 0x30 /* global Pascal symbol */
+#define N_RSYM 0x40 /* register variable */
+#define N_SLINE 0x44 /* text segment line number */
+#define N_DSLINE 0x46 /* data segment line number */
+#define N_BSLINE 0x48 /* bss segment line number */
+#define N_SSYM 0x60 /* structure/union element */
+#define N_SO 0x64 /* main source file name */
+#define N_LSYM 0x80 /* stack variable */
+#define N_BINCL 0x82 /* include file beginning */
+#define N_SOL 0x84 /* included source file name */
+#define N_PSYM 0xa0 /* parameter variable */
+#define N_EINCL 0xa2 /* include file end */
+#define N_ENTRY 0xa4 /* alternate entry point */
+#define N_LBRAC 0xc0 /* left bracket */
+#define N_EXCL 0xc2 /* deleted include file */
+#define N_RBRAC 0xe0 /* right bracket */
+#define N_BCOMM 0xe2 /* begin common */
+#define N_ECOMM 0xe4 /* end common */
+#define N_ECOML 0xe8 /* end common (local name) */
+#define N_LENG 0xfe /* length of preceding entry */
+
+#endif /* !_STAB_H_ */
diff --git a/skip/thunderbird/thunderbird.desktop b/skip/thunderbird/thunderbird.desktop
new file mode 100644
index 0000000..210859d
--- /dev/null
+++ b/skip/thunderbird/thunderbird.desktop
@@ -0,0 +1,64 @@
+[Desktop Entry]
+Name=Thunderbird
+GenericName=Mail Client
+GenericName[ast]=Client de correu
+GenericName[ca]=Client de correu
+GenericName[cs]=Poštovní klient
+GenericName[da]=E-postklient
+GenericName[de]=E-Mail-Anwendung
+GenericName[el]=Λογισμικό αλληλογραφίας
+GenericName[es]=Cliente de correo
+GenericName[fi]=Sähköpostiohjelma
+GenericName[fr]=Client de messagerie
+GenericName[gl]=Cliente de correo electrónico
+GenericName[he]=לקוח דוא״ל
+GenericName[hr]=Klijent e-pošte
+GenericName[hu]=Levelezőkliens
+GenericName[it]=Client email
+GenericName[ja]=電子メールクライアント
+GenericName[ko]=메일 클라이언트
+GenericName[nl]=E-mailprogramma
+GenericName[pl]=Klient poczty
+GenericName[pt_BR]=Cliente de E-mail
+GenericName[ru]=Почтовый клиент
+GenericName[sk]=Poštový klient
+GenericName[ug]=ئېلخەت دېتالى
+GenericName[uk]=Поштова програма
+GenericName[vi]=Phần mềm khách quản lý thư điện tử
+GenericName[zh_CN]=邮件新闻客户端
+GenericName[zh_TW]=郵件用戶端
+Comment=Send and receive mail with Thunderbird
+Comment[ast]=Lleer y escribir corréu electrónicu
+Comment[ca]=Llegiu i escriviu correu
+Comment[cs]=Čtení a psaní pošty
+Comment[da]=Skriv/læs e-post/nyhedsgruppe med Mozilla Thunderbird
+Comment[de]=E-Mails und Nachrichten mit Thunderbird lesen und schreiben
+Comment[el]=Διαβάστε και γράψτε γράμματα με το Mozilla Thunderbird
+Comment[es]=Lea y escriba correos y noticias con Thunderbird
+Comment[fi]=Lue ja kirjoita sähköposteja
+Comment[fr]=Lire et écrire des courriels
+Comment[gl]=Lea e escriba correo electrónico
+Comment[he]=קריאה/כתיבה של דוא״ל/חדשות באמצעות Mozilla Thunderbird
+Comment[hr]=Čitajte/šaljite e-poštu s Thunderbird
+Comment[hu]=Levelek írása és olvasása a Thunderbirddel
+Comment[it]=Per leggere e scrivere email
+Comment[ja]=メールの読み書き
+Comment[ko]=Mozilla Thunderbird 메일/뉴스 읽기 및 쓰기 클라이언트
+Comment[nl]=E-mail/nieuws lezen en schrijven met Mozilla Thunderbird
+Comment[pl]=Czytanie i wysyłanie e-maili
+Comment[pt_BR]=Leia e escreva suas mensagens
+Comment[ru]=Читайте и пишите письма
+Comment[sk]=Čítajte a píšte poštu pomocou programu Thunderbird
+Comment[sv]=Läs och skriv e-post
+Comment[ug]=ئېلخەت ۋە خەۋەرلەرنى Mozilla Thunderbird دا كۆرۈش ۋە يېزىش
+Comment[uk]=Читання та написання листів
+Comment[vi]=Đọc và soạn thư điện tử
+Comment[zh_CN]=阅读邮件或新闻
+Comment[zh_TW]=以 Mozilla Thunderbird 讀寫郵件或新聞
+Exec=thunderbird %u
+Icon=thunderbird
+Terminal=false
+Type=Application
+MimeType=message/rfc822;x-scheme-handler/mailto;
+StartupNotify=true
+Categories=Network;Email;
diff --git a/skip/thunderbird/thunderbird.xibuild b/skip/thunderbird/thunderbird.xibuild
new file mode 100644
index 0000000..05b3f5a
--- /dev/null
+++ b/skip/thunderbird/thunderbird.xibuild
@@ -0,0 +1,204 @@
+#!/bin/sh
+
+NAME="thunderbird"
+DESC="Thunderbird email client"
+
+MAKEDEPS=" alsa-lib automake botan cargo cbindgen llvm libclang clang dbus-glib gettext gtk3 icu json-c libevent libffi libjpeg-turbo libnotify libogg libtheora libtool libvorbis libvpx libwebp libxcomposite libxt llvm m4 mesa nasm nodejs nspr nss pipewire pulseaudio python sed wireless-tools zip"
+
+PKG_VER=102.6.1
+SOURCE="https://ftp.mozilla.org/pub/thunderbird/releases/$PKG_VER/source/thunderbird-$PKG_VER.source.tar.xz"
+
+ADDITIONAL="
+allow-custom-rust-vendor.patch
+avoid-redefinition.patch
+cbindgen-0.24.patch
+disable-moz-stackwalk.patch
+disable-neon-in-aom.patch
+distribution.ini
+fix-fortify-system-wrappers.patch
+fix-libresolv-path.patch
+fix-rust-target.patch
+fix-tools.patch
+fix-webrtc-glibcisms.patch
+mallinfo.patch
+metainfo.patch
+psutil.patch
+sandbox-fork.patch
+sandbox-largefile.patch
+sandbox-sched_setscheduler.patch
+stab.h
+thunderbird.desktop
+vendor-prefs.js
+zstandard.patch
+"
+
+mozappdir=/usr/lib/thunderbird
+
+_clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/$1/.cargo-checksum.json
+}
+
+export CC="gcc"
+export CXX="g++"
+
+export SHELL=/bin/sh
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+export USE_SHORT_LIBNAME=1
+export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none
+export MOZBUILD_STATE_PATH="$srcdir"/mozbuild
+# disable desktop notifications
+export MOZ_NOSPAM=1
+
+# set rpath so linker finds the libs
+export LDFLAGS="$LDFLAGS -Wl,-rpath,$_mozappdir"
+
+# let firefox do this itself.
+unset CARGO_PROFILE_RELEASE_OPT_LEVEL
+unset CARGO_PROFILE_RELEASE_LTO
+
+export CFLAGS="$CFLAGS -O2 -fno-plt"
+export CXXFLAGS="$CXXFLAGS -O2 -fno-plt"
+
+prepare() {
+
+ apply_patches
+
+ cp "$BUILD_ROOT"/stab.h toolkit/crashreporter/google-breakpad/src/
+
+ _clear_vendor_checksums audio_thread_priority
+ _clear_vendor_checksums packed_simd_2
+ _clear_vendor_checksums target-lexicon-0.9.0
+
+ cat > base-mozconfig <<-EOF
+ # disable unwanted things
+ ac_add_options --disable-bootstrap
+ ac_add_options --disable-cargo-incremental
+ ac_add_options --disable-crashreporter
+ ac_add_options --disable-debug
+ ac_add_options --disable-debug-symbols
+ ac_add_options --disable-install-strip
+ ac_add_options --disable-jemalloc
+ ac_add_options --disable-strip
+ ac_add_options --disable-tests
+ ac_add_options --disable-updater
+
+ # features
+ ac_add_options --enable-alsa
+ ac_add_options --enable-application=comm/mail
+ ac_add_options --enable-dbus
+ ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
+ ac_add_options --enable-ffmpeg
+ ac_add_options --enable-hardening
+ ac_add_options --enable-linker=lld
+ ac_add_options --enable-necko-wifi
+ ac_add_options --enable-official-branding
+ ac_add_options --enable-optimize="$CFLAGS"
+ ac_add_options --enable-pulseaudio
+ ac_add_options --enable-release
+ ac_add_options --enable-update-channel=release
+
+ # system libs
+ ac_add_options --enable-system-pixman
+ ac_add_options --with-system-ffi
+ ac_add_options --with-system-icu
+ ac_add_options --with-system-jpeg
+ ac_add_options --with-system-libevent
+ ac_add_options --with-system-libvpx
+ ac_add_options --with-system-nspr
+ ac_add_options --with-system-nss
+ ac_add_options --with-system-png
+ ac_add_options --with-system-webp
+ ac_add_options --with-system-zlib
+
+ # misc
+ ac_add_options --prefix=/usr
+ ac_add_options --with-libclang-path=/usr/lib
+ ac_add_options --with-unsigned-addon-scopes=app,system
+ ac_add_options --without-wasm-sandboxed-libraries
+
+ # objdir
+ mk_add_options MOZ_OBJDIR="$BUILD_ROOT/obj"
+
+ ac_add_options --enable-sandbox
+ ac_add_options --disable-elf-hack
+
+ mk_add_options AUTOCLOBBER=1
+ ac_add_options --host=x86_64-unknown-linux-musl
+ EOF
+}
+
+build() {
+ cat > .mozconfig base-mozconfig
+
+ export MOZ_BUILD_DATE="$(date ${SOURCE_DATE_EPOCH:+ -d@${SOURCE_DATE_EPOCH}} "+%Y%m%d%H%M%S")"
+
+ # for lto
+ ulimit -n 4096
+
+ ./mach build
+}
+
+package() {
+
+ DESTDIR="$PKG_DEST" MOZ_MAKE_FLAGS="$MAKEOPTS" ./mach install
+
+ install -m755 -d "$PKG_DEST"/usr/share/applications
+ install -m755 -d "$PKG_DEST"/usr/share/pixmaps
+
+ local _png
+ for _png in "$BUILD_ROOT"/comm/mail/branding/thunderbird/default*.png; do
+ local i=${_png%.png}
+ i=${i##*/default}
+ install -D -m644 "$_png" "$PKG_DEST"/usr/share/icons/hicolor/"$i"x"$i"/apps/thunderbird.png
+ done
+
+ install -Dm644 "$BUILD_ROOT"/comm/mail/branding/thunderbird/TB-symbolic.svg \
+ "$PKG_DEST/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg"
+ install -Dm644 "$BUILD_ROOT"/comm/mail/branding/thunderbird/default48.png \
+ $PKG_DEST/usr/share/pixmaps/thunderbird.png
+
+ install -m644 "$BUILD_ROOT"/thunderbird.desktop "$PKG_DEST"/usr/share/applications/thunderbird.desktop
+
+ # Add StartupWMClass=firefox on the .desktop files so Desktop Environments
+ # correctly associate the window with their icon, the correct fix is to have
+ # thunderbird sets its own AppID but this will work for the meantime
+ # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1607399
+ echo "StartupWMClass=thunderbird" >> "$PKG_DEST"/usr/share/applications/thunderbird.desktop
+
+ # install our vendor prefs
+ install -d "$PKG_DEST"/$mozappdir/defaults/preferences
+
+ cat >> "$PKG_DEST"/$mozappdir/defaults/preferences/vendor.js <<- EOF
+ // Use LANG environment variable to choose locale
+ pref("intl.locale.requested", "");
+
+ // Use system-provided dictionaries
+ pref("spellchecker.dictionary_path", "/usr/share/hunspell");
+
+ // Disable default mailer checking.
+ pref("mail.shell.checkDefaultMail", false);
+
+ // Don't disable our bundled extensions in the application directory
+ pref("extensions.autoDisableScopes", 11);
+ pref("extensions.shownSelectionUI", true);
+ EOF
+
+ install -d "$PKG_DEST"/$mozappdir/distribution
+
+ cat >> "$PKG_DEST"/$mozappdir/distribution/distribution.ini <<- EOF
+ [Global]
+ id=xilinux
+ version=1.0
+ about=Mozilla Thunderbird for XiLinux
+
+ [Preferences]
+ app.distributor=xilinux
+ app.distributor.channel=thunderbird
+ EOF
+
+ # Replace duplicate binary with wrapper
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=658850
+ ln -sf thunderbird "$PKG_DEST/$mozappdir/thunderbird-bin"
+}
+
diff --git a/skip/thunderbird/vendor-prefs.js b/skip/thunderbird/vendor-prefs.js
new file mode 100644
index 0000000..5aeeb1b
--- /dev/null
+++ b/skip/thunderbird/vendor-prefs.js
@@ -0,0 +1,17 @@
+// Use LANG environment variable to choose locale
+pref("intl.locale.requested", "");
+
+// Use system-provided dictionaries
+pref("spellchecker.dictionary_path", "/usr/share/hunspell");
+
+// Disable default mailer checking.
+pref("mail.shell.checkDefaultMail", false);
+
+// Don't disable our bundled extensions in the application directory
+pref("extensions.autoDisableScopes", 11);
+pref("extensions.shownSelectionUI", true);
+
+// Disable telemetry
+pref("datareporting.healthreport.uploadEnabled", false);
+pref("datareporting.policy.dataSubmissionEnabled", false);
+pref("toolkit.telemetry.archive.enabled", false);
diff --git a/skip/thunderbird/zstandard.patch b/skip/thunderbird/zstandard.patch
new file mode 100644
index 0000000..e6b7811
--- /dev/null
+++ b/skip/thunderbird/zstandard.patch
@@ -0,0 +1,8 @@
+--- a/python/sites/mach.txt
++++ b/python/sites/mach.txt
+@@ -134,4 +134,4 @@
+ # We aren't (yet) able to pin packages in automation, so we have to
+ # support down to the oldest locally-installed version (5.4.2).
+ pypi-optional:psutil>=5.4.2,<=5.10.0:telemetry will be missing some data
+-pypi-optional:zstandard>=0.11.1,<=0.17.0:zstd archives will not be possible to extract
++pypi-optional:zstandard>=0.11.1,<=0.18.0:zstd archives will not be possible to extract
diff --git a/skip/webkit2gtk/webkit2gtk.xibuild b/skip/webkit2gtk/webkit2gtk.xibuild
new file mode 100644
index 0000000..2d1667e
--- /dev/null
+++ b/skip/webkit2gtk/webkit2gtk.xibuild
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+NAME="webkit2gtk"
+DESC="Portable web rendering engine WebKit for GTK+"
+
+MAKEDEPS="bison cmake enchant2 flex geoclue gnutls gobject-introspection gperf gst-plugins-bad gst-plugins-base gstreamer gtk3 hyphen icu lcms2 libgcrypt libjpeg-turbo libmanette libnotify libpng libseccomp libsecret libsoup libwebp libwpe libwpebackend-fdo libxml2 libxslt libxt mesa openjpeg openjpeg-tools pango python ruby ninja sqlite woff2"
+
+PKG_VER=2.36.7
+SOURCE="https://webkitgtk.org/releases/webkitgtk-$PKG_VER.tar.xz"
+
+build() {
+ local _archopt=
+ case "$CARCH" in
+ x86)
+ # disable _FORTIFY_SOURCE to work around:
+ # cc1plus: out of memory allocating 65536 bytes after a total of 3131101184 bytes
+ CXXFLAGS="$CXXFLAGS -U_FORTIFY_SOURCE"
+ ;;
+ armhf)
+ CXXFLAGS="$CXXFLAGS -U_FORTIFY_SOURCE"
+ _archopt="-DENABLE_JIT=OFF"
+ ;;
+ ppc64le|s390x)
+ _archopt="-DENABLE_JIT=OFF"
+ ;;
+ esac
+
+ # reduce memory usage on 32 bit
+ # https://bugs.webkit.org/show_bug.cgi?id=199272
+ export CXXFLAGS="$CXXFLAGS -g1"
+
+ # disable gold usage since it can't find pthreads with it enabled
+ cmake -B build -G Ninja \
+ -DPORT=GTK \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_INSTALL_DIR=/usr/lib \
+ -DENABLE_GLES2=ON \
+ -DENABLE_GTKDOC=OFF \
+ -DENABLE_GEOLOCATION=ON \
+ -DENABLE_JOURNALD_LOG=OFF \
+ -DENABLE_SAMPLING_PROFILER=OFF \
+ -DENABLE_MINIBROWSER=ON \
+ -DUSE_WPE_RENDERER=ON \
+ -DUSE_WOFF2=ON \
+ -DUSE_SOUP2=ON \
+ $_archopt
+ cmake --build build
+}
+
+check() {
+ ninja -C build check
+}
+
+package() {
+ DESTDIR="$PKG_DEST" cmake --install build
+}
+
diff --git a/skip/wine/rpath.patch b/skip/wine/rpath.patch
new file mode 100644
index 0000000..68b2558
--- /dev/null
+++ b/skip/wine/rpath.patch
@@ -0,0 +1,57 @@
+diff --git a/configure b/configure
+index 774a95ce003..d408e77cc78 100755
+--- a/configure
++++ b/configure
+@@ -11137,6 +11137,38 @@ fi
+ LIBWINE_DEPENDS="wine.map"
+
+ TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.so.$libwine_version libs/wine/libwine.so.$libwine_soversion"
++
++ # do this at the end because it needs double dollar for makefile
++ as_ac_var=`printf "%s\n" "ac_cv_cflags_-Wl,-rpath,\\\\\\$ORIGIN" | $as_tr_sh`
++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-rpath,\\\$ORIGIN" >&5
++printf %s "checking whether the compiler supports -Wl,-rpath,\\\$ORIGIN... " >&6; }
++if eval test \${$as_ac_var+y}
++then :
++ printf %s "(cached) " >&6
++else $as_nop
++ ac_wine_try_cflags_saved=$CFLAGS
++CFLAGS="$CFLAGS -Wl,-rpath,\\\$ORIGIN"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++int main(int argc, char **argv) { return 0; }
++_ACEOF
++if ac_fn_c_try_link "$LINENO"
++then :
++ eval "$as_ac_var=yes"
++else $as_nop
++ eval "$as_ac_var=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.beam \
++ conftest$ac_exeext conftest.$ac_ext
++CFLAGS=$ac_wine_try_cflags_saved
++fi
++eval ac_res=\$$as_ac_var
++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++printf "%s\n" "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_var"\" = x"yes"
++then :
++ UNIXLDFLAGS="$UNIXLDFLAGS '-Wl,-rpath,\$\$ORIGIN'"
++fi
+ ;;
+ esac
+
+diff --git a/configure.ac b/configure.ac
+index 8c5066a3de6..01ede86df1e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -916,6 +916,9 @@ case $host_os in
+ AC_SUBST(LIBWINE_SHAREDLIB,"libwine.so.$libwine_version")
+ AC_SUBST(LIBWINE_DEPENDS,"wine.map")
+ TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.so.$libwine_version libs/wine/libwine.so.$libwine_soversion"
++
++ # do this at the end because it needs double dollar for makefile
++ WINE_TRY_CFLAGS([-Wl,-rpath,\\\$ORIGIN],[UNIXLDFLAGS="$UNIXLDFLAGS '-Wl,-rpath,\$\$ORIGIN'"])
+ ;;
+ esac
+
diff --git a/skip/wine/wine.xibuild b/skip/wine/wine.xibuild
new file mode 100644
index 0000000..20ce9f4
--- /dev/null
+++ b/skip/wine/wine.xibuild
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+NAME="wine"
+DESC="A compatibility layer for running Windows programs"
+
+MAKEDEPS=" alsa-lib autoconf automake bison cups dbus flex fontconfig freetype2 giflib gnutls gstreamer gst-plugins-base krb5 libgphoto2 libpcap libusb libxcomposite libxcursor libxdamage libxi libxinerama libxrandr libxrender mesa mingw-w64-gcc mpg123 ncurses openal-soft opencl sane sdl2 udisks2 v4l-utils vkd3d vulkan-loader"
+
+PKG_VER=7.18
+SOURCE="https://dl.winehq.org/wine/source/7.x/wine-$PKG_VER.tar.xz"
+
+ADDITIONAL="
+rpath.patch
+"
+
+prepare() {
+ apply_patches
+ # fix opencl header detection
+ sed 's|OpenCL/opencl.h|CL/opencl.h|g' -i configure*
+}
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-dbus \
+ --without-ldap \
+ --with-mingw \
+ --with-x \
+ --with-vulkan \
+ --enable-win64
+ make LDFLAGS="$LDFLAGS $_no_pie" tools/winedump/winedump
+ make
+}
+
+check() {
+ xvfb-run make test
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+
+ install -Dm755 tools/wineapploader \
+ "$PKG_DEST"/usr/bin/wineapploader
+
+ local file
+ for file in msiexec notepad regedit regsvr32 wineboot \
+ winecfg wineconsole winefile winemine winepath
+ do
+ rm "$PKG_DEST"/usr/bin/$file
+ ln -sf /usr/bin/wineapploader "$PKG_DEST"/usr/bin/$file
+ done
+
+ case "$CARCH" in
+ x86_64)
+ x86_64-w64-mingw32-strip --strip-unneeded "$PKG_DEST"/usr/lib/wine/x86_64-windows/*.dll
+ ;;
+ x86)
+ i686-w64-mingw32-strip --strip-unneeded "$PKG_DEST"/usr/lib/wine/i386-windows/*.dll
+ ;;
+ esac
+}
+