diff -ur slackware64-current.2/source/a/aaa_base/aaa_base.SlackBuild slackware64-current.3/source/a/aaa_base/aaa_base.SlackBuild
--- slackware64-current.2/source/a/aaa_base/aaa_base.SlackBuild	2021-07-17 19:46:57.879947846 +0200
+++ slackware64-current.3/source/a/aaa_base/aaa_base.SlackBuild	2021-09-18 13:42:52.406871391 +0200
@@ -79,9 +79,14 @@
   echo "VERSION_CODENAME=stable" >> $PKG/etc/os-release
 fi
 
-# Add lib64 directories on x86_64:
-if [ "$ARCH" = "x86_64" ]; then
-  mkdir -p $PKG/lib64 $PKG/usr/lib64 $PKG/usr/local/lib64
+# Add lib64 directories on x86_64 and aarch64:
+if [ "$ARCH" = "x86_64" -o "$ARCH" = "aarch64" ]; then
+  LIBDIRSUFFIX="64"
+else
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+fi
+if [ "$LIBDIRSUFFIX" != "" ]; then
+  mkdir -p $PKG/lib$LIBDIRSUFFIX $PKG/usr/lib$LIBDIRSUFFIX $PKG/usr/local/lib$LIBDIRSUFFIX
 fi
 
 # Build the package:
diff -ur slackware64-current.2/source/a/cpufrequtils/cpufrequtils.SlackBuild slackware64-current.3/source/a/cpufrequtils/cpufrequtils.SlackBuild
--- slackware64-current.2/source/a/cpufrequtils/cpufrequtils.SlackBuild	2021-02-13 06:31:50.074945733 +0100
+++ slackware64-current.3/source/a/cpufrequtils/cpufrequtils.SlackBuild	2021-09-18 13:42:52.486875429 +0200
@@ -76,6 +76,8 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+zcat $CWD/0001-Only-x86-has-cpuid-instruction.patch.gz | patch -p1
+
 # Build and install:
 make libdir=/usr/lib${LIBDIRSUFFIX} || exit 1
 make install libdir=/usr/lib${LIBDIRSUFFIX} DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/a/efivar/efivar.SlackBuild slackware64-current.3/source/a/efivar/efivar.SlackBuild
--- slackware64-current.2/source/a/efivar/efivar.SlackBuild	2021-03-13 20:11:05.646092497 +0100
+++ slackware64-current.3/source/a/efivar/efivar.SlackBuild	2021-09-18 13:42:52.646883505 +0200
@@ -78,6 +78,9 @@
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
 cd $PKGNAM-$VERSION || exit 1
 
+# Patch native march
+zcat $CWD/host_march.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/a/elogind/elogind.SlackBuild slackware64-current.3/source/a/elogind/elogind.SlackBuild
--- slackware64-current.2/source/a/elogind/elogind.SlackBuild	2021-09-15 21:42:41.116049529 +0200
+++ slackware64-current.3/source/a/elogind/elogind.SlackBuild	2021-09-18 13:42:52.716887039 +0200
@@ -79,6 +79,9 @@
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
 cd $PKGNAM-$VERSION || exit 1
 
+# Add new architectures (OpenRISC, LoongARCH, etc.)
+zcat $CWD/openrisc-loongarch.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/a/etc/etc.SlackBuild slackware64-current.3/source/a/etc/etc.SlackBuild
--- slackware64-current.2/source/a/etc/etc.SlackBuild	2021-09-15 21:42:41.116049529 +0200
+++ slackware64-current.3/source/a/etc/etc.SlackBuild	2021-09-18 13:42:52.716887039 +0200
@@ -55,8 +55,14 @@
 # Fix for ARCH:
 sed -i -e "s#/i586-slackware-linux#/${ARCH}-slackware-linux#" etc/ld.so.conf.new
 # Fix paths if lib64 is needed:
-if [ "$ARCH" = "x86_64" ]; then
-  sed -i -e "s#/lib#/lib64#" etc/ld.so.conf.new
+if [ "$ARCH" = "x86_64" -o "$ARCH" = "aarch64" ]; then
+  LIBDIRSUFFIX="64"
+else
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+fi
+
+if [ "$LIBDIRSUFFIX" != "" ]; then
+  sed -i -e "s#/lib#/lib${LIBDIRSUFFIX}#" etc/ld.so.conf.new
 fi
 zcat $CWD/nsswitch.conf.gz > $PKG/etc/nsswitch.conf.new
 
diff -ur slackware64-current.2/source/a/grub/grub.SlackBuild slackware64-current.3/source/a/grub/grub.SlackBuild
--- slackware64-current.2/source/a/grub/grub.SlackBuild	2021-09-15 21:42:41.116049529 +0200
+++ slackware64-current.3/source/a/grub/grub.SlackBuild	2021-09-18 13:42:52.716887039 +0200
@@ -91,11 +91,23 @@
 rm -rf $PKG
 mkdir -p $TMP $PKG
 
+if [ "$ARCH" = "mips64el" ]
+then
+  # Preinstall unifont, needed for loongson
+  mkdir /usr/share/fonts/unifont
+  mkdir -p $PKG/usr/share/fonts/unifont
+  cp -p $CWD/unifont-*.pcf.gz /usr/share/fonts/unifont/unifont.pcf.gz
+  cp -p $CWD/unifont-*.pcf.gz $PKG/usr/share/fonts/unifont/unifont.pcf.gz
+fi
+
 cd $TMP
 rm -rf $PKGNAM-$VERSION
 tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
 cd $PKGNAM-$VERSION || exit 1
 
+# Fix missing non-mandatory fence.i instruction in riscv64:
+zcat $CWD/riscv64_fence.i_not_implemented.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/a/haveged/haveged.SlackBuild slackware64-current.3/source/a/haveged/haveged.SlackBuild
--- slackware64-current.2/source/a/haveged/haveged.SlackBuild	2021-10-02 08:48:59.022671049 -0000
+++ slackware64-current.3/source/a/haveged/haveged.SlackBuild	2023-06-16 16:57:35.763314459 -0000
@@ -68,6 +68,10 @@
 rm -rf $PKGNAM-$VERSION
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
 cd $PKGNAM-$VERSION || exit 1
+
+# Disable v9 assembler code for sparc 32-bit:
+zcat $CWD/disable_sparcv9_asm.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find -L . \
  \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
diff -ur slackware64-current.2/source/a/lrzip/lrzip.SlackBuild slackware64-current.3/source/a/lrzip/lrzip.SlackBuild
--- slackware64-current.2/source/a/lrzip/lrzip.SlackBuild	2021-02-17 20:23:56.793004089 +0100
+++ slackware64-current.3/source/a/lrzip/lrzip.SlackBuild	2021-09-18 13:42:52.876895115 +0200
@@ -46,13 +46,17 @@
 
 NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
 
+ASM="--enable-asm=no" # Disable assembly code by default
+
 if [ "$ARCH" = "i586" ]; then
+  ASM="" # Enable assembly for x86
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
 elif [ "$ARCH" = "s390" ]; then
   SLKCFLAGS="-O2"
   LIBDIRSUFFIX=""
 elif [ "$ARCH" = "x86_64" ]; then
+  ASM="" # Enable assembly for x86
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
 else
@@ -85,6 +89,7 @@
   --mandir=/usr/man \
   --docdir=/usr/doc/$PKGNAM-$VERSION \
   --disable-static \
+  $ASM \
   --build=$ARCH-slackware-linux || exit 1
 
 make $NUMJOBS || make || exit 1
diff -ur slackware64-current.2/source/a/pkgtools/pkgtools.SlackBuild slackware64-current.3/source/a/pkgtools/pkgtools.SlackBuild
--- slackware64-current.2/source/a/pkgtools/pkgtools.SlackBuild.orig	2021-05-21 18:31:34.831004514 +0200
+++ slackware64-current.3/source/a/pkgtools/pkgtools.SlackBuild	2021-10-09 16:30:38.613381584 +0200
@@ -20,6 +20,7 @@
 #  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 # Set initial variables:
+PARCH="noarch"
 cd $(dirname $0) ; CWD=$(pwd)
 if [ "$TMP" = "" ]; then
   TMP=/tmp
@@ -29,7 +29,7 @@
 # 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"
+  echo "$PKGNAM-$VERSION-$PARCH-$BUILD.txz"
   exit 0
 fi
 
@@ -89,6 +89,21 @@
   chmod 755 $PKG/var/lib/pkgtools/setup/setup.*
   # Add a link for makebootstick:
   ( cd $PKG/sbin ; ln -sf ../var/lib/pkgtools/setup/setup.80.make-bootdisk makebootstick )
+  # Make customized default configuration for xz in makepkg:
+  ( cd $PKG/sbin
+    if [ `readelf -h /usr/bin/readelf|grep -c 80386` -gt 0 ] ; then
+      # x86 do not set ARCH environment, force it
+      ARCH="i586"
+    fi
+    if [ "x$ARCH" != "x" ] ; then
+      # Single-thread consume less memory and compress better:
+      zcat $CWD/single_thread.diff.gz | patch -p0 --verbose || exit 1
+    fi
+    if [ "$ARCH" = "arm" -o "$ARCH" = "ppc" -o "$ARCH" = "mips" -o "$ARCH" = "mipsel" -o "$ARCH" = "or1k" -o "$ARCH" = "hppa" -o "$ARCH" = "sh4" -o "ARCH" = "sparc" -o "$ARCH" = "i586" ] ; then
+      # For small-systems, force the compression to -4 (5MB memory for decompression):
+      zcat $CWD/low_memory.diff.gz | patch -p0 --verbose || exit 1
+    fi
+  )
 )
 
 # Create the base directories (not really necessary, but doesn't hurt):
@@ -101,7 +112,7 @@
 
 # Build the package:
 cd $PKG
-makepkg -l y -c n $TMP/pkgtools-$VERSION-$ARCH-$BUILD.txz
+makepkg -l y -c n $TMP/pkgtools-$VERSION-$PARCH-$BUILD.txz
 
 echo
 echo "HEY -- did you remember to update the version numbers in the setup scripts?"
diff -ur slackware64-current.2/source/a/userspace-rcu/userspace-rcu.SlackBuild slackware64-current.3/source/a/userspace-rcu/userspace-rcu.SlackBuild
--- slackware64-current.2/source/a/userspace-rcu/userspace-rcu.SlackBuild.orig	2023-06-14 13:40:53.759525094 +0200
+++ slackware64-current.3/source/a/userspace-rcu/userspace-rcu.SlackBuild	2023-06-14 21:33:32.256133108 +0200
@@ -78,6 +78,9 @@
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
 cd $PKGNAM-$VERSION || exit 1
 
+# Add generic-gcc implementation for atomic operations on unknown architectures:
+zcat $CWD/unknown_architecture_gcc_generic.diff.gz | patch --verbose -p1 || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/ap/bc/bc.SlackBuild slackware64-current.3/source/ap/bc/bc.SlackBuild
--- slackware64-current.2/source/ap/bc/bc.SlackBuild	2021-02-13 06:31:52.671945590 +0100
+++ slackware64-current.3/source/ap/bc/bc.SlackBuild	2021-09-18 13:42:53.026902686 +0200
@@ -65,6 +65,10 @@
 tar xvf $CWD/${PKGNAM}-$VERSION.tar.xz || exit 1
 cd ${PKGNAM}-$VERSION || exit 1
 
+# On loongarch64 running fix-libmath_h from make raise an error:
+# introducing explict bash call
+sed -i 's/^ed/#!\/bin\/bash\ned/' bc/fix-libmath_h
+
 # Make sure ownerships and permissions are sane:
 chown -R root:root .
 find . \
diff -ur slackware64-current.2/source/ap/cdparanoia/cdparanoia.SlackBuild slackware64-current.3/source/ap/cdparanoia/cdparanoia.SlackBuild
--- slackware64-current.2/source/ap/cdparanoia/cdparanoia.SlackBuild	2021-02-13 06:31:52.671945590 +0100
+++ slackware64-current.3/source/ap/cdparanoia/cdparanoia.SlackBuild	2021-09-18 13:42:53.026902686 +0200
@@ -72,6 +72,10 @@
 # Patch for changes in cdda headers:
 zcat $CWD/cdparanoia-III-10.2_cdda_private.patch.gz | patch -p3 --verbose --backup --suffix=.orig || exit 1
 
+# Add AArch64 architecture (and new architectures):
+\cp /usr/share/libtool/build-aux/config.sub configure.sub
+\cp /usr/share/libtool/build-aux/config.guess configure.guess
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/ap/cdrtools/cdrtools.SlackBuild slackware64-current.3/source/ap/cdrtools/cdrtools.SlackBuild
--- slackware64-current.2/source/ap/cdrtools/cdrtools.SlackBuild	2021-02-13 06:31:52.716945587 +0100
+++ slackware64-current.3/source/ap/cdrtools/cdrtools.SlackBuild	2021-09-18 13:42:53.056904200 +0200
@@ -59,6 +59,10 @@
 rm -rf cdrtools-$(echo $VERSION | cut -f 1 -d a)
 tar xvf $CWD/cdrtools-$VERSION.tar.?z || exit 1
 cd cdrtools-$(echo $VERSION | cut -f 1 -d a) || exit 1
+
+# Add symlinks for riscv64:
+zcat $CWD/riscv64-support.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/ap/dmapi/dmapi.SlackBuild slackware64-current.3/source/ap/dmapi/dmapi.SlackBuild
--- slackware64-current.2/source/ap/dmapi/dmapi.SlackBuild	2021-02-13 06:31:52.897945577 +0100
+++ slackware64-current.3/source/ap/dmapi/dmapi.SlackBuild	2021-09-18 13:42:53.106906724 +0200
@@ -71,6 +71,10 @@
 # Thanks, Debian
 zcat $CWD/bug799162.patch.gz | patch -p1 --verbose || exit 1
 
+# AArch64 specific patch
+zcat $CWD/missing-sys_getdents.patch.gz | patch -p1 --verbose || exit 1
+
+
 # Make sure you have the same version of autoconf as the
 # developers did...  ;-)
 autoreconf -vif
diff -ur slackware64-current.2/source/ap/ghostscript/ghostscript.SlackBuild slackware64-current.3/source/ap/ghostscript/ghostscript.SlackBuild
--- slackware64-current.2/source/ap/ghostscript/ghostscript.SlackBuild	2022-09-20 14:28:06.207562315 +0200
+++ slackware64-current.3/source/ap/ghostscript/ghostscript.SlackBuild	2023-05-15 12:32:03.237565466 +0200
@@ -83,6 +83,9 @@
 # Remove unmaintained garbage:
 rm -rf freetype jpeg lcms2 libpng libtiff png tiff zlib
 
+# Disable NEON instruction for arm (TesserACT won't compile):
+zcat $CWD/disable_neon.diff.gz | patch -p1 --verbose || exit 1
+
 # Regenerate ./configure.  Needed if patched, or to prevent libtool mismatch.
 autoreconf --force --install
 ( cd jbig2dec ; autoreconf --force --install )
@@ -88,6 +88,11 @@
 ( cd jbig2dec ; autoreconf --force --install )
 ( cd ijs ; autoreconf --force --install )
 
+# Patch lcms2 and psi bundled libraries to correctly handle alignment on ARMv5 and SPARC 
+# (64bit load/store should be aligned on 8-byte boundary even if 32bit architectures):
+zcat $CWD/arm_unaligned_64bit_load-store.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/arm_sparc_psi_align8.diff.gz | patch -p1 --verbose || exit 1
+
 # Make sure ownerships and permissions are sane:
 chown -R root:root .
 find . \
@@ -114,6 +114,7 @@
 
 # Configure:
 CFLAGS="$SLKCFLAGS" \
+LDFLAGS="$SLKLDFLAGS" \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
diff -ur slackware64-current.2/source/ap/linuxdoc-tools/linuxdoc-tools.build slackware64-current.3/source/ap/linuxdoc-tools/linuxdoc-tools.build
--- slackware64-current.2/source/ap/linuxdoc-tools/linuxdoc-tools.build	2021-08-12 14:42:11.000000000 +0200
+++ slackware64-current.3/source/ap/linuxdoc-tools/linuxdoc-tools.build	2021-09-18 13:42:53.266914800 +0200
@@ -45,7 +45,11 @@
 
 # Determine the general CFLAGS for the known architectures:
 case $ARCH in
-  arm*)    export SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -mtune=generic-armv7-a -mabi=aapcs-linux"
+  arm) export SLKCFLAGS="-O2 -march=armv5te -mfloat-abi=soft"
+           export LIBDIRSUFFIX=""
+           export HOSTTARGET="-gnueabi"
+           ;;
+  armv7hl) export SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -mtune=generic-armv7-a -mabi=aapcs-linux"
            export LIBDIRSUFFIX=""
            export HOSTTARGET="-gnueabihf"
            ;;
diff -ur slackware64-current.2/source/ap/lxc/lxc.SlackBuild slackware64-current.3/source/ap/lxc/lxc.SlackBuild
--- slackware64-current.2/source/ap/lxc/lxc.SlackBuild	2021-08-09 20:04:20.644977839 +0200
+++ slackware64-current.3/source/ap/lxc/lxc.SlackBuild	2021-09-18 13:42:53.346918839 +0200
@@ -94,6 +94,12 @@
 # so we'll comment this next line out for now:
 #[ -x /usr/bin/python3 ] && export PYTHON=/usr/bin/python3 && python="--enable-python"
 
+if [[ "$ARCH" = "ppc" ]]
+then
+  # Use ld.bfd on ppc ("unsupported -mbss-plt code" with gold)
+  sed -i 's/fuse-ld=gold/fuse-ld=bfd/' configure
+fi
+
 # Configure:
 # lua is autodetected
 CFLAGS="$SLKCFLAGS" \
diff -ur slackware64-current.2/source/ap/mariadb/mariadb.SlackBuild slackware64-current.3/source/ap/mariadb/mariadb.SlackBuild
--- slackware64-current.2/source/ap/mariadb/mariadb.SlackBuild	2021-08-09 20:04:20.644977839 +0200
+++ slackware64-current.3/source/ap/mariadb/mariadb.SlackBuild	2023-05-22 13:42:53.346918839 +0200
@@ -109,6 +109,16 @@
 tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z || exit 1
 cd ${PKGNAM}-$VERSION || exit 1
 
+# Disabling HTM instruction set for PowerPC64, since gcc is targeted 
+# for the most generic processor without HTM instruction set
+zcat $CWD/disable_htm_ppc64.diff.gz | patch -p1 --verbose || exit 1
+
+# Removing incorrect asm v9 instructions for sparc-v8:
+zcat $CWD/sparc_pre-v9.diff.gz | patch -p1 --verbose || exit 1
+
+# Remove incorrect MYSQL structure size test for (some) 32 bit platforms:
+zcat $CWD/disable_compile_time_test_size.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 chown -R root:root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -106,7 +106,7 @@
 
 mkdir build
 cd build
-cmake \
+LDFLAGS="$SLKLDFLAGS" cmake \
   -DCMAKE_C_FLAGS="$SLKCFLAGS" \
   -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
   -DCMAKE_BUILD_TYPE=RelWithDebInfo \
@@ -214,6 +214,12 @@
     mv $PKG/lib/security $PKG/lib${LIBDIRSUFFIX}/security
     rmdir $PKG/lib 2> /dev/null
   fi
+elif [ -d $PKG/lib64/security ]; then
+  if [ ! "lib64" = "lib${LIBDIRSUFFIX}" ]; then
+    mkdir -p $PKG/lib${LIBDIRSUFFIX}
+    mv $PKG/lib64/security $PKG/lib${LIBDIRSUFFIX}/security
+    rmdir $PKG/lib64 2> /dev/null
+  fi
 fi
 
 # The ./configure option to omit this has gone away, so we'll omit it
diff -ur slackware64-current.2/source/ap/mpg123/mpg123.SlackBuild slackware64-current.3/source/ap/mpg123/mpg123.SlackBuild
--- slackware64-current.2/source/ap/mpg123/mpg123.SlackBuild	2021-03-24 04:49:35.709449607 +0100
+++ slackware64-current.3/source/ap/mpg123/mpg123.SlackBuild	2021-09-18 13:42:53.426922877 +0200
@@ -86,15 +86,25 @@
 # --with-cpu=i586		Use code optimized for i586 processors
 # --with-cpu=i586_dither	Use code optimized for i586 processors with dithering (noise shaping), adds 256K to binary size
 # --with-cpu=3dnow		Use code optimized for 3DNow processors
+# --with-cpu=3dnow_vintage	Use code optimized for older 3DNow processors (K6 family)
 # --with-cpu=3dnowext		Use code optimized for 3DNowExt processors (K6-3+, Athlon)
 # --with-cpu=3dnowext_alone	Really only 3DNowExt decoder, without 3DNow fallback for flexible rate
+# --with-cpu=3dnowext_vintage	Use code optimized for older extended 3DNow processors (like K6-III+)
 # --with-cpu=mmx		Use code optimized for MMX processors
 # --with-cpu=mmx_alone		Really only MMX decoder, without i586 fallback for flexible rate
 # --with-cpu=sse		Use code optimized for SSE processors
+# --with-cpu=sse_vintage	Use code optimized for older SSE processors (plain C DCT36)
 # --with-cpu=sse_alone		Really only SSE decoder, without i586 fallback for flexible rate
+# --with-cpu=avx		Use code optimized for x86-64 with AVX processors
 # --with-cpu=x86		Pack all x86 opts into one binary (excluding i486, including dither)
 # --with-cpu=x86-64		Use code optimized for x86-64 processors (AMD64 and Intel64, including dithered generic)
-# --with-cpu=arm_nofpu		Use code optimized for ARM processors with fixed point arithmetic (experimental)
+# --with-cpu=altivec		Use code optimized for Altivec processors (PowerPC G4 and G5)
+# --with-cpu=ppc_nofpu		Use code optimized for PowerPC processors with fixed point arithmetic
+# --with-cpu=neon		Use code optimized for ARM NEON SIMD engine (Cortex-A series)
+# --with-cpu=arm_fpu		Pack neon and generic[_dither] decoders, for ARM processors with FPU and/or NEON
+# --with-cpu=arm_nofpu		Use code optimized for ARM processors with fixed point arithmetic
+# --with-cpu=neon64		Use code optimized for AArch64 NEON SIMD engine
+# --with-cpu=aarch64		Pack neon64 and generic[_dither] decoders, for 64bit ARM processors
 
 rm -rf $PKG
 mkdir -p $PKG $TMP
diff -ur slackware64-current.2/source/d/binutils/binutils.SlackBuild slackware64-current.3/source/d/binutils/binutils.SlackBuild
--- slackware64-current.2/source/d/binutils/binutils.SlackBuild	2021-08-27 22:23:54.171206523 +0200
+++ slackware64-current.3/source/d/binutils/binutils.SlackBuild	2021-09-18 13:42:53.496926410 +0200
@@ -53,13 +53,17 @@
 # Set to ld.gold or ld.bfd:
 DEFAULT_LD=ld.bfd
 
+ENABLE_GOLD=${ENABLE_GOLD:-"yes"}
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+  ADDTARGET="i386-efi-pe,bpf-unknown-none,"
   # The config option below is currently needed to compile on x86:
   WERROR="--enable-werror=no"
   LIBDIRSUFFIX=""
 elif [ "$ARCH" = "i686" ]; then
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+  ADDTARGET="i386-efi-pe,bpf-unknown-none,"
   # The config option below is currently needed to compile on x86:
   WERROR="--enable-werror=no"
   LIBDIRSUFFIX=""
@@ -68,6 +72,7 @@
   LIBDIRSUFFIX=""
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
+  ADDTARGET="i386-efi-pe,bpf-unknown-none,"
   LIBDIRSUFFIX="64"
 elif [ "$ARCH" = "armv7hl" ]; then
   SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
@@ -82,6 +87,12 @@
     *)    TARGET=$ARCH-slackware-linux ;;
 esac
 
+# Remove targets in mips since it does not compiles gold with it:
+case "$ARCH" in
+    mips*) ADDTARGET="" ;;
+    *)     ADDTARGET="--enable-targets=${ADDTARGET}$TARGET" ;;
+esac
+
 TMP=${TMP:-/tmp}
 PKG=$TMP/package-binutils
 
@@ -105,6 +116,12 @@
 # Don't check to see if "config.h" was included in the installed headers:
 zcat $CWD/patches/binutils-no-config-h-check.patch.gz | patch -p1 --verbose || exit 1
 
+# Change from error to warning when RWX in LOAD section detected:
+zcat $CWD/patches/binutils.rwx-warning.diff.gz | patch -p1 --verbose || exit 1
+
+# Enable 64bit time_t in 32bit system (disable it only on gprofng):
+zcat $CWD/patches/enable_time64_on_32bit.diff.gz | patch -p1 --verbose || exit 1
+
 # Set %version to something halfway meaningful:
 zcat $CWD/patches/binutils-version.patch.gz | patch -p1 --verbose || exit 1
 sed -i -e 's/%''{release}/slack151/g' bfd/Makefile{.am,.in}
@@ -158,7 +172,9 @@
 fi
 
 # Build for an x86 glibc2-based Linux system:
+#SLKCFLAGS="$SLKCFLAGS -D_DONOTFORCE_TIME_BITS"
 CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -170,9 +185,9 @@
   --enable-64-bit-bfd \
   --enable-plugins \
   --enable-threads \
-  --enable-targets=i386-efi-pe,bpf-unknown-none,${TARGET} \
+  ${ADDTARGET} \
   --enable-install-libiberty \
-  --enable-gold=yes \
+  --enable-gold=$ENABLE_GOLD \
   --enable-ld=default \
   --enable-initfini-array \
   $WERROR \
diff -ur slackware64-current.2/source/d/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild slackware64-current.3/source/d/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild
--- slackware64-current.2/source/d/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild	2023-04-19 20:21:42.773010844 +0200
+++ slackware64-current.3/source/d/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild	2023-09-22 15:09:55.325656914 +0200
@@ -98,18 +98,60 @@
 directory = "vendor"
 EOF
 
+# rustix uses now by default linux_raw backend for syscalls, but seems supported only
+# for aarch64, arm, mipsel, mips64el, powerpc64le, riscv64, x86, and x86_64.
+# Re-add real errno for other architectures, or you can pass "--cfg=rustix_use_libc" 
+# to force libc usage.
+case "$ARCH" in
+  mips|ppc|ppc64|s390x|loongarch64) 
+    (cd vendor
+     rm -rf errno
+     tar xvf $CWD/errno-*.tar.lz
+     cd rustix
+     perl -n -e '
+       if(m/dependencies.libc_errno/) { $status=1; }
+       if($status && m/"0\.3\.1"/) {
+	 s/"0.3.1"/"0.3.3"/;
+	 $status=0;
+       }
+       print;
+     ' Cargo.toml > Cargo.toml.tmp
+     \mv Cargo.toml.tmp Cargo.toml
+     cat .cargo-checksum.json  | perl -e '($newck)=split(" ",$ARGV[0]);while(<STDIN>) { s/("Cargo.toml":)"(\S+?)"/$1"$newck"/; print;}' `sha256sum Cargo.toml` > .cargo-checksum.json.tmp
+     \mv .cargo-checksum.json.tmp .cargo-checksum.json
+    )
+    #SLKRUSTFLAGS="--cfg=rustix_use_libc"
+    ;;
+esac
+
+# Add support for EXT4 ioctl and FICLONE to loongarch64
+case "$ARCH" in
+  loongarch64|mips|ppc64|s390x) 
+    (cd vendor
+     cd rustix
+     zcat $CWD/rustix-syscall_loongarch64.diff.gz | patch -p3 --verbose
+     cat .cargo-checksum.json  | perl -e '($newck)=split(" ",$ARGV[0]);while(<STDIN>) { s|("src/backend/libc/io/syscalls.rs":)"(\S+?)"|$1"$newck"|; print;}' `sha256sum src/backend/libc/io/syscalls.rs` > .cargo-checksum.json.tmp
+     \mv .cargo-checksum.json.tmp .cargo-checksum.json
+    )
+  ;;
+esac
+
+# Support for Loongarch64 in linux-raw-sys was introduced in 0.3.2, but rustix 
+# targets version 0.1.2 (raised to 0.1.4). Replace version 0.1.4 with 0.4.3 and
+# fix rustix Cargo.toml. See https://github.com/sunfishcode/linux-raw-sys/issues/34
+
+RUSTFLAGS="$SLKRUSTFLAGS" \
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
 OPENSSL_NO_VENDOR=1 \
 cargo build \
   --offline \
   --release \
-  --target $ARCH-unknown-linux-gnu \
-  $NUMJOBS
+  $NUMJOBS || exit 1
 
 mkdir -p $PKG/usr/bin
-install -m 755 target/$ARCH-unknown-linux-gnu/release/cargo-vendor-filterer \
-  $PKG/usr/bin/
+install -m 755 target/release/cargo-vendor-filterer \
+  $PKG/usr/bin/ || exit 1
 
 find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
   | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff -ur slackware64-current.2/source/d/cbindgen/cbindgen.SlackBuild slackware64-current.3/source/d/cbindgen/cbindgen.SlackBuild
--- slackware64-current.2/source/d/cbindgen/cbindgen.SlackBuild	2021-09-09 19:19:52.527012986 +0200
+++ slackware64-current.3/source/d/cbindgen/cbindgen.SlackBuild	2021-09-18 13:42:54.186961238 +0200
@@ -104,12 +104,11 @@
 cargo build \
   --offline \
   --release \
-  --target $ARCH-unknown-linux-gnu \
   --verbose \
   $NUMJOBS || exit 1
 
 mkdir -p $PKG/usr/bin
-install -m 755 target/$ARCH-unknown-linux-gnu/release/cbindgen $PKG/usr/bin
+install -m 755 target/release/cbindgen $PKG/usr/bin || exit 1
 
 find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
   | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff -ur slackware64-current.2/source/d/clisp/clisp.SlackBuild slackware64-current.3/source/d/clisp/clisp.SlackBuild
--- slackware64-current.2/source/d/clisp/clisp.SlackBuild	2021-10-02 10:49:12.993388643 +0200
+++ slackware64-current.3/source/d/clisp/clisp.SlackBuild	2023-06-23 11:36:11.929328955 +0200
@@ -86,6 +86,9 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+# Disabled SPARCv8plus instructions (-mcpu=v9):
+sed -i 's/ -mcpu=v9//' configure
+
 CFLAGS="$SLKCFLAGS" \
 ./configure \
   --prefix=/usr \
diff -ur slackware64-current.2/source/d/cmake/cmake.SlackBuild slackware64-current.3/source/d/cmake/cmake.SlackBuild
--- slackware64-current.2/source/d/cmake/cmake.SlackBuild	2022-04-30 21:32:40.309799140 +0200
+++ slackware64-current.3/source/d/cmake/cmake.SlackBuild	2023-07-25 11:47:33.216720484 +0200
@@ -78,6 +81,7 @@
 cd cmake-build
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="$SLKLDFLAGS" \
   ../configure \
   --prefix=/usr \
   --docdir=/doc/$PKGNAM-$VERSION \
diff -ur slackware64-current.2/source/d/gcc/gcc.SlackBuild slackware64-current.3/source/d/gcc/gcc.SlackBuild
--- slackware64-current.2/source/d/gcc/gcc.SlackBuild	2023-05-05 22:30:32.537922890 +0200
+++ slackware64-current.3/source/d/gcc/gcc.SlackBuild	2023-05-09 11:39:32.890163735 +0200
@@ -88,6 +88,9 @@
   exit 0
 fi
 
+addlang="ada,d,go,"
+ENABLE_GC="--enable-objc-gc"
+
 if [ "$ARCH" = "i386" ]; then
   SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
   LIBDIRSUFFIX=""
@@ -166,6 +169,17 @@
   fi
 done
 
+if [[ "$ARCH" = "arm" ]]
+then
+  # Ada tools now requires 64 bits atomic operation, need to link atomic library for arm:
+  zcat $CWD/patches/gcc.ada.atomic.armdiff.gz | patch -p1 --verbose || exit 1
+fi
+
+# Disabling c++ double128 compatibility on PowerPC platform
+#sed -i  's/powerpc\*-\*-linux\*/xpowerpc/' libstdc++-v3/configure
+# Disabling c++ double128 compatibility on Sparc(32bit) platform
+#sed -i  's/sparc\*-\*-linux\*/sparc64-*-linux*/' gcc-$VERSION/libstdc++-v3/configure
+
 # Fix perms/owners:
 chown -R root:root .
 find . \
@@ -343,7 +353,23 @@
   # Correct me if my take on this is wrong.
   #  --with-cpu=$ARCH 
  
-  if [ "$ARCH" != "x86_64" ]; then
+  if [ "$ARCH" == "armv7hl" ]; then
+    GCC_ARCHOPTS="--with-tune=cortex-a8 --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16 --with-abi=aapcs-linux"
+  elif [ "$ARCH" == "arm" ]; then
+    GCC_ARCHOPTS="--with-arch=armv5te --with-float=soft"
+  elif [ "$ARCH" == "aarch64" ]; then
+    GCC_ARCHOPTS="--with-arch=armv8-a"
+  elif [ "$ARCH" == "mips" ]; then
+    GCC_ARCHOPTS="--with-arch=mips32r2"
+  elif [ "$ARCH" == "mipsel" ]; then
+    GCC_ARCHOPTS="--with-arch=mips32r2"
+  elif [ "$ARCH" == "mips64el" ]; then
+    GCC_ARCHOPTS="--with-arch=mips64r2 --disable-multilib"
+  elif [ "$ARCH" == "sparc" ]; then
+    GCC_ARCHOPTS="--with-cpu=leon3 --with-float=hard --disable-multilib --disable-libitm"
+  elif [ "$ARCH" == "sparc64" ]; then
+    GCC_ARCHOPTS="--with-cpu=ultrasparc --with-float=hard --disable-multilib"
+  elif [ `echo "$ARCH" | grep -cE '^i.86$'` -gt 0 ]; then
     GCC_ARCHOPTS="--with-arch=$ARCH"
   else
     GCC_ARCHOPTS="--disable-multilib"
@@ -350,8 +390,10 @@
     GCC_ARCHOPTS="--disable-multilib"
   fi
  
-  CFLAGS="$SLKCFLAGS" \
-  CXXFLAGS="$SLKCFLAGS" \
+  CFLAGS="$SLKCFLAGS -D_DONOTFORCE_TIME_BITS" \
+  CXXFLAGS="$SLKCFLAGS -D_DONOTFORCE_TIME_BITS" \
+  LDFLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" \
+  BOOT_LDFLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" \
   ../configure --prefix=/usr \
      --libdir=/usr/lib$LIBDIRSUFFIX \
      --mandir=/usr/man \
@@ -368,10 +400,10 @@
      --infodir=/usr/info \
      --enable-shared \
      --enable-bootstrap \
-     --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++ \
+     --enable-languages=${addlang}c,c++,fortran,lto,m2,objc,obj-c++ \
      --enable-threads=posix \
      --enable-checking=release \
-     --enable-objc-gc \
+     $ENABLE_GC \
      --with-system-zlib \
      --enable-libstdcxx-dual-abi \
      --with-default-libstdcxx-abi=new \
@@ -377,6 +413,7 @@
   # Include all debugging info (for now):
   make $NUMJOBS bootstrap || exit 1
 
+  if [ `echo $addlang | grep -c 'ada,'` -gt 0 ] ; then
   ( cd gcc
     make $NUMJOBS gnatlib GNATLIBCFLAGS="$SLKCFLAGS" || exit 1
     # This wants a shared -ladd2line?
@@ -386,6 +423,7 @@
     CXXFLAGS="$SLKCFLAGS" \
     make $NUMJOBS gnattools || exit 1
   ) || exit 1
+  fi
   make info || exit 1
 
   # Set GCCCHECK=something to run the tests
@@ -395,6 +433,11 @@
 
   make install DESTDIR=$PKG1 || exit 1
 
+  if [ -d "$PKG1/usr/lib$LIBDIRSUFFIX/"'!m4' ]
+  then
+    (cd "$PKG1/usr/lib$LIBDIRSUFFIX/"'!m4' ; mv * .. ; cd .. ; rmdir '!m4')
+  fi
+
   # Move gdb pretty printers to the correct place
   mkdir -p $PKG1/usr/share/gdb/auto-load/usr/lib$LIBDIRSUFFIX
   mv $PKG1/usr/lib$LIBDIRSUFFIX/*-gdb.py \
@@ -406,7 +449,7 @@
   fi
 
   # Make our 64bit gcc look for 32bit gcc binaries in ./32 subdirectory:
-  if [ "$ARCH" = "x86_64" ]; then
+  if [ "$LIBDIRSUFFIX" = "64" ]; then
     sed -i 's#;.\(:../lib !m64 m32;\)$#;32\1#' \
       $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs
   fi
@@ -490,6 +533,15 @@
     cat $CWD/c89.sh > c89
     cat $CWD/c99.sh > c99
     chmod 755 c89 c99
+    if [ "$TARGET" != "${ARCH}-slackware-linux" ]
+    then
+      for b in gm2 c++ g++ cc gcc gcc-ar gcc-nm gcc-ranlib gccgo gdc gfortran
+      do
+	if [ -f $b ]; then
+     	  ln -s $b ${ARCH}-slackware-linux-$b
+	fi
+      done
+    fi
   )
 
   ( cd $PKG1/usr/man
@@ -512,7 +555,7 @@
   mv $PKG1/usr/share/gdb usr/share
   mkdir -p usr/share/gcc-$VERSION/python
   mv $PKG1/usr/share/gcc-$VERSION/python/libstdcxx usr/share/gcc-$VERSION/python
-)
+) || exit 1
 
 # gcc-gfortran:
 ( cd $PKG3
@@ -534,8 +577,9 @@
   mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/libgfortran* usr/libexec/gcc/$TARGET/$VERSION
   mkdir -p usr/man/man1
   mv $PKG1/usr/man/man1/gfortran* usr/man/man1
-)
+) || exit 1
 
+if [ `echo $addlang | grep -c 'ada,'` -gt 0 ] ; then
 # gcc-gnat:
 ( cd $PKG4
   mkdir -p usr/bin
@@ -548,7 +592,8 @@
   mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
   mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/adainclude usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
   mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/adalib usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
-)
+) || exit 1
+fi
 
 # gcc-objc:
 ( cd $PKG6
@@ -558,9 +603,9 @@
   mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/cc1obj usr/libexec/gcc/$TARGET/$VERSION
   mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/cc1objplus usr/libexec/gcc/$TARGET/$VERSION
   mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
-  mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/objc usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
   mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/cc1objplus usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
-)
+  mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/objc usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+) || exit 1
 
 ## NOTE: Thought about this, because the precompiled headers are so large.
 ## Probably easier to keep everything together, though.
@@ -570,6 +615,7 @@
 #  mv $PKG2/usr/include/c++/$VERSION/$TARGET/bits/stdc++.h.gch usr/include/c++/$VERSION/$TARGET/bits
 #)
 
+if [ `echo $addlang | grep -c 'go,'` -gt 0 ] ; then
 # gcc-go:
 ( cd $PKG8
   mkdir -p usr/bin
@@ -592,7 +638,9 @@
   mv $PKG1/usr/man/man1/go.1.gz usr/man/man1
   mv $PKG1/usr/man/man1/gofmt.1.gz usr/man/man1
 ) || exit 1
+fi
 
+if [ `echo $addlang | grep -c 'd,'` -gt 0 ] ; then
 # gcc-gdc:
 ( cd $PKG10
   mkdir -p usr/bin
@@ -615,6 +663,7 @@
   mkdir -p usr/man/man1
   mv $PKG1/usr/man/man1/gdc.1.gz usr/man/man1
 ) || exit 1
+fi
 
 # gcc-gm2:
 ( cd $PKG11
@@ -643,14 +692,20 @@
   makepkg -l y -c n $TMP/gcc-g++-$VERSION-$ARCH-$BUILD.txz )
 ( cd $PKG3
   makepkg -l y -c n $TMP/gcc-gfortran-$VERSION-$ARCH-$BUILD.txz )
+if [ `echo $addlang | grep -c 'ada,'` -gt 0 ] ; then
 ( cd $PKG4
   makepkg -l y -c n $TMP/gcc-gnat-$VERSION-$ARCH-$BUILD.txz )
+fi
 ( cd $PKG6
   makepkg -l y -c n $TMP/gcc-objc-$VERSION-$ARCH-$BUILD.txz )
+if [ `echo $addlang | grep -c 'go,'` -gt 0 ] ; then
 ( cd $PKG8
   makepkg -l y -c n $TMP/gcc-go-$VERSION-$ARCH-$BUILD.txz )
+fi
+if [ `echo $addlang | grep -c 'd,'` -gt 0 ] ; then
 ( cd $PKG10
   makepkg -l y -c n $TMP/gcc-gdc-$VERSION-$ARCH-$BUILD.txz )
+fi
 ( cd $PKG11
   makepkg -l y -c n $TMP/gcc-gm2-$VERSION-$ARCH-$BUILD.txz )
 
diff -ur slackware64-current.2/source/d/gdb/gdb.SlackBuild slackware64-current.3/source/d/gdb/gdb.SlackBuild
--- slackware64-current.2/source/d/gdb/gdb.SlackBuild	2021-09-18 13:40:05.888467298 +0200
+++ slackware64-current.3/source/d/gdb/gdb.SlackBuild	2021-09-18 13:42:53.546928934 +0200
@@ -72,6 +72,11 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+if [ "$ARCH" = "mips" -o "$ARCH" = "mipsel" ] ; then
+  # Avoid overflow on simulator for MIPS32:
+  zcat $CWD/mips32_overflow.diff.gz | patch -p1 --verbose || exit 1
+fi
+
 # This has been perpetually broken, so we'll default to turning it off:
 GUILE_OPTION=${GUILE_OPTION:"--without-guile"}
 
diff -ur slackware64-current.2/source/d/guile/guile.SlackBuild slackware64-current.3/source/d/guile/guile.SlackBuild
--- slackware64-current.2/source/d/guile/guile.SlackBuild	2021-04-28 20:11:00.493022067 +0200
+++ slackware64-current.3/source/d/guile/guile.SlackBuild	2021-09-18 13:42:53.586930953 +0200
@@ -73,6 +73,9 @@
 tar xvf $CWD/guile-$VERSION.tar.?z || exit 1
 cd guile-$VERSION || exit 1
 
+# Remove 32-bit-big-endian prebuilt, since it does not work:
+rm -rf prebuilt/32-bit-big-endian
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -90,6 +93,7 @@
   --disable-static \
   --disable-rpath \
   --disable-error-on-warning \
+  $EXTRAGUILE \
   --build=$ARCH-slackware-linux || exit 1
 
 # Does not like parallel make...
diff -ur slackware64-current.2/source/d/libgccjit/libgccjit.SlackBuild slackware64-current.3/source/d/libgccjit/libgccjit.SlackBuild
--- slackware64-current.2/source/d/libgccjit/libgccjit.SlackBuild	2024-02-13 22:27:32.208514310 +0100
+++ slackware64-current.3/source/d/libgccjit/libgccjit.SlackBuild.new	2024-02-13 23:36:51.525931524 +0100
@@ -150,14 +149,30 @@
 ( mkdir gcc.build.lnx
   cd gcc.build.lnx
 
-  if [ "$ARCH" != "x86_64" ]; then
+  if [ "$ARCH" == "armv7hl" ]; then
+    GCC_ARCHOPTS="--with-tune=cortex-a8 --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16 --with-abi=aapcs-linux"
+  elif [ "$ARCH" == "arm" ]; then
+    GCC_ARCHOPTS="--with-arch=armv5te --with-float=soft"
+  elif [ "$ARCH" == "aarch64" ]; then
+    GCC_ARCHOPTS="--with-arch=armv8-a"
+  elif [ "$ARCH" == "mips" ]; then
+    GCC_ARCHOPTS="--with-arch=mips32r2"
+  elif [ "$ARCH" == "mipsel" ]; then
+    GCC_ARCHOPTS="--with-arch=mips32r2"
+  elif [ "$ARCH" == "mips64el" ]; then
+    GCC_ARCHOPTS="--with-arch=mips64r2 --disable-multilib"
+  elif [ "$ARCH" == "sparc" ]; then
+    GCC_ARCHOPTS="--with-cpu=leon3 --with-float=hard --disable-multilib --disable-libitm"
+  elif [ "$ARCH" == "sparc64" ]; then
+    GCC_ARCHOPTS="--with-cpu=ultrasparc --with-float=hard --disable-multilib"
+  elif [ `echo "$ARCH" | grep -cE '^i.86$'` -gt 0 ]; then
     GCC_ARCHOPTS="--with-arch=$ARCH"
   else
     GCC_ARCHOPTS="--disable-multilib"
   fi
 
-  CFLAGS="$SLKCFLAGS" \
-  CXXFLAGS="$SLKCFLAGS" \
+  CFLAGS="$SLKCFLAGS -D_DONOTFORCE_TIME_BITS" \
+  CXXFLAGS="$SLKCFLAGS -D_DONOTFORCE_TIME_BITS" \
   ../configure --prefix=/usr \
      --libdir=/usr/lib$LIBDIRSUFFIX \
      --mandir=/usr/man \
diff -ur slackware64-current.2/source/d/llvm/llvm.SlackBuild slackware64-current.3/source/d/llvm/llvm.SlackBuild
--- slackware64-current.2/source/d/llvm/llvm.SlackBuild	2023-09-24 20:35:11.100136347 +0200
+++ slackware64-current.3/source/d/llvm/llvm.SlackBuild	2023-09-30 09:57:58.045992151 +0200
@@ -67,6 +67,8 @@
 # massive warning spew:
 IGNORE_GNU_EXTENSIONS=${IGNORE_GNU_EXTENSIONS:--Wno-unknown-warning-option -Wno-gnu-line-marker -Wno-gnu-anonymous-struct -Wno-gnu-include-next}
 
+LINKER="lld"
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686 $IGNORE_GNU_EXTENSIONS"
   LIBDIRSUFFIX=""
@@ -94,6 +96,54 @@
   CLANGD="-DCLANG_ENABLE_CLANGD=OFF"
 fi
 
+# Building lld will be determined automatically unless BUILD_LLD is
+# preset to YES or NO:
+if [ -z $BUILD_LLD ]; then
+  if [ "$ARCH" =  "or1k" -o "$ARCH" = "sh4" -o "$ARCH" = "alpha" -o "$ARCH" = "hppa" ]; then
+    BUILD_LLD=NO
+  else
+    BUILD_LLD=YES
+  fi
+fi
+
+# Building lldb will be determined automatically unless BUILD_LLDB is
+# preset to YES or NO:
+if [ -z $BUILD_LLDB ]; then
+  if [ "$ARCH" = "riscv64" -o "$ARCH" = "ppc" -o "${ARCH::4}" = "mips"  -o "$ARCH" =  "or1k" -o "$ARCH" = "sh4" -o "$ARCH" = "alpha" -o "$ARCH" = "hppa" -o "${ARCH::5}" = "sparc" ]; then
+    BUILD_LLDB=NO
+  else
+    BUILD_LLDB=YES
+  fi
+fi
+
+# Building OpenMP will be determined automatically unless BUILD_OPENMP is
+# preset to YES or NO:
+if [ -z $BUILD_OPENMP ]; then
+  if [ "$ARCH" = "ppc" -o "$ARCH" = "mips" -o "$ARCH" = "mipsel" -o "$ARCH" = "riscv64" -o "$ARCH" = "s390x" -o "$ARCH" =  "or1k" -o "$ARCH" = "sh4" -o "$ARCH" = "alpha" -o "$ARCH" = "hppa" -o "${ARCH::5}" = "sparc" ]; then
+    # OpenMP not supported on PowerPC 32 bits / RISC-V / zArchitecture
+    BUILD_OPENMP=NO
+  else
+    BUILD_OPENMP=YES
+  fi
+fi
+
+# Building Host clang will be determined automatically unless BUILD_HOST is
+# preset to YES or NO:
+if [ -z $BUILD_HOST ]; then
+  if [ "$ARCH" = "sh4" -o "$ARCH" = "or1k" -o "$ARCH" = "hppa" -o "$ARCH" = "alpha" ]; then
+    # clang not supported on sh4, or1k, hppa, alpha
+    BUILD_HOST=NO
+  else
+    BUILD_HOST=YES
+  fi
+fi
+
+if [ "$BUILD_HOST" = "YES" ]; then
+  ADD_HOST="host;"
+else
+  ADD_HOST=""
+fi
+
 # Python3 short version:
 PY3=$(python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' | cut -f 2 -d n | cut -f 1 -d /)
 
@@ -130,12 +180,16 @@
   #echo "Extracting $CWD/flang-$VERSION.src.tar.xz..."
   #tar xf $CWD/flang-$VERSION.src.tar.xz || exit 1
   #mv flang-${VERSION} flang 2>/dev/null || mv flang-${VERSION}.src flang || exit 1
-  echo "Extracting $CWD/lldb-$VERSION.src.tar.xz..."
-  tar xf $CWD/lldb-$VERSION.src.tar.xz || exit 1
-  mv lldb-${VERSION} lldb 2>/dev/null || mv lldb-${VERSION}.src lldb || exit 1
-  echo "Extracting $CWD/lld-$VERSION.src.tar.xz..."
-  tar xf $CWD/lld-$VERSION.src.tar.xz || exit 1
-  mv lld-${VERSION} lld 2>/dev/null || mv lld-${VERSION}.src lld || exit 1
+  if [ "$BUILD_LLDB" = "YES" ]; then
+    echo "Extracting $CWD/lldb-$VERSION.src.tar.xz..."
+    tar xf $CWD/lldb-$VERSION.src.tar.xz || exit 1
+    mv lldb-${VERSION} lldb 2>/dev/null || mv lldb-${VERSION}.src lldb || exit 1
+  fi
+  if [ "$BUILD_LLD" = "YES" ]; then
+    echo "Extracting $CWD/lld-$VERSION.src.tar.xz..."
+    tar xf $CWD/lld-$VERSION.src.tar.xz || exit 1
+    mv lld-${VERSION} lld 2>/dev/null || mv lld-${VERSION}.src lld || exit 1
+  fi
 cd ../
 
 cd tools/clang/tools || exit 1
@@ -149,9 +203,13 @@
   echo "Extracting $CWD/compiler-rt-$VERSION.src.tar.xz..."
   tar xf $CWD/compiler-rt-$VERSION.src.tar.xz || exit 1
   mv compiler-rt-${VERSION} compiler-rt 2>/dev/null || mv compiler-rt-${VERSION}.src compiler-rt || exit 1
-  echo "Extracting $CWD/openmp-$VERSION.src.tar.xz..."
-  tar xf $CWD/openmp-$VERSION.src.tar.xz || exit 1
-  mv openmp-${VERSION} openmp 2>/dev/null || mv openmp-${VERSION}.src openmp || exit 1
+  # Fixing "asan_interceptors.cpp:(.text+0x450): relocation truncated to fit: R_MIPS_PC16 against `__interceptor_inet_pton'":
+  zcat $CWD/mips_sanitizer_R_MIPS_PC16.diff.gz | patch -p1 --verbose || exit 1
+  if [ "$BUILD_OPENMP" = "YES" ]; then
+    echo "Extracting $CWD/openmp-$VERSION.src.tar.xz..."
+    tar xf $CWD/openmp-$VERSION.src.tar.xz || exit 1
+    mv openmp-${VERSION} openmp 2>/dev/null || mv openmp-${VERSION}.src openmp || exit 1
+  fi
   echo "Extracting $CWD/libcxx-${VERSION}.src.tar.xz..."
   tar xf $CWD/libcxx-${VERSION}.src.tar.xz || exit 1
   mv libcxx-${VERSION} libcxx 2>/dev/null || mv libcxx-${VERSION}.src libcxx || exit 1
@@ -185,6 +243,37 @@
 ln -sf ../../cmake .
 cd -
 
+# Patch arm: soft float, invalid conversion from unwind state:
+zcat $CWD/arm_soft.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/unwind_state_invalid_conversion.diff.gz | patch -p1 --verbose || exit 1
+
+if [ "${ARCH::3}" = "arm" ]; then
+  # Re-enabling system libunwind, since it searches for aeabi_unwind* function that are
+  # not present in bundled one
+  zcat $CWD/arm_enable_system_libunwind.diff.gz | patch -p1 --verbose || exit 1
+fi
+
+if [ "$ARCH" = "mips" -o "$ARCH" = "mipsel" ]; then
+  # Disabling FLOAT16, since it requires mips64 instructions
+  zcat $CWD/mips_disable_float16.diff.gz | patch -p1 --verbose || exit 1
+fi
+
+if [ "$BUILD_HOST" = "NO" ]; then
+  # Disabling arch/triple autodetection, since it does not work without host target
+  zcat $CWD/disable_default_arch_detect.diff.gz | patch -p1 --verbose || exit 1
+fi
+
+# Patch riscv64: AllWinner D1 does not have fence.tso instruction:
+zcat $CWD/riscv64-no-fence.tso.diff.gz | patch -p1 --verbose || exit 1
+
+# Patch alpha: Fix invalid variable name __alpha:
+zcat $CWD/alpha_fix_variable_name.diff.gz | patch -p1 --verbose || exit 1
+
+# Add new architectures (loongarch64, or1k, etc...) to cmake config.guess and config-ix.cmake:
+\cp /usr/share/libtool/build-aux/config.* cmake/
+zcat $CWD/newarchs.diff.gz | patch -p1 --verbose || exit 1
+
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -201,6 +290,21 @@
   SHARED_LIBRARY_OPTIONS="-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCLANG_LINK_CLANG_DYLIB=ON"
 fi
 
+# In bootstrap system, or for architectures that does not support host llvm,
+# clang is not yet available or it could not compile c(++) sources, use gcc
+which clang 2> /dev/null
+if [ $? -eq 0 -a `file -L $(which clang) | grep -c 'shell script'` -eq 0 ]
+then
+  C_COMPILER="clang"
+  CXX_COMPILER="clang++"
+else
+  C_COMPILER="gcc"
+  CXX_COMPILER="g++"
+  LINKER="bfd"
+fi
+
+SLKCFLAGS="$SLKCFLAGS $IGNORE_GNU_EXTENSIONS"
+
 mkdir build
 cd build
   mkdir include
@@ -209,8 +313,8 @@
   # Nuke LLVM libunwind as it conflicts with the one already on the system:
   rm -r ../projects/libunwind
   cmake -GNinja \
-    -DCMAKE_C_COMPILER="clang" \
-    -DCMAKE_CXX_COMPILER="clang++" \
+    -DCMAKE_C_COMPILER="$C_COMPILER" \
+    -DCMAKE_CXX_COMPILER="$CXX_COMPILER" \
     -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
@@ -219,7 +323,7 @@
     -DLIBCXXABI_LIBDIR_SUFFIX=${LIBDIRSUFFIX} \
     -DCMAKE_BUILD_TYPE=Release \
     $SHARED_LIBRARY_OPTIONS \
-    -DLLVM_USE_LINKER=lld \
+    -DLLVM_USE_LINKER=$LINKER \
     -DLLVM_ENABLE_RTTI=ON \
     -DLLVM_ENABLE_FFI=ON \
     -DLLVM_ENABLE_ZLIB=ON \
@@ -228,7 +332,8 @@
     -DLLVM_INSTALL_UTILS=ON \
     -DLLVM_BINUTILS_INCDIR=/usr/include \
     -DCLANG_RESOURCE_DIR="../lib${LIBDIRSUFFIX}/clang/$(echo $VERSION | cut -f 1 -d .)" \
-    -DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF" \
+    -DLLVM_TARGETS_TO_BUILD="${ADD_HOST}AMDGPU;BPF" \
+    $CMAKE_EXTRA \
     -DLLVM_INCLUDE_BENCHMARKS=OFF \
     -DLIBCXX_INCLUDE_BENCHMARKS=OFF \
     -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \
@@ -242,12 +347,29 @@
   DESTDIR=$PKG "$NINJA" install || exit 1
 cd ..
 
+case "$ARCH" in
+  arm) TARGET=$ARCH-slackware-linux-gnueabi ;;
+  armv7hl) TARGET=$ARCH-slackware-linux-gnueabihf ;;
+  mips64el) TARGET=$ARCH-slackware-linux-gnueabi64 ;;
+     *) TARGET=$ARCH-slackware-linux ;;
+esac
+
 # Add symlinks for $ARCH-slackware-linux-{clang,clang++}:
 ( cd $PKG/usr/bin
-  ln -sf clang $ARCH-slackware-linux-clang
-  ln -sf clang++ $ARCH-slackware-linux-clang++
+  ln -sf clang $TARGET-clang
+  ln -sf clang++ $TARGET-clang++
 )
 
+# Add clang target if host clang not built:
+if [ "$BUILD_HOST" = "NO" ]; then
+( cd $PKG/usr/bin
+  SHORTVER=`echo clang-[0-9][0-9] | sed 's/clang-//'`
+  mv clang-$SHORTVER clang-$SHORTVER.orig
+  cat $CWD/clang.target | sed "s/-XX/-$SHORTVER/g" > clang-$SHORTVER
+  chmod 755 clang-$SHORTVER
+)
+fi
+
 # Install clang-static-analyzer:
 for i in ccc c++; do
   ln -s /usr/libexec/$i-analyzer \
diff -ur slackware64-current.2/source/d/m4/m4.SlackBuild slackware64-current.3/source/d/m4/m4.SlackBuild
--- slackware64-current.2/source/d/m4/m4.SlackBuild	2021-05-31 21:24:21.170031455 +0200
+++ slackware64-current.3/source/d/m4/m4.SlackBuild	2023-06-15 09:15:36.667957641 +0200
@@ -81,6 +81,9 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+# Disabled SPARCv8plus instructions (-mcpu=v9):
+sed -i 's/ -mcpu=v9//' configure
+
 CFLAGS="$SLKCFLAGS" \
 ./configure \
   --prefix=/usr \
diff -ur slackware64-current.2/source/d/meson/meson.SlackBuild slackware64-current.3/source/d/meson/meson.SlackBuild
--- slackware64-current.2/source/d/meson/meson.SlackBuild	2021-06-08 22:36:48.082202988 +0200
+++ slackware64-current.3/source/d/meson/meson.SlackBuild	2021-09-18 13:42:53.796941553 +0200
@@ -65,6 +65,16 @@
  \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
   -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
 
+# Meson check only if the compiler supports NEON instructions without
+# checking if CAN compile NEON instructions with selected architecture.
+# Disabling simd-neon for ARMv5 ("arm" ARCH):
+if [ "$ARCH" = "arm" ]; then
+  zcat $CWD/disabling_neon_armv5.diff.gz | patch -p1 --verbose || exit 1
+fi
+
+# Adding new architectures (openrisc):
+zcat $CWD/new_architectures.diff.gz | patch -p1 --verbose || exit 1
+
 python3 setup.py install --root=$PKG || exit 1
 
 mv $PKG/usr/share/man $PKG/usr/
diff -ur slackware64-current.2/source/d/oprofile/oprofile.SlackBuild slackware64-current.3/source/d/oprofile/oprofile.SlackBuild
--- slackware64-current.2/source/d/oprofile/oprofile.SlackBuild	2021-08-28 21:45:51.897177190 +0200
+++ slackware64-current.3/source/d/oprofile/oprofile.SlackBuild	2021-09-18 13:42:53.846944077 +0200
@@ -82,6 +82,11 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+# Disabling PFMLIB for powerpc platform:
+zcat $CWD/disable_pfm.patch.gz | patch -p1 --verbose || exit 1
+# Adding rmb definition for riscv:
+zcat $CWD/riscv_rmb_definition.diff.gz | patch -p1 --verbose || exit 1
+
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
 ./configure \
diff -ur slackware64-current.2/source/d/perl/perl.SlackBuild slackware64-current.3/source/d/perl/perl.SlackBuild
--- slackware64-current.2/source/d/perl/perl.SlackBuild	2021-05-21 06:51:21.743866987 +0200
+++ slackware64-current.3/source/d/perl/perl.SlackBuild	2021-09-18 13:42:53.956949629 +0200
@@ -146,7 +146,7 @@
 #
 USE_THREADS="-Dusethreads -Duseithreads"
 
-if [ "$ARCH" = "x86_64" ]; then # adopted from "Cross Linux From Scratch"
+if [ "$LIBDIRSUFFIX" = "64" ]; then # adopted from "Cross Linux From Scratch"
   # Configure must be told to also use lib64:
   zcat $CWD/perl.configure.multilib.patch.gz | patch -p1 --verbose || exit 1
   # "perl -V" should report that libc is in /lib64
diff -ur slackware64-current.2/source/d/poke/poke.SlackBuild slackware64-current.3/source/d/poke/poke.SlackBuild
--- slackware64-current.2/source/d/poke/poke.SlackBuild	2022-01-31 09:45:37.918393279 +0100
+++ slackware64-current.3/source/d/poke/poke.SlackBuild	2023-07-07 15:32:31.178365617 +0200
@@ -86,6 +86,9 @@
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
 cd $PKGNAM-$VERSION || exit 1
 
+# Disable v9-assembly for sparc32:
+zcat $CWD/jitter_disable_assembly_for_sparc32.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/d/python2/python2.SlackBuild slackware64-current.3/source/d/python2/python2.SlackBuild
--- slackware64-current.2/source/d/python2/python2.SlackBuild	2021-02-13 06:31:55.408945438 +0100
+++ slackware64-current.3/source/d/python2/python2.SlackBuild	2021-09-18 13:42:54.126958210 +0200
@@ -81,12 +81,15 @@
 # We don't want a large libpython*.a:
 zcat $CWD/python.no-static-library.diff.gz | patch -p1 --verbose || exit 1
 
-if [ "$ARCH" = "x86_64" ]; then
+if [ "$LIBDIRSUFFIX" = "64" ]; then
   # Install to lib64 instead of lib and 
   # Python must report /usr/lib64/python2.7/site-packages as python_lib_dir:
   zcat $CWD/python.x86_64.diff.gz | patch -p1 --verbose || exit 1
 fi
 
+# Add _ctypes support for MIPS64
+zcat $CWD/python.mips64-missing-n32-functions.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/d/rust/rust.SlackBuild slackware64-current.3/source/d/rust/rust.SlackBuild
--- slackware64-current.2/source/d/rust/rust.SlackBuild	2021-09-09 19:19:52.527012986 +0200
+++ slackware64-current.3/source/d/rust/rust.SlackBuild	2021-09-18 13:42:54.186961238 +0200
@@ -67,10 +67,14 @@
 
 # If the bootstrap binaries are present, use those. Otherwise bootstrap from
 # installed compiler.
-if /bin/ls *-unknown-linux-gnu.tar.?z 1> /dev/null 2> /dev/null ; then
+if /bin/ls *-unknown-linux-gnu*.tar.?z 1> /dev/null 2> /dev/null ; then
   LOCAL_BOOTSTRAP=no
 else
-  LOCAL_BOOTSTRAP=yes
+  if [ "$LOCAL_BOOTSTRAP" = "" ] && [ -x /usr/bin/cargo ] && [ -x /usr/bin/rustc ] ; then
+    LOCAL_BOOTSTRAP=yes
+  else
+    LOCAL_BOOTSTRAP=no
+  fi
 fi
 
 # https://forge.rust-lang.org/platform-support.html
@@ -98,6 +102,21 @@
 elif [ "$ARCH" = "armv7hl" ]; then
   BARCH="armv7"
   TARCH="$BARCH"
+elif [ "$ARCH" = "arm" ]; then
+  BARCH="armv5te"
+  TARCH="$BARCH"
+elif [ "$ARCH" = "ppc" ]; then
+  BARCH="powerpc"
+  TARCH="$BARCH"
+elif [ "$ARCH" = "ppc64" ]; then
+  BARCH="powerpc64"
+  TARCH="$BARCH"
+elif [ "$ARCH" = "ppc64le" ]; then
+  BARCH="powerpc64le"
+  TARCH="$BARCH"
+elif [ "$ARCH" = "riscv64" ]; then
+  BARCH="riscv64gc"
+  TARCH="$BARCH"
 else
   BARCH="$ARCH"
   TARCH="$ARCH"
@@ -106,6 +125,10 @@
 # Bootstrapping ABI:
 if [ "$ARCH" = "armv7hl" ]; then
   BABI="gnueabihf"
+elif [ "$ARCH" = "arm" ]; then
+  BABI="gnueabi"
+elif [ "$ARCH" = "mips64el" ]; then
+  BABI="gnuabi64"
 else
   BABI="gnu"
 fi
@@ -142,15 +165,27 @@
   zcat $CWD/link_libffi.diff.gz | patch -p1 --verbose || exit 1
 fi
 
+# Patch armv5te atomic operations (already defined in libgcc) and rls AtomicU64
+if [ "${ARCH}" = "arm" ]; then
+  ckorig=`sha256sum vendor/compiler_builtins/src/arm_linux.rs | cut -f1 -d' '`
+  zcat $CWD/atomic_builtins_gcc9.diff.gz | patch -p1 --verbose || exit 1
+  cknew=`sha256sum vendor/compiler_builtins/src/arm_linux.rs | cut -f1 -d' '`
+  # Fix cargo checksum for above patch
+  sed -i "s/$ckorig/$cknew/" vendor/compiler_builtins/.cargo-checksum.json
+fi
+
+# Fix GOT overflow on bootstrap for mips64el:
+zcat $CWD/d-fix-mips64el-bootstrap.diff.gz | patch -p1 --verbose || exit 1
+
 if [ "$LOCAL_BOOTSTRAP" != "yes" ] ; then
   # rust requires bootstrapping with the previous rust version.
   # versions are defined in src/stage0.txt.
   mkdir -p build/cache/$RSTAGE0_DIR
-  cp $CWD/$PKGNAM-std-$RSTAGE0_VERSION-$BARCH-unknown-linux-gnu.tar.?z \
-     $CWD/$SRCNAM-$RSTAGE0_VERSION-$BARCH-unknown-linux-gnu.tar.?z \
+  cp $CWD/$PKGNAM-std-$RSTAGE0_VERSION-$BARCH-unknown-linux-gnu*.tar.?z \
+     $CWD/$SRCNAM-$RSTAGE0_VERSION-$BARCH-unknown-linux-gnu*.tar.?z \
      build/cache/$RSTAGE0_DIR
   mkdir -p build/cache/$CSTAGE0_DIR
-  cp $CWD/cargo-$CSTAGE0_VERSION-$BARCH-unknown-linux-gnu.tar.?z build/cache/$CSTAGE0_DIR
+  cp $CWD/cargo-$CSTAGE0_VERSION-$BARCH-unknown-linux-gnu*.tar.?z build/cache/$CSTAGE0_DIR
 fi
 
 # Build configuration:
@@ -195,8 +234,45 @@
 [target.x86_64-unknown-linux-gnu]
 llvm-config = "/usr/bin/llvm-config"
 
+[target.arm-unknown-linux-gnueabi]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.armv5te-unknown-linux-gnueabi]
+llvm-config = "/usr/bin/llvm-config"
+
 [target.armv7-unknown-linux-gnueabihf]
 llvm-config = "/usr/bin/llvm-config"
+
+[target.aarch64-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.powerpc-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.powerpc64-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.powerpc64le-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.mips-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.mipsel-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.mips64el-unknown-linux-gnuabi64]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.riscv64gc-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.s390x-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.loongarch64-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
 EOF
 fi
 
@@ -258,7 +328,7 @@
 
 # Evidently there are a lot of duplicated libraries in this tree, so let's
 # try to save some space:
-( cd $PKG/usr/lib${LIBDIRSUFFIX}/rustlib/*-linux-gnu/lib && for file in *.so ; do if cmp -s $file ../../../$file ; then ln -sf ../../../$file .; fi; done )
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/rustlib/*-linux-gnu*/lib && for file in *.so ; do if cmp -s $file ../../../$file ; then ln -sf ../../../$file .; fi; done )
 
 # Strip ELF objects:
 find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
diff -ur slackware64-current.2/source/d/rust-bindgen/rust-bindgen.SlackBuild slackware64-current.3/source/d/rust-bindgen/rust-bindgen.SlackBuild
--- slackware64-current.2/source/d/rust-bindgen/rust-bindgen.SlackBuild	2021-09-09 19:19:52.527012986 +0200
+++ slackware64-current.3/source/d/rust-bindgen/rust-bindgen.SlackBuild	2021-09-18 13:42:54.186961238 +0200
@@ -98,6 +98,37 @@
 directory = "vendor"
 EOF
 
+# rustix uses now by default linux_raw backend for syscalls, but seems supported only
+# for aarch64, arm, mipsel, mips64el, powerpc64le, riscv64, x86, and x86_64.
+# Re-add real errno for other architectures, or you can pass "--cfg=rustix_use_libc" 
+# to force libc usage.
+case "$ARCH" in
+  mips|ppc|ppc64|s390x|loongarch64) 
+    (cd vendor
+     rm -rf errno
+     tar xvf $CWD/errno-*.tar.lz
+     for r in rustix*
+     do
+       (cd $r
+       perl -n -e '
+	 if(m/dependencies.libc_errno/) { $status=1; }
+	 if($status && m/"0.3.[012]"/) {
+	   s/"0.3.[012]"/"0.3.3"/;
+	   $status=0;
+	 }
+	 print;
+       ' Cargo.toml > Cargo.toml.tmp
+       \mv Cargo.toml.tmp Cargo.toml
+       cat .cargo-checksum.json  | perl -e '($newck)=split(" ",$ARGV[0]);while(<STDIN>) { s/("Cargo.toml":)"(\S+?)"/$1"$newck"/; print;}' `sha256sum Cargo.toml` > .cargo-checksum.json.tmp
+       \mv .cargo-checksum.json.tmp .cargo-checksum.json
+       )
+     done
+    )
+    #SLKRUSTFLAGS="--cfg=rustix_use_libc"
+    ;;
+esac
+
+RUSTFLAGS="$SLKRUSTFLAGS" \
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
 RUSTONIG_DYNAMIC_LIBONIG=1 \
@@ -104,13 +104,12 @@
 cargo build \
   --offline \
   --release \
-  --target $ARCH-unknown-linux-gnu \
   --verbose \
   $NUMJOBS || exit 1
 
 mkdir -p $PKG/usr/bin
-install -m 755 target/$ARCH-unknown-linux-gnu/release/bindgen \
-  $PKG/usr/bin/
+install -m 755 target/release/bindgen \
+  $PKG/usr/bin/ || exit 1
 
 find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
   | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff -ur slackware64-current/source/d/slacktrack/slacktrack.SlackBuild slackware64-current.2/source/d/slacktrack/slacktrack.SlackBuild
--- slackware64-current/source/d/slacktrack/slacktrack.SlackBuild	2021-08-12 15:41:16.000000000 +0200
+++ slackware64-current.2/source/d/slacktrack/slacktrack.SlackBuild	2021-09-18 13:41:20.862251020 +0200
@@ -8,6 +8,7 @@
 PKGNAM=slacktrack
 export VERSION=2.21
 # Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
 case "$( uname -m )" in
   i?86)    export ARCH=i586
            PKGEXT=txz ;;
@@ -17,6 +18,7 @@
      *)    export ARCH=$( uname -m )
            PKGEXT=txz ;;
 esac
+fi
 BUILD=${BUILD:-1}
 export BUILD
 
@@ -36,5 +38,8 @@
 tar xvf $CWD/slacktrack-$VERSION-source.tar.xz
 cd slacktrack-project || exit 1
 
+# Fix incorrect ARCH assignment if already set
+zcat $CWD/fix_already_set_arch.patch.gz | patch -p1
+
 # Start the "real" SlackBuild:
 ./slacktrack.SlackBuild
diff -ur slackware64-current/source/e/emacs/emacs.SlackBuild slackware64-current.2/source/e/emacs/emacs.SlackBuild
--- slackware64-current/source/e/emacs/emacs.SlackBuild	2021-08-12 15:41:16.000000000 +0200
+++ slackware64-current.2/source/e/emacs/emacs.SlackBuild	2021-09-18 13:41:20.862251020 +0200
@@ -88,6 +88,9 @@
 tar xvf $CWD/$PKGNAM-$TARBALLVER.tar.xz || exit 1
 cd $PKGNAM-$SRCDIRVER || exit 1
 
+# Fix incorrect SIGSTKSZ on or1k:
+zcat $CWD/sigstksz_or1k.diff.gz  | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/installer/build_installer.sh slackware64-current.3/source/installer/build_installer.sh
--- slackware64-current.2/source/installer/build_installer.sh	2020-10-15 01:30:57.815498320 +0200
+++ slackware64-current.3/source/installer/build_installer.sh	2021-09-18 13:42:54.216962753 +0200
@@ -148,9 +148,9 @@
     ADD_NETMODS=1         # add network modules
     ADD_PCMCIAMODS=1      # add pcmcia modules
     ADD_MANPAGES=1        # Add preprocessed manpages
-    DISTRODIR=${DISTRODIR:-"slackware"} # below this you find a,ap,d,..,y
+    #DISTRODIR=${DISTRODIR:-"slackware"} # below this you find a,ap,d,..,y
     COMPRESS_MODS=1       # compress kernel modules
-    LIBDIRSUFFIX=""       # the default
+    #LIBDIRSUFFIX=""       # the default
     RECOMPILE=0           # re-use binaries from existing initrd and packages
     SPLIT_INITRD=0        # Do not create separate initrd for each kernel
     USBBOOT=0             # do not build the USB boot image
diff -ur slackware64-current.2/source/installer/installer.SlackBuild slackware64-current.3/source/installer/installer.SlackBuild
--- slackware64-current.2/source/installer/installer.SlackBuild	2022-09-06 20:27:30.645132064 +0200
+++ slackware64-current.3/source/installer/installer.SlackBuild	2023-05-01 20:57:27.969137234 +0200
@@ -49,6 +49,10 @@
   export ARCH
 fi
 
+if [ -z "$OUTPUT" ]; then
+  OUTPUT=$TMP/installer
+fi
+
 NUMJOBS=${NUMJOBS:-" -j7 "}
 
 mkdir -p $OUTPUT
diff -ur slackware64-current.2/source/kde/kde/cmake/akonadi slackware64-current.3/source/kde/kde/cmake/akonadi
--- slackware64-current.2/source/kde/kde/cmake/akonadi	2020-10-15 01:30:57.815498320 +0200
+++ slackware64-current.3/source/kde/kde/cmake/akonadi	2021-09-18 13:42:54.216962753 +0200
@@ -0,0 +1,28 @@
+if [ "$ARCH" = "mips" -o "$ARCH" = "mipsel" -o "$ARCH" = "arm" -o "$ARCH" = "ppc" -o "$ARCH" = "sh4" -o "$ARCH" = "or1k" -o "$ARCH" = "sparc" ]
+then
+  CMAKE_EXTRA="-DCMAKE_EXE_LINKER_FLAGS=-latomic"
+fi
+mkdir cmake-build
+cd cmake-build
+  cmake \
+    $KDE_OPT_ARGS \
+    -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DMAN_INSTALL_DIR=/usr/man \
+    -DSYSCONF_INSTALL_DIR=/etc/kde \
+    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+    -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+    -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+    -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+    -DBUILD_TESTING=OFF \
+    -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+    $CMAKE_EXTRA \
+    ..
+
diff -ur slackware64-current.2/source/kde/kde/cmake/digikam slackware64-current.3/source/kde/kde/cmake/digikam
--- slackware64-current.2/source/kde/kde/cmake/digikam	2020-10-15 01:30:57.815498320 +0200
+++ slackware64-current.3/source/kde/kde/cmake/digikam	2021-09-18 13:42:54.216962753 +0200
@@ -1,3 +1,8 @@
+if [ "$ARCH" = "mips" -o "$ARCH" = "mipsel" -o "$ARCH" = "arm" -o "$ARCH" = "ppc" ]
+then
+  CMAKE_EXTRA="-DCMAKE_SHARED_LINKER_FLAGS=-latomic"
+fi
+
 mkdir cmake-build
 cd cmake-build
   cmake \
@@ -17,6 +22,7 @@
     -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
     -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
     -DBUILD_TESTING=OFF \
+    $CMAKE_EXTRA \
     -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
     -DPYTHON_EXECUTABLE=/usr/bin/python3 \
     -DENABLE_KFILEMETADATASUPPORT=ON \
diff -ur slackware64-current.2/source/kde/kde/cmake/kdenetwork-filesharing slackware64-current.3/source/kde/kde/cmake/kdenetwork-filesharing
--- slackware64-current.2/source/kde/kde/cmake/kdenetwork-filesharing	2020-10-15 01:30:57.815498320 +0200
+++ slackware64-current.3/source/kde/kde/cmake/kdenetwork-filesharing	2021-09-18 13:42:54.216962753 +0200
@@ -0,0 +1,29 @@
+if [ "$ARCH" = "riscv64" ]
+then
+  CMAKE_EXTRA="-DCMAKE_MODULE_LINKER_FLAGS=-latomic"
+fi
+mkdir cmake-build
+cd cmake-build
+  cmake \
+    $KDE_OPT_ARGS \
+    -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DMAN_INSTALL_DIR=/usr/man \
+    -DSYSCONF_INSTALL_DIR=/etc/kde \
+    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
+    -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+    -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+    -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+    -DBUILD_TESTING=OFF \
+    -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+    -DPYTHON_EXECUTABLE=/usr/bin/python3 \
+    $CMAKE_EXTRA \
+    ..
+
diff -ur slackware64-current.2/source/kde/kde/cmake/kmouth slackware64-current.3/source/kde/kde/cmake/kmouth
--- slackware64-current.2/source/kde/kde/cmake/kmouth	2020-10-15 01:30:57.815498320 +0200
+++ slackware64-current.3/source/kde/kde/cmake/kmouth	2021-09-18 13:42:54.216962753 +0200
@@ -0,0 +1,23 @@
+mkdir cmake-build
+cd cmake-build
+  cmake \
+    $KDE_OPT_ARGS \
+    -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DMAN_INSTALL_DIR=/usr/man \
+    -DSYSCONF_INSTALL_DIR=/etc/kde \
+    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+    -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+    -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+    -DBUILD_TESTING=OFF \
+    -DKF_IGNORE_PLATFORM_CHECK=TRUE \
+    -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+    ..
+
diff -ur slackware64-current.2/source/kde/kde/cmake/krita slackware64-current.3/source/kde/kde/cmake/krita
--- slackware64-current.2/source/kde/kde/cmake/krita	2021-09-30 19:56:09.556980609 +0200
+++ slackware64-current.3/source/kde/kde/cmake/krita	2022-07-26 12:11:11.111111111 +0200
@@ -1,3 +1,12 @@
+if [ "$ARCH" = "mips" -o "$ARCH" = "mipsel" -o "$ARCH" = "arm" -o "$ARCH" = "riscv64" -o "$ARCH" = "sh4" -o "$ARCH" = "or1k" -o "$ARCH" = "sparc" ]
+then
+  CMAKE_EXTRA="-DCMAKE_SHARED_LINKER_FLAGS=-latomic"
+fi
+if [ "$ARCH" = "or1k" ]
+then
+  SLKCFLAGS="-O2 -mcmodel=large"
+fi
+
 mkdir cmake-build
 cd cmake-build
   cmake \
@@ -17,6 +22,7 @@
     -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
     -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
     -DBUILD_TESTING=OFF \
+    $CMAKE_EXTRA \
     -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
     -DPYTHON_EXECUTABLE=/usr/bin/python3 \
     -DBUILD_KRITA_QT_DESIGNER_PLUGINS=ON \
diff -ur slackware64-current.2/source/kde/kde/cmake/ktimer slackware64-current.3/source/kde/kde/cmake/ktimer
--- slackware64-current.2/source/kde/kde/cmake/ktimer	2020-10-15 01:30:57.815498320 +0200
+++ slackware64-current.3/source/kde/kde/cmake/ktimer	2021-09-18 13:42:54.216962753 +0200
@@ -0,0 +1,23 @@
+mkdir cmake-build
+cd cmake-build
+  cmake \
+    $KDE_OPT_ARGS \
+    -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DMAN_INSTALL_DIR=/usr/man \
+    -DSYSCONF_INSTALL_DIR=/etc/kde \
+    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+    -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+    -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+    -DBUILD_TESTING=OFF \
+    -DKF_IGNORE_PLATFORM_CHECK=TRUE \
+    -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+    ..
+
diff -ur slackware64-current.2/source/kde/kde/cmake/kwin slackware64-current.3/source/kde/kde/cmake/kwin
--- slackware64-current.2/source/kde/kde/cmake/kwin	2000-01-01 01:01:01.000000000 +0200
+++ slackware64-current.3/source/kde/kde/cmake/kwin		2024-03-19 11:09:56.174717894 +0100
@@ -0,0 +1,29 @@
+if [ "$ARCH" = "or1k" ]
+then
+  SLKCFLAGS="-O2 -mcmodel=large"
+fi
+
+mkdir cmake-build
+cd cmake-build
+  cmake \
+    $KDE_OPT_ARGS \
+    -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DMAN_INSTALL_DIR=/usr/man \
+    -DSYSCONF_INSTALL_DIR=/etc/kde \
+    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
+    -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+    -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+    -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+    -DBUILD_TESTING=OFF \
+    -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+    -DPYTHON_EXECUTABLE=/usr/bin/python3 \
+    ..
+
diff -ur slackware64-current.2/source/kde/kde/cmake/syntax-highlighting slackware64-current.3/source/kde/kde/cmake/syntax-highlighting
--- slackware64-current.2/source/kde/kde/cmake/syntax-highlighting	2020-10-15 01:30:57.815498320 +0200
+++ slackware64-current.3/source/kde/kde/cmake/syntax-highlighting	2021-09-18 13:42:54.216962753 +0200
@@ -0,0 +1,28 @@
+if [ "$ARCH" = "mips" -o "$ARCH" = "mipsel" -o "$ARCH" = "arm" -o "$ARCH" = "ppc" -o "$ARCH" = "or1k" -o "$ARCH" = "sh4" ]
+then
+  CMAKE_EXTRA="-DCMAKE_SHARED_LINKER_FLAGS=-latomic"
+fi
+mkdir cmake-build
+cd cmake-build
+  cmake \
+    $KDE_OPT_ARGS \
+    -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DMAN_INSTALL_DIR=/usr/man \
+    -DSYSCONF_INSTALL_DIR=/etc/kde \
+    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+    -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+    -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+    -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+    -DBUILD_TESTING=OFF \
+    -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+    $CMAKE_EXTRA \
+    ..
+
diff -ur slackware64-current.2/source/kde/kde/patch/digikam slackware64-current.3/source/kde/kde/patch/digikam
--- slackware64-current.2/source/kde/kde/patch/digikam.patch	2020-10-15 01:30:57.815498320 +0200
+++ slackware64-current.3/source/kde/kde/patch/digikam.patch	2021-10-18 10:41:27.365616223 +0200
@@ -0,0 +1,2 @@
+# Fix missing bigendian on MIPS32:
+cat $CWD/patch/digikam/bigendian.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff -ur slackware64-current.2/source/kde/kde/patch/extra-cmake-modules.patch slackware64-current.3/source/kde/kde/patch/extra-cmake-modules.patch
--- slackware64-current.2/source/kde/kde/patch/extra-cmake-modules.patch	2020-10-15 01:30:57.815498320 +0200
+++ slackware64-current.3/source/kde/kde/patch/extra-cmake-modules.patch	2021-09-18 13:42:54.216962753 +0200
@@ -0,0 +1,2 @@
+# Fix incorrect generation for aarch64:
+cat $CWD/patch/extra-cmake-modules/sip_generator.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff -ur slackware64-current.2/source/kde/kde/patch/kdevelop-pg-qt.patch slackware64-current.3/source/kde/kde/patch/kdevelop-pg-qt.patch
--- slackware64-current.2/source/kde/kde/patch/kdevelop-pg-qt.patch	2020-10-15 01:30:57.815498320 +0200
+++ slackware64-current.3/source/kde/kde/patch/kdevelop-pg-qt.patch	2023-05-12 19:59:17.441802793 +0200
@@ -0,0 +1,2 @@
+# Fix misaligned allocation (only MIPS64 and SPARC64 are affected):
+cat $CWD/patch/kdevelop-pg-qt/aligned_allocate.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff -ur slackware64-current.2/source/l/aalib/aalib.SlackBuild slackware64-current.3/source/l/aalib/aalib.SlackBuild
--- slackware64-current.2/source/l/aalib/aalib.SlackBuild	2021-02-13 06:31:56.092945400 +0100
+++ slackware64-current.3/source/l/aalib/aalib.SlackBuild	2021-09-18 13:42:54.276965781 +0200
@@ -71,7 +71,8 @@
 tar xvf $CWD/${PKGNAM}-$VERSION.tar.gz || exit 1
 cd ${PKGNAM}-${SRCVER} || exit 1
 #cp /usr/share/libtool/config.{guess,sub} .             # libtool-1.x
-cp /usr/share/libtool/config/config.{guess,sub} .       # libtool-2.x
+#cp /usr/share/libtool/config/config.{guess,sub} .       # libtool-2.x
+\cp /usr/share/libtool/build-aux/config.* . 
 sed -i -e "s# -lslang# -lslang1#" configure
 
 zcat $CWD/aalib-aclocal.patch.gz | patch -p1 --verbose || exit 1
diff -ur slackware64-current.2/source/l/apr/apr.SlackBuild slackware64-current.3/source/l/apr/apr.SlackBuild
--- slackware64-current.2/source/l/apr/apr.SlackBuild	2023-02-01 22:28:25.912750044 +0100
+++ slackware64-current.3/source/l/apr/apr.SlackBuild	2023-07-27 14:25:42.455046559 +0200
@@ -78,7 +82,11 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+# Fix incorrect mutex definitions for or1k:
+zcat $CWD/proc_mutex.diff.gz | patch -p1 --verbose || exit 1
+
 CFLAGS="$SLKCFLAGS" \
+LDFLAGS="$SLKLDFLAGS" \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
diff -ur slackware64-current.2/source/l/boost/boost.SlackBuild slackware64-current.3/source/l/boost/boost.SlackBuild
--- slackware64-current.2/source/l/boost/boost.SlackBuild	2021-02-13 06:31:56.229945393 +0100
+++ slackware64-current.3/source/l/boost/boost.SlackBuild	2021-09-18 13:42:54.296966791 +0200
@@ -85,6 +85,13 @@
 tar xvf $CWD/boost_$VERSION.tar.?z || exit 1
 cd boost_$VERSION || exit 1
 
+# From 1.77 BOOST_MATH_NO_ATOMIC_INT was removed from bernoulli code.
+# Reintegrate it:
+zcat $CWD/reintegrate_BOOST_MATH_NO_ATOMIC_INT.diff.gz | patch -p1 --verbose || exit 1
+# Change -mcpu=v7 to -mcpu=leon3 for sparc to support atomic operation (otherwise
+# "Boost.Atomic unsupported target platform: native atomic operations not implemented for bytes):
+zcat $CWD/sparc_cpu_leon3.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/l/chmlib/chmlib.SlackBuild slackware64-current.3/source/l/chmlib/chmlib.SlackBuild
--- slackware64-current.2/source/l/chmlib/chmlib.SlackBuild	2021-02-13 06:31:56.568945374 +0100
+++ slackware64-current.3/source/l/chmlib/chmlib.SlackBuild	2021-09-18 13:42:54.346969315 +0200
@@ -70,6 +70,13 @@
 rm -rf chmlib-$VERSION
 tar xvf $CWD/chmlib-$VERSION.tar.?z* || exit 1
 cd chmlib-$VERSION || exit 1 || exit 1
+
+# These patches are still needed for arm:
+for i in src_chm_lib.c.diff.gz src_extract_chmLib.c.diff.gz
+do
+  zcat $CWD/$i | patch -p1
+done
+
 chown -R root:root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/l/cryfs/cryfs.SlackBuild slackware64-current.3/source/l/cryfs/cryfs.SlackBuild
--- slackware64-current.2/source/l/cryfs/cryfs.SlackBuild	2021-02-13 06:31:56.635945370 +0100
+++ slackware64-current.3/source/l/cryfs/cryfs.SlackBuild	2021-09-18 13:42:54.396971838 +0200
@@ -79,6 +79,9 @@
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
 cd $PKGNAM-$VERSION || exit 1
 
+# Fix building for bigendian or1k
+sed -i -e "s/defined(__ARMEB__)/defined(__ARMEB__) || defined(__or1k__)/" vendor/cryptopp/vendor_cryptopp/config.h
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -89,6 +89,12 @@
 # Oddly, cryfs expects a static boost, so we'll need to hit it with the LART:
 export LDFLAGS="$SLKLDFLAGS -lboost_thread -lboost_program_options -lboost_filesystem -lboost_chrono -lcryptopp -lfuse"
 
+case "$ARCH" in
+  arm|mips|mipsel|ppc|or1k|sh4)
+    export LDFLAGS="$LDFLAGS -latomic"
+    ;;
+esac
+
 # gcc11 fixes:
 zcat $CWD/27587ea1acec5f939a31217f1c43953378f18821.patch.gz | patch -p1 --verbose || exit 1
 
diff -ur slackware64-current.2/source/l/cryptopp/cryptopp.SlackBuild slackware64-current.3/source/l/cryptopp/cryptopp.SlackBuild
--- slackware64-current.2/source/l/cryptopp/cryptopp.SlackBuild	2021-02-13 06:31:56.635945370 +0100
+++ slackware64-current.3/source/l/cryptopp/cryptopp.SlackBuild	2021-09-18 13:42:54.396971838 +0200
@@ -95,6 +95,11 @@
 # Cater to 64-bit Slackware:
 sed -i -e "s,(PREFIX)/lib,(PREFIX)/lib${LIBDIRSUFFIX},g" GNUmakefile
 
+# Disable NEON on armv5:
+sed -i -e "s/if defined(__arm__) || defined(__ARM_NEON)/if defined(__ARM_NEON)/" config.h
+# Fix building for bigendian or1k
+sed -i -e "s/defined(__ARMEB__)/defined(__ARMEB__) || defined(__or1k__)/" config.h
+
 # Compile and install:
 make all dynamic libcryptopp.pc $NUMJOBS \
   CXXFLAGS="${SLKCFLAGS} -DNDEBUG" LDFLAGS="${LDFLAGS}"
diff -ur slackware64-current.2/source/l/ffmpeg/ffmpeg.SlackBuild slackware64-current.3/source/l/ffmpeg/ffmpeg.SlackBuild
--- slackware64-current.2/source/l/ffmpeg/ffmpeg.SlackBuild	2024-02-09 00:19:22.862311554 +0100
+++ slackware64-current.3/source/l/ffmpeg/ffmpeg.SlackBuild	2024-02-10 12:57:11.806102782 +0100
@@ -197,6 +197,9 @@
 tar xf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
 cd $PKGNAM-$VERSION || exit 1
 
+# Fix missing #if...#else...#endif for older (<2.52) librsvg versions:
+zcat $CWD/old_librsvg.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find -L . \
  \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -215,6 +215,7 @@
 
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="$SLKLDFLAGS" \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -263,6 +263,7 @@
   $chromaprint \
   $decklink \
   $fdk \
+  $EXTRACONF \
   $fontconfig \
   $freetype \
   $fribidi \
diff -ur slackware64-current.2/source/l/fftw/fftw.SlackBuild slackware64-current.3/source/l/fftw/fftw.SlackBuild
--- slackware64-current.2/source/l/fftw/fftw.SlackBuild	2021-09-17 05:10:46.589065042 +0200
+++ slackware64-current.3/source/l/fftw/fftw.SlackBuild	2021-09-18 13:42:54.496976886 +0200
@@ -51,22 +51,42 @@
 PKG=$TMP/package-$PKGNAM-$VERSION
 OUTPUT=${OUTPUT:-/tmp}
 
+QUAD=""
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
   SIMD="--enable-sse2 --enable-avx"
+  SIMDF="$SIMD"
+  QUAD="yes"
 elif [ "$ARCH" = "i686" ]; then
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
   LIBDIRSUFFIX=""
   SIMD="--enable-sse2 --enable-avx"
+  SIMDF="$SIMD"
+  QUAD="yes"
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
   SIMD="--enable-sse2 --enable-avx"
-else
-  SLKCFLAGS="-O2"
+  SIMDF="$SIMD"
+  QUAD="yes"
+elif [ "$ARCH" = "armv7hl" ]; then
+  SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX=""
   SIMD=""
+  SIMDF="--enable-neon"
+elif [ "$ARCH" = "aarch64" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX="64"
+  SIMD=""
+  SIMDF="$SIMD"
+else
+  SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+  SIMD=${SIMD:-""}
+  SIMDF=${SIMDF:-""}
+  QUAD=${QUAD:-""}
 fi
 
 rm -rf $PKG
@@ -115,7 +135,7 @@
     --enable-threads \
     --enable-openmp \
     --enable-float \
-    $SIMD \
+    $SIMDF \
     --build=$ARCH-slackware-linux || exit 1
 
 make $NUMJOBS || make || exit 1
@@ -142,24 +162,27 @@
 make install-strip DESTDIR=$PKG || exit 1
 make clean
 
-# compile libfftw3q
-./configure \
-    --prefix=/usr \
-    --libdir=/usr/lib${LIBDIRSUFFIX} \
-    --sysconfdir=/etc \
-    --localstatedir=/var \
-    --mandir=/usr/man \
-    --infodir=/usr/info \
-    --docdir=/usr/doc/fftw-$VERSION \
-    --enable-shared \
-    --disable-static \
-    --enable-threads \
-    --enable-openmp \
-    --enable-quad-precision \
-    --build=$ARCH-slackware-linux || exit 1
+if [ "$QUAD" != "" ]
+then
+    # compile libfftw3q
+    ./configure \
+	--prefix=/usr \
+	--libdir=/usr/lib${LIBDIRSUFFIX} \
+	--sysconfdir=/etc \
+	--localstatedir=/var \
+	--mandir=/usr/man \
+	--infodir=/usr/info \
+	--docdir=/usr/doc/fftw-$VERSION \
+	--enable-shared \
+	--disable-static \
+	--enable-threads \
+	--enable-openmp \
+	--enable-quad-precision \
+	--build=$ARCH-slackware-linux || exit 1
 
-make $NUMJOBS || make || exit 1
-make install-strip DESTDIR=$PKG || exit 1
+    make $NUMJOBS || make || exit 1
+    make install-strip DESTDIR=$PKG || exit 1
+fi
 
 # Don't ship .la files:
 rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
diff -ur slackware64-current.2/source/l/fuse/fuse.SlackBuild slackware64-current.3/source/l/fuse/fuse.SlackBuild
--- slackware64-current.2/source/l/fuse/fuse.SlackBuild	2021-02-13 06:31:57.244945337 +0100
+++ slackware64-current.3/source/l/fuse/fuse.SlackBuild	2021-09-18 13:42:54.546979410 +0200
@@ -72,6 +72,10 @@
 rm -rf $PKGNAM-$VERSION
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
 cd $PKGNAM-$VERSION || exit 1
+
+# Fix AArch64 already defined __u64/__s64/__u32/__s32/__u16:
+zcat $CWD/fuse_kernel-types.patch.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/l/gc/gc.SlackBuild slackware64-current.3/source/l/gc/gc.SlackBuild
--- slackware64-current.2/source/l/gc/gc.SlackBuild	2021-02-13 06:31:57.244945337 +0100
+++ slackware64-current.3/source/l/gc/gc.SlackBuild	2021-09-18 13:42:54.546979410 +0200
@@ -74,6 +74,11 @@
 tar xvf $CWD/libatomic_ops-$LAO_VERSION.tar.?z || exit 1
 mv libatomic_ops-$LAO_VERSION libatomic_ops
 
+if [ "$ARCH" = "sparc" ]; then
+  # Disable sparcv9 code:
+  zcat $CWD/atomic_ops_sparcv8.diff.gz | patch -p1 --verbose || exit 1
+fi
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/l/gjs/gjs.SlackBuild slackware64-current.3/source/l/gjs/gjs.SlackBuild
--- slackware64-current.2/source/l/gjs/gjs.SlackBuild	2021-02-13 06:31:57.244945337 +0100
+++ slackware64-current.3/source/l/gjs/gjs.SlackBuild	2021-09-18 13:42:54.546979410 +0200
@@ -83,6 +83,7 @@
 # Configure, build, and install:
 export CFLAGS="$SLKCFLAGS"
 export CXXFLAGS="$SLKCFLAGS"
+export LDFLAGS="$SLKLDFLAGS"
 mkdir meson-build
 cd meson-build
 meson setup \
diff -ur slackware64-current.2/source/l/glibc/glibc.SlackBuild slackware64-current.3/source/l/glibc/glibc.SlackBuild
--- slackware64-current.2/source/l/glibc/glibc.SlackBuild	2021-08-17 21:01:07.631022697 +0200
+++ slackware64-current.3/source/l/glibc/glibc.SlackBuild	2021-09-18 13:42:54.606982438 +0200
@@ -70,30 +70,37 @@
   i386)
     OPTIMIZ="-O3 -march=i386 -mcpu=i686"
     LIBDIRSUFFIX=""
+    LIBDIRSUFFIXROOT=""
     ;;
   i486)
     OPTIMIZ="-O3 -march=i486 -mtune=i686"
     LIBDIRSUFFIX=""
+    LIBDIRSUFFIXROOT=""
     ;;
   i586)
     OPTIMIZ="-O3 -march=i586 -mtune=i686"
     LIBDIRSUFFIX=""
+    LIBDIRSUFFIXROOT=""
     ;;
   i686)
     OPTIMIZ="-O3 -march=i686"
     LIBDIRSUFFIX=""
+    LIBDIRSUFFIXROOT=""
     ;;
   athlon)
     OPTIMIZ="-O3 -march=athlon"
     LIBDIRSUFFIX=""
+    LIBDIRSUFFIXROOT=""
     ;;
   s390)
     OPTIMIZ="-O3"
     LIBDIRSUFFIX=""
+    LIBDIRSUFFIXROOT=""
     ;;
   x86_64)
     OPTIMIZ="-O3 -fPIC"
     LIBDIRSUFFIX="64"
+    LIBDIRSUFFIXROOT="64"
     ;;
   *)
     OPTIMIZ="-O3"
@@ -102,13 +109,8 @@
 esac
 
 case $ARCH in
-  x86_64)
-    TARGET=${TARGET:-x86_64}
-    ;;
-  i586)
-    # This should be i586 for all 32-bit x86 arch:
-    TARGET=${TARGET:-i586}
-    ;;
+    arm*) TARGET=${TARGET:-$ARCH-slackware-linux-gnueabi} ;;
+    *)    TARGET=${TARGET:-$ARCH-slackware-linux} ;;
 esac
 
 # Hand off the $ARCH variable to $SLACKWARE_ARCH to avoid confusing glibc:
@@ -128,18 +137,54 @@
 # This function fixes a doinst.sh file for x86_64.
 # With thanks to Fred Emmott.
 fix_doinst() {
-  if [ "x$LIBDIRSUFFIX" = "x" ]; then
-    return;
-  fi;
-  # Fix "( cd usr/lib ;" occurrences
-  sed -i "s#lib ;#lib${LIBDIRSUFFIX} ;#" install/doinst.sh
+  if [ "x$LIBDIRSUFFIXROOT" != "x" ]; then
+  # Fix "( cd usr/lib ;" occurrences (shoul fix nothing)
+  sed -i "s#usr/lib ;#usr/lib${LIBDIRSUFFIX} ;#" install/doinst.sh
+  # Fix "( cd lib ;" occurrences
+  sed -i "s# lib ;# lib${LIBDIRSUFFIXROOT} ;#" install/doinst.sh
   # Fix "lib/" occurrences
-  sed -i "s#lib/#lib${LIBDIRSUFFIX}/#g" install/doinst.sh
+  sed -i "s#lib/#lib${LIBDIRSUFFIXROOT}/#g" install/doinst.sh
   # Fix "( cd lib" occurrences
-  sed -i "s#( cd lib\$#( cd lib${LIBDIRSUFFIX}#" install/doinst.sh
+  sed -i "s#( cd lib\$#( cd lib${LIBDIRSUFFIXROOT}#" install/doinst.sh
+  fi;
 
   if [ "$SLACKWARE_ARCH" = "x86_64" ]; then
     sed -i 's#ld-linux.so.2#ld-linux-x86-64.so.2#' install/doinst.sh
+  elif [ "$SLACKWARE_ARCH" = "arm" ]; then
+    sed -i 's#ld-linux.so.2#ld-linux.so.3#' install/doinst.sh
+  elif [ "$SLACKWARE_ARCH" = "armv7hl" ]; then
+    sed -i 's#ld-linux.so.2#ld-linux-armhf.so.3#' install/doinst.sh
+  elif [ "$SLACKWARE_ARCH" = "aarch64" ]; then
+    sed -i 's#ld-linux.so.2#ld-linux-aarch64.so.1#' install/doinst.sh
+    if [[ "x$LIBDIRSUFFIX" != "x" ]]
+    then
+      # All binaries are linked by default to /lib/ld-linux-aarch64.so.1, so make sure
+      # the file/link exists
+      echo -e "\n# Make sure /lib/ld-linux-aarch64.so.1 links to the correct file\n\n(cd lib; ln -sf ../lib$LIBDIRSUFFIXROOT/ld-linux-aarch64.so.1 . )\n" >> install/doinst.sh
+    fi
+  elif [ "${SLACKWARE_ARCH::5}" = "ppc64" ]; then
+    sed -i 's#ld-linux.so.2#ld64.so.1#' install/doinst.sh
+  elif [ "$SLACKWARE_ARCH" = "riscv64" ]; then
+    sed -i 's#ld-linux.so.2#ld-linux-riscv64-lp64d.so.1#' install/doinst.sh
+    # All binaries are linked by default to /lib/ld-linux-riscv64-lp64d.so.1, so make sure
+    # the file/link exists
+    echo -e "\n# Make sure /lib/ld-linux-riscv64-lp64d.so.1 links to the correct file\n(cd lib; ln -sf ../lib$LIBDIRSUFFIXROOT/ld-linux-riscv64-lp64d.so.1 . )\n(cd lib64; ln -sf lp64d/ld-linux-riscv64-lp64d.so.1 . )\n" >> install/doinst.sh
+  elif [ "$SLACKWARE_ARCH" = "s390x" ]; then
+    sed -i 's#ld-linux.so.2#ld64.so.1#' install/doinst.sh
+    # All binaries are linked by default to /lib/ld64.so.1, so make sure
+    # the file/link exists
+    echo -e "\n# Make sure /lib/ld64.so.1 links to the correct file\n\n(cd lib; ln -sf ../lib$LIBDIRSUFFIXROOT/ld64.so.1 . )\n" >> install/doinst.sh
+  elif [ "$SLACKWARE_ARCH" = "or1k" ]; then
+    sed -i 's#ld-linux.so.2#ld-linux-or1k.so.1#' install/doinst.sh
+  elif [ "$SLACKWARE_ARCH" = "hppa" ]; then
+    sed -i 's#ld-linux.so.2#ld.so.1#' install/doinst.sh
+  elif [ "$SLACKWARE_ARCH" = "alpha" ]; then
+    # Alpha adds .1 on some libraries, change it and make additional link
+    for lib in libresolv.so.2 libnsl.so.1 libm.so.6 libutil.so.1 libcrypt.so.1 libBrokenLocale.so.1 libdl.so.2
+    do
+      sed -i "s#$lib #$lib.1 #" install/doinst.sh
+      echo -e "(cd lib$LIBDIRSUFFIX; ln -s $lib.1 $lib 2>/dev/null)\n" >> install/doinst.sh
+    done
   fi
 }
 
@@ -155,6 +200,14 @@
   for git_patch in $CWD/patches/*.patch.gz ; do
     zcat $git_patch | patch -p1 --verbose || exit 1
   done
+
+  # Set time64 as default on 32-bit architectures (only exception is or1k which 
+  # has __TIMESIZE == 64 (/usr/include/bits/timesize.h).
+  case $SLACKWARE_ARCH in
+    arm|armv7hl|hppa|mips|mipsel|ppc|sh4|i?86)
+    zcat $CWD/time64default.diff.gz | patch -p1 --verbose || exit 1
+    ;;
+  esac
 }
 
 # This is going to be the initial $DESTDIR:
@@ -179,7 +207,7 @@
 fi
 
 # Create an incoming directory structure for glibc to be built into:
-mkdir -p $PKG/lib${LIBDIRSUFFIX}
+mkdir -p $PKG/lib${LIBDIRSUFFIXROOT}
 mkdir -p $PKG/sbin
 mkdir -p $PKG/usr/bin
 mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
@@ -241,7 +269,7 @@
   --with-tls \
   --with-__thread \
   --without-cvs \
-  $TARGET-slackware-linux
+  $TARGET
 
 make $NUMJOBS || exit 1
 make $NUMJOBS install install_root=$PKG || exit 1
@@ -274,7 +302,7 @@
 # /usr/lib/debug/ and stripping the debugging symbols from all the other
 # libraries.
 mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/debug
-cp -a $PKG/lib${LIBDIRSUFFIX}/l*.so* $PKG/usr/lib${LIBDIRSUFFIX}/debug
+cp -a $PKG/lib${LIBDIRSUFFIXROOT}/l*.so* $PKG/usr/lib${LIBDIRSUFFIX}/debug
 cp -a $PKG/usr/lib${LIBDIRSUFFIX}/*.a $PKG/usr/lib${LIBDIRSUFFIX}/debug
 # Don't need debug+profile:
 ( cd $PKG/usr/lib${LIBDIRSUFFIX}/debug ; rm -f *_p.* )
@@ -286,8 +314,32 @@
 #mv $PKG/usr/lib${LIBDIRSUFFIX}/debug/*_p.a $PKG/usr/lib${LIBDIRSUFFIX}
 # It might be best to put the unstripped and profiling libraries in glibc-debug and glibc-profile.
 
+if [ "$SLACKWARE_ARCH" = "aarch64" -a "$LIBDIRSUFFIX" = "64" ]
+then
+  # On aarch64 the default linker is on /lib/ld-linux-aarch64.so.1,
+  # and from glibc-2.34 it is no more a link.
+  # Move it to /lib64 so it will be correctly renamed later by this build scripts.
+  mv $PKG/lib/ld-linux-aarch64.so.1 $PKG/lib$LIBDIRSUFFIXROOT
+fi
+
+if [ "$SLACKWARE_ARCH" = "riscv64" ]
+then
+  # On riscv64 the default linker is on /lib/ld-linux-riscv64-lp64d.so.1,
+  # and from glibc-2.34 it is no more a link.
+  # Move it to /lib64/lp64d so it will be correctly renamed later by this build scripts.
+  mv $PKG/lib/ld-linux-riscv64-lp64d.so.1 $PKG/lib$LIBDIRSUFFIXROOT
+fi
+
+if [ "$SLACKWARE_ARCH" = "s390x" ]
+then
+  # On s390x the default linker is on /lib/ld64.so.1,
+  # and from glibc-2.34 it is no more a link.
+  # Move it to /lib64 so it will be correctly renamed later by this build scripts.
+  mv $PKG/lib/ld64.so.1 $PKG/lib$LIBDIRSUFFIXROOT
+fi
+
 # I don't think "strip -g" causes the pthread problems.  It's --strip-unneeded that does.
-strip -g $PKG/lib${LIBDIRSUFFIX}/l*.so*
+strip -g $PKG/lib${LIBDIRSUFFIXROOT}/l*.so*
 strip -g $PKG/usr/lib${LIBDIRSUFFIX}/l*.so*
 strip -g $PKG/usr/lib${LIBDIRSUFFIX}/lib*.a
 
@@ -399,7 +451,7 @@
 chmod 755 etc/profile.d/*
 mkdir -p lib${LIBDIRSUFFIX}
 cp -a $PKG/lib${LIBDIRSUFFIX}/* lib${LIBDIRSUFFIX}
-( cd lib${LIBDIRSUFFIX}
+( cd lib${LIBDIRSUFFIXROOT}
   mkdir incoming
   mv *so* incoming
   mv incoming/libmemusage.so .
@@ -420,6 +472,7 @@
   # installed in the same directory anyway. So give it the previous name
   # format:
   mv ld-linux*-${VERSION}.so ld-${VERSION}.so
+  mv ld64*-${VERSION}.so ld-${VERSION}.so
 )
 mkdir -p usr
 cp -a $PKG/usr/bin usr
@@ -472,7 +525,7 @@
 sed -i "s/@@VERSION@@/$VERSION/g" install/doinst.sh
 # Call the function to fix doinst.sh where $LIBDIRSUFFIX is needed:
 fix_doinst
-( cd lib${LIBDIRSUFFIX}
+( cd lib${LIBDIRSUFFIXROOT}
   mkdir incoming
   mv *so* incoming
   mv incoming/libmemusage.so .
@@ -493,6 +546,7 @@
   # installed in the same directory anyway. So give it the previous name
   # format:
   mv ld-linux*-${VERSION}.so ld-${VERSION}.so
+  mv ld64*-${VERSION}.so ld-${VERSION}.so
 )
 # Build the package:
 /sbin/makepkg -l y -c n $TMP/glibc-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
diff -ur slackware64-current.2/source/l/gnu-efi/gnu-efi.SlackBuild slackware64-current.3/source/l/gnu-efi/gnu-efi.SlackBuild
--- slackware64-current.2/source/l/gnu-efi/gnu-efi.SlackBuild	2021-08-17 21:01:07.631022697 +0200
+++ slackware64-current.3/source/l/gnu-efi/gnu-efi.SlackBuild	2021-09-18 13:42:54.606982438 +0200
@@ -71,6 +71,10 @@
 chown -R root:root .
 chmod -R u+w,go+r-w,a-s .
 
+# gnu-efi search "initplat.c" in lib/$ARCH, but ARCH is wrongly set
+SLACKWARE_ARCH=$ARCH
+unset ARCH
+
 sed -i "s,/usr/local,/usr,g" Make.defaults
 
 make CPPFLAGS="$SLKCFLAGS" || exit 1
@@ -89,6 +93,9 @@
 )
 strip -g $PKG/usr/lib${LIBDIRSUFFIX}/libefi.a
 
+# Restore ARCH after library build
+ARCH=$SLACKWARE_ARCH
+
 mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
 cp -a ChangeLog README* \
  $PKG/usr/doc/$PKGNAM-$VERSION
diff -ur slackware64-current.2/source/l/gobject-introspection/gobject-introspection.SlackBuild slackware64-current.3/source/l/gobject-introspection/gobject-introspection.SlackBuild
--- slackware64-current.2/source/l/gobject-introspection/gobject-introspection.SlackBuild	2021-02-13 06:31:58.058945292 +0100
+++ slackware64-current.3/source/l/gobject-introspection/gobject-introspection.SlackBuild	2021-09-18 13:42:54.756990010 +0200
@@ -106,7 +106,7 @@
   --buildtype=release \
   -Dgtk_doc=true \
   .. || exit 1
-  "${NINJA:=ninja}" $NUMJOBS || exit 1
+  "${NINJA:=ninja}" $NUMJOBS || $NINJA || exit 1
   DESTDIR=$PKG $NINJA install || exit 1
 cd ..
 
diff -ur slackware64-current.2/source/l/gtk+2/gtk+2.SlackBuild slackware64-current.3/source/l/gtk+2/gtk+2.SlackBuild
--- slackware64-current.2/source/l/gtk+2/gtk+2.SlackBuild	2021-02-13 06:31:58.058945292 +0100
+++ slackware64-current.3/source/l/gtk+2/gtk+2.SlackBuild	2021-09-18 13:42:54.756990010 +0200
@@ -123,9 +123,9 @@
 # Check the host value that is passed to the compile to the one in this script:
 host="$ARCH-slackware-linux"
 compile_host=$(grep 'host_triplet =' gtk/Makefile | sed -e "s/.* = //")
-if [ "x$compile_host" != "x$host" ]; then
-  echo "Host mismatch: compile='$compile_host', SlackBuild='$host'" && exit 1
-fi
+#if [ "x$compile_host" != "x$host" ]; then
+#  echo "Host mismatch: compile='$compile_host', SlackBuild='$host'" && exit 1
+#fi
 
 make install \
   RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false \
@@ -148,7 +148,7 @@
 # for places where we have two copies of the GTK+ package installed.
 # (we might have x86_64 and i486 packages on the same system, for example.)
 case "$host" in
-  s390x*|x86_64*)
+  s390x*|*64*)
    mv $PKG/usr/bin/gtk-query-immodules-2.0{,-64}
    ( cd $PKG/usr/bin
      ln -sf gtk-query-immodules-2.0-64 gtk-query-immodules-2.0
diff -ur slackware64-current.2/source/l/icu4c/icu4c.SlackBuild slackware64-current.3/source/l/icu4c/icu4c.SlackBuild
--- slackware64-current.2/source/l/icu4c/icu4c.SlackBuild	2021-04-17 20:02:06.771940219 +0200
+++ slackware64-current.3/source/l/icu4c/icu4c.SlackBuild	2021-09-18 13:42:54.776991019 +0200
@@ -80,9 +80,18 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
   -o -perm 400 \) -exec chmod 644 {} \+
 
+if [ "$ARCH" = "armv7hl" ]; then
+  # On Arm it generated wrong libicudata
+  zcat $CWD/arm.patch.gz | patch -p1 || exit 1
+fi
+
+# On PPC64 "out" dir is not automatically generated
+mkdir -p source/data/out
+
 cd source/
   CFLAGS="$SLKCFLAGS -Wno-gnu-line-marker" \
   CXXFLAGS="$SLKCFLAGS -Wno-gnu-line-marker" \
+  LDFLAGS="$SLKLDFLAGS" \
   ./configure \
     --prefix=/usr \
     --libdir=/usr/lib${LIBDIRSUFFIX} \
diff -ur slackware64-current.2/source/l/jemalloc/jemalloc.SlackBuild slackware64-current.3/source/l/jemalloc/jemalloc.SlackBuild
--- slackware64-current.2/source/l/jemalloc/jemalloc.SlackBuild	2021-02-13 06:31:58.489945268 +0100
+++ slackware64-current.3/source/l/jemalloc/jemalloc.SlackBuild	2023-06-17 17:07:39.954674081 +0200
@@ -71,6 +74,9 @@
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
 cd $PKGNAM-$VERSION || exit 1
 
+# Fix missing alignment for SPARC 32 bit:
+zcat $CWD/lg_quantum_sparc.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find -L . \
  \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
diff -ur slackware64-current.2/source/l/lensfun/lensfun.SlackBuild slackware64-current.3/source/l/lensfun/lensfun.SlackBuild
--- slackware64-current.2/source/l/lensfun/lensfun.SlackBuild	2021-02-13 06:31:58.738945254 +0100
+++ slackware64-current.3/source/l/lensfun/lensfun.SlackBuild	2021-09-18 13:42:54.816993038 +0200
@@ -60,6 +60,7 @@
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
+  CMAKE_EXTRA="-DBUILD_FOR_SSE=ON -DBUILD_FOR_SSE2=ON"
 elif [ "$ARCH" = "armv7hl" ]; then
   SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
   LIBDIRSUFFIX=""
@@ -98,8 +99,7 @@
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DLIB_SUFFIX=${LIBDIRSUFFIX} \
     -DBUILD_LENSTOOL=ON \
-    -DBUILD_FOR_SSE=ON \
-    -DBUILD_FOR_SSE2=ON \
+    $CMAKE_EXTRA \
     -DBUILD_TESTS=OFF \
     -DINSTALL_HELPER_SCRIPTS=ON \
     .. || exit 1
diff -ur slackware64-current/source/l/libcap/libcap.SlackBuild slackware64-current.2/source/l/libcap/libcap.SlackBuild
--- slackware64-current/source/l/libcap/libcap.SlackBuild	2021-03-14 18:51:45.109039507 +0100
+++ slackware64-current.2/source/l/libcap/libcap.SlackBuild	2021-09-18 13:40:06.198482943 +0200
@@ -96,7 +96,7 @@
 sed -i 's@^BUILD_GPERF@#\0@' Make.Rules
 
 make DYNAMIC=yes GOLANG=$GOSUPPORT || exit 1
-make install RAISE_SETFCAP=no GOLANG=$GOSUPPORT DESTDIR=$PKG man_prefix=/usr || exit 1
+make install RAISE_SETFCAP=no GOLANG=$GOSUPPORT DESTDIR=$PKG man_prefix=/usr lib=lib${LIBDIRSUFFIX} || exit 1
 chmod 755 $PKG/lib${LIBDIRSUFFIX}/libcap.so*
 
 # Don't ship the static libcap.a. Leave libpsx.a alone, though - there's no
diff -ur slackware64-current/source/l/libffi/libffi.SlackBuild slackware64-current.2/source/l/libffi/libffi.SlackBuild
--- slackware64-current/source/l/libffi/libffi.SlackBuild	2022-10-29 12:56:09.465547088 +0200
+++ slackware64-current.2/source/l/libffi/libffi.SlackBuild	2024-02-26 13:20:38.145654765 +0100
@@ -104,6 +104,11 @@
   --disable-exec-static-tramp \
   --build=$ARCH-slackware-linux || exit 1
 
+# On Alpha and MIPS64 LONG_DOUBLE is not correctly detectd, force it:
+if [ "$ARCH" = "alpha" -o "$ARCH" = "mips64el" ]; then
+  sed -i -e 's|/. #undef HAVE_LONG_DOUBLE ./|#define HAVE_LONG_DOUBLE 1|' ${ARCH}-*/fficonfig.h
+fi
+
 make || exit 1
 make install DESTDIR=$PKG || exit 1
 
diff -ur slackware64-current.2/source/l/libjpeg-turbo/libjpeg-turbo.SlackBuild slackware64-current.3/source/l/libjpeg-turbo/libjpeg-turbo.SlackBuild
--- slackware64-current.2/source/l/libjpeg-turbo/libjpeg-turbo.SlackBuild	2021-04-24 05:12:21.810644855 +0200
+++ slackware64-current.3/source/l/libjpeg-turbo/libjpeg-turbo.SlackBuild	2021-09-18 13:42:54.916998086 +0200
@@ -47,6 +47,8 @@
 
 NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
 
+WITH_SIMD=""
+
 if [ "$ARCH" = "i386" ]; then
   SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
   LIBDIRSUFFIX=""
@@ -102,6 +104,7 @@
     -DCMAKE_INSTALL_DOCDIR=/usr/doc/libjpeg-turbo-${VERSION} \
     -DCMAKE_INSTALL_MANDIR=/usr/man \
     -DENABLE_STATIC=OFF \
+    $WITH_SIMD \
     .. || exit 1
   make $NUMJOBS || make || exit 1
   make install DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/l/libkarma/libkarma.SlackBuild slackware64-current.3/source/l/libkarma/libkarma.SlackBuild
--- slackware64-current.2/source/l/libkarma/libkarma.SlackBuild	2021-02-13 06:31:59.754945198 +0100
+++ slackware64-current.3/source/l/libkarma/libkarma.SlackBuild	2021-09-18 13:42:54.916998086 +0200
@@ -79,7 +79,7 @@
 make $NUMJOBS PREFIX=/usr || make PREFIX=/usr || exit 1
 make install PREFIX=$PKG/usr || exit 1
 
-if [ "$ARCH" = "x86_64" ]; then
+if [ "$LIBDIRSUFFIX" != "" ]; then
   mv $PKG/usr/lib $PKG/usr/lib${LIBDIRSUFFIX}
 fi
 rm $PKG/usr/lib${LIBDIRSUFFIX}/*.a
diff -ur slackware64-current.2/source/l/libmad/libmad.SlackBuild slackware64-current.3/source/l/libmad/libmad.SlackBuild
--- slackware64-current.2/source/l/libmad/libmad.SlackBuild	2021-02-13 06:31:59.776945197 +0100
+++ slackware64-current.3/source/l/libmad/libmad.SlackBuild	2021-09-18 13:42:54.957000105 +0200
@@ -81,6 +81,11 @@
 # Remove obsolete --force-mem optimization:
 sed -i "s/-fforce-mem//g" configure
 
+# On MIPS platform, from gcc 4.4, =h constraint (save HI register) was removed 
+# to avoid unpredictable code sequences, but the compiler will generate the
+# best optimized code with at least -O2 and generic 64-bit C code.
+sed -i 's/(FPM_64BIT/(FPM_64BIT) || defined(FPM_MIPS/' fixed.h
+
 # Configure:
 CFLAGS="$SLKCFLAGS" \
 ./configure \
diff -ur slackware64-current.2/source/l/librsvg/librsvg.SlackBuild slackware64-current.3/source/l/librsvg/librsvg.SlackBuild
--- slackware64-current.2/source/l/librsvg/librsvg.SlackBuild	2023-04-13 12:01:39.548165338 +0200
+++ slackware64-current.3/source/l/librsvg/librsvg.SlackBuild	2023-07-17 19:25:09.698986105 +0200
@@ -76,6 +80,12 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+# On 32 mips, the error "Undefined temporary symbol $BB14_1" will raise by newer rust. 
+# Adding "-C opt-level=1" is a workaround
+if [ "$SLKRUSTFLAGS" != "" ]; then
+  export RUSTFLAGS="$SLKRUSTFLAGS"
+fi
+
 CFLAGS="$SLKCFLAGS" \
 unshare -n ./configure \
   --prefix=/usr \
diff -ur slackware64-current.2/source/l/libsigsegv/libsigsegv.SlackBuild slackware64-current.3/source/l/libsigsegv/libsigsegv.SlackBuild
--- slackware64-current.2/source/l/libsigsegv/libsigsegv.SlackBuild	2015-10-15 22:22:29.000000000 +0200
+++ slackware64-current.3/source/l/libsigsegv/libsigsegv.SlackBuild	2017-11-07 20:03:35.998841066 +0100
@@ -65,6 +65,9 @@
 tar xvf $CWD/${PKGNAM}-$VERSION.tar.xz || exit 1
 cd ${PKGNAM}-$VERSION
 
+# Fix incorrect NetBSD detection on alpha platform:
+zcat $CWD/alpha_linux.diff.gz | patch -p1 --verbose || exit 1
+
 # Make sure ownerships and permissions are sane:
 chown -R root:root .
 find . \
diff -ur slackware64-current.2/source/l/libtheora/libtheora.SlackBuild slackware64-current.3/source/l/libtheora/libtheora.SlackBuild
--- slackware64-current.2/source/l/libtheora/libtheora.SlackBuild	2021-09-18 13:40:06.318488999 +0200
+++ slackware64-current.3/source/l/libtheora/libtheora.SlackBuild	2021-09-18 13:42:55.107007676 +0200
@@ -84,6 +84,7 @@
 
 # Configure:
 CFLAGS="$SLKCFLAGS" \
+LDFLAGS="-lm" \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
diff -ur slackware64-current.2/source/l/liburing/liburing.SlackBuild slackware64-current.3/source/l/liburing/liburing.SlackBuild
--- slackware64-current.2/source/l/liburing/liburing.SlackBuild	2021-02-13 06:32:00.724945144 +0100
+++ slackware64-current.3/source/l/liburing/liburing.SlackBuild	2021-09-18 13:42:55.237014238 +0200
@@ -78,6 +78,12 @@
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
 cd $PKGNAM-$VERSION || exit 1
 
+# Fix missing __NR_mmap on 32bits platform for test program:
+zcat $CWD/nr_mmap-missing-on-32bits.diff.gz | patch -p1 --verbose || exit 1
+
+# Fix missing MAP_HUGE_2MB on s390x for test program:
+zcat $CWD/missing_map_huge_2mb.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/l/libvpx/libvpx.SlackBuild slackware64-current.3/source/l/libvpx/libvpx.SlackBuild
--- slackware64-current.2/source/l/libvpx/libvpx.SlackBuild	2021-03-26 18:41:08.280005240 +0100
+++ slackware64-current.3/source/l/libvpx/libvpx.SlackBuild	2021-09-18 13:42:55.257015248 +0200
@@ -59,10 +59,21 @@
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
   ARCHOPTS="--target=x86_64-linux-gcc --enable-pic"
-else
-  SLKCFLAGS="-O2"
+elif [ "$ARCH" = "armv7hl" ]; then
+  ARCHOPTS="--target=armv7-linux-gcc --cpu=cortex-a8"
   LIBDIRSUFFIX=""
-  ARCHOPTS="--target=${ARCH}-linux-gcc"
+  export CC=gcc
+  export LD=gcc
+  export AS=as
+  export AR=ar
+elif [ "$ARCH" = "aarch64" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX="64"
+  ARCHOPTS="--target=arm64-linux-gcc"
+else
+  SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+  ARCHOPTS=${ARCHOPTS:-"--target=generic-gnu"}
 fi
 
 TMP=${TMP:-/tmp}
diff -ur slackware64-current/source/l/libwpg/libwpg.SlackBuild slackware64-current.2/source/l/libwpg/libwpg.SlackBuild
--- slackware64-current/source/l/libwpg/libwpg.SlackBuild	2021-03-14 18:51:45.109039507 +0100
+++ slackware64-current.2/source/l/libwpg/libwpg.SlackBuild	2021-09-18 13:40:06.198482943 +0200
@@ -87,8 +92,13 @@
 # Add AArch64 architecture (and new architectures):
 \cp /usr/share/libtool/build-aux/config.* .
 
+if [ -z "$TARGET" ]; then
+  TARGET=$ARCH-slackware-linux
+fi
+
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="$SLKLDFLAGS" \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -96,8 +106,8 @@
   --localstatedir=/var \
   --docdir=/usr/doc/$PKGNAM-$VERSION \
   --disable-static \
-  --build=$ARCH-slackware-linux \
-  --host=$ARCH-slackware-linux || exit 1
+  --build=$TARGET \
+  --host=$TARGET || exit 1
 
 make $NUMJOBS || make || exit 1
 make install-strip DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/l/mozilla-nss/mozilla-nss.SlackBuild slackware64-current.3/source/l/mozilla-nss/mozilla-nss.SlackBuild
--- slackware64-current.2/source/l/mozilla-nss/mozilla-nss.SlackBuild	2021-09-06 19:57:58.896772281 +0200
+++ slackware64-current.3/source/l/mozilla-nss/mozilla-nss.SlackBuild	2021-09-18 13:42:55.317018276 +0200
@@ -56,7 +56,6 @@
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
-  export USE_64=1
 elif [ "$ARCH" = "armv7hl" ]; then
   SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
   LIBDIRSUFFIX=""
@@ -70,6 +69,11 @@
 
 NUMJOBS=${NUMJOBS:-" -j $(expr $(nproc) + 1) "}
 
+if [ "$LIBDIRSUFFIX" = "64" -o `gcc -dM -E - < /dev/null | grep -c LP64.*1` -gt 0 ]
+then
+  export USE_64=1
+fi
+
 rm -rf $PKG
 mkdir -p $TMP $PKG
 
@@ -100,8 +100,23 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+EXTRA_NSS=""
+if [ "$ARCH" = "ppc64" ]
+then
+  # PowerPC64 (big-endian) porting is compiled to support POWER4: disabling POWER8 assembler
+  # and vsx crypto instructions 
+  #zcat $CWD/ppc64-disable-power8-asm.diff.gz | patch -p1 --verbose || exit 1
+  EXTRA_NSS="-Ddisable_crypto_vsx=1"
+elif [ "$ARCH" = "i586" ]
+then
+  EXTRA_NSS="-m32"
+fi
+
+# Add Alpha architecture to 64 bit pool:
+zcat $CWD/newarch_use_nss_64.diff.gz | patch -p1 --verbose || exit 1
+
 cd nss
-./build.sh -v $NUMJOBS --opt --system-sqlite --enable-libpkix --disable-tests
+./build.sh -v $NUMJOBS --opt --system-sqlite --enable-libpkix --disable-tests $EXTRA_NSS
 cd -
 
 # Install all the needed stuff to the package dir:
diff -ur slackware64-current.2/source/l/mozjs115/mozjs115.SlackBuild slackware64-current.3/source/l/mozjs115/mozjs115.SlackBuild
--- slackware64-current.2/source/l/mozjs115/mozjs115.SlackBuild	2021-02-22 21:48:23.402992123 +0100
+++ slackware64-current.3/source/l/mozjs115/mozjs115.SlackBuild	2021-09-18 13:42:55.387021810 +0200
@@ -59,6 +59,7 @@
 elif [ "$ARCH" = "i686" ]; then
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
   LIBDIRSUFFIX=""
+  EXTRACONF="--target=$ARCH-slackware-linux --host=$ARCH-slackware-linux"
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
@@ -113,6 +113,9 @@
 # Remove bundled zlib directory and use system version:
 rm -rf modules/zlib
 
+# Build big-endian data file for ppc, ppc64, mips, and s390:
+( cd config/external/icu/data ; icupkg -tb icu*l.dat `basename icu*l.dat l.dat`b.dat )
+
 cd js/src
 
 # We need to do this because patches above touch configure.in:
@@ -120,6 +123,7 @@
 
 CFLAGS+="$SLKCFLAGS -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp " \
 CXXFLAGS+="$SLKCFLAGS -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp " \
+LDFLAGS+="$SLKLDFLAGS" \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -137,6 +141,7 @@
   --disable-debug \
   --enable-pie \
   --disable-jemalloc \
+  $EXTRACONF \
   --build=$ARCH-slackware-linux \
 
 make $NUMJOBS || make || exit 1
diff -ur slackware64-current.2/source/l/nodejs/nodejs.SlackBuild slackware64-current.3/source/l/nodejs/nodejs.SlackBuild
--- slackware64-current.2/source/l/nodejs/nodejs.SlackBuild	2022-04-14 11:20:02.912848385 +0200
+++ slackware64-current.3/source/l/nodejs/nodejs.SlackBuild	2022-06-27 04:16:05.625970512 +0200
@@ -88,6 +88,13 @@
 sed -i "s/'lib'/'lib${LIBDIRSUFFIX}'/" lib/module.js
 sed -i "s|\"lib\"|\"lib${LIBDIRSUFFIX}\"|" deps/npm/lib/npm.js
 
+## Fix various non-x86 architectures:
+for p in $CWD/patches/*.diff.gz
+do
+  zcat $p | patch --verbose -p1 || exit 1
+done
+
+
 # Not sure if this one is really needed.
 #sed -i "s|math.h|cmath|" src/node_crypto.cc
 
diff -ur slackware64-current.2/source/l/opencv/opencv.SlackBuild slackware64-current.3/source/l/opencv/opencv.SlackBuild
--- slackware64-current.2/source/l/opencv/opencv.SlackBuild	2021-10-02 10:49:52.075396075 +0200
+++ slackware64-current.3/source/l/opencv/opencv.SlackBuild	2023-07-07 12:36:45.236164422 +0200
@@ -81,6 +81,10 @@
 
 tar xvf $CWD/${PKGNAM}_contrib-${VERSION}.tar.?z || exit 1
 
+# HPPA wants structure that cares memory locking aligned to 16 bytes.
+# Skip static assertion 'static_assert(alignof(T) <= 8, "");' on HPPA:
+zcat $CWD/disable_protobuf_static_assert.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -100,6 +100,7 @@
     -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+    $CMAKE_EXTRA \
     -DCMAKE_BUILD_TYPE="Release" \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DINSTALL_MAN_DIR=man \
diff -ur slackware64-current.2/source/l/opus/opus.SlackBuild slackware64-current.3/source/l/opus/opus.SlackBuild
--- slackware64-current.2/source/l/opus/opus.SlackBuild	2021-10-02 2024-04-06 20:29:00.969838645 +0200
+++ slackware64-current.3/source/l/opus/opus.SlackBuild	2023-07-07 2024-04-11 10:36:17.472676211 +0200
@@ -70,6 +70,11 @@
 TMP=${TMP:-/tmp}
 PKG=$TMP/package-$PKGNAM
 
+case "$ARCH" in
+  i?86|x86_64|armv7hl|aarch64)
+    EXTRACONF="-Dintrinsics=enabled -Drtcd=enabled" ;;
+esac
+
 rm -rf $PKG
 mkdir -p $TMP $PKG
 
@@ -106,8 +111,7 @@
   --localstatedir=/var \
   --buildtype=release \
   -Dcustom-modes=true \
-  -Drtcd=enabled \
-  -Dintrinsics=enabled \
+  $EXTRACONF \
   -Ddocdir=/usr/doc/opus-$VERSION \
   .. || exit 1
   "${NINJA:=ninja}" $NUMJOBS || exit 1
diff -ur slackware64-current.2/source/l/pcre/pcre.SlackBuild slackware64-current.3/source/l/pcre/pcre.SlackBuild
--- slackware64-current.2/source/l/pcre/pcre.SlackBuild	2021-06-16 20:06:20.130041857 +0200
+++ slackware64-current.3/source/l/pcre/pcre.SlackBuild	2021-09-18 13:42:55.527028876 +0200
@@ -46,6 +46,8 @@
 
 NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
 
+ENABLE_JIT="--enable-jit"
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
@@ -87,7 +89,7 @@
   --enable-utf8 \
   --enable-pcre16 \
   --enable-pcre32 \
-  --enable-jit \
+  $ENABLE_JIT \
   --enable-unicode-properties \
   --enable-pcregrep-libz \
   --enable-pcregrep-libbz2 \
diff -ur slackware64-current.2/source/l/pcre2/pcre2.SlackBuild slackware64-current.3/source/l/pcre2/pcre2.SlackBuild
--- slackware64-current.2/source/l/pcre2/pcre2.SlackBuild	2021-05-27 20:13:43.502030635 +0200
+++ slackware64-current.3/source/l/pcre2/pcre2.SlackBuild	2021-09-18 13:42:55.577031400 +0200
@@ -50,6 +50,8 @@
 TMP=${TMP:-/tmp}
 PKG=$TMP/package-$PKGNAM
 
+ENABLE_JIT="--enable-jit"
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
@@ -88,7 +90,7 @@
   --enable-static=no \
   --enable-pcre2-16 \
   --enable-pcre2-32 \
-  --enable-jit \
+  $ENABLE_JIT \
   --enable-pcre2grep-libz \
   --enable-pcre2grep-libbz2 \
   --enable-pcre2test-libreadline \
diff -ur slackware64-current.2/source/l/poppler/poppler.SlackBuild slackware64-current.3/source/l/poppler/poppler.SlackBuild
--- slackware64-current.2/source/l/poppler/poppler.SlackBuild	2024-04-06 20:28:40.018721799 +0200
+++ slackware64-current.3/source/l/poppler/poppler.SlackBuild	2024-04-07 21:16:01.527973848 +0200
@@ -47,6 +47,10 @@
 
 NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
 
+if [ ! -f /usr/bin/qmake6 ]; then
+  QT6OPT="-DENABLE_QT6=OFF"
+fi
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
diff -ur slackware64-current.2/source/l/pulseaudio/pulseaudio.SlackBuild slackware64-current.3/source/l/pulseaudio/pulseaudio.SlackBuild
--- slackware64-current.2/source/l/pulseaudio/pulseaudio.SlackBuild	2021-05-27 20:13:43.502030635 +0200
+++ slackware64-current.3/source/l/pulseaudio/pulseaudio.SlackBuild	2021-09-18 13:42:55.577031400 +0200
@@ -94,6 +94,9 @@
 # When built by meson, this patch also required to fix the above issue:
 zcat $CWD/pulseaudio-autostart-meson.build.patch.gz | patch -p1 --verbose || exit 1
 
+# Fixing time64 on 32 bit systems for padsp (should not be defined):
+zcat $CWD/padsp_disable_time64.diff.gz | patch -p1 --verbose || exit 1
+
 # Configure, build, and install:
 export CFLAGS="$SLKCFLAGS"
 export CXXFLAGS="$SLKCFLAGS"
diff -ur slackware64-current.2/source/l/qt5/qt5.SlackBuild slackware64-current.3/source/l/qt5/qt5.SlackBuild
--- slackware64-current.2/source/l/qt5/qt5.SlackBuild	2021-08-29 03:37:59.278649809 +0200
+++ slackware64-current.3/source/l/qt5/qt5.SlackBuild	2021-09-18 13:42:55.657035438 +0200
@@ -149,6 +149,21 @@
 cd - 1>/dev/null
 cd qtwebengine
   zcat $CWD/patches/qt5-qtwebengine-gcc11.patch.gz | patch -p1 --verbose || exit 1
+  zcat $CWD/patches/qtwebengine-mips-ppc-riscv-s390-support.diff.gz | patch -p1 --verbose || exit 1
+  zcat $CWD/patches/qtwebengine-mips32-limit-mksnapshot-memory.diff.gz | patch -p1 --verbose || exit 1
+  zcat $CWD/patches/qtwebengine-bigendian.diff.gz | patch -p1 --verbose || exit 1
+  zcat $CWD/patches/qtwebengine-time64_disable_zlib.diff.gz | patch -p1 --verbose || exit 1
+  tar xvf $CWD/patches/qtwebengine-mips-ppc-riscv-s390-newfiles.tar.gz
+  if [ "${ARCH::3}" = "ppc" -o "$ARCH" = "mips64el" -o "$ARCH" = "riscv64" -o "$ARCH" = "s390x" ]
+  then
+    # Disable getcontext on breakpad (missing assembler):
+    zcat $CWD/patches/qtwebengine-nogetcontext.diff.gz | patch -p1 --verbose || exit 1
+  fi
+  if [ "$ARCH" = "mips" -o "$ARCH" = "mipsel" ]
+  then
+    # Add atomic linking for mips 32-bits architecture
+    sed -i 's/LIBS_PRIVATE += /LIBS_PRIVATE += -latomic /' src/tools/qwebengine_convert_dict/qwebengine_convert_dict.pro
+  fi
 cd - 1>/dev/null
 
 # CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui
@@ -175,6 +184,22 @@
   unset FFMPEG_OPTION
 fi
 
+if [ "$ARCH" = "arm" ]; then
+  # Fix incorrect target cpu (armv7 instead of armv5) for qtwebengine
+  # and remove the use of thumb2 instructions (not present on armv5)
+  zcat $CWD/patches/qtwebengine-armv5.patch.gz | patch -p1 --verbose || exit 1
+fi
+
+# Add s390x/loongarch support to qtscript (JSVALUE64: error: cast from 'QTJSC::JSCell*' to 'int32_t' {aka 'int'} loses precision [-fpermissive])
+zcat $CWD/patches/qt5.qtscript.s390x_loongarch_support.diff.gz | patch -p1 --verbose || exit 1
+# Add loongarch in the list of "correct" double conversion architectures:
+zcat $CWD/patches/qt5.doubleconversion_correct.diff.gz | patch -p1 --verbose || exit 1
+
+if [ `gcc -dM -E - < /dev/null | grep -c '__BYTE_ORDER__.*__ORDER_BIG_ENDIAN__'` -gt 0 ]; then
+  # Fix incorrect icudt(littleendian).dat file
+  sed -i 's/icudtl.dat/icudtb.dat/' qtwebengine/src/core/core_module.pro
+fi
+
 export CFLAGS="$SLKCFLAGS"
 export CXXFLAGS="$SLKCFLAGS"
 export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
@@ -263,12 +263,17 @@
 # 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
 
+# Removing RPATHS from uic broke the binary that generate invalid "->addSubWindow()" call,
+# but only for mips architecture. On riscv64, removing RPATHS lead to 
+if [ "$ARCH" != "mips" ]
+then
 # 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
+fi
 
 # Don't ship .la files:
 rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
diff -ur slackware64-current.2/source/l/qt5-webkit/qt5-webkit.SlackBuild slackware64-current.3/source/l/qt5-webkit/qt5-webkit.SlackBuild
--- slackware64-current.2/source/l/qt5-webkit/qt5-webkit.SlackBuild	2021-04-17 20:41:42.824808792 +0200
+++ slackware64-current.3/source/l/qt5-webkit/qt5-webkit.SlackBuild	2021-09-18 13:42:55.727038972 +0200
@@ -51,6 +51,8 @@
 
 NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
 
+SLKLDFLAGS=""
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
@@ -126,6 +126,13 @@
 # Fix for glib-2.68.0:
 zcat $CWD/qt5-webkit.glib-2.68.0.diff.gz | patch -p1 --verbose || exit 1
 
+# Add new architectures (riscv64, or1k, sparc64, loongarch64):
+zcat $CWD/new_architectures.diff.gz | patch -p1 --verbose || exit 1
+
+if [ ! -z "$SLKLDFLAGS" ]; then
+  export LDFLAGS="$SLKLDFLAGS"
+fi
+
 # -DU_DEFINE_FALSE_AND_TRUE=1 since recent icu4c no longer defines these otherwise.
 
 export CFLAGS="$SLKCFLAGS -DU_DEFINE_FALSE_AND_TRUE=1"
@@ -140,6 +140,7 @@
 mkdir qtwebkit-build
 cd qtwebkit-build
   cmake \
+    $CMAKE_EXTRA \
     -DPORT=Qt \
     -DQt5_DIR=$QTDIR \
     ..  || exit 1
diff -ur slackware64-current.2/source/l/qt6/qt6.SlackBuild slackware64-current.3/source/l/qt6/qt6.SlackBuild
--- slackware64-current.2/source/l/qt6/qt6.SlackBuild	2024-03-01 00:53:42.898179588 +0100
+++ slackware64-current.3/source/l/qt6/qt6.SlackBuild	2024-03-23 11:30:37.209363666 +0100
@@ -62,10 +62,12 @@
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
   SLKLDFLAGS=""
   LIBDIRSUFFIX=""
+  EXTRA="-DFEATURE_no_direct_extern_access=ON"
 elif [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   SLKLDFLAGS=""
   LIBDIRSUFFIX=""
+  EXTRA="-DFEATURE_no_direct_extern_access=ON"
 elif [ "$ARCH" = "s390" ]; then
   SLKCFLAGS="-O2"
   SLKLDFLAGS=""
@@ -74,6 +76,7 @@
   SLKCFLAGS="-O2 -fPIC"
   SLKLDFLAGS="-L/usr/lib64"
   LIBDIRSUFFIX="64"
+  EXTRA="-DFEATURE_no_direct_extern_access=ON"
 elif [ "$ARCH" = "armv7hl" ]; then
   # To prevent "qatomic_armv6.h error: output number 2 not directly addressable"
   # More permanent solution is to patch gcc:
@@ -143,6 +146,11 @@
 pushd qtwebengine
   # Thanks Debian! See https://salsa.debian.org/qt-kde-team/qt6/qt6-webengine/-/tree/master/debian/patches
   cat $CWD/patches/qt6-webengine_32bit_compressing_files.patch | patch -p1 --verbose || exit 1
+
+  # Add BonSlack architecture support
+  zcat $CWD/patches/qtwebengine-disable_time64_for_gz.diff.gz | patch -p1 --verbose || exit 1
+  zcat $CWD/patches/qtwebengine-disable-v8-unit-tests.diff.gz | patch -p1 --verbose || exit 1
+  zcat $CWD/patches/qtwebengine-newarchs.diff.gz | patch -p1 --verbose || exit 1
 popd
 cat $CWD/patches/nodejs-allow-32bit.patch | patch -p1 --verbose || exit 1
 
@@ -161,6 +169,26 @@
 sed -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${SLKLDFLAGS}|" \
   -i qtbase/mkspecs/common/g++-unix.conf || exit 1
 
+if [ "$ARCH" = "arm" ]; then
+  # Fix incorrect target cpu (armv7 instead of armv5) for qtwebengine
+  # and remove the use of thumb2 instructions (not present on armv5)
+  zcat $CWD/patches/qtwebengine-armv5.patch.gz | patch -p1 --verbose || exit 1
+fi
+
+# Add loongarch/riscv/mips64 support to qtdeclarative
+zcat $CWD/patches/qtdeclarative.wtf.mips64_loongarch_riscv_support.diff.gz | patch -p1 --verbose || exit 1
+
+if [ `gcc -dM -E - < /dev/null | grep -c '__BYTE_ORDER__.*__ORDER_BIG_ENDIAN__'` -gt 0 ]; then
+  # Fix incorrect icudt(littleendian).dat file
+  for f in qtwebengine/src/core/api/Qt6WebEngineCoreDeploySupport.cmake \
+           qtwebengine/src/core/api/CMakeLists.txt \
+	   qtwebengine/src/core/tools/main.cpp 
+  do
+    sed -i 's/icudtl.dat/icudtb.dat/' $f
+  done
+fi
+
+export LANG=en_US.UTF-8
 export CFLAGS="$SLKCFLAGS"
 export CXXFLAGS="$SLKCFLAGS"
 export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
@@ -188,7 +216,7 @@
   -DINSTALL_DOCDIR=/usr/doc/qt6-${PKGVER} \
   -DINSTALL_EXAMPLESDIR=/usr/doc/qt6-${PKGVER}/examples \
   -DFEATURE_libproxy=ON \
-  -DFEATURE_no_direct_extern_access=ON \
+  $EXTRA \
   -DFEATURE_openssl_linked=ON \
   -DFEATURE_pulseaudio="${USE_PULSEAUDIO}" \
   -DFEATURE_system_sqlite=ON \
diff -ur slackware64-current.2/source/l/sdl/sdl.SlackBuild slackware64-current.3/source/l/sdl/sdl.SlackBuild
--- slackware64-current.2/source/l/sdl/sdl.SlackBuild	2021-09-07 20:59:04.419006899 +0200
+++ slackware64-current.3/source/l/sdl/sdl.SlackBuild	2021-09-18 13:42:55.767040991 +0200
@@ -97,6 +97,7 @@
   --disable-esd \
   --enable-shared=yes \
   --enable-static=no \
+  $SVGA \
   --disable-x11-shared || exit 1
 
 make $NUMJOBS || make || exit 1
diff -ur slackware64-current.2/source/l/speexdsp/speexdsp.SlackBuild slackware64-current.3/source/l/speexdsp/speexdsp.SlackBuild
--- slackware64-current.2/source/l/speexdsp/speexdsp.SlackBuild	2021-02-13 06:32:03.250945004 +0100
+++ slackware64-current.3/source/l/speexdsp/speexdsp.SlackBuild	2021-09-18 13:42:55.767040991 +0200
@@ -88,7 +88,7 @@
   --mandir=/usr/man \
   --docdir=/usr/doc/$PKGNAM-$VERSION \
   --enable-static=no \
-  --build=$ARCH-slackware-linux || exit 1
+  $EXTRACONF --build=$ARCH-slackware-linux || exit 1
 
 make $NUMJOBS || make || exit 1
 make install DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/l/v4l-utils/v4l-utils.SlackBuild slackware64-current.3/source/l/v4l-utils/v4l-utils.SlackBuild
--- slackware64-current.2/source/l/v4l-utils/v4l-utils.SlackBuild	2010-08-09 23:14:43.000000000 +0200
+++ slackware64-current.3/source/l/v4l-utils/v4l-utils.SlackBuild	2017-12-08 14:49:40.096583760 +0100
@@ -71,6 +71,15 @@
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
 cd $PKGNAM-$VERSION || exit 1
 
+# Disable _TIME_BITS=64 (not useful and in conflict on v4l2convert.c):
+zcat $CWD/disable_time64.diff.gz | patch -p1 --verbose || exit 1
+# v4l2-tracer did not link with _TIME_BITS=64, disabling it for the whole package:
+SLKCFLAGS="$SLKCFLAGS -D_DONOTFORCE_TIME_BITS"
+#if [ "$LIBDIRSUFFIX" = "" -a `gcc -dM -E - < /dev/null | grep -c LP64.*1` -eq 0  ]; then
+#  # You have to disable tracer if you want _TIME_BITS=64
+#  TRACER="--disable-v4l2-tracer"
+#fi
+
 # Make sure ownerships and permissions are sane:
 chown -R root:root .
 find . \
diff -ur slackware64-current.2/source/l/zlib/zlib.SlackBuild slackware64-current.3/source/l/zlib/zlib.SlackBuild
--- slackware64-current.2/source/l/zlib/zlib.SlackBuild	2021-02-13 06:32:03.250945004 +0100
+++ slackware64-current.3/source/l/zlib/zlib.SlackBuild	2021-09-18 13:42:55.767040991 +0200
@@ -81,7 +81,7 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS -D_DONOTFORCE_TIME_BITS" \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
diff -ur slackware64-current.2/source/n/curl/curl.SlackBuild slackware64-current.3/source/n/curl/curl.SlackBuild
--- slackware64-current.2/source/n/curl/curl.SlackBuild	2021-05-29 19:23:09.213002935 +0200
+++ slackware64-current.3/source/n/curl/curl.SlackBuild	2021-09-18 13:42:55.837044524 +0200
@@ -52,6 +52,8 @@
 # Set this variable to "--without-ssl" to build a no-SSL version:
 SSLOPT=${SSLOPT:-"--with-openssl"}
 
+SLKLDFLAGS=""
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
@@ -80,7 +86,11 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+# Adding missing #include <sched.h>
+zcat $CWD/sched_yield-missing_include.diff.gz | patch -p1 --verbose || exit 1
+
 CFLAGS="$SLKCFLAGS" \
+LDFLAGS="$SLKLDFLAGS" \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
diff -ur slackware64-current.2/source/n/dhcp/dhcp.SlackBuild slackware64-current.3/source/n/dhcp/dhcp.SlackBuild
--- slackware64-current.2/source/n/dhcp/dhcp.SlackBuild	2021-05-29 19:23:09.213002935 +0200
+++ slackware64-current.3/source/n/dhcp/dhcp.SlackBuild	2021-09-18 13:42:55.837044524 +0200
@@ -85,6 +85,9 @@
 # Add PATH setting to /sbin/dhclient-script
 zcat $CWD/dhclient-script.PATH.diff.gz | patch -p1 || exit 1
 
+# Add build-aux scripts for riscv64:
+(cd bind; zcat $CWD/bind-build-aux-Makefile.patch.gz | patch --verbose)
+
 # Fix paths in manual pages
 sed -i \
     -e "s,ETCDIR,/etc,g" \
@@ -95,6 +99,7 @@
     doc/*/*.{5,8}
 
 CFLAGS="$SLKCFLAGS" \
+LDFLAGS="$SLKLDFLAGS" \
 ./configure \
   --prefix=/usr \
   --sysconfdir=/etc \
diff -ur slackware64-current.2/source/n/dhcpcd/dhcpcd.SlackBuild slackware64-current.3/source/n/dhcpcd/dhcpcd.SlackBuild
--- slackware64-current.2/source/n/dhcpcd/dhcpcd.SlackBuild	2021-05-29 19:23:09.213002935 +0200
+++ slackware64-current.3/source/n/dhcpcd/dhcpcd.SlackBuild	2021-09-18 13:42:55.837044524 +0200
@@ -75,6 +75,10 @@
 rm -rf dhcpcd-$VERSION
 tar xvf $CWD/dhcpcd-$VERSION.tar.?z || exit 1
 cd dhcpcd-$VERSION
+
+# Add loongarch64 AUDIT support:
+patch -p1 --verbose < $CWD/patches/loongarch_audit_support.patch || exit 1
+
 chown -R root:root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/n/gnutls/gnutls.SlackBuild slackware64-current.3/source/n/gnutls/gnutls.SlackBuild
--- slackware64-current.2/source/n/gnutls/gnutls.SlackBuild.orig	2021-10-13 11:50:07.319744395 +0200
+++ slackware64-current.3/source/n/gnutls/gnutls.SlackBuild	2021-10-13 14:42:17.034568636 +0200
@@ -60,6 +60,12 @@
   LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
 fi
 
+case "$ARCH" in
+    arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+    mips64el) TARGET=$ARCH-slackware-linux-gnuabi64 ;;
+    *)    TARGET=$ARCH-slackware-linux ;;
+esac
+
 # Don't use icecream:
 PATH=$(echo $PATH | sed "s|/usr/libexec/icecc/bin||g" | tr -s : | sed "s/^://g" | sed "s/:$//g")
 
@@ -88,7 +88,12 @@
   -exec chmod 644 {} \+
 
 # Need to reconf to find guile-3.0.x:
-autoreconf -vif
+which guile >/dev/null 2>&1
+if [ $? -eq 0 ] ; then
+  autoreconf -vif
+else
+  DISABLEGUILE="--disable-guile"
+fi
 
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
@@ -98,8 +104,9 @@
   --disable-rpath \
   --with-included-libtasn1 \
   --enable-openssl-compatibility \
-  --build=$ARCH-slackware-linux \
-  --host=$ARCH-slackware-linux || exit 1
+  $DISABLE_GUILE \
+  --build=$TARGET \
+  --host=$TARGET || exit 1
 
 make $NUMJOBS || make || exit 1
 make install DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/n/gpgme/gpgme.SlackBuild slackware64-current.3/source/n/gpgme/gpgme.SlackBuild
--- slackware64-current.2/source/n/gpgme/gpgme.SlackBuild	2023-08-05 12:30:21.055156252 +0200
+++ slackware64-current.3/source/n/gpgme/gpgme.SlackBuild	2023-08-30 10:18:34.615468982 +0200
@@ -87,8 +87,9 @@
   --enable-languages="cl cpp python qt" \
   --disable-gpg-test \
   --docdir=/usr/doc/gpgme-$VERSION \
-  --build=$ARCH-slackware-linux \
-  --host=$ARCH-slackware-linux || exit 1
+  || exit 1
+# Remove --build and --host otherwise gcc not detected on arm and 
+# arm-slackware-linux-clang++ has by default armv4 (not supported by qt)
 
 make $NUMJOBS || make || exit 1
 make install DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/n/iptraf-ng/iptraf-ng.SlackBuild slackware64-current.3/source/n/iptraf-ng/iptraf-ng.SlackBuild
--- slackware64-current.2/source/n/iptraf-ng/iptraf-ng.SlackBuild	2021-02-13 06:32:04.693944925 +0100
+++ slackware64-current.3/source/n/iptraf-ng/iptraf-ng.SlackBuild	2021-09-18 13:42:55.877046543 +0200
@@ -71,6 +71,17 @@
 
 zcat $CWD/iptraf-ng.paths.diff.gz | patch -p1 --verbose || exit 1
 
+# Patch for unaligned buffer: since could drop performance (a copy is 
+# done for every packet), apply only on known architecture that does
+# not work with unaligned copy (armv5te, mips*, sparc*):
+if [ "$ARCH" = "arm" -o "${ARCH::4}" = "mips" -o "${ARCH::5}" = "sparc" -o "$ARCH" = "hppa" ]
+then
+  zcat $CWD/unaligned_copy.diff.gz | patch -p1 --verbose || exit 1
+fi
+
+# Fix printf size (does not match longlong/long/int):
+zcat $CWD/fix_printf_int_sizes.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/n/nn/nn.SlackBuild slackware64-current.3/source/n/nn/nn.SlackBuild
--- slackware64-current.2/source/n/nn/nn.SlackBuild	2021-02-13 06:32:06.037944850 +0100
+++ slackware64-current.3/source/n/nn/nn.SlackBuild	2021-09-18 13:42:55.917048562 +0200
@@ -80,7 +80,7 @@
     | sed -e "s#m-sparc.h#${MFILE}#" \
     | sed -e "s#/usr/lib/nn#/usr/lib${LIBDIRSUFFIX}/nn#" \
     | patch -p0 --verbose || exit 1
-if [ $ARCH = "x86_64" ]; then
+if [ "$MFILE" = "m-x86_64.h" ]; then
 	zcat $CWD/m-x86_64.h.gz > conf/m-x86_64.h
 fi
 zcat $CWD/nn.badnntphost.diff.gz | patch -p1 --verbose || exit 1
diff -ur slackware64-current.2/source/n/ntp/ntp.SlackBuild slackware64-current.3/source/n/ntp/ntp.SlackBuild
--- slackware64-current.2/source/n/ntp/ntp.SlackBuild	2021-02-16 20:16:39.664000909 +0100
+++ slackware64-current.3/source/n/ntp/ntp.SlackBuild	2021-09-18 13:42:55.957050581 +0200
@@ -68,6 +68,9 @@
 
 zcat $CWD/ntp.nano.diff.gz | patch -p1 --verbose || exit 1
 
+# Fix invalid PTHREAD_STACK_MIN macro on or1k:
+sed -i 's/^#ifndef __sun/#if !defined(__sun) \&\& !defined(__or1k__)/' libntp/work_thread.c
+
 chown -R root:root .
 find . \
   \( -perm 2777 -o -perm 2755 -o -perm 2775 \) \
diff -ur slackware64-current.2/source/n/openssh/openssh.SlackBuild slackware64-current.3/source/n/openssh/openssh.SlackBuild
--- slackware64-current.2/source/n/openssh/openssh.SlackBuild	2023-10-06 19:00:26.131609140 +0200
+++ slackware64-current.3/source/n/openssh/openssh.SlackBuild	2024-01-08 17:56:19.419184410 +0100
@@ -99,6 +102,12 @@
 
 autoreconf -vif
 
+# MIPS big-endian does not like -fzero-call-used-regs=used 
+# (internal compiler error during RTL pass: zero_call_used_regs)
+if [ "$ARCH" = "mips" ]; then
+  sed -i 's/-fzero-call-used-regs=used//' configure
+fi
+
 # Compile package:
 CFLAGS="$SLKCFLAGS" \
 ./configure \
diff -ur slackware64-current.2/source/n/openssl/openssl.SlackBuild slackware64-current.3/source/n/openssl/openssl.SlackBuild
--- slackware64-current.2/source/n/openssl/openssl.SlackBuild	2021-02-16 20:16:39.664000909 +0100
+++ slackware64-current.3/source/n/openssl/openssl.SlackBuild	2021-09-18 13:42:55.957050581 +0200
@@ -110,6 +110,9 @@
   touch -r CHANGES $DOCSDIR/CHANGES
 fi
 
+# Add patch for various arch default auto-configuration:
+zcat $CWD/fix_autoconfiguration.diff.gz | patch -p1 --verbose || exit 1
+
 # These are the known patent issues with OpenSSL:
 # name   #         expires
 # MDC-2: 4,908,861  2007-03-13, not included.
@@ -119,9 +122,10 @@
 # not a good idea to include them as there are better
 # algorithms to use.
 
-./config \
+LDFLAGS=$SLKLDFLAGS KERNEL_BITS=$LIBDIRSUFFIX ./config \
  --prefix=/usr \
  --openssldir=/etc/ssl \
+ --libdir=lib${LIBDIRSUFFIX} \
  zlib \
  enable-camellia \
  enable-seed \
diff -ur slackware64-current.2/source/n/openssl11/openssl11.SlackBuild slackware64-current.3/source/n/openssl11/openssl11.SlackBuild
--- slackware64-current.2/source/n/openssl11/openssl11.SlackBuild	2021-02-16 20:16:39.664000909 +0100
+++ slackware64-current.3/source/n/openssl11/openssl11.SlackBuild	2021-09-18 13:42:55.957050581 +0200
@@ -110,6 +110,9 @@
   touch -r CHANGES $DOCSDIR/CHANGES
 fi
 
+# Add patch for pure 64 bits mips64 library
+zcat $CWD/mips64_64bits.patch.gz | patch -p1 --verbose || exit 1
+
 # These are the known patent issues with OpenSSL:
 # name   #         expires
 # MDC-2: 4,908,861  2007-03-13, not included.
@@ -124,7 +124,7 @@
 # not a good idea to include them as there are better
 # algorithms to use.
 
-./config \
+KERNEL_BITS=$LIBDIRSUFFIX ./config \
  --prefix=/usr \
  --openssldir=/etc/ssl \
  --libdir=lib${LIBDIRSUFFIX}/openssl-1.1 \
diff -ur slackware64-current.2/source/n/php/php.SlackBuild slackware64-current.3/source/n/php/php.SlackBuild
--- slackware64-current.2/source/n/php/php.SlackBuild	2010-08-12 18:05:09.000000000 +0200
+++ slackware64-current.3/source/n/php/php.SlackBuild	2017-11-08 00:43:15.725031287 +0100
@@ -145,6 +145,9 @@
   zcat $CWD/php.configure.s390.diff.gz | patch -p1 || exit
 fi
 
+# Fix forced inline for sh4:
+zcat $CWD/sh4_inline.diff.gz | patch -p1 --verbose || exit 1
+
 # Fixup perms/owners:
 chown -R root:root .
 find . \
diff -ur slackware64-current.2/source/n/s-nail/s-nail.SlackBuild slackware64-current.3/source/n/s-nail/s-nail.SlackBuild
--- slackware64-current.2/source/n/s-nail/s-nail.SlackBuild	2021-02-24 19:51:46.341919611 +0100
+++ slackware64-current.3/source/n/s-nail/s-nail.SlackBuild	2021-09-18 13:42:56.027054114 +0200
@@ -96,7 +96,12 @@
   config || exit 1
 
 make $NUMJOBS build || exit 1
+
+# Test failed on arch different then x86
+if [ `echo $ARCH|grep -c 86` -gt 0 ]]
+then
 make $NUMJOBS test || exit 1
+fi
 make install DESTDIR=$PKG || exit 1
 
 # Tighten up the perms a bit:
diff -ur slackware64.1/source/n/samba/samba.SlackBuild slackware64.2/source/n/samba/samba.SlackBuild
--- slackware64.1/source/n/samba/samba.SlackBuild	2023-04-24 16:18:30.756016051 +0200
+++ slackware64.2/source/n/samba/samba.SlackBuild	2023-09-19 13:05:40.802851431 +0200
@@ -130,7 +130,7 @@
 # build in.
 #
 # LDFLAGS are needed to avoid problems with missing symbols.
-LDFLAGS="-Wl,--no-as-needed" \
+LDFLAGS="-Wl,--no-as-needed $SLKLDFLAGS" \
 CFLAGS="$SLKCFLAGS" \
 ./configure \
   --enable-fhs \
diff -ur slackware64-current.2/source/n/vsftpd/vsftpd.SlackBuild slackware64-current.3/source/n/vsftpd/vsftpd.SlackBuild
--- slackware64-current.2/source/n/vsftpd/vsftpd.SlackBuild	2010-08-12 18:05:09.000000000 +0200
+++ slackware64-current.3/source/n/vsftpd/vsftpd.SlackBuild	2017-11-08 00:43:15.725031287 +0100
@@ -75,6 +75,12 @@
 # OpenSSL3:
 zcat $CWD/vsftpd-3.0.5-replace-deprecated-openssl-functions.patch.gz | patch -Np1 --fuzz=20 --verbose || exit 1
 
+if [ "$ARCH" = "alpha" -o "$ARCH" = "hppa" ]
+then
+  # GCC for alpha and hppa does not implement -fstack-protector
+  sed -i 's/-fstack-protector//' Makefile
+fi
+
 # Build:
 make $NUMJOBS || make || exit 1
 
diff -ur slackware64-current.2/source/t/texlive/texlive.SlackBuild slackware64-current.3/source/t/texlive/texlive.SlackBuild
--- slackware64-current.2/source/t/texlive/texlive.SlackBuild	2021-04-20 07:20:00.000000000 +0200
+++ slackware64-current.3/source/t/texlive/texlive.SlackBuild	2021-09-18 13:42:56.077056638 +0200
@@ -80,6 +80,17 @@
 # fixes from stable branch
 cat $CWD/patches/fixes-210420.patch | patch -p1 --verbose || exit 1
 
+# Fix incorrect MIPS64 architecture detection on LuaJIT:
+zcat $CWD/patches/mips64_configure_fix.diff.gz | patch -p1 --verbose || exit 1
+
+XINDY="--enable-xindy --with-clisp-runtime=system"
+
+which clisp 2>/dev/null
+if [ $? -ne 0 ]
+then
+  XINDY=""
+fi
+
 mkdir build
 cd build
   CFLAGS="$SLKCFLAGS" \
@@ -148,11 +152,11 @@
     --disable-xz \
     --disable-texdoctk \
     --with-x \
-    --enable-xindy \
+    $XINDY \
+    $EXTRATEX \
     --disable-xindy-docs \
     --disable-xindy-rules \
     --disable-linked-scripts \
-    --with-clisp-runtime=system \
     --enable-gc=system \
     --with-system-libpng \
     --with-system-t1lib \
diff -ur slackware64-current.2/source/x/glew/glew.SlackBuild slackware64-current.3/source/x/glew/glew.SlackBuild
--- slackware64-current.2/source/x/glew/glew.SlackBuild	2021-02-13 06:32:07.791944753 +0100
+++ slackware64-current.3/source/x/glew/glew.SlackBuild	2021-09-18 13:42:56.207063200 +0200
@@ -89,8 +89,11 @@
 # Use lib${LIBDIRSUFFIX} (if needed) in Makefile:
 sed -i "s,/lib,/lib${LIBDIRSUFFIX},g" Makefile
 
-make $NUMJOBS OPT="$SLKCFLAGS" || make OPT="$SLKCFLAGS" || exit 1
-make install.all GLEW_DEST=$PKG/usr || exit 1
+# Add AArch64 architecture (and new architectures):
+\cp /usr/share/libtool/build-aux/config.* config/
+
+make $NUMJOBS OPT="$SLKCFLAGS" LIBDIR=/usr/lib$LIBDIRSUFFIX || make OPT="$SLKCFLAGS" LIBDIR=/usr/lib$LIBDIRSUFFIX || exit 1
+make install.all DESTDIR=$PKG LIBDIR=/usr/lib$LIBDIRSUFFIX || exit 1
 
 chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/libGLEW*.so.*
 rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libGLEW*.a
diff -ur slackware64-current.2/source/x/ibus/ibus.SlackBuild slackware64-current.3/source/x/ibus/ibus.SlackBuild
--- slackware64-current.2/source/x/ibus/ibus.SlackBuild	2021-07-04 18:32:55.599325278 +0200
+++ slackware64-current.3/source/x/ibus/ibus.SlackBuild	2021-09-18 13:42:56.237064714 +0200
@@ -79,6 +79,10 @@
 tar xvf $CWD/ibus-$VERSION.tar.?z || exit 1
 cd ibus-$VERSION || exit 1
 
+# On platform that does not support unaligned 32bit load (mips, armv5), force
+# the start of 32bit array on 4 bytes boundary:
+zcat $CWD/align32bit_word.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/x/libdrm/libdrm.SlackBuild slackware64-current.3/source/x/libdrm/libdrm.SlackBuild
--- slackware64-current.2/source/x/libdrm/libdrm.SlackBuild	2021-07-04 18:32:55.599325278 +0200
+++ slackware64-current.3/source/x/libdrm/libdrm.SlackBuild	2021-09-18 13:42:56.237064714 +0200
@@ -80,6 +80,18 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+if [ "${ARCH::3}" = "arm" -o "$ARCH" = "aarch64" ]; then
+  EXTRABUILD="-Dintel=enabled
+              -Domap=enabled
+	      -Dexynos=enabled
+	      -Dtegra=enabled
+	     "
+elif [ "${ARCH::3}" = "ppc" -o "${ARCH::4}" = "mips" ]; then
+  EXTRABUILD="-Dintel=enabled"
+else
+  EXTRABUILD=${EXTRABUILD:-""}
+fi
+
 # Configure, build, and install:
 export CFLAGS="$SLKCFLAGS"
 export CXXFLAGS="$SLKCFLAGS"
@@ -96,6 +108,7 @@
   --mandir=/usr/man \
   --sysconfdir=/etc \
   --localstatedir=/var \
+  $EXTRABUILD \
   --buildtype=release \
   -Dudev=true \
   .. || exit 1
diff -ur slackware64-current.2/source/x/libime/libime.SlackBuild slackware64-current.3/source/x/libime/libime.SlackBuild
--- slackware64-current.2/source/x/libime/libime.SlackBuild	2023-04-15 10:48:40.528539410 +0200
+++ slackware64-current.3/source/x/libime/libime.SlackBuild	2023-05-06 01:10:51.263665487 +0200
@@ -79,6 +79,9 @@
 tar xvf $CWD/libime-${VERSION}_dict.tar.?z || exit 1
 cd libime-$VERSION || exit 1
 
+# Fix unaligned copy for hppa, mips*, and sparc* (bus error), arm already present:
+zcat $CWD/unaligned_copy.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current/source/x/libpinyin/libpinyin.SlackBuild slackware64-current.2/source/x/libpinyin/libpinyin.SlackBuild
--- slackware64-current/source/x/libpinyin/libpinyin.SlackBuild	2022-12-13 12:34:45.189372723 +0100
+++ slackware64-current.2/source/x/libpinyin/libpinyin.SlackBuild	2023-02-28 12:34:08.211129371 +0100
@@ -79,6 +79,8 @@
 tar xvf $CWD/libpinyin-$VERSION.tar.?z || exit 1
 cd libpinyin-$VERSION || exit 1
 
+zcat $CWD/unaligned_access_traling_zeros.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/x/mesa/mesa.SlackBuild slackware64-current.3/source/x/mesa/mesa.SlackBuild
--- slackware64-current.2/source/x/mesa/mesa.SlackBuild	2021-09-18 13:40:06.588502625 +0200
+++ slackware64-current.3/source/x/mesa/mesa.SlackBuild	2021-09-18 13:48:46.964770001 +0200
@@ -33,8 +33,6 @@
 
 NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
 
-# Be sure this list is up-to-date:
-GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast,virgl,iris,crocus,zink"
 
 if [ -z "$ARCH" ]; then
   case "$( uname -m )" in
@@ -44,6 +42,19 @@
   esac
 fi
 
+# Be sure this list is up-to-date:
+GALLIUM_DRIVERS="nouveau,r300,r600,radeonsi,swrast,virgl,zink"
+VULKAN_DRIVERS="amd,swrast"
+VULKAN_LAYERS="device-select,overlay"
+
+case "$ARCH" in
+  i?86 | x86_64) 
+    GALLIUM_DRIVERS="svga,iris,crocus,$GALLIUM_DRIVERS"
+    VULKAN_DRIVERS="intel,intel_hasvk,$VULKAN_DRIVERS"
+    VULKAN_LAYERS="intel-nullhw,$VULKAN_LAYERS"
+    ;;
+esac
+
 # 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.
@@ -111,6 +122,13 @@
   done
 fi
 
+which bindgen >/dev/null
+if [ $? -eq 0 ]; then
+  RUSTICL="-Dgallium-rusticl=true -Drust_std=2021"
+else
+  RUSTICL=""
+fi
+
 # Configure, build, and install:
 export CFLAGS="$SLKCFLAGS"
 export CXXFLAGS="$SLKCFLAGS"
@@ -131,12 +149,11 @@
   -Dplatforms=x11,wayland \
   -Dgallium-opencl=icd \
   -Dgallium-nine=true \
-  -Dgallium-rusticl=true \
-  -Drust_std=2021 \
+  $RUSTICL \
   -Dosmesa=true \
   -Dgallium-drivers=$GALLIUM_DRIVERS \
-  -Dvulkan-drivers=amd,intel,intel_hasvk,swrast \
-  -Dvulkan-layers=device-select,intel-nullhw,overlay \
+  -Dvulkan-drivers=$VULKAN_DRIVERS \
+  -Dvulkan-layers=$VULKAN_LAYERS \
   -Dvideo-codecs="$CODECS" \
   -Dglvnd=true \
   -Dllvm=enabled \
diff -ur slackware64-current.2/source/x/mesa/mesa-amber.build slackware64-current.3/source/x/mesa/mesa-amber.build
--- slackware64-current.2/source/x/mesa/mesa-amber.build	2022-08-08 23:46:48.013005690 +0200
+++ slackware64-current.3/source/x/mesa/mesa-amber.build	2022-08-13 08:10:13.569335845 +0200
@@ -6,7 +6,13 @@
 
 
 # Be sure this list is up-to-date:
-DRI_DRIVERS="i915,i965,r100,r200,nouveau"
+DRI_DRIVERS="r100,r200,nouveau"
+
+case "$ARCH" in
+  i?86 | x86_64) 
+    DRI_DRIVERS="i915,i965,$DRI_DRIVERS"
+    ;;
+esac
 
 cd $TMP
 rm -rf ${PKGNAM}-${AMBERVERS}
diff -ur slackware64-current.2/source/x/vulkan-sdk/vulkan-sdk.SlackBuild slackware64-current.3/source/x/vulkan-sdk/vulkan-sdk.SlackBuild
--- slackware64-current.2/source/x/vulkan-sdk/vulkan-sdk.SlackBuild	2023-11-24 06:23:56.876038563 +0100
+++ slackware64-current.3/source/x/vulkan-sdk/vulkan-sdk.SlackBuild	2024-02-07 18:04:36.206795221 +0100
@@ -562,6 +562,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-error=stringop-overflow" \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    $CMAKE_EXTRA \
     ..
 
   make $NUMJOBS || make || exit 1
@@ -586,6 +587,15 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+# Patching incorrect vector (instead of __vector) definition in ALtivec code
+zcat $CWD/altivec_vector.diff.gz | patch -p1 --verbose || exit 1
+
+# Adding riscv support:
+zcat $CWD/riscv-support.diff.gz | patch -p1 --verbose || exit 1
+
+# Add AArch64 architecture (and new architectures):
+\cp /usr/share/libtool/build-aux/config.* autoconf/
+
 mkdir -p build/docs
 cd build
   cmake \
@@ -619,6 +629,9 @@
 tar xvf $CWD/SPIRV-Reflect-vulkan-sdk-$SPIRV_REFLECT_VERSION.tar.?z || exit 1
 cd $TMP/SPIRV-Reflect-vulkan-sdk-$SPIRV_REFLECT_VERSION
 
+# Add AArch64 architecture (and new architectures):
+\cp /usr/share/libtool/build-aux/config.* autoconf/
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/x/x11/arch.use.flags slackware64-current.3/source/x/x11/arch.use.flags
--- slackware64-current.2/source/x/x11/arch.use.flags	2021-01-16 19:58:44.314112841 +0100
+++ slackware64-current.3/source/x/x11/arch.use.flags	2021-12-29 17:07:32.039077407 +0100
@@ -4,8 +4,8 @@
   SLKCFLAGS="-O2 -march=i586 -mtune=i686 -fcommon"
 elif [ "$ARCH" = "i686" ]; then
   SLKCFLAGS="-O2 -march=i686 -mtune=i686 -fcommon"
-elif [ "$ARCH" = "s390" ]; then
-  SLKCFLAGS="-O2 -fcommon"
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC -fcommon"
+else
+  SLKCFLAGS="-O2 -fcommon"
 fi
diff -ur slackware64-15.0.orig/source/x/x11/configure/igt-gpu-tools slackware64-15.0.work/source/x/x11/configure/igt-gpu-tools
--- slackware64-15.0.orig/source/x/x11/configure/igt-gpu-tools	2021-04-23 19:48:51.690704921 +0200
+++ slackware64-15.0.work/source/x/x11/configure/igt-gpu-tools	2023-08-31 12:46:01.465385680 +0200
@@ -1,3 +1,6 @@
+if [[ "$ARCH" = "sparc" ]]; then
+  MESON_C_LINK_ARGS="-Dc_link_args=-latomic"
+fi
 CFLAGS="$SLKCFLAGS -Wno-error=array-bounds" \
 CXXFLAGS=$SLKCFLAGS \
 mkdir meson-build
@@ -12,4 +15,5 @@
   -Ddocs=disabled \
   -Dtests=disabled \
   -Drunner=disabled \
-  .. || exit 1
+  $MESON_C_LINK_ARGS \
+  ..
diff -ur slackware64-15.0.orig/source/x/x11/configure/libxcvt slackware64-15.0.work/source/x/x11/configure/libxcvt
--- slackware64-15.0.orig/source/x/x11/configure/libxcvt	2022-05-21 06:33:17.256400502 +0200
+++ slackware64-15.0.work/source/x/x11/configure/libxcvt	2023-08-31 14:54:43.321713262 +0200
@@ -14,4 +14,4 @@
   --sysconfdir /etc \
   --localstatedir /var \
   --buildtype=release \
-  .. || exit 1
+  ..
diff -ur slackware64-current.2/source/x/x11/configure/pixman slackware64-current.3/source/x/x11/configure/pixman
--- slackware64-current.2/source/x/x11/configure/pixman	2024-01-05 12:15:58.676832328 +0100
+++ slackware64-current.3/source/x/x11/configure/pixman	2024-01-05 15:33:12.413893301 +0100
@@ -5,6 +5,9 @@
   do_sse2=enabled
 else
   do_sse2=disabled
+  if [ "$ARCH" = "arm" ]; then
+    do_sse2="$do_sse2 -Darm-simd=disable -Darm-neon=disable"
+  fi
 fi
 
 export CFLAGS="$SLKCFLAGS"
@@ -24,6 +27,7 @@
   --localstatedir=/var \
   --buildtype=release \
   -Dvmx=disabled \
+  -Diwmmxt=disabled \
   -Dtests=disabled \
   -Dsse2=$do_sse2 \
   .. || exit 1
diff -ur slackware64-15.0.orig/source/x/x11/configure/xisxwayland slackware64-15.0.work/source/x/x11/configure/xisxwayland
--- slackware64-15.0.orig/source/x/x11/configure/xisxwayland	2020-05-18 19:50:24.669979606 +0200
+++ slackware64-15.0.work/source/x/x11/configure/xisxwayland	2023-08-31 12:05:23.263687546 +0200
@@ -14,4 +14,4 @@
   --sysconfdir /etc \
   --localstatedir /var \
   --buildtype=release \
-  .. || exit 1
+  .. 
diff -ur slackware64-15.0.orig/source/x/x11/configure/xkeyboard-config slackware64-15.0.work/source/x/x11/configure/xkeyboard-config
--- slackware64-15.0.orig/source/x/x11/configure/xkeyboard-config	2022-02-10 19:52:47.145013268 +0100
+++ slackware64-15.0.work/source/x/x11/configure/xkeyboard-config	2023-08-31 14:54:34.881286463 +0200
@@ -16,4 +16,4 @@
   --buildtype=release \
   -Dcompat-rules=true \
   -Dxorg-rules-symlinks=true \
-  .. || exit 1
+  ..
diff -ur slackware64-15.0.orig/source/x/x11/configure/xorgproto slackware64-15.0.work/source/x/x11/configure/xorgproto
--- slackware64-15.0.orig/source/x/x11/configure/xorgproto	2018-03-17 18:33:59.047545400 +0100
+++ slackware64-15.0.work/source/x/x11/configure/xorgproto	2023-08-31 12:05:49.051650835 +0200
@@ -15,4 +15,4 @@
   --localstatedir /var \
   --buildtype=release \
   -Dlegacy=true \
-  .. || exit 1
+  .. 
diff -ur slackware64-current.2/source/x/x11/configure/xorg-server slackware64-current.3/source/x/x11/configure/xorg-server
--- slackware64-current.2/source/x/x11/configure/xorg-server	2021-12-16 19:48:07.542110989 +0100
+++ slackware64-current.3/source/x/x11/configure/xorg-server	2021-12-25 10:30:22.885532522 +0100
@@ -47,6 +47,14 @@
 # Default font paths to be used by the X server:
 DEF_FONTPATH="/usr/share/fonts/misc,/usr/share/fonts/local,/usr/share/fonts/TTF,/usr/share/fonts/OTF,/usr/share/fonts/Type1,/usr/share/fonts/CID,/usr/share/fonts/75dpi/:unscaled,/usr/share/fonts/100dpi/:unscaled,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/cyrillic"
 
+INT10=x86emu
+case "$ARCH" in
+  mips*) 
+    INT10=stub
+    SLKCFLAGS="$SLKCFLAGS -fcommon"
+    ;;
+esac
+
 # Reconf (don't remove this plz):
 autoreconf -vif
 
@@ -60,7 +68,7 @@
   --mandir=/usr/man \
   --disable-static \
   --with-pic \
-  --with-int10=x86emu \
+  --with-int10=$INT10 \
   --with-default-font-path="${DEF_FONTPATH}" \
   --with-module-dir=/usr/lib${LIBDIRSUFFIX}/xorg/modules \
   --with-os-name="Slackware 15.0" \
diff -ur slackware64-current.2/source/x/x11/modularize slackware64-current.3/source/x/x11/modularize
--- slackware64-current.2/source/x/x11/modularize	2021-02-13 22:06:16.101014833 +0100
+++ slackware64-current.3/source/x/x11/modularize	2021-09-18 13:43:06.117563421 +0200
@@ -180,12 +181,15 @@
 xf86-input-wacom
 xf86-video-amdgpu
 xf86-video-apm
+xf86-video-armsoc
 xf86-video-ark
 xf86-video-ast
 xf86-video-ati
 xf86-video-chips
 xf86-video-cirrus
 xf86-video-dummy
+xf86-video-fbdev
+xf86-video-fbturbo
 xf86-video-geode
 xf86-video-glint
 xf86-video-i128
@@ -198,6 +202,7 @@
 xf86-video-nv
 xf86-video-omap
 xf86-video-openchrome
+xf86-video-opentegra
 xf86-video-qxl
 xf86-video-r128
 xf86-video-rendition
diff -ur slackware64-current.2/source/x/x11/patch/xorg-cf-files.patch slackware64-current.3/source/x/x11/patch/xorg-cf-files.patch
--- slackware64-current.2/source/x/x11/patch/xorg-cf-files.patch	2021-04-20 20:11:42.282116621 +0200
+++ slackware64-current.3/source/x/x11/patch/xorg-cf-files.patch	2021-09-18 13:43:06.197567459 +0200
@@ -1 +1,2 @@
 zcat $CWD/patch/xorg-cf-files/Imake.tmpl-binutils-ar-2.36.patch.gz | patch -p1 || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-cf-files/Imake.riscv-support.patch.gz | patch -p1 || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff -ur slackware64-current.2/source/x/x11/post-install/xorg-cf-files.post-install slackware64-current.3/source/x/x11/post-install/xorg-cf-files.post-install
--- slackware64-current.2/source/x/x11/post-install/xorg-cf-files.post-install	2023-06-06 09:38:48.000000000 +0200
+++ slackware64-current.3/source/x/x11/post-install/xorg-cf-files.post-install	2023-06-13 13:58:13.195424432 +0200
@@ -1,4 +1,4 @@
-if [[ "$(uname -m)" =~ (x86_64|aarch64|riscv64) ]]; then
+if [[ "$(uname -m)" =~ (x86_64|aarch64|riscv64) || "$LIBDIRSUFFIX" = "64" ]]; then
   ( cd $PKG/usr/lib/X11/config
     zcat $CWD/post-install/xorg-cf-files/x11.tmpl.lib64.kludge.diff.gz | patch -p1 || exit 1
   )
diff -ur slackware64-current.2/source/x/x11/x11.SlackBuild slackware64-current.3/source/x/x11/x11.SlackBuild
--- slackware64-current.2/source/x/x11/x11.SlackBuild	2020-02-19 21:37:54.752789884 +0100
+++ slackware64-current.3/source/x/x11/x11.SlackBuild	2021-09-18 13:43:06.187566954 +0200
@@ -163,7 +163,12 @@
         if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
           PKGARCH=noarch
         fi 
-        if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+	blacklist=package-blacklist
+	if [ -r ${CWD}/$blacklist.$ARCH ]
+	then
+	  blacklist=$blacklist.$ARCH
+	fi
+        if grep -wq "^$PKGNAME" ${CWD}/$blacklist ; then
           continue
         fi
         cd $SLACK_X_BUILD_DIR
@@ -225,6 +230,19 @@
           . $CWD/patch/${PKGNAME}.patch
         fi
 
+	# Fix architecture guess for AArch64 and new architectures
+	auxdir="."
+	if [ -d "build-aux" ]
+	then
+	  auxdir="build-aux/"
+	fi
+	\cp /usr/share/libtool/build-aux/config.* $auxdir
+
+	# Fix configure to support shared libraries for PPC64LE and new architectures
+	if [ -x /usr/share/libtool/build-aux/fix_configure ]; then
+	  /usr/share/libtool/build-aux/fix_configure
+	fi
+
         # I heard somewhere that -O2 breaks some chipset or another.  If you encounter
         # problems, please contact volkerdi@slackware.com.  Thanks! :-)
 
diff -ur slackware64-current.2/source/xap/MPlayer/MPlayer.SlackBuild slackware64-current.3/source/xap/MPlayer/MPlayer.SlackBuild
--- slackware64-current.2/source/xap/MPlayer/MPlayer.SlackBuild	2021-04-18 20:11:00.718666090 +0200
+++ slackware64-current.3/source/xap/MPlayer/MPlayer.SlackBuild	2021-09-18 13:43:06.247569983 +0200
@@ -254,6 +254,9 @@
 # fix building against samba 4
 zcat $SRCDIR/include-samba-4.0.patch.gz | patch -p1 --verbose || exit 1
 
+# Adding riscv64, or1k and loongarch64 support to configure:
+zcat $SRCDIR/newproc-support.diff.gz | patch -p1 --verbose || exit 1
+
 echo Building ...
 # MPlayer wants to automatically determine compiler flags,
 # so we don't provide CFLAGS.
diff -ur slackware64-current.2/source/xap/blackbox/blackbox.SlackBuild slackware64-current.3/source/xap/blackbox/blackbox.SlackBuild
--- slackware64-current.2/source/xap/blackbox/blackbox.SlackBuild	2021-04-18 20:11:00.718666090 +0200
+++ slackware64-current.3/source/xap/blackbox/blackbox.SlackBuild	2021-09-18 13:43:06.247569983 +0200
@@ -85,6 +85,9 @@
 tar xvf $CWD/${SRCNAM}-$VERSION.tar.?z || exit 1
 cd ${SRCNAM}-$VERSION || exit 1
 
+# Fix time64 "max" on 32 bits platforms:
+zcat std_max_time64.diff.gz | patch -p1 --verbose || exit 1
+
 # Make sure ownerships and permissions are sane:
 chown -R root:root .
 find . \
diff -ur slackware64-current.2/source/xap/freerdp/freerdp.SlackBuild slackware64-current.3/source/xap/freerdp/freerdp.SlackBuild
--- slackware64-current.2/source/xap/freerdp/freerdp.SlackBuild	2021-04-18 20:11:00.718666090 +0200
+++ slackware64-current.3/source/xap/freerdp/freerdp.SlackBuild	2021-09-18 13:43:06.247569983 +0200
@@ -86,6 +96,7 @@
   -exec chmod 644 {} \+
 
 # Configure, build, and install:
+export LDFLAGS="$SLKLDFLAGS"
 mkdir cmake-build
 cd cmake-build
   cmake \
@@ -117,6 +117,7 @@
     -DWITH_SERVER=ON \
     -DWITH_CAIRO=ON \
     -DBUILD_TESTING=OFF \
+    $CMAKE_EXTRA \
     .. || exit 1
   make $NUMJOBS || make || exit 1
   make install DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild slackware64-current.3/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild
--- slackware64-current.2/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild.orig	2021-09-18 13:56:19.067560297 +0200
+++ slackware64-current.2/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild	2021-09-23 03:16:27.921034028 +0200
@@ -134,6 +134,8 @@
 # PGO is disabled by default:
 PGO=${PGO:-no}
 
+EXTRACONF="--disable-elf-hack"
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-g0"
   LIBDIRSUFFIX=""
@@ -208,6 +211,9 @@
 # Don't enable LTO for Rust unless the whole build uses it:
 zcat $CWD/0027-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch.gz | patch -p1 --verbose || exit 1
 
+# Fix incorrect wav signed-samples byte order swap on big-endian:
+zcat $CWD/webrtc-wav_file-big_endian.diff.gz | patch -p1 --verbose || exit 1
+
 # Fetch localization, if requested
 # https://bugzilla.mozilla.org/show_bug.cgi?id=1256955
 if [ ! -z $MOZLOCALIZE ]; then
@@ -252,7 +258,7 @@
   --disable-crashreporter \
   --disable-debug-symbols \
   --disable-debug \
-  --disable-elf-hack \
+  $EXTRACONF \
   --disable-updater"
 # Complains about missing APNG support in Slackware's libpng:
 # --with-system-png \
@@ -315,7 +315,7 @@
 echo "export CC=\"${CC}\"" >> .mozconfig
 echo "export CXX=\"${CXX}\"" >> .mozconfig
 
-if [ "$COMPILE_X86_UNDER_X86_64" = "true" ]; then
+if [ "$COMPILE_X86_UNDER_X86_64" = "true" -o "$ARCH" = "i686" ]; then
   # Compile for i686 under an x86_64 kernel:
   echo "ac_add_options --host=i686-pc-linux-gnu" >> .mozconfig
   echo "ac_add_options --target=i686-pc-linux-gnu" >> .mozconfig
diff -ur slackware64-current.2/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild slackware64-current.3/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
--- slackware64-current.2/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild.orig	2021-09-18 13:56:19.357574767 +0200
+++ slackware64-current.2/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild	2021-09-23 03:17:09.142883804 +0200
@@ -83,6 +83,8 @@
   ARCH=i686
 fi
 
+EXTRACONF="--disable-elf-hack"
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-g0"
   LIBDIRSUFFIX=""
@@ -96,6 +98,12 @@
 # Bypass a test that fails the build:
 zcat $CWD/gkrust.a.no.networking.check.diff.gz | patch -p1 --verbose || exit 1
 
+# Fix incorrect wav signed-samples byte order swap on big-endian:
+zcat $CWD/webrtc-wav_file-big_endian.diff.gz | patch -p1 --verbose || exit 1
+
+# Fix missing armv7hl architecture alias on botan submodule:
+zcat $CWD/botan_arch_add.diff.gz | patch -p1 --verbose || exit 1
+
 # Fetch localization, if requested:
 if [ ! -z $MOZLOCALIZE ]; then
   LOC_TAG="THUNDERBIRD_$( echo $VERSION | tr \. _ )_RELEASE"
@@ -228,11 +238,10 @@
   --disable-crashreporter \
   --disable-debug-symbols \
   --disable-debug \
-  --disable-elf-hack \
+  $EXTRACONF \
   --disable-tests \
   --disable-updater \
-  --host=$ARCH-slackware-linux \
-  --target=$ARCH-slackware-linux"
+  "
   # Complains about missing APNG support in Slackware's libpng:
   #--with-system-png \
   # Broken with 12.0:
@@ -286,7 +286,7 @@
 # This directory is also needed or the build will fail:
 mkdir -p mozilla/obj
 
-if [ "$COMPILE_X86_UNDER_X86_64" = "true" ]; then
+if [ "$COMPILE_X86_UNDER_X86_64" = "true" -o "$ARCH" = "i686" ]; then
   # Compile for i686 under an x86_64 kernel:
   echo "ac_add_options --host=i686-pc-linux-gnu" >> .mozconfig
   echo "ac_add_options --target=i686-pc-linux-gnu" >> .mozconfig
diff -ur slackware64-current.2/source/xap/seamonkey/seamonkey.SlackBuild slackware64-current.3/source/xap/seamonkey/seamonkey.SlackBuild
--- slackware64-current.2/source/xap/seamonkey/seamonkey.SlackBuild.orig	2021-09-18 13:56:20.067610192 +0200
+++ slackware64-current.2/source/xap/seamonkey/seamonkey.SlackBuild	2021-09-23 03:18:29.156482802 +0200
@@ -65,5 +65,11 @@
 fi
 
+case "$ARCH" in
+    arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+    mips64el) TARGET=$ARCH-slackware-linux-gnuabi64 ;;
+    *)    TARGET=$ARCH-slackware-linux ;;
+esac
+
 # Choose a compiler (gcc/g++ or clang/clang++):
 export CC=${CC:-gcc}
 export CXX=${CXX:-g++}
@@ -131,6 +139,9 @@
 # Retain GTK+ v2 scrolling behavior:
 zcat $CWD/sm.ui.scrollToClick.diff.gz | patch -p2 --verbose || exit 1
 
+# Fix incorrect wav signed-samples byte order swap on big-endian:
+zcat $CWD/webrtc-wav_file-big_endian.diff.gz | patch -p1 --verbose || exit 1
+
 # Make sure the perms/ownerships are sane:
 chown -R root:root .
 find . \
@@ -179,8 +179,8 @@
   --with-system-nss \
   --with-system-zlib \
   --with-unsigned-addon-scopes=app,system \
-  --host=$ARCH-slackware-linux \
-  --target=$ARCH-slackware-linux"
+  --host=$TARGET \
+  --target=$TARGET"
 
 export BUILD_OFFICIAL=1
 export MOZILLA_OFFICIAL=1
diff -ur slackware64-current.2/source/xap/seyon/seyon.SlackBuild slackware64-current.3/source/xap/seyon/seyon.SlackBuild
--- slackware64-current.2/source/xap/seyon/seyon.SlackBuild	2021-02-13 06:32:09.757944644 +0100
+++ slackware64-current.3/source/xap/seyon/seyon.SlackBuild	2021-09-18 13:43:06.667591183 +0200
@@ -93,7 +93,8 @@
 chmod 755 makever.sh
 xmkmf
 # Add -fcommon to CFLAGS:
-sed -i -e 's/-fno-strict-aliasing/-fno-strict-aliasing -fcommon/' Makefile
+sed -i -e 's/ CFLAGS = / CFLAGS = -fcommon /' Makefile
+
 make || exit 1
 
 mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/X11
diff -ur slackware64-current.2/source/xap/ssr/ssr.SlackBuild slackware64-current.3/source/xap/ssr/ssr.SlackBuild
--- slackware64-current.2/source/xap/ssr/ssr.SlackBuild	2021-09-03 04:16:59.807156898 +0200
+++ slackware64-current.3/source/xap/ssr/ssr.SlackBuild	2021-09-18 13:43:06.737594716 +0200
@@ -85,6 +85,9 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+# Fix missing architectures for glinject:
+zcat $CWD/elf64-32_define.diff.gz | patch -p1 --verbose || exit 1
+
 # Configure, build, and install:
 mkdir cmake-build
 cd cmake-build
diff -ur slackware64-current.2/source/xap/xine-lib/xine-lib.SlackBuild slackware64-current.3/source/xap/xine-lib/xine-lib.SlackBuild
--- slackware64-current.2/source/xap/xine-lib/xine-lib.SlackBuild	2021-10-27 12:31:23.272413690 +0200
+++ slackware64-current.3/source/xap/xine-lib/xine-lib.SlackBuild	2023-08-01 22:19:36.736014470 +0200
@@ -108,6 +111,7 @@
   --disable-vcd \
   --without-speex \
   --without-xcb \
+  $EXTRACONF \
   --with-external-dvdnav || exit 1
 
 make $NUMJOBS || make || exit 1
diff -ur slackware64-current.2/source/xap/xscreensaver/xscreensaver.SlackBuild slackware64-current.3/source/xap/xscreensaver/xscreensaver.SlackBuild
--- slackware64-current.2/source/xap/xscreensaver/xscreensaver.SlackBuild.orig	2021-04-02 21:24:36.971695613 +0200
+++ slackware64-current.3/source/xap/xscreensaver/xscreensaver.SlackBuild	2021-10-16 22:43:55.788930029 +0200
@@ -92,6 +92,9 @@
 # as opposed to a generic "screensaver" settings
 zcat $CWD/clarify-desc-in-xfce-settings.patch.gz | patch -p1 --verbose || exit 1
 
+# Remove NEON usage (it does not compile):
+zcat $CWD/xscreensaver.disable_neon.diff.gz | patch -p1 --verbose || exit 1
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-current.2/source/xfce/elementary-xfce/elementary-xfce.SlackBuild slackware64-current.3/source/xfce/elementary-xfce/elementary-xfce.SlackBuild
--- slackware64-current.2/source/xfce/elementary-xfce/elementary-xfce.SlackBuild	2021-03-10 20:25:28.262981289 +0100
+++ slackware64-current.3/source/xfce/elementary-xfce/elementary-xfce.SlackBuild	2021-09-18 13:44:12.500914160 +0200
@@ -74,7 +74,7 @@
 rm -rf $(basename $CWD/optipng-*.tar.lz .tar.lz)
 tar xvf $CWD/optipng-*.tar.lz || exit 1
 cd optipng-*
-./configure || exit 1
+./configure -with-system-libs || exit 1
 make $NUMJOBS -C src/optipng || exit 1
 mkdir $TMP/package-optipng
 cp src/optipng/optipng $TMP/package-optipng || exit 1
diff -ur slackware64-current.2/extra/source/rust-for-mozilla/rust.SlackBuild slackware64-current.3/testing/source/rust/rust.SlackBuild
--- slackware64-current.2/extra/source/rust-for-mozilla/rust.SlackBuild	2021-09-09 19:19:52.527012986 +0200
+++ slackware64-current.3/extra/source/rust-for-mozilla/rust.SlackBuild	2021-09-18 13:42:54.186961238 +0200
@@ -67,10 +67,14 @@
 
 # If the bootstrap binaries are present, use those. Otherwise bootstrap from
 # installed compiler.
-if /bin/ls *-unknown-linux-gnu.tar.?z 1> /dev/null 2> /dev/null ; then
+if /bin/ls *-unknown-linux-gnu*.tar.?z 1> /dev/null 2> /dev/null ; then
   LOCAL_BOOTSTRAP=no
 else
-  LOCAL_BOOTSTRAP=yes
+  if [ "$LOCAL_BOOTSTRAP" = "" ] && [ -x /usr/bin/cargo ] && [ -x /usr/bin/rustc ] ; then
+    LOCAL_BOOTSTRAP=yes
+  else
+    LOCAL_BOOTSTRAP=no
+  fi
 fi
 
 # https://forge.rust-lang.org/platform-support.html
@@ -98,6 +102,21 @@
 elif [ "$ARCH" = "armv7hl" ]; then
   BARCH="armv7"
   TARCH="$BARCH"
+elif [ "$ARCH" = "arm" ]; then
+  BARCH="armv5te"
+  TARCH="$BARCH"
+elif [ "$ARCH" = "ppc" ]; then
+  BARCH="powerpc"
+  TARCH="$BARCH"
+elif [ "$ARCH" = "ppc64" ]; then
+  BARCH="powerpc64"
+  TARCH="$BARCH"
+elif [ "$ARCH" = "ppc64le" ]; then
+  BARCH="powerpc64le"
+  TARCH="$BARCH"
+elif [ "$ARCH" = "riscv64" ]; then
+  BARCH="riscv64gc"
+  TARCH="$BARCH"
 else
   BARCH="$ARCH"
   TARCH="$ARCH"
@@ -106,6 +125,10 @@
 # Bootstrapping ABI:
 if [ "$ARCH" = "armv7hl" ]; then
   BABI="gnueabihf"
+elif [ "$ARCH" = "arm" ]; then
+  BABI="gnueabi"
+elif [ "$ARCH" = "mips64el" ]; then
+  BABI="gnuabi64"
 else
   BABI="gnu"
 fi
@@ -142,15 +165,27 @@
   zcat $CWD/link_libffi.diff.gz | patch -p1 --verbose || exit 1
 fi
 
+# Patch armv5te atomic operations (already defined in libgcc) and rls AtomicU64
+if [ "${ARCH}" = "arm" ]; then
+  ckorig=`sha256sum vendor/compiler_builtins/src/arm_linux.rs | cut -f1 -d' '`
+  zcat $CWD/atomic_builtins_gcc9.diff.gz | patch -p1 --verbose || exit 1
+  cknew=`sha256sum vendor/compiler_builtins/src/arm_linux.rs | cut -f1 -d' '`
+  # Fix cargo checksum for above patch
+  sed -i "s/$ckorig/$cknew/" vendor/compiler_builtins/.cargo-checksum.json
+fi
+
+# Fix GOT overflow on bootstrap for mips64el:
+zcat $CWD/d-fix-mips64el-bootstrap.diff.gz | patch -p1 --verbose || exit 1
+
 if [ "$LOCAL_BOOTSTRAP" != "yes" ] ; then
   # rust requires bootstrapping with the previous rust version.
   # versions are defined in src/stage0.txt.
   mkdir -p build/cache/$RSTAGE0_DIR
-  cp $CWD/$PKGNAM-std-$RSTAGE0_VERSION-$BARCH-unknown-linux-gnu.tar.?z \
-     $CWD/$SRCNAM-$RSTAGE0_VERSION-$BARCH-unknown-linux-gnu.tar.?z \
+  cp $CWD/$PKGNAM-std-$RSTAGE0_VERSION-$BARCH-unknown-linux-gnu*.tar.?z \
+     $CWD/$SRCNAM-$RSTAGE0_VERSION-$BARCH-unknown-linux-gnu*.tar.?z \
      build/cache/$RSTAGE0_DIR
   mkdir -p build/cache/$CSTAGE0_DIR
-  cp $CWD/cargo-$CSTAGE0_VERSION-$BARCH-unknown-linux-gnu.tar.?z build/cache/$CSTAGE0_DIR
+  cp $CWD/cargo-$CSTAGE0_VERSION-$BARCH-unknown-linux-gnu*.tar.?z build/cache/$CSTAGE0_DIR
 fi
 
 # Build configuration:
@@ -195,8 +234,45 @@
 [target.x86_64-unknown-linux-gnu]
 llvm-config = "/usr/bin/llvm-config"
 
+[target.arm-unknown-linux-gnueabi]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.armv5te-unknown-linux-gnueabi]
+llvm-config = "/usr/bin/llvm-config"
+
 [target.armv7-unknown-linux-gnueabihf]
 llvm-config = "/usr/bin/llvm-config"
+
+[target.aarch64-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.powerpc-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.powerpc64-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.powerpc64le-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.mips-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.mipsel-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.mips64el-unknown-linux-gnuabi64]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.riscv64gc-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.s390x-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
+[target.loongarch64-unknown-linux-gnu]
+llvm-config = "/usr/bin/llvm-config"
+
 EOF
 fi
 
@@ -234,6 +304,8 @@
     # /tmp/SBo/rustc-1.20.0-src/build/i686-unknown-linux-gnu/stage1-rustc/i586-unknown-linux-gnu/release/deps/librustc_llvm-4ab259c9aed547db.so: undefined reference to `xxx`
     export RUSTFLAGS="$RUSTFLAGS -C link-args=-lrt -ldl -lcurses -lpthread -lz -lm"
   fi
+elif [ "$ARCH" = "mips" -o "$ARCH" = "mipsel" ]; then
+  export RUSTFLAGS="$RUSTFLAGS -C opt-level=1" # "Undefined temporary symbol $BB2_1"
 fi
 
 # Fix path to the rust libraries in rust-analyzer:
@@ -258,7 +328,7 @@
 
 # Evidently there are a lot of duplicated libraries in this tree, so let's
 # try to save some space:
-( cd $PKG/usr/lib${LIBDIRSUFFIX}/rustlib/*-linux-gnu/lib && for file in *.so ; do if cmp -s $file ../../../$file ; then ln -sf ../../../$file .; fi; done )
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/rustlib/*-linux-gnu*/lib && for file in *.so ; do if cmp -s $file ../../../$file ; then ln -sf ../../../$file .; fi; done )
 
 # Strip ELF objects:
 find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
#
# Placeholder for rust in testing (copy from source.d.rust)
diff -ur slackware64-current.2/testing/source/rust/rust.SlackBuild slackware64-current.3/testing/source/rust/rust.SlackBuild
--- slackware64-current.2/testing/source/rust/rust.SlackBuild	2021-09-09 19:19:52.527012986 +0200
+++ slackware64-current.3/testing/source/rust/rust.SlackBuild	2021-09-18 13:42:54.186961238 +0200
#
#
# #######################################################################
#
# Place here all fixes for CMAKE_INSTALL_LIBDIR, since it is not stricly 
# related to non-x86 platforms, but it could be not considered a bug since 
# only alpha is affected (64bit without "64" suffix)
#
diff -ur slackware64-current/source/ap/qpdf/qpdf.SlackBuild slackware64-current.2/source/ap/qpdf/qpdf.SlackBuild
--- slackware64-current/source/ap/qpdf/qpdf.SlackBuild	2018-04-23 19:20:52.261170202 +0200
+++ slackware64-current.2/source/ap/qpdf/qpdf.SlackBuild	2021-09-18 13:40:05.718458718 +0200
@@ -85,7 +85,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     -DINSTALL_EXAMPLES=OFF \
diff -ur slackware64-current/source/ap/rpm/rpm.SlackBuild slackware64-current.2/source/ap/rpm/rpm.SlackBuild
--- slackware64-current/source/ap/rpm/rpm.SlackBuild	2024-01-02 15:09:09.466323531 +0100
+++ slackware64-current.2/source/ap/rpm/rpm.SlackBuild	2024-01-12 13:31:06.853025544 +0100
@@ -113,7 +113,7 @@
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_INSTALL_MANDIR=man \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DWITH_AUDIT=OFF \
     -DWITH_SELINUX=OFF \
     -DWITH_INTERNAL_OPENPGP=ON \
diff -ur slackware64-current/source/d/rinutils/rinutils.SlackBuild slackware64-current.2/source/d/rinutils/rinutils.SlackBuild
--- slackware64-current/source/d/rinutils/rinutils.SlackBuild	2018-04-23 19:20:52.261170202 +0200
+++ slackware64-current.2/source/d/rinutils/rinutils.SlackBuild	2021-09-18 13:40:05.718458718 +0200
@@ -92,7 +92,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     .. || exit 1
diff -ur slackware64-current.2/source/kde/kColorPicker/kColorPicker.SlackBuild slackware64-current.3/source/kde/kColorPicker/kColorPicker.SlackBuild
--- slackware64-current.2/source/kde/kColorPicker/kColorPicker.SlackBuild	2013-06-23 21:31:32.000000000 +0200
+++ slackware64-current.3/source/kde/kColorPicker/kColorPicker.SlackBuild	2017-12-08 02:47:41.800331255 +0100
@@ -100,7 +100,7 @@
     -DMAN_INSTALL_DIR=/usr/man \
     -DSYSCONF_INSTALL_DIR=/etc/kde \
     -DLIB_SUFFIX=${LIBDIRSUFFIX} \
-    -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
     -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
     -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
diff -ur slackware64-current.2/source/kde/kImageAnnotator/kImageAnnotator.SlackBuild slackware64-current.3/source/kde/kImageAnnotator/kImageAnnotator.SlackBuild
--- slackware64-current.2/source/kde/kImageAnnotator/kImageAnnotator.SlackBuild	2013-06-23 21:31:32.000000000 +0200
+++ slackware64-current.3/source/kde/kImageAnnotator/kImageAnnotator.SlackBuild	2017-12-08 02:47:41.800331255 +0100
@@ -100,7 +100,7 @@
     -DMAN_INSTALL_DIR=/usr/man \
     -DSYSCONF_INSTALL_DIR=/etc/kde \
     -DLIB_SUFFIX=${LIBDIRSUFFIX} \
-    -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
     -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
     -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
diff -ur slackware64-current.2/source/kde/kde/cmake/cmake slackware64-current.3/source/kde/kde/cmake/cmake
--- slackware64-current.2/source/kde/kde/cmake/cmake	2013-06-23 21:31:32.000000000 +0200
+++ slackware64-current.3/source/kde/kde/cmake/cmake	2017-12-08 02:47:41.800331255 +0100
@@ -12,6 +12,7 @@
     -DMAN_INSTALL_DIR=/usr/man \
     -DSYSCONF_INSTALL_DIR=/etc/kde \
     -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
     -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
     -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
diff -ur slackware64-current.2/source/kde/kde/cmake/marble slackware64-current.3/source/kde/kde/cmake/marble
--- slackware64-current.2/source/kde/kde/cmake/marble	2013-06-23 21:31:32.000000000 +0200
+++ slackware64-current.3/source/kde/kde/cmake/marble	2017-12-08 02:47:41.800331255 +0100
@@ -13,6 +13,7 @@
     -DMAN_INSTALL_DIR=/usr/man \
     -DKDE_INSTALL_SYSCONFDIR=/etc/kde \
     -DSYSCONF_INSTALL_DIR=/etc/kde \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DLIB_SUFFIX=${LIBDIRSUFFIX} \
     -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
     -DBUILD_TESTING=OFF \
diff -ur slackware64-current.2/source/kde/libindi/libindi.SlackBuild slackware64-current.3/source/kde/libindi/libindi.SlackBuild
--- slackware64-current.2/source/kde/libindi/libindi.SlackBuild	2023-10-24 12:49:19.597976670 +0200
+++ slackware64-current.3/source/kde/libindi/libindi.SlackBuild	2024-03-10 12:47:18.216003045 +0100
@@ -93,7 +93,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     -DINCLUDE_INSTALL_DIR=/usr/include \
diff -ur slackware64-current.2/source/kde/qcoro/qcoro.SlackBuild slackware64-current.3/source/kde/qcoro/qcoro.SlackBuild
--- slackware64-current.2/source/kde/qcoro/qcoro.SlackBuild	2023-04-24 16:16:20.799546479 +0200
+++ slackware64-current.3/source/kde/qcoro/qcoro.SlackBuild	2023-05-07 23:27:21.621542789 +0200
@@ -92,7 +92,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     .. || exit 1
diff -ur slackware64-current.2/source/kde/stellarsolver/stellarsolver.SlackBuild slackware64-current.3/source/kde/stellarsolver/stellarsolver.SlackBuild
--- slackware64-current.2/source/kde/stellarsolver/stellarsolver.SlackBuild	2023-10-24 12:49:21.024717600 +0200
+++ slackware64-current.3/source/kde/stellarsolver/stellarsolver.SlackBuild	2024-03-10 12:43:27.443802459 +0100
@@ -92,7 +92,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     .. || exit 1
diff -ur slackware64-current.2/source/l/zxing-cpp/zxing-cpp.SlackBuild slackware64-current.3/source/l/zxing-cpp/zxing-cpp.SlackBuild
--- slackware64-current.2/source/l/zxing-cpp/zxing-cpp.SlackBuild	2023-04-24 16:16:20.999556442 +0200
+++ slackware64-current.3/source/l/zxing-cpp/zxing-cpp.SlackBuild	2023-05-07 23:26:28.588779511 +0200
@@ -92,7 +92,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     .. || exit 1
diff -ur slackware64-current.2/source/l/Imath/Imath.SlackBuild slackware64-current.3/source/l/Imath/Imath.SlackBuild
--- slackware64-current.2/source/l/Imath/Imath.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/Imath/Imath.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -86,6 +86,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     .. || exit 1
   make $NUMJOBS || make || exit 1
   make install DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/l/SDL2/SDL2.SlackBuild slackware64-current.3/source/l/SDL2/SDL2.SlackBuild
--- slackware64-current.2/source/l/SDL2/SDL2.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/SDL2/SDL2.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -92,7 +92,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     -DSDL_STATIC=OFF \
diff -ur slackware64-current.2/source/l/cxxopts/cxxopts.SlackBuild slackware64-current.3/source/l/cxxopts/cxxopts.SlackBuild
--- slackware64-current.2/source/l/cxxopts/cxxopts.SlackBuild	2024-02-09 00:20:11.244884586 +0100
+++ slackware64-current.3/source/l/cxxopts/cxxopts.SlackBuild	2024-02-12 05:32:58.001067523 +0100
@@ -92,7 +92,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     -DCXXOPTS_BUILD_EXAMPLES=OFF \
diff -ur slackware64-current.2/source/l/editorconfig-core-c/editorconfig-core-c.SlackBuild slackware64-current.3/source/l/editorconfig-core-c/editorconfig-core-c.SlackBuild
--- slackware64-current.2/source/l/editorconfig-core-c/editorconfig-core-c.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/editorconfig-core-c/editorconfig-core-c.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -79,6 +79,7 @@
   cmake \
     -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DCMAKE_INSTALL_MANDIR=/usr/man \
     -DCMAKE_BUILD_TYPE=Release \
     ..
diff -ur slackware64-current.2/source/l/exiv2/exiv2.SlackBuild slackware64-current.3/source/l/exiv2/exiv2.SlackBuild
--- slackware64-current.2/source/l/exiv2/exiv2.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/exiv2/exiv2.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -87,7 +87,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DMAN_INSTALL_DIR=/usr/man \
     -DBUILD_SHARED_LIBS=ON \
     -DEXIV2_ENABLE_CURL=ON \
diff -ur slackware64-current.2/source/l/fluidsynth/fluidsynth.SlackBuild slackware64-current.3/source/l/fluidsynth/fluidsynth.SlackBuild
--- slackware64-current.2/source/l/fluidsynth/fluidsynth.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/fluidsynth/fluidsynth.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -90,7 +90,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DCMAKE_INSTALL_MANDIR=/usr/man \
     -Denable-ladspa=ON \
     .. || exit 1
diff -ur slackware64-current.2/source/l/freecell-solver/freecell-solver.SlackBuild slackware64-current.3/source/l/freecell-solver/freecell-solver.SlackBuild
--- slackware64-current.2/source/l/freecell-solver/freecell-solver.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/freecell-solver/freecell-solver.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -97,7 +97,7 @@
     -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_INSTALL_MANDIR=/usr/man \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DFCS_WITH_TEST_SUITE=OFF \
     -DBUILD_STATIC_LIBRARY=OFF \
     .. || exit 1
diff -ur slackware64-current.2/source/l/jasper/jasper.SlackBuild slackware64-current.3/source/l/jasper/jasper.SlackBuild
--- slackware64-current.2/source/l/jasper/jasper.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/jasper/jasper.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -94,7 +94,7 @@
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_INSTALL_MANDIR=/usr/man \
     -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PKGNAM-$VERSION \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DLATEX_FOUND=NO \
     .. || exit 1
   make $NUMJOBS VERBOSE=1 || make || exit 1
diff -ur slackware64-current/source/l/json-c/json-c.SlackBuild slackware64-current.2/source/l/json-c/json-c.SlackBuild
--- slackware64-current/source/l/json-c/json-c.SlackBuild	2021-11-04 12:17:09.000000000 +0100
+++ slackware64-current.2/source/l/json-c/json-c.SlackBuild	2022-01-11 20:29:10.000000000 +0100
@@ -89,6 +89,7 @@
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     -DBUILD_STATIC_LIBS=OFF \
diff -ur slackware64-current.2/source/l/kdsoap/kdsoap.SlackBuild slackware64-current.3/source/l/kdsoap/kdsoap.SlackBuild
--- slackware64-current.2/source/l/kdsoap/kdsoap.SlackBuild	2010-08-09 23:14:43.000000000 +0200
+++ slackware64-current.3/source/l/kdsoap/kdsoap.SlackBuild	2017-12-08 14:49:40.096583760 +0100
@@ -98,7 +98,7 @@
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_INSTALL_MANDIR=/usr/man \
     -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PKGNAM-$VERSION \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DBUILD_TESTS=OFF \
     .. || exit 1
   make $NUMJOBS || make || exit 1
diff -ur slackware64-current.2/source/l/lager/lager.SlackBuild slackware64-current.3/source/l/lager/lager.SlackBuild
--- slackware64-current.2/source/l/lager/lager.SlackBuild	2023-10-06 19:00:00.500322950 +0200
+++ slackware64-current.3/source/l/lager/lager.SlackBuild	2024-03-10 12:12:08.934495043 +0100
@@ -95,6 +95,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -Dlager_BUILD_TESTS=OFF \
     -Dlager_BUILD_EXAMPLES=OFF \
     .. || exit 1
diff -ur slackware64-current.2/source/l/lensfun/lensfun.SlackBuild slackware64-current.3/source/l/lensfun/lensfun.SlackBuild
--- slackware64-current.2/source/l/lensfun/lensfun.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/lensfun/lensfun.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -97,7 +97,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DBUILD_LENSTOOL=ON \
     $CMAKE_EXTRA \
     -DBUILD_TESTS=OFF \
diff -ur slackware64-current.2/source/l/libdbusmenu-qt/libdbusmenu-qt.SlackBuild slackware64-current.3/source/l/libdbusmenu-qt/libdbusmenu-qt.SlackBuild
--- slackware64-current.2/source/l/libdbusmenu-qt/libdbusmenu-qt.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/libdbusmenu-qt/libdbusmenu-qt.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -102,7 +102,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     -DUSE_QT4:BOOL=FALSE \
diff -ur slackware64-current.2/source/l/libdeflate/libdeflate.SlackBuild slackware64-current.3/source/l/libdeflate/libdeflate.SlackBuild
--- slackware64-current.2/source/l/libdeflate/libdeflate.SlackBuild	2023-09-02 22:53:02.721598139 +0200
+++ slackware64-current.3/source/l/libdeflate/libdeflate.SlackBuild	2024-01-23 05:22:36.195420718 +0100
@@ -92,7 +92,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DLIBDEFLATE_BUILD_STATIC_LIB=OFF \
     .. || exit 1
diff -ur slackware64-current.2/source/l/libdiscid/libdiscid.SlackBuild slackware64-current.3/source/l/libdiscid/libdiscid.SlackBuild
--- slackware64-current.2/source/l/libdiscid/libdiscid.SlackBuild	2023-05-06 09:47:50.335677432 +0200
+++ slackware64-current.3/source/l/libdiscid/libdiscid.SlackBuild	2023-05-07 23:25:42.096356945 +0200
@@ -89,7 +89,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DMAN_INSTALL_DIR=/usr/man \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     .. || exit 1
 make $NUMJOBS || make || exit 1
 make install DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/l/libical/libical.SlackBuild slackware64-current.3/source/l/libical/libical.SlackBuild
--- slackware64-current.2/source/l/libical/libical.SlackBuild	2010-08-08 05:18:22.000000000 +0200
+++ slackware64-current.3/source/l/libical/libical.SlackBuild	2017-11-03 22:02:50.196859191 +0100
@@ -97,6 +97,7 @@
   -DMAN_INSTALL_DIR=/usr/man \
   -DSYSCONF_INSTALL_DIR=/etc \
   -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+  -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
   -DGOBJECT_INTROSPECTION=true \
   -DICAL_GLIB_VAPI=true \
   -DSHARED_ONLY:BOOL=true \
diff -ur slackware64-current/source/l/libjpeg-turbo/libjpeg-turbo.SlackBuild slackware64-current.2/source/l/libjpeg-turbo/libjpeg-turbo.SlackBuild
--- slackware64-current/source/l/libjpeg-turbo/libjpeg-turbo.SlackBuild	2021-11-04 12:17:09.000000000 +0100
+++ slackware64-current.2/source/l/libjpeg-turbo/libjpeg-turbo.SlackBuild	2022-01-11 20:29:10.000000000 +0100
@@ -104,7 +104,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
     -DCMAKE_INSTALL_DOCDIR=/usr/doc/libjpeg-turbo-${VERSION} \
     -DCMAKE_INSTALL_MANDIR=/usr/man \
     -DENABLE_STATIC=OFF \
diff -ur slackware64-current/source/l/libptytty/libptytty.SlackBuild slackware64-current.2/source/l/libptytty/libptytty.SlackBuild
--- slackware64-current/source/l/libptytty/libptytty.SlackBuild	2023-07-25 06:26:23.821756299 +0200
+++ slackware64-current.2/source/l/libptytty/libptytty.SlackBuild	2024-01-07 12:15:25.673850411 +0100
@@ -93,7 +93,7 @@
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_INSTALL_MANDIR=/usr/man \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DBUILD_SHARED_LIBS=ON \
     .. || exit 1
   make $NUMJOBS || make || exit 1
diff -ur slackware64-current/source/l/libssh/libssh.SlackBuild slackware64-current.2/source/l/libssh/libssh.SlackBuild
--- slackware64-current/source/l/libssh/libssh.SlackBuild	2021-11-04 12:17:09.000000000 +0100
+++ slackware64-current.2/source/l/libssh/libssh.SlackBuild	2022-01-11 20:29:10.000000000 +0100
@@ -92,6 +92,7 @@
     -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DWITH_GCRYPT=1 \
     -DWITH_SSH1=1 \
     -DWITH_PCAP=1 \
diff -ur slackware64-current.2/source/l/mlt/mlt.SlackBuild slackware64-current.3/source/l/mlt/mlt.SlackBuild
--- slackware64-current.2/source/l/mlt/mlt.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/mlt/mlt.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -92,6 +92,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DCMAKE_INSTALL_MANDIR=/usr/man \
     .. || exit 1
   make $NUMJOBS || make || exit 1
diff -ur slackware64-current.2/source/l/openal-soft/openal-soft.SlackBuild slackware64-current.3/source/l/openal-soft/openal-soft.SlackBuild
--- slackware64-current.2/source/l/openal-soft/openal-soft.SlackBuild	2010-08-09 23:14:43.000000000 +0200
+++ slackware64-current.3/source/l/openal-soft/openal-soft.SlackBuild	2017-12-08 14:49:40.096583760 +0100
@@ -93,7 +93,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     -DSYSCONF_INSTALL_DIR=/etc \
diff -ur slackware64-current.2/source/l/opencv/opencv.SlackBuild slackware64-current.3/source/l/opencv/opencv.SlackBuild
--- slackware64-current.2/source/l/opencv/opencv.SlackBuild	2010-08-09 23:14:43.000000000 +0200
+++ slackware64-current.3/source/l/opencv/opencv.SlackBuild	2017-12-08 14:49:40.096583760 +0100
@@ -101,7 +101,7 @@
     -DINSTALL_MAN_DIR=man \
     -DINSTALL_DOC_DIR=doc/$PKGNAM-$VERSION \
     -DSYSCONF_INSTALL_DIR=/etc \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \
     -DBUILD_CUDA_STUBS=OFF \
     -DBUILD_PACKAGE=OFF \
diff -ur slackware64-current.2/source/l/openexr/openexr.SlackBuild slackware64-current.3/source/l/openexr/openexr.SlackBuild
--- slackware64-current.2/source/l/openexr/openexr.SlackBuild	2010-08-09 23:14:43.000000000 +0200
+++ slackware64-current.3/source/l/openexr/openexr.SlackBuild	2017-12-08 14:49:40.096583760 +0100
@@ -97,6 +97,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     .. || exit 1
   make $NUMJOBS || make || exit 1
   make install DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/l/openjpeg/openjpeg.SlackBuild slackware64-current.3/source/l/openjpeg/openjpeg.SlackBuild
--- slackware64-current.2/source/l/openjpeg/openjpeg.SlackBuild	2022-08-13 09:18:11.999354584 +0200
+++ slackware64-current.3/source/l/openjpeg/openjpeg.SlackBuild	2024-03-10 12:49:13.152081620 +0100
@@ -92,6 +92,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DOPENJPEG_INSTALL_LIB_DIR="lib$LIBDIRSUFFIX" \
     -DOPENJPEG_INSTALL_MAN_DIR="man/" \
     -DOPENJPEG_INSTALL_DOC_DIR="doc/openjpeg-$VERSION/" \
diff -ur slackware64-current.2/source/l/phonon/phonon.SlackBuild slackware64-current.3/source/l/phonon/phonon.SlackBuild
--- slackware64-current.2/source/l/phonon/phonon.SlackBuild	2010-08-09 23:14:43.000000000 +0200
+++ slackware64-current.3/source/l/phonon/phonon.SlackBuild	2017-12-08 14:49:40.096583760 +0100
@@ -100,6 +100,7 @@
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DMAN_INSTALL_DIR=/usr/man \
     -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT:BOOL=ON \
     -DPHONON_QT_PLUGIN_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX/qt/plugins/designer \
     -DWITH_QZeitgeist=BOOL:OFF \
diff -ur slackware64-current.2/source/l/phonon-backend-gstreamer/phonon-backend-gstreamer.SlackBuild slackware64-current.3/source/l/phonon-backend-gstreamer/phonon-backend-gstreamer.SlackBuild
--- slackware64-current.2/source/l/phonon-backend-gstreamer/phonon-backend-gstreamer.SlackBuild	2010-08-09 23:14:43.000000000 +0200
+++ slackware64-current.3/source/l/phonon-backend-gstreamer/phonon-backend-gstreamer.SlackBuild	2017-12-08 14:49:40.096583760 +0100
@@ -99,6 +99,7 @@
     -DMAN_INSTALL_DIR=/usr/man \
     -DSYSCONF_INSTALL_DIR=/etc \
     -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     .. || exit 1
   make $NUMJOBS || make || exit 1
   make install DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/l/polkit-qt-1/polkit-qt-1.SlackBuild slackware64-current.3/source/l/polkit-qt-1/polkit-qt-1.SlackBuild
--- slackware64-current.2/source/l/polkit-qt-1/polkit-qt-1.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/polkit-qt-1/polkit-qt-1.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -93,7 +93,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DMAN_INSTALL_DIR=/usr/man \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     .. || exit 1
   make $NUMJOBS || make || exit 1
   make install DESTDIR=$PKG || exit 1
diff -ur slackware64-current.2/source/l/poppler/poppler.SlackBuild slackware64-current.3/source/l/poppler/poppler.SlackBuild
--- slackware64-current.2/source/l/poppler/poppler.SlackBuild	2024-04-06 20:28:40.018721799 +0200
+++ slackware64-current.3/source/l/poppler/poppler.SlackBuild	2024-04-07 21:16:01.527973848 +0200
@@ -84,6 +84,7 @@
 cmake \
   -DCMAKE_INSTALL_PREFIX=/usr \
   -DCMAKE_INSTALL_MANDIR=/usr/man \
+  -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
   -DBUILD_SHARED_LIBS=ON \
   -DENABLE_QT5=ON \
   -DENABLE_XPDF_HEADERS=ON \
diff -ur slackware64-current.2/source/l/qtkeychain/qtkeychain.SlackBuild slackware64-current.3/source/l/qtkeychain/qtkeychain.SlackBuild
--- slackware64-current.2/source/l/qtkeychain/qtkeychain.SlackBuild	2022-09-15 20:23:19.380253234 +0200
+++ slackware64-current.3/source/l/qtkeychain/qtkeychain.SlackBuild	2023-05-22 05:07:12.114944056 +0200
@@ -92,7 +92,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man \
     .. || exit 1
diff -ur slackware64-current.2/source/l/taglib/taglib.SlackBuild slackware64-current.3/source/l/taglib/taglib.SlackBuild
--- slackware64-current.2/source/l/taglib/taglib.SlackBuild	2021-04-13 20:07:19.309939691 +0200
+++ slackware64-current.3/source/l/taglib/taglib.SlackBuild	2021-09-18 13:42:54.446974362 +0200
@@ -84,7 +84,7 @@
   -DCMAKE_INSTALL_PREFIX=/usr \
   -DCMAKE_BUILD_TYPE=Release \
   -DCMAKE_SHARED_LINKER_FLAGS="-lstdc++" \
-  -DLIB_SUFFIX="${LIBDIRSUFFIX}" \
+  -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
   -DBUILD_SHARED_LIBS=ON \
   -DWITH_MP4=ON \
   -DWITH_ASF=ON \
diff -ur slackware64-current.2/source/l/vid.stab/vid.stab.SlackBuild slackware64-current.3/source/l/vid.stab/vid.stab.SlackBuild
--- slackware64-current.2/source/l/vid.stab/vid.stab.SlackBuild	2010-08-09 23:14:43.000000000 +0200
+++ slackware64-current.3/source/l/vid.stab/vid.stab.SlackBuild	2017-12-08 14:49:40.096583760 +0100
@@ -96,7 +96,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DUSE_OMP=OFF \
     .. || exit 1
   make $NUMJOBS || make || exit 1
diff -ur slackware64-current.2/source/l/zstd/zstd.SlackBuild slackware64-current.3/source/l/zstd/zstd.SlackBuild
--- slackware64-current.2/source/l/zstd/zstd.SlackBuild	2023-09-07 20:04:57.513422969 +0200
+++ slackware64-current.3/source/l/zstd/zstd.SlackBuild	2024-01-07 12:12:34.674742756 +0100
@@ -100,7 +100,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DMAN_INSTALL_DIR=/usr/man/man1 \
     -DZSTD_BUILD_STATIC=OFF \
diff -ur slackware64-current.2/source/l/zug/zug.SlackBuild slackware64-current.3/source/l/zug/zug.SlackBuild
--- slackware64-current.2/source/l/zug/zug.SlackBuild	2023-10-06 19:00:00.500322950 +0200
+++ slackware64-current.3/source/l/zug/zug.SlackBuild	2024-03-10 12:12:08.934495043 +0100
@@ -95,6 +95,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -Dzug_BUILD_TESTS=OFF \
     -Dzug_BUILD_EXAMPLES=OFF \
     .. || exit 1
diff -ur slackware64-current.2/source/n/obexftp/obexftp.SlackBuild.orig slackware64-current.3/source/n/obexftp/obexftp.SlackBuild
--- slackware64-current.2/source/n/obexftp/obexftp.SlackBuild	2011-03-25 22:45:28.000000000 +0100
+++ slackware64-current.3/source/n/obexftp/obexftp.SlackBuild	2020-04-02 15:04:10.183750901 +0200
@@ -91,6 +91,6 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PKGNAM-$VERSION \
     -DCMAKE_BUILD_TYPE=Release ..
   make $NUMJOBS || make || exit 1
diff -ur slackware64-current.2/source/n/openobex/openobex.SlackBuild.orig slackware64-current.3/source/n/openobex/openobex.SlackBuild
--- slackware64-current.2/source/n/openobex/openobex.SlackBuild	2011-03-25 22:45:28.000000000 +0100
+++ slackware64-current.3/source/n/openobex/openobex.SlackBuild	2020-04-02 15:04:10.183750901 +0200
@@ -75,7 +78,7 @@
     -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PKGNAM-$VERSION \
     -DCMAKE_BUILD_TYPE=Release ..
   make $NUMJOBS || make || exit 1
diff -ur slackware64-current/source/x/freeglut/freeglut.SlackBuild slackware64-current.2/source/x/freeglut/freeglut.SlackBuild
--- slackware64-current/source/x/freeglut/freeglut.SlackBuild	2021-02-13 06:32:10.793944587 +0100
+++ slackware64-current.2/source/x/freeglut/freeglut.SlackBuild	2021-09-18 13:40:06.748510700 +0200
@@ -100,7 +100,7 @@
     -DFREEGLUT_BUILD_SHARED_LIBS=ON \
     -DFREEGLUT_BUILD_STATIC_LIBS=OFF \
     -DMAN_INSTALL_DIR=/usr/man \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     .. || exit 1
 
 #CFLAGS="$SLKCFLAGS" \
diff -ur slackware64-current/source/x/vulkan-sdk/vulkan-sdk.SlackBuild slackware64-current.2/source/x/vulkan-sdk/vulkan-sdk.SlackBuild
--- slackware64-current/source/x/vulkan-sdk/vulkan-sdk.SlackBuild	2021-02-13 06:32:10.793944587 +0100
+++ slackware64-current.2/source/x/vulkan-sdk/vulkan-sdk.SlackBuild	2021-09-18 13:40:06.748510700 +0200
@@ -234,6 +269,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DBUILD_WSI_WAYLAND_SUPPORT=On \
     ..
 
@@ -257,6 +293,7 @@
     -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DRH_STANDALONE_PROJECT="OFF" \
     ..
 
@@ -281,6 +318,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DCMAKE_INSTALL_SYSCONFDIR=/usr/share \
     -DVulkanHeaders_DIR=$PKG/usr/share/cmake/VulkanHeaders/ \
     ..
@@ -305,6 +343,7 @@
     -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DCMAKE_INSTALL_SYSCONFDIR=/etc \
     -DCMAKE_INSTALL_DATADIR=/share \
     -DCMAKE_SKIP_RPATH=True \
@@ -340,6 +379,7 @@
     -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DCMAKE_INSTALL_SYSCONFDIR=/etc \
     -DCMAKE_INSTALL_DATADIR=/share \
     -DCMAKE_SKIP_RPATH=True \
@@ -373,6 +413,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr \
     -DGLSLANG_INSTALL_DIR=$PKG/usr \
     -DVULKAN_LOADER_INSTALL_DIR=$PKG/usr \
@@ -403,6 +444,7 @@
     -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DBUILD_OBJECT_LIBS=OFF \
     -DBUILD_STATIC_LIBS=ON \
     -DBUILD_SHARED_LIBS=OFF \
@@ -430,6 +472,7 @@
     -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     ..
 
   make $NUMJOBS || make || exit 1
@@ -453,6 +496,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DCMAKE_INSTALL_SYSCONFDIR=/usr/share \
     -DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr \
     -DVULKAN_REGISTRY_PATH_HINT=$PKG/usr \
@@ -498,6 +545,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DCMAKE_INSTALL_SYSCONFDIR=/usr/share \
     -DSHADERC_SKIP_TESTS=On \
     -DSHADERC_SKIP_EXAMPLES=On \
@@ -535,6 +586,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DSPIRV_CROSS_ENABLE_TESTS=Off \
     -DSPIRV_CROSS_SHARED=On \
     -DSPIRV_CROSS_FORCE_PIC=On \
@@ -558,6 +610,7 @@
 mkdir -p build
 cd build
   cmake \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-error=stringop-overflow" \
     -DCMAKE_BUILD_TYPE=Release \
@@ -593,6 +653,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-error=stringop-truncation" \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DCMAKE_INSTALL_INCLUDEDIR=include/dxc \
     -DLLVM_LIBDIR_SUFFIX=$LIBDIRSUFFIX \
     -DLLVM_BUILD_TOOLS="OFF" \
@@ -632,6 +693,7 @@
     -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     ..
 
   make $NUMJOBS || make || exit 1
@@ -665,6 +727,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-error=deprecated-declarations -I$PKG/usr/include/vulkan" \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
     -DCMAKE_INSTALL_SYSCONFDIR=/usr/share \
     -DVULKAN_LOADER_INSTALL_DIR=$PKG/usr \
     -DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr \
@@ -698,6 +726,7 @@
     -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DCMAKE_INSTALL_SYSCONFDIR=/usr/share \
     -DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr \
     -DVOLK_INSTALL=ON \
diff -ur slackware64-current.2/source/xap/freerdp/freerdp.SlackBuild slackware64-current.3/source/xap/freerdp/freerdp.SlackBuild
--- slackware64-current.2/source/xap/freerdp/freerdp.SlackBuild	2021-04-18 20:11:00.718666090 +0200
+++ slackware64-current.3/source/xap/freerdp/freerdp.SlackBuild	2021-09-18 13:43:06.247569983 +0200
@@ -101,6 +100,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
     -DWITH_ALSA=ON \
     -DWITH_PULSE=ON \
     -DWITH_CHANNELS=ON \
diff -ur slackware64-current.2/source/xap/ssr/ssr.SlackBuild slackware64-current.3/source/xap/ssr/ssr.SlackBuild
--- slackware64-current.2/source/xap/ssr/ssr.SlackBuild	2021-04-18 20:11:00.718666090 +0200
+++ slackware64-current.3/source/xap/ssr/ssr.SlackBuild	2021-09-18 13:43:06.247569983 +0200
@@ -95,7 +95,7 @@
     -DCMAKE_C_FLAGS="$SLKCFLAGS" \
     -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+    -DCMAKE_INSTALL_LIBDIR="lib$LIBDIRSUFFIX" \
     -DDOC_INSTALL_DIR="doc" \
     -DCMAKE_INSTALL_MANDIR=/usr/man \
     -DWITH_JACK=FALSE \
