summaryrefslogtreecommitdiffstats
path: root/patches/source
diff options
context:
space:
mode:
Diffstat (limited to 'patches/source')
-rw-r--r--patches/source/bind/3link.sh136
-rwxr-xr-xpatches/source/bind/bind.SlackBuild180
-rw-r--r--patches/source/bind/caching-example/localhost.zone11
-rw-r--r--patches/source/bind/caching-example/named.conf31
-rw-r--r--patches/source/bind/caching-example/named.local10
-rw-r--r--patches/source/bind/caching-example/named.root92
-rw-r--r--patches/source/bind/default.named12
-rw-r--r--patches/source/bind/doinst.sh38
-rw-r--r--patches/source/bind/rc.bind136
-rw-r--r--patches/source/bind/slack-desc19
-rw-r--r--patches/source/bluez/bluez-5.51-obexd_without_systemd-1.patch59
-rwxr-xr-xpatches/source/bluez/bluez.SlackBuild199
-rw-r--r--patches/source/bluez/bluez.url1
-rw-r--r--patches/source/bluez/btusb.conf3
-rw-r--r--patches/source/bluez/config/defaultconfig9
-rw-r--r--patches/source/bluez/config/rc.bluetooth74
-rw-r--r--patches/source/bluez/config/uart.conf6
-rw-r--r--patches/source/bluez/doinst.sh26
-rw-r--r--patches/source/bluez/slack-desc19
-rw-r--r--patches/source/openssl/certwatch130
-rw-r--r--patches/source/openssl/doinst.sh-openssl26
-rw-r--r--patches/source/openssl/doinst.sh-openssl-solibs12
-rwxr-xr-xpatches/source/openssl/openssl.SlackBuild263
-rw-r--r--patches/source/openssl/slack-desc.openssl19
-rw-r--r--patches/source/openssl/slack-desc.openssl-solibs19
-rw-r--r--patches/source/qt5/doinst.sh9
-rwxr-xr-xpatches/source/qt5/fetch_sources.sh61
-rw-r--r--patches/source/qt5/patches/qt5-qtbase-gcc11.patch171
-rw-r--r--patches/source/qt5/patches/qt5-qtwebengine-gcc11.patch20
-rw-r--r--patches/source/qt5/patches/qt5-qtwebsockets-gcc11.patch12
-rw-r--r--patches/source/qt5/patches/qt5.mysql.h.diff11
-rw-r--r--patches/source/qt5/patches/qt5.qtbase_cmake_isystem_includes.patch14
-rw-r--r--patches/source/qt5/profile.d/qt5.csh27
-rw-r--r--patches/source/qt5/profile.d/qt5.sh26
-rwxr-xr-xpatches/source/qt5/qt5.SlackBuild357
-rw-r--r--patches/source/qt5/slack-desc19
36 files changed, 2257 insertions, 0 deletions
diff --git a/patches/source/bind/3link.sh b/patches/source/bind/3link.sh
new file mode 100644
index 000000000..ec8ba4d19
--- /dev/null
+++ b/patches/source/bind/3link.sh
@@ -0,0 +1,136 @@
+rm -f lwres_addr_parse.3
+ln -sf lwres_resutil.3 lwres_addr_parse.3
+rm -f lwres_buffer_add.3
+ln -sf lwres_buffer.3 lwres_buffer_add.3
+rm -f lwres_buffer_back.3
+ln -sf lwres_buffer.3 lwres_buffer_back.3
+rm -f lwres_buffer_clear.3
+ln -sf lwres_buffer.3 lwres_buffer_clear.3
+rm -f lwres_buffer_first.3
+ln -sf lwres_buffer.3 lwres_buffer_first.3
+rm -f lwres_buffer_forward.3
+ln -sf lwres_buffer.3 lwres_buffer_forward.3
+rm -f lwres_buffer_getmem.3
+ln -sf lwres_buffer.3 lwres_buffer_getmem.3
+rm -f lwres_buffer_getuint16.3
+ln -sf lwres_buffer.3 lwres_buffer_getuint16.3
+rm -f lwres_buffer_getuint32.3
+ln -sf lwres_buffer.3 lwres_buffer_getuint32.3
+rm -f lwres_buffer_getuint8.3
+ln -sf lwres_buffer.3 lwres_buffer_getuint8.3
+rm -f lwres_buffer_init.3
+ln -sf lwres_buffer.3 lwres_buffer_init.3
+rm -f lwres_buffer_invalidate.3
+ln -sf lwres_buffer.3 lwres_buffer_invalidate.3
+rm -f lwres_buffer_putmem.3
+ln -sf lwres_buffer.3 lwres_buffer_putmem.3
+rm -f lwres_buffer_putuint16.3
+ln -sf lwres_buffer.3 lwres_buffer_putuint16.3
+rm -f lwres_buffer_putuint32.3
+ln -sf lwres_buffer.3 lwres_buffer_putuint32.3
+rm -f lwres_buffer_putuint8.3
+ln -sf lwres_buffer.3 lwres_buffer_putuint8.3
+rm -f lwres_buffer_subtract.3
+ln -sf lwres_buffer.3 lwres_buffer_subtract.3
+rm -f lwres_conf_clear.3
+ln -sf lwres_config.3 lwres_conf_clear.3
+rm -f lwres_conf_get.3
+ln -sf lwres_config.3 lwres_conf_get.3
+rm -f lwres_conf_init.3
+ln -sf lwres_config.3 lwres_conf_init.3
+rm -f lwres_conf_parse.3
+ln -sf lwres_config.3 lwres_conf_parse.3
+rm -f lwres_conf_print.3
+ln -sf lwres_config.3 lwres_conf_print.3
+rm -f lwres_context_allocmem.3
+ln -sf lwres_context.3 lwres_context_allocmem.3
+rm -f lwres_context_create.3
+ln -sf lwres_context.3 lwres_context_create.3
+rm -f lwres_context_destroy.3
+ln -sf lwres_context.3 lwres_context_destroy.3
+rm -f lwres_context_freemem.3
+ln -sf lwres_context.3 lwres_context_freemem.3
+rm -f lwres_context_initserial.3
+ln -sf lwres_context.3 lwres_context_initserial.3
+rm -f lwres_context_nextserial.3
+ln -sf lwres_context.3 lwres_context_nextserial.3
+rm -f lwres_context_sendrecv.3
+ln -sf lwres_context.3 lwres_context_sendrecv.3
+rm -f lwres_endhostent.3
+ln -sf lwres_gethostent.3 lwres_endhostent.3
+rm -f lwres_endhostent_r.3
+ln -sf lwres_gethostent.3 lwres_endhostent_r.3
+rm -f lwres_freeaddrinfo.3
+ln -sf lwres_getaddrinfo.3 lwres_freeaddrinfo.3
+rm -f lwres_freehostent.3
+ln -sf lwres_getipnode.3 lwres_freehostent.3
+rm -f lwres_gabnrequest_free.3
+ln -sf lwres_gabn.3 lwres_gabnrequest_free.3
+rm -f lwres_gabnrequest_parse.3
+ln -sf lwres_gabn.3 lwres_gabnrequest_parse.3
+rm -f lwres_gabnrequest_render.3
+ln -sf lwres_gabn.3 lwres_gabnrequest_render.3
+rm -f lwres_gabnresponse_free.3
+ln -sf lwres_gabn.3 lwres_gabnresponse_free.3
+rm -f lwres_gabnresponse_parse.3
+ln -sf lwres_gabn.3 lwres_gabnresponse_parse.3
+rm -f lwres_gabnresponse_render.3
+ln -sf lwres_gabn.3 lwres_gabnresponse_render.3
+rm -f lwres_getaddrsbyname.3
+ln -sf lwres_resutil.3 lwres_getaddrsbyname.3
+rm -f lwres_gethostbyaddr.3
+ln -sf lwres_gethostent.3 lwres_gethostbyaddr.3
+rm -f lwres_gethostbyaddr_r.3
+ln -sf lwres_gethostent.3 lwres_gethostbyaddr_r.3
+rm -f lwres_gethostbyname.3
+ln -sf lwres_gethostent.3 lwres_gethostbyname.3
+rm -f lwres_gethostbyname2.3
+ln -sf lwres_gethostent.3 lwres_gethostbyname2.3
+rm -f lwres_gethostbyname_r.3
+ln -sf lwres_gethostent.3 lwres_gethostbyname_r.3
+rm -f lwres_gethostent_r.3
+ln -sf lwres_gethostent.3 lwres_gethostent_r.3
+rm -f lwres_getipnodebyaddr.3
+ln -sf lwres_getipnode.3 lwres_getipnodebyaddr.3
+rm -f lwres_getipnodebyname.3
+ln -sf lwres_getipnode.3 lwres_getipnodebyname.3
+rm -f lwres_getnamebyaddr.3
+ln -sf lwres_resutil.3 lwres_getnamebyaddr.3
+rm -f lwres_gnbarequest_free.3
+ln -sf lwres_gnba.3 lwres_gnbarequest_free.3
+rm -f lwres_gnbarequest_parse.3
+ln -sf lwres_gnba.3 lwres_gnbarequest_parse.3
+rm -f lwres_gnbarequest_render.3
+ln -sf lwres_gnba.3 lwres_gnbarequest_render.3
+rm -f lwres_gnbaresponse_free.3
+ln -sf lwres_gnba.3 lwres_gnbaresponse_free.3
+rm -f lwres_gnbaresponse_parse.3
+ln -sf lwres_gnba.3 lwres_gnbaresponse_parse.3
+rm -f lwres_gnbaresponse_render.3
+ln -sf lwres_gnba.3 lwres_gnbaresponse_render.3
+rm -f lwres_herror.3
+ln -sf lwres_hstrerror.3 lwres_herror.3
+rm -f lwres_lwpacket_parseheader.3
+ln -sf lwres_packet.3 lwres_lwpacket_parseheader.3
+rm -f lwres_lwpacket_renderheader.3
+ln -sf lwres_packet.3 lwres_lwpacket_renderheader.3
+rm -f lwres_net_ntop.3
+ln -sf lwres_inetntop.3 lwres_net_ntop.3
+rm -f lwres_nooprequest_free.3
+ln -sf lwres_noop.3 lwres_nooprequest_free.3
+rm -f lwres_nooprequest_parse.3
+ln -sf lwres_noop.3 lwres_nooprequest_parse.3
+rm -f lwres_nooprequest_render.3
+ln -sf lwres_noop.3 lwres_nooprequest_render.3
+rm -f lwres_noopresponse_free.3
+ln -sf lwres_noop.3 lwres_noopresponse_free.3
+rm -f lwres_noopresponse_parse.3
+ln -sf lwres_noop.3 lwres_noopresponse_parse.3
+rm -f lwres_noopresponse_render.3
+ln -sf lwres_noop.3 lwres_noopresponse_render.3
+rm -f lwres_sethostent.3
+ln -sf lwres_gethostent.3 lwres_sethostent.3
+rm -f lwres_sethostent_r.3
+ln -sf lwres_gethostent.3 lwres_sethostent_r.3
+rm -f lwres_string_parse.3
+ln -sf lwres_resutil.3 lwres_string_parse.3
diff --git a/patches/source/bind/bind.SlackBuild b/patches/source/bind/bind.SlackBuild
new file mode 100755
index 000000000..7884f1831
--- /dev/null
+++ b/patches/source/bind/bind.SlackBuild
@@ -0,0 +1,180 @@
+#!/bin/bash
+
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=bind
+VERSION=${VERSION:-$(echo ${PKGNAM}-[0-9]*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack15.0}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG/etc/default
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z || exit 1
+cd ${PKGNAM}-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \+ -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \+
+
+# Detect krb5:
+if ls /lib*/libgssapi_krb5* 1> /dev/null 2> /dev/null ; then
+ GSSAPI=" --with-gssapi "
+else
+ GSSAPI=" "
+fi
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-libtool \
+ --with-libidn2 \
+ --with-python=/usr/bin/python3 \
+ --mandir=/usr/man \
+ --enable-shared \
+ --disable-static \
+ --with-openssl=/usr \
+ $GSSAPI \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+# These probably were not supposed to be installed:
+find . -name .deps -exec rm -rf "{}" \;
+find . -name .libs -exec rm -rf "{}" \;
+
+# We like symlinks.
+( cd $PKG/usr/sbin
+ ln -sf named lwresd
+)
+
+# We like a lot of symlinks.
+if [ -d $PKG/usr/man/man3 ]; then
+ ( cd $PKG/usr/man/man3
+ sh $CWD/3link.sh
+ )
+fi
+
+# Install init script:
+mkdir -p $PKG/etc/rc.d
+cp -a $CWD/rc.bind $PKG/etc/rc.d/rc.bind.new
+chmod 644 $PKG/etc/rc.d/rc.bind.new
+
+# Install default options file for named:
+cat $CWD/default.named > $PKG/etc/default/named.new
+
+# Fix library perms:
+chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/*
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \+
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ CHANGES COPYRIGHT FAQ* README* \
+ doc/arm doc/misc \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# This one should have the correct perms of the config file:
+if [ -r $PKG/usr/doc/${PKGNAM}-$VERSION/misc/rndc.conf-sample ]; then
+ chmod 644 $PKG/usr/doc/${PKGNAM}-$VERSION/misc/rndc.conf-sample
+fi
+
+# One format of this is plenty. Especially get rid of the bloated PDF.
+( cd $PKG/usr/doc/bind-$VERSION/arm
+ rm -f Makefile* *.pdf *.xml README.SGML latex-fixup.pl
+)
+
+# Add sample config files for a simple caching nameserver:
+mkdir -p $PKG/var/named/caching-example
+cat $CWD/caching-example/named.conf > $PKG/etc/named.conf.new
+cat $CWD/caching-example/localhost.zone > $PKG/var/named/caching-example/localhost.zone
+cat $CWD/caching-example/named.local > $PKG/var/named/caching-example/named.local
+cat $CWD/caching-example/named.root > $PKG/var/named/caching-example/named.root
+# This name is deprecated, but having it here doesn't hurt in case
+# an old configuration file wants it:
+cat $CWD/caching-example/named.root > $PKG/var/named/caching-example/named.ca
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
+
diff --git a/patches/source/bind/caching-example/localhost.zone b/patches/source/bind/caching-example/localhost.zone
new file mode 100644
index 000000000..c47baf5f1
--- /dev/null
+++ b/patches/source/bind/caching-example/localhost.zone
@@ -0,0 +1,11 @@
+$TTL 86400
+$ORIGIN localhost.
+@ 1D IN SOA @ root (
+ 42 ; serial (d. adams)
+ 3H ; refresh
+ 15M ; retry
+ 1W ; expiry
+ 1D ) ; minimum
+
+ 1D IN NS @
+ 1D IN A 127.0.0.1
diff --git a/patches/source/bind/caching-example/named.conf b/patches/source/bind/caching-example/named.conf
new file mode 100644
index 000000000..a8ee2795f
--- /dev/null
+++ b/patches/source/bind/caching-example/named.conf
@@ -0,0 +1,31 @@
+options {
+ directory "/var/named";
+ /*
+ * If there is a firewall between you and nameservers you want
+ * to talk to, you might need to uncomment the query-source
+ * directive below. Previous versions of BIND always asked
+ * questions using port 53, but BIND 8.1 uses an unprivileged
+ * port by default.
+ */
+ // query-source address * port 53;
+};
+
+//
+// a caching only nameserver config
+//
+zone "." IN {
+ type hint;
+ file "caching-example/named.root";
+};
+
+zone "localhost" IN {
+ type master;
+ file "caching-example/localhost.zone";
+ allow-update { none; };
+};
+
+zone "0.0.127.in-addr.arpa" IN {
+ type master;
+ file "caching-example/named.local";
+ allow-update { none; };
+};
diff --git a/patches/source/bind/caching-example/named.local b/patches/source/bind/caching-example/named.local
new file mode 100644
index 000000000..8f40bcf36
--- /dev/null
+++ b/patches/source/bind/caching-example/named.local
@@ -0,0 +1,10 @@
+$TTL 86400
+@ IN SOA localhost. root.localhost. (
+ 2011032500 ; Serial
+ 28800 ; Refresh
+ 14400 ; Retry
+ 3600000 ; Expire
+ 86400 ) ; Minimum
+ IN NS localhost.
+
+1 IN PTR localhost.
diff --git a/patches/source/bind/caching-example/named.root b/patches/source/bind/caching-example/named.root
new file mode 100644
index 000000000..dba9ed9ea
--- /dev/null
+++ b/patches/source/bind/caching-example/named.root
@@ -0,0 +1,92 @@
+; This file holds the information on root name servers needed to
+; initialize cache of Internet domain name servers
+; (e.g. reference this file in the "cache . <file>"
+; configuration file of BIND domain name servers).
+;
+; This file is made available by InterNIC
+; under anonymous FTP as
+; file /domain/named.cache
+; on server FTP.INTERNIC.NET
+; -OR- RS.INTERNIC.NET
+;
+; last update: July 30, 2019
+; related version of root zone: 2019073000
+;
+; FORMERLY NS.INTERNIC.NET
+;
+. 3600000 NS A.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
+A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30
+;
+; FORMERLY NS1.ISI.EDU
+;
+. 3600000 NS B.ROOT-SERVERS.NET.
+B.ROOT-SERVERS.NET. 3600000 A 199.9.14.201
+B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:200::b
+;
+; FORMERLY C.PSI.NET
+;
+. 3600000 NS C.ROOT-SERVERS.NET.
+C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
+C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::c
+;
+; FORMERLY TERP.UMD.EDU
+;
+. 3600000 NS D.ROOT-SERVERS.NET.
+D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13
+D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2d::d
+;
+; FORMERLY NS.NASA.GOV
+;
+. 3600000 NS E.ROOT-SERVERS.NET.
+E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
+E.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:a8::e
+;
+; FORMERLY NS.ISC.ORG
+;
+. 3600000 NS F.ROOT-SERVERS.NET.
+F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
+F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
+;
+; FORMERLY NS.NIC.DDN.MIL
+;
+. 3600000 NS G.ROOT-SERVERS.NET.
+G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
+G.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:12::d0d
+;
+; FORMERLY AOS.ARL.ARMY.MIL
+;
+. 3600000 NS H.ROOT-SERVERS.NET.
+H.ROOT-SERVERS.NET. 3600000 A 198.97.190.53
+H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::53
+;
+; FORMERLY NIC.NORDU.NET
+;
+. 3600000 NS I.ROOT-SERVERS.NET.
+I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
+I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fe::53
+;
+; OPERATED BY VERISIGN, INC.
+;
+. 3600000 NS J.ROOT-SERVERS.NET.
+J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
+J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:c27::2:30
+;
+; OPERATED BY RIPE NCC
+;
+. 3600000 NS K.ROOT-SERVERS.NET.
+K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
+K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
+;
+; OPERATED BY ICANN
+;
+. 3600000 NS L.ROOT-SERVERS.NET.
+L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
+L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:9f::42
+;
+; OPERATED BY WIDE
+;
+. 3600000 NS M.ROOT-SERVERS.NET.
+M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
+M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
+; End of file \ No newline at end of file
diff --git a/patches/source/bind/default.named b/patches/source/bind/default.named
new file mode 100644
index 000000000..50e18664b
--- /dev/null
+++ b/patches/source/bind/default.named
@@ -0,0 +1,12 @@
+# User to run named as:
+NAMED_USER=named
+
+# Group to use for chowning named related files and directories.
+# By default, named will also run as the primary group of $NAMED_USER,
+# which will usually be the same as what's listed below, but not
+# necessarily if something other than the default of "named" is used.
+NAMED_GROUP=named
+
+# Options to run named with. At least -u $NAMED_USER is required, but
+# additional options may be added if needed.
+NAMED_OPTIONS="-u $NAMED_USER"
diff --git a/patches/source/bind/doinst.sh b/patches/source/bind/doinst.sh
new file mode 100644
index 000000000..0e90be641
--- /dev/null
+++ b/patches/source/bind/doinst.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.bind.new:
+if [ -e etc/rc.d/rc.bind ]; then
+ cp -a etc/rc.d/rc.bind etc/rc.d/rc.bind.new.incoming
+ cat etc/rc.d/rc.bind.new > etc/rc.d/rc.bind.new.incoming
+ mv etc/rc.d/rc.bind.new.incoming etc/rc.d/rc.bind.new
+fi
+
+config etc/default/named.new
+config etc/named.conf.new
+config etc/rc.d/rc.bind.new
+
+# Add a /var/named if it doesn't exist:
+if [ ! -d var/named ]; then
+ mkdir -p var/named
+ chmod 755 var/named
+fi
+
+# Generate /etc/rndc.key if there's none there,
+# and there's also no /etc/rndc.conf (the other
+# way to set this up).
+if [ ! -r etc/rndc.key -a ! -r /etc/rndc.conf ]; then
+ chroot . /sbin/ldconfig
+ chroot . /usr/sbin/rndc-confgen -a 2> /dev/null
+ chroot . /bin/chown named:named /etc/rndc.key 2> /dev/null
+fi
diff --git a/patches/source/bind/rc.bind b/patches/source/bind/rc.bind
new file mode 100644
index 000000000..169db8126
--- /dev/null
+++ b/patches/source/bind/rc.bind
@@ -0,0 +1,136 @@
+#!/bin/sh
+# Start/stop/restart the BIND name server daemon (named).
+
+# Start BIND. By default this will run with user "named". If you'd like to
+# change this or other options, see: /etc/default/named
+
+# You might also consider running BIND in a "chroot jail",
+# a discussion of which may be found in
+# /usr/doc/Linux-HOWTOs/Chroot-BIND-HOWTO.
+
+# One last note: rndc has a lot of other nice features that it is not
+# within the scope of this start/stop/restart script to support.
+# For more details, see "man rndc" or just type "rndc" to see the options.
+
+# Load command defaults:
+if [ -f /etc/default/named ] ; then . /etc/default/named ; fi
+if [ -f /etc/default/rndc ] ; then . /etc/default/rndc ; fi
+
+# In case /etc/default/named was missing, provide fallbacks:
+if [ -z "$NAMED_USER" ]; then
+ NAMED_USER="named"
+fi
+if [ -z "$NAMED_GROUP" ]; then
+ NAMED_GROUP="named"
+fi
+if [ -z "$NAMED_OPTIONS" ]; then
+ NAMED_OPTIONS="-u $NAMED_USER"
+fi
+
+# Sanity check. If /usr/sbin/named is missing then it
+# doesn't make much sense to try to run this script:
+if [ ! -x /usr/sbin/named ]; then
+ echo "/etc/rc.d/rc.bind: no /usr/sbin/named found (or not executable); cannot start."
+ exit 1
+fi
+
+# Start BIND. As many times as you like. ;-)
+# Seriously, don't run "rc.bind start" if BIND is already
+# running or you'll get more than one copy running.
+bind_start() {
+ # Make sure /var/run/named exists:
+ mkdir -p /var/run/named
+ # Make sure that /var/run/named has correct ownership:
+ chown -R ${NAMED_USER}:${NAMED_GROUP} /var/run/named
+ # Make sure that /var/named has correct ownership:
+ chown -R ${NAMED_USER}:${NAMED_GROUP} /var/named
+ if [ -r /etc/rndc.key ]; then
+ # Make sure that /etc/rndc.key has correct ownership:
+ chown ${NAMED_USER}:${NAMED_GROUP} /etc/rndc.key
+ fi
+ # Start named:
+ if [ -x /usr/sbin/named ]; then
+ echo "Starting BIND: /usr/sbin/named $NAMED_OPTIONS"
+ /usr/sbin/named $NAMED_OPTIONS
+ sleep 1
+ fi
+ # Make sure that named started:
+ if ! ps axc | grep -q named ; then
+ echo "WARNING: named did not start."
+ echo "Attempting to start named again: /usr/sbin/named $NAMED_OPTIONS"
+ /usr/sbin/named $NAMED_OPTIONS
+ sleep 1
+ if ps axc | grep -q named ; then
+ echo "SUCCESS: named started."
+ else
+ echo "FAILED: Sorry, a second attempt to start named has also failed."
+ echo "There may be a configuration error that needs fixing. Good luck!"
+ fi
+ fi
+}
+
+# Stop all running copies of BIND (/usr/sbin/named):
+bind_stop() {
+ # If you've set up rndc, we can use this to make shutting down BIND faster.
+ # If you have /etc/rndc.conf, or you have /etc/rndc.key, or $RNDC_OPTIONS is
+ # not empty, we'll try it.
+ if [ -r /etc/rndc.conf -o -r /etc/rndc.key -o ! -z "$RNDC_OPTIONS" ]; then
+ if [ -z "$RNDC_OPTIONS" ]; then
+ echo "Stopping BIND: /usr/sbin/rndc stop"
+ else
+ echo "Stopping BIND: /usr/sbin/rndc $RNDC_OPTIONS stop"
+ fi
+ /usr/sbin/rndc $RNDC_OPTIONS stop
+ # Wait for up to $TIMEOUT seconds before moving on to try killall:
+ TIMEOUT=${TIMEOUT:-10}
+ while [ "$TIMEOUT" -gt "0" ]; do
+ # Exit the timeout loop if there are no named processes:
+ if ! ps axco command | grep -q -e "^named$"; then
+ break
+ fi
+ sleep 1
+ TIMEOUT=$(expr $TIMEOUT - 1)
+ done
+ fi
+ # Kill named processes if there are any running:
+ if ps axco command | grep -q -e "^named$"; then
+ echo "Stopping all named processes in this namespace: /bin/killall -SIGTERM --ns \$\$ named"
+ /bin/killall -SIGTERM --ns $$ named 2> /dev/null
+ fi
+}
+
+# Reload BIND:
+bind_reload() {
+ /usr/sbin/rndc $RNDC_OPTIONS reload
+}
+
+# Restart BIND:
+bind_restart() {
+ bind_stop
+ bind_start
+}
+
+# Get BIND status:
+bind_status() {
+ /usr/sbin/rndc $RNDC_OPTIONS status
+}
+
+case "$1" in
+'start')
+ bind_start
+ ;;
+'stop')
+ bind_stop
+ ;;
+'reload')
+ bind_reload
+ ;;
+'restart')
+ bind_restart
+ ;;
+'status')
+ bind_status
+ ;;
+*)
+ echo "usage $0 start|stop|reload|restart|status"
+esac
diff --git a/patches/source/bind/slack-desc b/patches/source/bind/slack-desc
new file mode 100644
index 000000000..b4fcc8250
--- /dev/null
+++ b/patches/source/bind/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+bind: bind (DNS server and utilities)
+bind:
+bind: The named daemon and support utilities such as dig, host, and
+bind: nslookup. Sample configuration files for running a simple caching
+bind: nameserver are included. Documentation for advanced name server
+bind: setup can be found in /usr/doc/bind-9.x.x/.
+bind:
+bind:
+bind:
+bind:
+bind:
diff --git a/patches/source/bluez/bluez-5.51-obexd_without_systemd-1.patch b/patches/source/bluez/bluez-5.51-obexd_without_systemd-1.patch
new file mode 100644
index 000000000..21c99acc4
--- /dev/null
+++ b/patches/source/bluez/bluez-5.51-obexd_without_systemd-1.patch
@@ -0,0 +1,59 @@
+Submitted By: Armin K. <krejzi at email dot com>
+Date: 2013-04-29
+Initial Package Version: 5.17
+Upstream Status: unknown
+Origin: Arch Linux (Giovanni Campagna)
+Description: Allow using obexd without systemd in the user session
+
+Not all sessions run systemd --user (actually, the majority
+doesn't), so the dbus daemon must be able to spawn obexd
+directly, and to do so it needs the full path of the daemon.
+---
+ Makefile.obexd | 4 ++--
+ obexd/src/org.bluez.obex.service | 4 ----
+ obexd/src/org.bluez.obex.service.in | 4 ++++
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+ delete mode 100644 obexd/src/org.bluez.obex.service
+ create mode 100644 obexd/src/org.bluez.obex.service.in
+
+--- ./Makefile.obexd.orig 2019-09-19 13:51:02.000000000 -0500
++++ ./Makefile.obexd 2019-09-20 14:10:10.647348607 -0500
+@@ -1,12 +1,12 @@
+ if SYSTEMD
+ systemduserunitdir = $(SYSTEMD_USERUNITDIR)
+ systemduserunit_DATA = obexd/src/obex.service
++endif
+
+ dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
+ dbussessionbus_DATA = obexd/src/org.bluez.obex.service
+-endif
+
+-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
+
+ if OBEX
+
+diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
+deleted file mode 100644
+index a538088..0000000
+--- a/obexd/src/org.bluez.obex.service
++++ /dev/null
+@@ -1,4 +0,0 @@
+-[D-BUS Service]
+-Name=org.bluez.obex
+-Exec=/bin/false
+-SystemdService=dbus-org.bluez.obex.service
+diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
+new file mode 100644
+index 0000000..9c815f2
+--- /dev/null
++++ b/obexd/src/org.bluez.obex.service.in
+@@ -0,0 +1,4 @@
++[D-BUS Service]
++Name=org.bluez.obex
++Exec=@libexecdir@/bluetooth/obexd
++SystemdService=dbus-org.bluez.obex.service
+--
+1.8.3.1
+
+
diff --git a/patches/source/bluez/bluez.SlackBuild b/patches/source/bluez/bluez.SlackBuild
new file mode 100755
index 000000000..69c9083a3
--- /dev/null
+++ b/patches/source/bluez/bluez.SlackBuild
@@ -0,0 +1,199 @@
+#!/bin/bash
+
+# Copyright 2009, 2010, 2011, 2012, 2013, 2016, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=bluez
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack15.0}
+
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/${PKGNAM}-${VERSION}.tar.?z || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \+ -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \+
+
+zcat $CWD/bluez-5.51-obexd_without_systemd-1.patch.gz | patch -p1 --verbose || exit 1
+
+sed -i -e 's|-lreadline|\0 -lncursesw|g' Makefile.{in,tools}
+
+autoreconf -vif
+
+# We're adding --enable-deprecated due to this commit:
+#
+# commit b1eb2c4cd057624312e0412f6c4be000f7fc3617
+#Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+#Date: Wed Jan 4 14:23:58 2017 +0200
+#
+# build: Hide deprecated tools under --enable-deprecated
+#
+# This marks the following tools as deprecated as they are not longer
+# maintained or have been replaced by other tools:
+#
+# hciattach hciconfig hcitool hcidump rfcomm sdptool ciptool gatttool
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="-L/usr/lib$LIBDIRSUFFIX" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --localstatedir=/var \
+ --docdir=/usr/doc/${PKGNAM}-${VERSION} \
+ --enable-library \
+ --disable-systemd \
+ --enable-deprecated \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+# Use reset=1 for the btusb module, which supposedly fixes reconnect problems:
+mkdir -p $PKG/lib/modprobe.d
+cp -a $CWD/btusb.conf $PKG/lib/modprobe.d
+chown root:root $PKG/lib/modprobe.d/btusb.conf
+chmod 644 $PKG/lib/modprobe.d/btusb.conf
+
+# Add bluetoothd to /usr/sbin
+mkdir -p $PKG/usr/sbin
+ln -s ../libexec/bluetooth/bluetoothd $PKG/usr/sbin
+
+# Move the dbus config file to the system directory
+mkdir -p $PKG/usr/share/dbus-1/system.d/
+mv $PKG/etc/dbus-1/system.d/* $PKG/usr/share/dbus-1/system.d/
+rmdir --parents $PKG/etc/dbus-1/system.d/
+
+# Fix substitution in /usr/share/dbus-1/services/org.bluez.obex.service:
+if [ -x $PKG/usr/libexec/bluetooth/obexd ]; then
+ sed -i "s|@libexecdir@|/usr/libexec|g" $PKG/usr/share/dbus-1/services/org.bluez.obex.service
+fi
+
+# Install the configuration files
+mkdir -p $PKG/etc/bluetooth $PKG/etc/default
+cat src/main.conf > $PKG/etc/bluetooth/main.conf.new
+cat profiles/input/input.conf > $PKG/etc/bluetooth/input.conf.new
+cat profiles/network/network.conf > $PKG/etc/bluetooth/network.conf.new
+cat $CWD/config/uart.conf > $PKG/etc/bluetooth/uart.conf.new
+cat $CWD/config/defaultconfig > $PKG/etc/default/bluetooth.new
+
+# Add an init script
+mkdir -p $PKG/etc/rc.d
+cat $CWD/config/rc.bluetooth > $PKG/etc/rc.d/rc.bluetooth.new
+
+# Let's go ahead and let that start by default, unless an existing init
+# script is not executable:
+chmod 755 $PKG/etc/rc.d/rc.bluetooth.new
+
+# If the deprecated utility gatttool was built, go ahead and install it:
+if [ -x attrib/gatttool ]; then
+ cp attrib/gatttool $PKG/usr/bin
+ chown root:root $PKG/usr/bin/gatttool
+ chmod 755 $PKG/usr/bin/gatttool
+fi
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL README* TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/bluez/bluez.url b/patches/source/bluez/bluez.url
new file mode 100644
index 000000000..34d9166e9
--- /dev/null
+++ b/patches/source/bluez/bluez.url
@@ -0,0 +1 @@
+http://www.kernel.org/pub/linux/bluetooth
diff --git a/patches/source/bluez/btusb.conf b/patches/source/bluez/btusb.conf
new file mode 100644
index 000000000..3072d7885
--- /dev/null
+++ b/patches/source/bluez/btusb.conf
@@ -0,0 +1,3 @@
+# use "reset=1" as default, since it should be safe for recent devices and
+# solves all kind of problems.
+options btusb reset=1
diff --git a/patches/source/bluez/config/defaultconfig b/patches/source/bluez/config/defaultconfig
new file mode 100644
index 000000000..52793c6c5
--- /dev/null
+++ b/patches/source/bluez/config/defaultconfig
@@ -0,0 +1,9 @@
+# /etc/default/bluetooth
+
+# A space delimited list of devices to start at boot time:
+ACTIVE_HCI_DEVICES_ON_BOOT="hci0"
+
+# A semicolon delimited list of SDP (Service Discovery Protocol)
+# operations for bluetooth devices. See the sdptool for more details.
+SDPTOOL_OPTIONS=""
+
diff --git a/patches/source/bluez/config/rc.bluetooth b/patches/source/bluez/config/rc.bluetooth
new file mode 100644
index 000000000..fb5b8d68e
--- /dev/null
+++ b/patches/source/bluez/config/rc.bluetooth
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+# /etc/rc.d/rc.bluetooth (based on BLFS script)
+
+# Populated from /etc/default/bluetooth:
+# ACTIVE_HCI_DEVICES_ON_BOOT and SDPTOOL_OPTIONS
+
+[ -r /etc/default/bluetooth ] && . /etc/default/bluetooth
+
+start_hci_dev() {
+ for dev in ${ACTIVE_HCI_DEVICES_ON_BOOT} ; do
+ hciconfig $dev up > /dev/null 2>&1
+ done
+}
+
+run_sdptool() {
+ # Declaring IFS local in this function, removes the need to save/restore it
+ local IFS option
+ test -x /usr/bin/sdptool || return 1
+ IFS=";"
+ for option in ${SDPTOOL_OPTIONS}; do
+ IFS=" "
+ /usr/bin/sdptool $option > /dev/null 2>&1
+ done
+}
+
+start_uarts() {
+ [ -r /etc/bluetooth/uart.conf ] || return
+ grep -v '^[[:space:]]*(#|$)' /etc/bluetooth/uart.conf | grep -v "^#" | sed -r '/^\s*$/d' | while read i; do
+ /usr/bin/hciattach $i > /dev/null 2>&1
+ done
+}
+
+stop_uarts() {
+ killall /usr/bin/hciattach > /dev/null 2>&1
+}
+
+start() {
+ if [ -d /sys/class/bluetooth ]; then
+ # Start as background process and assume OK
+ echo -n "Starting Bluetooth services: bluetoothd "
+ /usr/sbin/bluetoothd &
+ echo -n "hciconfig "
+ start_hci_dev
+ echo -n "sdptool "
+ run_sdptool
+ echo "hciattach"
+ start_uarts
+ fi
+}
+
+stop() {
+ stop_uarts
+ killall /usr/sbin/bluetoothd > /dev/null 2>&1
+}
+
+case "${1}" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ sleep 1
+ start
+ ;;
+ *)
+ echo "Usage: ${0} {start|stop|restart}"
+ exit 1
+ ;;
+esac
+
diff --git a/patches/source/bluez/config/uart.conf b/patches/source/bluez/config/uart.conf
new file mode 100644
index 000000000..b2e276f4e
--- /dev/null
+++ b/patches/source/bluez/config/uart.conf
@@ -0,0 +1,6 @@
+# /etc/bluetooth/uart.conf
+
+# Attach serial devices via UART HCI to BlueZ stack
+# Use one line per device
+# See the hciattach man page for options
+
diff --git a/patches/source/bluez/doinst.sh b/patches/source/bluez/doinst.sh
new file mode 100644
index 000000000..796630fd2
--- /dev/null
+++ b/patches/source/bluez/doinst.sh
@@ -0,0 +1,26 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.bluetooth.new:
+if [ -e etc/rc.d/rc.bluetooth ]; then
+ cp -a etc/rc.d/rc.bluetooth etc/rc.d/rc.bluetooth.new.incoming
+ cat etc/rc.d/rc.bluetooth.new > etc/rc.d/rc.bluetooth.new.incoming
+ mv etc/rc.d/rc.bluetooth.new.incoming etc/rc.d/rc.bluetooth.new
+fi
+
+config etc/rc.d/rc.bluetooth.new
+config etc/bluetooth/input.conf.new
+config etc/bluetooth/main.conf.new
+config etc/bluetooth/network.conf.new
+config etc/bluetooth/uart.conf.new
+config etc/default/bluetooth.new
+
diff --git a/patches/source/bluez/slack-desc b/patches/source/bluez/slack-desc
new file mode 100644
index 000000000..8b7d76ee3
--- /dev/null
+++ b/patches/source/bluez/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+bluez: bluez (Bluetooth libraries and utilities)
+bluez:
+bluez: Bluez is the Bluetooth stack for Linux, allowing Bluetooth adaptors
+bluez: and devices to be used with Linux. This package contains the Bluez
+bluez: libraries, utilities, and other support files.
+bluez:
+bluez: Homepage: http://www.bluez.org
+bluez:
+bluez:
+bluez:
+bluez:
diff --git a/patches/source/openssl/certwatch b/patches/source/openssl/certwatch
new file mode 100644
index 000000000..d52dc3dc4
--- /dev/null
+++ b/patches/source/openssl/certwatch
@@ -0,0 +1,130 @@
+#!/bin/sh
+#
+# Will check all certificates stored in $CERTDIR for their expiration date,
+# and will display (if optional "stdout" argument is given), or mail a warning
+# message to $MAILADDR (if script is executed without any parameter
+# - unattended mode suitable for cron execution) for each particular certificate
+# that is about to expire in time less to, or equal to $DAYS after this script
+# has been executed, or if it has already expired.
+# This stupid script (C) 2006,2007 Jan Rafaj
+
+########################## CONFIGURATION SECTION BEGIN #########################
+# Note: all settings are mandatory
+# Warning will be sent if a certificate expires in time <= days given here
+DAYS=7
+# E-mail address where to send warnings
+MAILADDR=root
+# Directory with certificates to check
+CERTDIR=/etc/ssl/certs
+# Directory where to keep state files if this script isnt executed with "stdout"
+STATEDIR=/var/run
+########################### CONFIGURATION SECTION END ##########################
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAY_IN_SECS=$((60*60*24))
+DATE_CURRENT=$(date '+%s')
+
+usage()
+{
+ echo "Usage: $0 [stdout]"
+ echo
+ echo "Detailed description and configuration is embedded within the script."
+ exit 0
+}
+
+message()
+{
+ cat << EOF
+ WARNING: certificate $certfile
+ is about to expire in time equal to or less than $DAYS days from now on,
+ or has already expired - it might be a good idea to obtain/create new one.
+
+EOF
+}
+
+message_mail()
+{
+ message
+ cat << EOF
+ NOTE: This message is being sent only once.
+
+ A lock-file
+ $STATEDIR/certwatch-mailwarning-sent-$certfilebase
+ has been created, which will prevent this script from mailing you again
+ upon its subsequent executions by crond. You dont need to care about it;
+ the file will be auto-deleted as soon as you'll prolong your certificate.
+EOF
+}
+
+unset stdout
+case $# in
+ 0) ;;
+ 1) if [ "$1" = "-h" -o "$1" == "--help" ]; then
+ usage
+ elif [ "$1" = "stdout" ]; then
+ stdout=1
+ else
+ usage
+ fi
+ ;;
+ *) usage ;;
+esac
+
+for dir in $STATEDIR $CERTDIR ; do
+ if [ ! -d $dir ]; then
+ echo "ERROR: directory $dir does not exist"
+ exit 1
+ fi
+done
+for binary in basename date find grep mail openssl touch ; do
+ if [ ! \( -x /usr/bin/$binary -o -x /bin/$binary \) ]; then
+ echo "ERROR: /usr/bin/$binary not found"
+ exit 1
+ fi
+done
+
+find $CERTDIR -type f -maxdepth 1 | while read certfile ; do
+ if [ "$certfile" != "/etc/ssl/certs/ca-certificates.crt" ]; then
+ certfilebase="$(basename "$certfile")"
+ inform=PEM
+ echo "$certfile" | grep -q -i '\.net$'
+ if [ $? -eq 0 ]; then
+ # This is based purely on filename extension, so may give false results.
+ # But lets assume noone uses NET format certs today, ok?
+ continue
+ fi
+ echo "$certfile" | grep -q -i '\.der$'
+ if [ $? -eq 0 -o "$(file "$certfile" | egrep '(ASCII|PEM)')" == "" ]; then
+ inform=DER
+ fi
+ # We wont use '-checkend' since it is not properly documented (as of
+ # OpenSSL 0.9.8e).
+ DATE_CERT_EXPIRES=$(openssl x509 -in "$certfile" -inform $inform -noout -enddate | sed 's/^notAfter=//')
+ DATE_CERT_EXPIRES=$(date -d"$DATE_CERT_EXPIRES" +%s)
+ if [ $(($DATE_CERT_EXPIRES - $DATE_CURRENT)) -le $(($DAYS * $DAY_IN_SECS)) ]
+ then
+ if [ $stdout ]; then
+ message
+ else
+ if [ ! -f $STATEDIR/certwatch-mailwarning-sent-"$certfilebase" ]; then
+ subject="$0: certificate $certfile expiration warning"
+ message_mail | mail -r "certwatch@$HOSTNAME" \
+ -s "$subject" \
+ $MAILADDR 2>/dev/null
+ # echo "Mail about expiring certificate $certfile sent to $MAILADDR."
+ # echo "If you need to send it again, please remove lock-file"
+ # echo "$STATEDIR/certwatch-mailwarning-sent-$certfilebase ."
+ # echo
+ fi
+ touch $STATEDIR/certwatch-mailwarning-sent-"$certfilebase"
+ fi
+ else
+ if [ ! $stdout ]; then
+ if [ -f $STATEDIR/certwatch-mailwarning-sent-"$certfilebase" ]; then
+ rm $STATEDIR/certwatch-mailwarning-sent-"$certfilebase"
+ fi
+ fi
+ fi
+ fi
+done
+
diff --git a/patches/source/openssl/doinst.sh-openssl b/patches/source/openssl/doinst.sh-openssl
new file mode 100644
index 000000000..8fcf3d1c1
--- /dev/null
+++ b/patches/source/openssl/doinst.sh-openssl
@@ -0,0 +1,26 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# If there is a known buggy certwatch script with no local
+# modifications, just replace it:
+if [ "$(md5sum etc/cron.daily/certwatch 2> /dev/null)" = "32556321806f1850d56cb2ef8384b7a1 etc/cron.daily/certwatch" ]; then
+ cat etc/cron.daily/certwatch.new > etc/cron.daily/certwatch
+ touch -r etc/cron.daily/certwatch.new etc/cron.daily/certwatch
+fi
+
+config etc/ssl/openssl.cnf.new
+config etc/cron.daily/certwatch.new
+
+# Rehash certificates if the package is upgraded on a running system:
+if [ -x /usr/bin/c_rehash ]; then
+ /usr/bin/c_rehash 1> /dev/null 2> /dev/null
+fi
diff --git a/patches/source/openssl/doinst.sh-openssl-solibs b/patches/source/openssl/doinst.sh-openssl-solibs
new file mode 100644
index 000000000..ed4fdfacb
--- /dev/null
+++ b/patches/source/openssl/doinst.sh-openssl-solibs
@@ -0,0 +1,12 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/ssl/openssl.cnf.new
diff --git a/patches/source/openssl/openssl.SlackBuild b/patches/source/openssl/openssl.SlackBuild
new file mode 100755
index 000000000..e10aad5ce
--- /dev/null
+++ b/patches/source/openssl/openssl.SlackBuild
@@ -0,0 +1,263 @@
+#!/bin/bash
+
+# Copyright 2000 BSDi, Inc. Concord, CA, USA
+# Copyright 2001, 2002 Slackware Linux, Inc. Concord, CA, USA
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+
+# Set initial variables:
+cd $(dirname $0) ; CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+PKGNAM=openssl
+VERSION=${VERSION:-$(echo openssl-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack15.0}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+PKG1=$TMP/package-openssl
+PKG2=$TMP/package-ossllibs
+NAME1=openssl-$VERSION-$ARCH-$BUILD
+NAME2=openssl-solibs-$VERSION-$ARCH-$BUILD
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "${NAME1}.txz"
+ echo "${NAME2}.txz"
+ exit 0
+fi
+
+# Parallel build doesn't link properly.
+#NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
+# So that ls has the right field counts for parsing...
+export LC_ALL=C
+
+cd $TMP
+rm -rf $PKG1 $PKG2 openssl-$VERSION
+
+tar xvf $CWD/openssl-$VERSION.tar.gz || exit 1
+cd openssl-$VERSION
+
+# Fix pod syntax errors which are fatal wih a newer perl:
+find . -name "*.pod" -exec sed -i "s/^\=item \([0-9]\)\(\ \|$\)/\=item C<\1>/g" {} \;
+
+## For openssl-1.1.x, don't try to change the soname.
+## Use .so.1, not .so.1.0.0:
+#sed -i "s/soname=\$\$SHLIB\$\$SHLIB_SOVER\$\$SHLIB_SUFFIX/soname=\$\$SHLIB.1/g" Makefile.shared
+
+if [ "$ARCH" = "i586" ]; then
+ # Build with -march=i586 -mtune=i686:
+ sed -i "/linux-elf/s/fomit-frame-pointer/fomit-frame-pointer -march=i586 -mtune=i686/g" Configure
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ # Build with -march=i686 -mtune=i686:
+ sed -i "/linux-elf/s/fomit-frame-pointer/fomit-frame-pointer -march=i686 -mtune=i686/g" Configure
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+fi
+
+# OpenSSL has a (nasty?) habit of bumping the internal version number with
+# every release. This wouldn't be so bad, but some applications are so
+# paranoid that they won't run against a different OpenSSL version than
+# what they were compiled against, whether or not the ABI has changed.
+#
+# So, we will use the OPENSSL_VERSION_NUMBER from openssl-1.1.1 unless ABI
+# breakage forces it to change. Yes, we're finally using this old trick. :)
+sed -i "s/#define OPENSSL_VERSION_NUMBER.*/\/* Use 0x1010100fL (1.1.1) below to avoid pointlessly breaking the ABI *\/\n#define OPENSSL_VERSION_NUMBER 0x1010100fL/g" include/openssl/opensslv.h || exit 1
+
+chown -R root:root .
+mkdir -p $PKG1/usr/doc/openssl-$VERSION
+cp -a ACKNOWLEDGEMENTS AUTHORS CHANGES* CONTRIBUTING FAQ INSTALL* \
+ LICENSE* NEWS NOTES* README* doc \
+ $PKG1/usr/doc/openssl-$VERSION
+find $PKG1/usr/doc/openssl-$VERSION -type d -exec chmod 755 {} \+
+find $PKG1/usr/doc/openssl-$VERSION -type f -exec chmod 644 {} \+
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG1/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 2000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+# These are the known patent issues with OpenSSL:
+# name # expires
+# MDC-2: 4,908,861 2007-03-13, not included.
+# IDEA: 5,214,703 2010-05-25, not included.
+#
+# Although all of the above are expired, it's still probably
+# not a good idea to include them as there are better
+# algorithms to use.
+
+./config \
+ --prefix=/usr \
+ --openssldir=/etc/ssl \
+ zlib \
+ enable-camellia \
+ enable-seed \
+ enable-rfc3779 \
+ enable-cms \
+ enable-md2 \
+ enable-rc5 \
+ enable-ssl3 \
+ enable-ssl3-method \
+ no-weak-ssl-ciphers \
+ no-mdc2 \
+ no-ec2m \
+ no-idea \
+ no-sse2 \
+ shared
+
+make $NUMJOBS depend || make depend || exit 1
+
+make $NUMJOBS || make || exit 1
+
+make install DESTDIR=$PKG1 || exit 1
+
+# No thanks on the static libraries:
+rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/*.a
+
+# No thanks on manpages duplicated as html:
+rm -rf $PKG1/usr/share/doc
+
+# Make the .so.? library symlinks:
+( cd $PKG1/usr/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.* )
+
+# Move libraries, as they might be needed by programs that bring a network
+# mounted /usr online:
+
+mkdir $PKG1/lib${LIBDIRSUFFIX}
+( cd $PKG1/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.?.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
+)
+
+# Add a cron script to warn root if a certificate is going to expire soon:
+mkdir -p $PKG1/etc/cron.daily
+zcat $CWD/certwatch.gz > $PKG1/etc/cron.daily/certwatch.new
+chmod 755 $PKG1/etc/cron.daily/certwatch.new
+
+# Make config file non-clobber:
+mv $PKG1/etc/ssl/openssl.cnf $PKG1/etc/ssl/openssl.cnf.new
+
+# Remove duplicate config file:
+rm -f $PKG1/etc/ssl/openssl.cnf.dist
+
+( cd $PKG1
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Relocate the manpages:
+mv $PKG1/usr/share/man $PKG1/usr
+rmdir $PKG1/usr/share
+
+# Fix manpage name collisions, and relink anything that linked to the old name:
+( cd $PKG1/usr/man/man1
+ mv passwd.1 ssl_passwd.1
+ for file in *.1 ; do
+ if [ -L $file ]; then
+ if [ "$(readlink $file)" = "passwd.1" ]; then
+ rm -f $file
+ ln -sf ssl_passwd.1 $file
+ fi
+ fi
+ done )
+
+# Compress and symlink the man pages:
+if [ -d $PKG1/usr/man ]; then
+ ( cd $PKG1/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# If there's an openssl1 directory, then build openssl-1.0 shared libraries for
+# compatibility with programs linked to those:
+if [ -d $CWD/openssl1 ]; then
+ ( cd $CWD/openssl1
+ ./openssl1.build || exit 1
+ ) || exit 1
+ # Don't put these in the openssl package... openssl-solibs is enough.
+ #mkdir -p $PKG1/lib${LIBDIRSUFFIX}
+ #cp -a $TMP/package-openssl1/usr/lib/lib*.so.?.?.? $PKG1/lib${LIBDIRSUFFIX}
+ #( cd $PKG1/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.?.?.? )
+ mkdir -p $PKG2/lib${LIBDIRSUFFIX}
+ cp -a $TMP/package-openssl1/usr/lib${LIBDIRSUFFIX}/lib*.so.?.?.? $PKG2/lib${LIBDIRSUFFIX}
+ ( cd $PKG2/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.?.?.? )
+fi
+
+cd $PKG1
+chmod 755 usr/lib${LIBDIRSUFFIX}/pkgconfig
+sed -i -e "s#lib\$#lib${LIBDIRSUFFIX}#" usr/lib${LIBDIRSUFFIX}/pkgconfig/*.pc
+mkdir -p install
+zcat $CWD/doinst.sh-openssl.gz > install/doinst.sh
+cat $CWD/slack-desc.openssl > install/slack-desc
+/sbin/makepkg -l y -c n $TMP/${NAME1}.txz
+
+# Make runtime package:
+mkdir -p $PKG2/lib${LIBDIRSUFFIX}
+( cd lib${LIBDIRSUFFIX} ; cp -a lib*.so.* $PKG2/lib${LIBDIRSUFFIX} )
+( cd $PKG2/lib${LIBDIRSUFFIX} ; ldconfig -l * )
+mkdir -p $PKG2/etc
+( cd $PKG2/etc ; cp -a $PKG1/etc/ssl . )
+mkdir -p $PKG2/usr/doc/openssl-$VERSION
+( cd $TMP/openssl-$VERSION
+ cp -a ACKNOWLEDGEMENTS AUTHORS CHANGES* CONTRIBUTING FAQ INSTALL* \
+ LICENSE* NEWS NOTES* README* $PKG2/usr/doc/openssl-$VERSION
+ # If there's a CHANGES file, installing at least part of the recent history
+ # is useful, but don't let it get totally out of control:
+ if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG2/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 2000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+ fi
+)
+
+find $PKG2/usr/doc/openssl-$VERSION -type d -exec chmod 755 {} \+
+find $PKG2/usr/doc/openssl-$VERSION -type f -exec chmod 644 {} \+
+cd $PKG2
+mkdir -p install
+zcat $CWD/doinst.sh-openssl-solibs.gz > install/doinst.sh
+cat $CWD/slack-desc.openssl-solibs > install/slack-desc
+/sbin/makepkg -l y -c n $TMP/${NAME2}.txz
diff --git a/patches/source/openssl/slack-desc.openssl b/patches/source/openssl/slack-desc.openssl
new file mode 100644
index 000000000..685abd95b
--- /dev/null
+++ b/patches/source/openssl/slack-desc.openssl
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+openssl: openssl (Secure Sockets Layer toolkit)
+openssl:
+openssl: The OpenSSL certificate management tool and the shared libraries that
+openssl: provide various encryption and decryption algorithms and protocols.
+openssl:
+openssl: This product includes software developed by the OpenSSL Project for
+openssl: use in the OpenSSL Toolkit (http://www.openssl.org). This product
+openssl: includes cryptographic software written by Eric Young
+openssl: (eay@cryptsoft.com). This product includes software written by Tim
+openssl: Hudson (tjh@cryptsoft.com).
+openssl:
diff --git a/patches/source/openssl/slack-desc.openssl-solibs b/patches/source/openssl/slack-desc.openssl-solibs
new file mode 100644
index 000000000..8b424e066
--- /dev/null
+++ b/patches/source/openssl/slack-desc.openssl-solibs
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+openssl-solibs: openssl-solibs (OpenSSL shared libraries)
+openssl-solibs:
+openssl-solibs: These shared libraries provide encryption routines required by
+openssl-solibs: programs such as openssh, bind, sendmail, and many others.
+openssl-solibs:
+openssl-solibs: This product includes software developed by the OpenSSL Project for
+openssl-solibs: use in the OpenSSL Toolkit (http://www.openssl.org). This product
+openssl-solibs: includes cryptographic software written by Eric Young
+openssl-solibs: (eay@cryptsoft.com). This product includes software written by Tim
+openssl-solibs: Hudson (tjh@cryptsoft.com).
+openssl-solibs:
diff --git a/patches/source/qt5/doinst.sh b/patches/source/qt5/doinst.sh
new file mode 100644
index 000000000..3e5691a05
--- /dev/null
+++ b/patches/source/qt5/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/patches/source/qt5/fetch_sources.sh b/patches/source/qt5/fetch_sources.sh
new file mode 100755
index 000000000..4859cf30a
--- /dev/null
+++ b/patches/source/qt5/fetch_sources.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+# Copyright 2021 Heinz Wiesinger, Amsterdam, The Netherlands
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+
+BRANCH="5.15.3"
+
+rm -f qt-everywhere-src-*.tar*
+
+git clone https://invent.kde.org/qt/qt/qt5.git
+
+cd qt5
+ git checkout kde/5.15
+ ./init-repository
+
+ # Sync qtwebengine version with the rest of qt5
+ sed -i -E "s/5.15.(.*)/5.15.3/" qtwebengine/.qmake.conf
+
+ for i in $(find . -type d -name "qt*" -maxdepth 1); do
+ cd $i
+ ../qtbase/bin/syncqt.pl -version $BRANCH
+ cd ..
+ done
+
+ # Not in the release tarball for 5.15.2
+ rm -rf qtqa qtrepotools qtsystems qtpim qtfeedback qtdocgallery qtcanvas3d
+ rm -rf qtdatavis3d/tools qtcharts/tools
+ rm -f init-repository README.git .commit-template
+
+ VERSION="${BRANCH}_$(git log --format="%ad_%h" --date=short | head -n 1 | tr -d -)"
+ LONGDATE="$(git log -1 --format=%cd --date=format:%c )"
+
+cd ..
+
+mv qt5 qt-everywhere-src-$VERSION
+
+tar --exclude-vcs -cf qt-everywhere-src-$VERSION.tar qt-everywhere-src-$VERSION
+tar -cf qt5-gitmodules.tar qt-everywhere-src-$VERSION/**/.gitmodules qt-everywhere-src-$VERSION/.gitmodules
+tar --concatenate --file=qt-everywhere-src-$VERSION.tar qt5-gitmodules.tar
+plzip -9 -v qt-everywhere-src-$VERSION.tar
+touch -d "$LONGDATE" qt-everywhere-src-$VERSION.tar.lz
+
+rm -rf qt-everywhere-src-$VERSION
+rm -f qt5-gitmodules.tar
diff --git a/patches/source/qt5/patches/qt5-qtbase-gcc11.patch b/patches/source/qt5/patches/qt5-qtbase-gcc11.patch
new file mode 100644
index 000000000..c9567128a
--- /dev/null
+++ b/patches/source/qt5/patches/qt5-qtbase-gcc11.patch
@@ -0,0 +1,171 @@
+diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
+index 06fd88da..dbff3239 100644
+--- a/src/corelib/codecs/qtextcodec.cpp
++++ b/src/corelib/codecs/qtextcodec.cpp
+@@ -38,6 +38,7 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
+ #include "qplatformdefs.h"
+
+ #include "qtextcodec.h"
+diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
+index 8561f908..8128d3cf 100644
+--- a/src/corelib/codecs/qutfcodec.cpp
++++ b/src/corelib/codecs/qutfcodec.cpp
+@@ -38,6 +38,8 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
++
+ #include "qutfcodec_p.h"
+ #include "qlist.h"
+ #include "qendian.h"
+diff --git a/src/corelib/global/qendian.cpp b/src/corelib/global/qendian.cpp
+index eb08b2f8..6b41b3dd 100644
+--- a/src/corelib/global/qendian.cpp
++++ b/src/corelib/global/qendian.cpp
+@@ -38,6 +38,7 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
+ #include "qendian.h"
+
+ #include "qalgorithms.h"
+diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp
+index c9733174..c62a1972 100644
+--- a/src/corelib/global/qfloat16.cpp
++++ b/src/corelib/global/qfloat16.cpp
+@@ -38,6 +38,7 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
+ #include "qfloat16.h"
+ #include "private/qsimd_p.h"
+ #include <cmath> // for fpclassify()'s return values
+diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp
+index 10672c1f..6d5fd63e 100644
+--- a/src/corelib/global/qrandom.cpp
++++ b/src/corelib/global/qrandom.cpp
+@@ -40,6 +40,7 @@
+ // for rand_s
+ #define _CRT_RAND_S
+
++#include <limits>
+ #include "qrandom.h"
+ #include "qrandom_p.h"
+ #include <qobjectdefs.h>
+diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp
+index 13eee353..9e7a7a41 100644
+--- a/src/corelib/plugin/qelfparser_p.cpp
++++ b/src/corelib/plugin/qelfparser_p.cpp
+@@ -37,6 +37,7 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
+ #include "qelfparser_p.h"
+
+ #if defined (Q_OF_ELF) && defined(Q_CC_GNU)
+diff --git a/src/corelib/plugin/qmachparser.cpp b/src/corelib/plugin/qmachparser.cpp
+index 11670caf..39f5596b 100644
+--- a/src/corelib/plugin/qmachparser.cpp
++++ b/src/corelib/plugin/qmachparser.cpp
+@@ -37,6 +37,8 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
++
+ #include "qmachparser_p.h"
+
+ #if defined(Q_OF_MACH_O)
+diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
+index 83873edf..5aafb4e5 100644
+--- a/src/corelib/plugin/quuid.cpp
++++ b/src/corelib/plugin/quuid.cpp
+@@ -38,6 +38,7 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
+ #include "quuid.h"
+
+ #include "qcryptographichash.h"
+diff --git a/src/corelib/serialization/qdatastream.cpp b/src/corelib/serialization/qdatastream.cpp
+index 5082a8cb..7eecfcca 100644
+--- a/src/corelib/serialization/qdatastream.cpp
++++ b/src/corelib/serialization/qdatastream.cpp
+@@ -40,6 +40,8 @@
+ #include "qdatastream.h"
+ #include "qdatastream_p.h"
+
++#include <limits>
++
+ #if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED)
+ #include "qbuffer.h"
+ #include "qfloat16.h"
+diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp
+index 9a72df58..6651ee98 100644
+--- a/src/corelib/text/qbytearray.cpp
++++ b/src/corelib/text/qbytearray.cpp
+@@ -39,6 +39,7 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
+ #include "qbytearray.h"
+ #include "qbytearraymatcher.h"
+ #include "private/qtools_p.h"
+diff --git a/src/corelib/text/qbytearraymatcher.cpp b/src/corelib/text/qbytearraymatcher.cpp
+index 72e09226..80511cb5 100644
+--- a/src/corelib/text/qbytearraymatcher.cpp
++++ b/src/corelib/text/qbytearraymatcher.cpp
+@@ -37,6 +37,7 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
+ #include "qbytearraymatcher.h"
+
+ #include <limits.h>
+diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp
+index ab3054d5..22efb3a0 100644
+--- a/src/corelib/tools/qbitarray.cpp
++++ b/src/corelib/tools/qbitarray.cpp
+@@ -38,6 +38,7 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
+ #include "qbitarray.h"
+ #include <qalgorithms.h>
+ #include <qdatastream.h>
+diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp
+index fa8d21e0..cd85956d 100644
+--- a/src/corelib/tools/qcryptographichash.cpp
++++ b/src/corelib/tools/qcryptographichash.cpp
+@@ -38,6 +38,7 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
+ #include <qcryptographichash.h>
+ #include <qiodevice.h>
+
+diff --git a/src/gui/text/qfontengine_qpf2.cpp b/src/gui/text/qfontengine_qpf2.cpp
+index e00f9d05..917ab5f9 100644
+--- a/src/gui/text/qfontengine_qpf2.cpp
++++ b/src/gui/text/qfontengine_qpf2.cpp
+@@ -37,6 +37,7 @@
+ **
+ ****************************************************************************/
+
++#include <limits>
+ #include "qfontengine_qpf2_p.h"
+
+ #include <QtCore/QFile>
diff --git a/patches/source/qt5/patches/qt5-qtwebengine-gcc11.patch b/patches/source/qt5/patches/qt5-qtwebengine-gcc11.patch
new file mode 100644
index 000000000..3b2606e6e
--- /dev/null
+++ b/patches/source/qt5/patches/qt5-qtwebengine-gcc11.patch
@@ -0,0 +1,20 @@
+-- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc
++++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc
+@@ -40,6 +40,7 @@
+ #include "absl/base/internal/hide_ptr.h"
+ #include "absl/base/internal/raw_logging.h"
+ #include "absl/base/internal/spinlock.h"
++#include <limits>
+
+ // Do not use STL. This module does not use standard memory allocation.
+
+--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h
++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h
+@@ -19,6 +19,7 @@
+
+ #include <stddef.h>
+ #include <stdint.h>
++#include <limits>
+
+ #include <unordered_map>
+ #include <vector>
diff --git a/patches/source/qt5/patches/qt5-qtwebsockets-gcc11.patch b/patches/source/qt5/patches/qt5-qtwebsockets-gcc11.patch
new file mode 100644
index 000000000..5b33d7b30
--- /dev/null
+++ b/patches/source/qt5/patches/qt5-qtwebsockets-gcc11.patch
@@ -0,0 +1,12 @@
+diff --git a/src/websockets/qwebsocketprotocol.cpp b/src/websockets/qwebsocketprotocol.cpp
+index df87a93..9556d18 100644
+--- a/src/websockets/qwebsocketprotocol.cpp
++++ b/src/websockets/qwebsocketprotocol.cpp
+@@ -38,6 +38,7 @@
+ ****************************************************************************/
+
+ #include "qwebsocketprotocol_p.h"
++#include <limits>
+ #include <QtCore/QString>
+ #include <QtCore/QSet>
+ #include <QtCore/QtEndian>
diff --git a/patches/source/qt5/patches/qt5.mysql.h.diff b/patches/source/qt5/patches/qt5.mysql.h.diff
new file mode 100644
index 000000000..f1cf11b91
--- /dev/null
+++ b/patches/source/qt5/patches/qt5.mysql.h.diff
@@ -0,0 +1,11 @@
+--- qt-everywhere-opensource-src-5.9.0/qtbase/src/plugins/sqldrivers/mysql/qsql_mysql_p.h.orig 2017-05-26 14:43:31.000000000 +0200
++++ qt-everywhere-opensource-src-5.9.0/qtbase/src/plugins/sqldrivers/mysql/qsql_mysql_p.h 2017-06-17 22:11:34.211899826 +0200
+@@ -57,7 +57,7 @@
+ #include <QtCore/qt_windows.h>
+ #endif
+
+-#include <mysql.h>
++#include <mysql/mysql.h>
+
+ #ifdef QT_PLUGIN
+ #define Q_EXPORT_SQLDRIVER_MYSQL
diff --git a/patches/source/qt5/patches/qt5.qtbase_cmake_isystem_includes.patch b/patches/source/qt5/patches/qt5.qtbase_cmake_isystem_includes.patch
new file mode 100644
index 000000000..ff00e63be
--- /dev/null
+++ b/patches/source/qt5/patches/qt5.qtbase_cmake_isystem_includes.patch
@@ -0,0 +1,14 @@
+diff -up qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in
+--- qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo 2019-04-30 15:18:24.886346423 -0500
++++ qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in 2019-04-30 15:19:48.303873296 -0500
+@@ -66,8 +66,10 @@ unset(_GL_INCDIRS)
+ # Don\'t check for existence of the "_qt5gui_OPENGL_INCLUDE_DIR" because it is
+ # optional.
+
++if (NOT ${_qt5gui_OPENGL_INCLUDE_DIR} STREQUAL "/usr/include")
+ list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR})
+ set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR})
++endif()
+
+ unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE)
+
diff --git a/patches/source/qt5/profile.d/qt5.csh b/patches/source/qt5/profile.d/qt5.csh
new file mode 100644
index 000000000..0c3f10d42
--- /dev/null
+++ b/patches/source/qt5/profile.d/qt5.csh
@@ -0,0 +1,27 @@
+#!/bin/csh
+# Environment path variables for the Qt package:
+if ( ! $?QT5DIR ) then
+ # It's best to use the generic directory to avoid
+ # compiling in a version-containing path:
+ if ( -d /usr/lib@LIBDIRSUFFIX@/qt5 ) then
+ setenv QT5DIR /usr/lib@LIBDIRSUFFIX@/qt5
+ else
+ # Find the newest Qt directory and set $QT5DIR to that:
+ foreach qtd ( /usr/lib@LIBDIRSUFFIX@/qt5-* )
+ if ( -d $qtd ) then
+ setenv QT5DIR $qtd
+ endif
+ end
+ endif
+endif
+set path = ( $path $QT5DIR/bin )
+# Unfortunately Chromium and derived projects (including QtWebEngine) seem
+# to be suffering some bitrot when it comes to 32-bit support, so we are
+# forced to disable the seccomp filter sandbox on 32-bit or else all of these
+# applications crash. If anyone has a patch that gets these things running on
+# 32-bit without this workaround, please let volkerdi or alienBOB know, or
+# post your solution on LQ. Thanks. :-)
+file /bin/cat | grep -wq 32-bit
+if ( "$?" == "0" ) then
+ setenv QTWEBENGINE_CHROMIUM_FLAGS="--disable-seccomp-filter-sandbox"
+endif
diff --git a/patches/source/qt5/profile.d/qt5.sh b/patches/source/qt5/profile.d/qt5.sh
new file mode 100644
index 000000000..c7495e374
--- /dev/null
+++ b/patches/source/qt5/profile.d/qt5.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Environment variables for the Qt package.
+#
+# It's best to use the generic directory to avoid
+# compiling in a version-containing path:
+if [ -d /usr/lib@LIBDIRSUFFIX@/qt5 ]; then
+ QT5DIR=/usr/lib@LIBDIRSUFFIX@/qt5
+else
+ # Find the newest Qt directory and set $QT5DIR to that:
+ for qtd in /usr/lib@LIBDIRSUFFIX@/qt5-* ; do
+ if [ -d $qtd ]; then
+ QT5DIR=$qtd
+ fi
+ done
+fi
+PATH="$PATH:$QT5DIR/bin"
+export QT5DIR
+# Unfortunately Chromium and derived projects (including QtWebEngine) seem
+# to be suffering some bitrot when it comes to 32-bit support, so we are
+# forced to disable the seccomp filter sandbox on 32-bit or else all of these
+# applications crash. If anyone has a patch that gets these things running on
+# 32-bit without this workaround, please let volkerdi or alienBOB know, or
+# post your solution on LQ. Thanks. :-)
+if file /bin/cat | grep -wq 32-bit ; then
+ export QTWEBENGINE_CHROMIUM_FLAGS="--disable-seccomp-filter-sandbox"
+fi
diff --git a/patches/source/qt5/qt5.SlackBuild b/patches/source/qt5/qt5.SlackBuild
new file mode 100755
index 000000000..b6ebaba27
--- /dev/null
+++ b/patches/source/qt5/qt5.SlackBuild
@@ -0,0 +1,357 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+
+# Merged some ideas from Alex Sarmardzic's script for qt4 at SlackBuilds.org
+# ^^ Modified by Robby Workman <rworkman@slackware.com> for QT4 & KDE4
+#
+# Modifications 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Eric Hameleers, Eindhoven, NL
+# Modifications for qt 5.2.0 2013 by Michael James, AU
+# Modifications for qt 5.x by Eric Hameleers, Eindhoven, NL
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=qt5
+VERSION=$(ls qt-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+BUILD=${BUILD:-1_slack15.0}
+PKGSRC=$(echo $VERSION | cut -d - -f 1)
+PKGVER=$(echo $VERSION | tr - _)
+
+USE_CODECS=${USE_CODECS:-YES}
+SYSTEM_FFMPEG=${SYSTEM_FFMPEG:-YES}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-${PKGVER}-${ARCH}-${BUILD}.txz"
+ exit 0
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS=""
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ # To prevent "qatomic_armv6.h error: output number 2 not directly addressable"
+ # More permanent solution is to patch gcc:
+ # http://bazaar.launchpad.net/~linaro-toolchain-dev/gcc-linaro/4.6/revision/106731
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -fno-strict-volatile-bitfields"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+export NINJAJOBS="$NUMJOBS"
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf qt-everywhere-src-$VERSION
+echo "Extracting qt-everywhere-src-$VERSION"
+tar xf $CWD/qt-everywhere-src-$VERSION.tar.?z* || exit 1
+cd qt-everywhere-src-$PKGSRC || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \+ -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \+
+
+# Use -reduce-relocations only on i?86 and x86_64 architextures.
+# https://bugreports.qt-project.org/browse/QTBUG-36129
+if echo $ARCH | grep -q '\(i.86\|x86_64\)' 2>/dev/null; then
+ RELOCATIONS="-reduce-relocations"
+else
+ RELOCATIONS=""
+fi
+
+# Fix path to mysql header:
+zcat $CWD/patches/qt5.mysql.h.diff.gz | patch -p1 --verbose || exit 1
+
+# Fix build with gcc11:
+cd qtbase
+ zcat $CWD/patches/qt5-qtbase-gcc11.patch.gz | patch -p1 --verbose || exit 1
+cd - 1>/dev/null
+cd qtwebsockets
+ zcat $CWD/patches/qt5-qtwebsockets-gcc11.patch.gz | patch -p1 --verbose || exit 1
+cd - 1>/dev/null
+cd qtwebengine
+ zcat $CWD/patches/qt5-qtwebengine-gcc11.patch.gz | patch -p1 --verbose || exit 1
+cd - 1>/dev/null
+
+# CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui
+# and for it breaks KWin compilation with:
+# /usr/include/c++/9.1.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
+# See also https://bugzilla.redhat.com/1704474
+cd qtbase
+ zcat $CWD/patches/qt5.qtbase_cmake_isystem_includes.patch.gz | patch -p1 --verbose || exit 1
+cd - 1>/dev/null
+
+# If PulseAudio is not found, use the _alsa $TAG and disable it in the build:
+if ! pkg-config --exists libpulse 2>/dev/null ; then
+ PULSEAUDIO_OPTION="-no-pulseaudio -no-webengine-pulseaudio"
+ TAG="_alsa"
+else
+ unset PULSEAUDIO_OPTION
+ unset TAG
+fi
+
+# Use our custom compiler and linker flags:
+sed -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${SLKCFLAGS}|" \
+ -i qtbase/mkspecs/common/gcc-base.conf || exit 1
+sed -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${SLKLDFLAGS}|" \
+ -i qtbase/mkspecs/common/g++-unix.conf || exit 1
+
+if [ ! "$USE_CODECS" = "NO" ]; then
+ CODEC_OPTION="-proprietary-codecs -webengine-proprietary-codecs"
+else
+ unset CODEC_OPTION
+fi
+
+if [ "$SYSTEM_FFMPEG" = "YES" ]; then
+ FFMPEG_OPTION="-webengine-ffmpeg"
+else
+ unset FFMPEG_OPTION
+fi
+
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
+export QTDIR="${TMP}/qt-everywhere-src-${PKGSRC}"
+export LD_LIBRARY_PATH="${QTDIR}/qtbase/lib:${QTDIR}/qttools/lib:${LD_LIBRARY_PATH}"
+export QT_PLUGIN_PATH="${QTDIR}/qtbase/plugins"
+./configure -v \
+ -confirm-license \
+ -opensource \
+ -prefix /usr \
+ -libdir /usr/lib${LIBDIRSUFFIX} \
+ -bindir /usr/lib${LIBDIRSUFFIX}/qt5/bin \
+ -sysconfdir /etc/xdg \
+ -headerdir /usr/include/qt5 \
+ -datadir /usr/share/qt5 \
+ -archdatadir /usr/lib${LIBDIRSUFFIX}/qt5 \
+ -docdir /usr/doc/qt5-$PKGVER \
+ -examplesdir /usr/doc/qt5-$PKGVER/examples \
+ -system-libpng \
+ -system-libjpeg \
+ -system-sqlite \
+ -system-zlib \
+ -plugin-sql-mysql \
+ -plugin-sql-sqlite \
+ -accessibility \
+ -alsa \
+ -dbus \
+ -glib \
+ -icu \
+ -opengl \
+ -openssl-linked \
+ -optimized-qmake \
+ -qpa "xcb;wayland" \
+ -qt-harfbuzz \
+ -verbose \
+ -xcb \
+ -egl \
+ -eglfs \
+ -nomake examples \
+ -nomake tests \
+ -no-mimetype-database \
+ -no-separate-debug-info \
+ -no-strip \
+ -no-use-gold-linker \
+ ${CODEC_OPTION} \
+ ${FFMPEG_OPTION} \
+ ${PULSEAUDIO_OPTION} \
+ ${RELOCATIONS} \
+ -no-pch
+ # No-precompiled-headers is ccache-friendly.
+
+# Sometimes a failure happens when parallelizing make. Try again if make fails,
+# but make a failure the second time around (single threaded) a fatal error:
+#### DEBUG
+make $NUMJOBS || exit 1
+#make $NUMJOBS || make || exit 1
+make install INSTALL_ROOT=$PKG || exit 1
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Remove rpaths:
+for file in $(find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : 2> /dev/null) ; do
+ if [ ! "$(patchelf --print-rpath $file 2> /dev/null)" = "" ]; then
+ patchelf --remove-rpath $file
+ fi
+done
+
+# Don't ship .la files:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+# Fix internal linking for Qt5WebEngineCore.pc ,
+# thanks to Larry Hajali's SBo script:
+sed -i \
+ -e 's|-Wl,--start-group.* -Wl,--end-group||' \
+ -e "s|-L${PWD}/qtwebengine/src/core/api/Release||" \
+ $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/Qt5WebEngineCore.pc
+
+# Fix the path in prl files:
+find "$PKG/usr/lib${LIBDIRSUFFIX}" -type f -name '*.prl' \
+ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
+
+# Fix the qmake path in pri file:
+sed -i "s,${QTDIR}/qtbase,/usr/lib${LIBDIRSUFFIX}/qt5," \
+ $PKG/usr/lib${LIBDIRSUFFIX}/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri
+
+# Install symlinks to the Qt5 binaries in the $PATH:
+mkdir -p $PKG/usr/bin
+for FILE in $PKG/usr/lib${LIBDIRSUFFIX}/qt5/bin/* ; do
+ ln -s ../lib${LIBDIRSUFFIX}/qt5/bin/$(basename $FILE) $PKG/usr/bin/$(basename $FILE)-qt5
+done
+
+# Set the QT5DIR variable in the environment:
+mkdir -p $PKG/etc/profile.d
+sed -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" $CWD/profile.d/$PKGNAM.sh \
+ > $PKG/etc/profile.d/$PKGNAM.sh
+sed -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" $CWD/profile.d/$PKGNAM.csh \
+ > $PKG/etc/profile.d/$PKGNAM.csh
+chmod 0755 $PKG/etc/profile.d/*
+
+# Add menu entries for all those hidden but great Qt applications:
+# Qt5 logo:
+mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps
+convert qtdoc/doc/src/images/qt-logo.png -resize 48x48 $PKG/usr/share/icons/hicolor/48x48/apps/qt5-logo.png
+# Assistant icons
+install -p -m644 -D qttools/src/assistant/assistant/images/assistant.png $PKG/usr/share/icons/hicolor/32x32/apps/qt5-assistant.png
+install -p -m644 -D qttools/src/assistant/assistant/images/assistant-128.png $PKG/usr/share/icons/hicolor/128x128/apps/qt5-assistant.png
+# Designer icon
+install -p -m644 -D qttools/src/designer/src/designer/images/designer.png $PKG/usr/share/icons/hicolor/128x128/apps/qt5-designer.png
+# QDbusViewer icons
+install -p -m644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer.png $PKG/usr/share/icons/hicolor/32x32/apps/qt5-qdbusviewer.png
+install -p -m644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png $PKG/usr/share/icons/hicolor/128x128/apps/qt5-qdbusviewer.png
+# Linguist icons
+for icon in qttools/src/linguist/linguist/images/icons/linguist-*-32.png ; do
+ size=$(echo $(basename ${icon}) | cut -d- -f2)
+ install -p -m644 -D ${icon} $PKG/usr/share/icons/hicolor/${size}x${size}/apps/qt5-linguist.png
+done
+
+# And the .desktop files too:
+mkdir -p $PKG/usr/share/applications
+cat <<EOF > $PKG/usr/share/applications/qt5-designer.desktop
+[Desktop Entry]
+Name=Qt5 Designer
+GenericName=Interface Designer
+Comment=Design GUIs for Qt5 applications
+Exec=designer-qt5
+Icon=qt5-designer
+MimeType=application/x-designer;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
+EOF
+cat <<EOF > $PKG/usr/share/applications/qt5-assistant.desktop
+[Desktop Entry]
+Name=Qt5 Assistant
+Comment=Shows Qt5 documentation and examples
+Exec=assistant-qt5
+Icon=qt5-assistant
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;Documentation;
+EOF
+cat <<EOF > $PKG/usr/share/applications/qt5-linguist.desktop
+[Desktop Entry]
+Name=Qt5 Linguist
+Comment=Add translations to Qt5 applications
+Exec=linguist-qt5
+Icon=qt5-linguist
+MimeType=text/vnd.trolltech.linguist;application/x-linguist;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
+EOF
+cat <<EOF > $PKG/usr/share/applications/qt5-qdbusviewer.desktop
+[Desktop Entry]
+Name=Qt5 QDbusViewer
+GenericName=Qt5 D-Bus Debugger
+Comment=Debug D-Bus applications
+Exec=qdbusviewer-qt5
+Icon=qt5-qdbusviewer
+Terminal=false
+Type=Application
+Categories=Qt;Development;Debugger;
+EOF
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/$PKGNAM-$PKGVER
+cp -a \
+ README qtbase/{header*,LGPL_EXCEPTION.txt,LICENSE*} \
+ $PKG/usr/doc/$PKGNAM-$PKGVER
+if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/qt5/doc/html ]; then
+ ( cd $PKG/usr/doc/$PKGNAM-$PKGVER
+ ln -sf /usr/lib${LIBDIRSUFFIX}/qt5/doc/html .
+ )
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$PKGVER-$ARCH-${BUILD}${TAG}.txz
diff --git a/patches/source/qt5/slack-desc b/patches/source/qt5/slack-desc
new file mode 100644
index 000000000..9dbcba20c
--- /dev/null
+++ b/patches/source/qt5/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+qt5: qt5 (a C++ graphical user interface toolkit)
+qt5:
+qt5: Qt is a complete and well-developed object-oriented framework for
+qt5: developing graphical user interface (GUI) applications using C++.
+qt5:
+qt5: Homepage: http://www.qt.io/
+qt5:
+qt5:
+qt5:
+qt5:
+qt5: