diff -ur slackware64-14.2/source/a/aaa_base/aaa_base.SlackBuild slackware64-14.2.patcharm/source/a/aaa_base/aaa_base.SlackBuild
--- slackware64-14.2/source/a/aaa_base/aaa_base.SlackBuild	2016-05-20 22:18:20.000000000 +0200
+++ slackware64-14.2.patcharm/source/a/aaa_base/aaa_base.SlackBuild	2017-10-10 01:55:04.119819001 +0200
@@ -56,9 +56,14 @@
 chown root:root $PKG/etc/os-release
 chmod 644 $PKG/etc/os-release
 
-# 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:
Only in slackware64-14.2.patcharm/source/a/cpufrequtils: 0001-Only-x86-has-cpuid-instruction.patch.gz
diff -ur slackware64-14.2/source/a/cpufrequtils/cpufrequtils.SlackBuild slackware64-14.2.patcharm/source/a/cpufrequtils/cpufrequtils.SlackBuild
--- slackware64-14.2/source/a/cpufrequtils/cpufrequtils.SlackBuild	2010-03-11 21:10:14.000000000 +0100
+++ slackware64-14.2.patcharm/source/a/cpufrequtils/cpufrequtils.SlackBuild	2017-10-10 01:58:53.571990767 +0200
@@ -68,6 +71,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}
 make install libdir=/usr/lib${LIBDIRSUFFIX} DESTDIR=$PKG
diff -ur slackware64-14.2/source/a/etc/etc.SlackBuild slackware64-14.2.patcharm/source/a/etc/etc.SlackBuild
--- slackware64-14.2/source/a/etc/etc.SlackBuild	2016-06-22 21:36:42.000000000 +0200
+++ slackware64-14.2.patcharm/source/a/etc/etc.SlackBuild	2017-10-24 15:56:56.242972625 +0200
@@ -45,8 +45,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
 cp -a $CWD/termcap-BSD.gz etc/termcap-BSD.gz
 gzip -d --force etc/termcap-BSD.gz
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,6 +91,15 @@
 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
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
 CWD=`pwd`
 if [ "$TMP" = "" ]; then
   TMP=/tmp
@@ -87,7 +88,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-14.2/source/ap/cdparanoia/cdparanoia.SlackBuild slackware64-14.2.patcharm/source/ap/cdparanoia/cdparanoia.SlackBuild
--- slackware64-14.2/source/ap/cdparanoia/cdparanoia.SlackBuild	2014-02-04 21:56:20.000000000 +0100
+++ slackware64-14.2.patcharm/source/ap/cdparanoia/cdparanoia.SlackBuild	2017-11-03 00:23:46.876016124 +0100
@@ -63,6 +69,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/ghostscript/ghostscript.SlackBuild slackware64-current.3/source/ap/ghostscript/ghostscript.SlackBuild
--- slackware64-current.2/source/ap/ghostscript/ghostscript.SlackBuild	2016-05-27 20:12:59.000000000 +0200
+++ slackware64-current.3/source/ap/ghostscript/ghostscript.SlackBuild	2023-05-15 15:28:36.923737086 +0200
@@ -73,6 +76,9 @@
 ( cd jbig2dec ; autoreconf --force --install )
 ( cd ijs ; autoreconf --force --install )
 
+# SPARC and ARMv5 wants aligned double-word (64bit) load/store:
+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 . \
diff -ur slackware64-14.2/source/ap/ksh93/ksh93.SlackBuild slackware64-14.2.patcharm/source/ap/ksh93/ksh93.SlackBuild
--- slackware64-14.2/source/ap/ksh93/ksh93.SlackBuild	2016-03-02 22:51:21.000000000 +0100
+++ slackware64-14.2.patcharm/source/ap/ksh93/ksh93.SlackBuild	2017-11-04 00:31:12.622296346 +0100
@@ -43,8 +43,16 @@
 # but package with our real arch label...
 if [ "$ARCH" = "x86_64" ]; then
   SARCH=i386-64
+elif [ `echo "$ARCH"|cut -c 1-3` = "arm"  ]; then
+  SARCH=arm
+elif [ "$ARCH" = "aarch64" ]; then
+  SARCH=$ARCH
+elif [ "$ARCH" = "s390x" ]; then
+  SARCH=s390-64
+elif [ "$ARCH" = "hppa" ]; then
+  SARCH=pa
 else
-  SARCH=i386
+  SARCH=${SARCH:-"i386"}
 fi
 
 CWD=$(pwd)
diff -ur slackware64-14.2/source/ap/mpg123/mpg123.SlackBuild slackware64-14.2.patcharm/source/ap/mpg123/mpg123.SlackBuild
--- slackware64-14.2/source/ap/mpg123/mpg123.SlackBuild	2016-05-23 21:28:44.000000000 +0200
+++ slackware64-14.2.patcharm/source/ap/mpg123/mpg123.SlackBuild	2018-08-23 16:38:50.127815969 +0200
@@ -56,10 +56,18 @@
   SLKCFLAGS="-O2"
   LIBDIRSUFFIX=""
   TARGET="arm_nofpu"
-else
+elif [ "$ARCH" = "armv7hl" ]; then
   SLKCFLAGS="-O2"
   LIBDIRSUFFIX=""
-  TARGET=""
+  TARGET="arm_fpu"
+elif [ "$ARCH" = "aarch64" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX="64"
+  TARGET="aarch64"
+else
+  SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+  TARGET=${TARGET:-""}
 fi
 
 # configure --help shows the following re TARGET:
@@ -69,15 +77,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-14.2/source/d/binutils/binutils.SlackBuild slackware64-14.2.patcharm/source/d/binutils/binutils.SlackBuild
--- slackware64-14.2/source/d/binutils/binutils.SlackBuild	2015-11-12 23:36:07.000000000 +0100
+++ slackware64-14.2.patcharm/source/d/binutils/binutils.SlackBuild	2017-08-13 01:28:51.311297877 +0200
@@ -123,6 +141,10 @@
 # Don't check to see if "config.h" was included in the installed headers:
 zcat $CWD/patches/binutils.no-config-h-check.diff.gz | patch -p1 --verbose || exit 1
 
+# Fix 64bit default target for mips
+sed -i 's/mips64\*el-\*-linux-\*)\ttarg_emul=elf32ltsmipn32/mips64\*el-\*-linux-\*)\ttarg_emul=elf64ltsmip/' ld/configure.tgt
+sed -i 's/mips64\*-\*-linux-\*)\ttarg_emul=elf32btsmipn32/mips64\*-\*-linux-\*)\ttarg_emul=elf64btsmip/' ld/configure.tgt
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff -ur slackware64-14.2/source/d/cmake/cmake.SlackBuild slackware64-14.2.patcharm/source/d/cmake/cmake.SlackBuild
--- slackware64-14.2/source/d/cmake/cmake.SlackBuild	2015-11-12 23:36:07.000000000 +0100
+++ slackware64-14.2.patcharm/source/d/cmake/cmake.SlackBuild	2017-08-13 01:28:51.311297877 +0200
@@ -93,8 +93,8 @@
   --no-system-jsoncpp \
   --system-zlib \
   --system-bzip2 \
-  --system-libarchive \
-  --build=$ARCH-slackware-linux
+  --system-libarchive 
+#  --build=$ARCH-slackware-linux
 #  --system-libs \
 #  --sphinx-man \
 
diff -ur slackware64-14.2/source/d/gcc/gcc.SlackBuild slackware64-14.2.patcharm/source/d/gcc/gcc.SlackBuild
--- slackware64-14.2/source/d/gcc/gcc.SlackBuild	2016-03-06 18:55:49.000000000 +0100
+++ slackware64-14.2.patcharm/source/d/gcc/gcc.SlackBuild	2017-12-30 01:58:22.424944162 +0100
@@ -98,10 +98,19 @@
   SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
   LIBDIRSUFFIX=""
   LIB_ARCH=armv7hl
-else
-  SLKCFLAGS="-O2"
-  LIBDIRSUFFIX=""
+elif [ "$ARCH" = "aarch64" ]; then
+  #SLKCFLAGS="-O3 -march=armv8-a -mfpu=neon-fp-armv8"
+  SLKCFLAGS="-O3"
+  LIBDIRSUFFIX="64"
+  LIB_ARCH=aarch64
+elif [ "$ARCH" = "mips64el" ]; then
+  SLKCFLAGS="-O3 -march=mips64r2 -mabi=64"
+  LIBDIRSUFFIX="64"
   LIB_ARCH=$ARCH
+else
+  SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+  LIB_ARCH=${LIB_ARCH:-"$ARCH"}
 fi
 
 case "$ARCH" in
@@ -150,6 +159,19 @@
   zcat $CWD/gcc.69140.diff.gz | patch -p2 --verbose || exit 1
 ) || exit 1
 
+( cd gcc-$VERSION
+  # Fix std atomics to allow llvm compilation
+  zcat $CWD/libstdc++-fix-future-header-for-armel.patch.gz | patch -p2 --verbose || exit 1
+  # 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 ld warning/error "no .eh_frame_hdr table will be created"
+  zcat $CWD/alpha-crtend.patch.gz | patch -p1 --verbose || exit 1
+  # Fix sparc64 sanitizer checks for glibc>=2.20
+  zcat $CWD/sparc64_sanitizer_glibc220.patch.gz | patch -p1 --verbose || exit 1
+) || exit 1
+
 # Copy ecj.jar into the TLD of the source. Needed for java compiler.
 # This can be retrieved from ftp://sourceware.org/pub/java
 cp $CWD/ecj-4.9.jar gcc-$VERSION/ecj.jar
@@ -473,7 +476,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 --with-abi=64 --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"
@@ -488,7 +522,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
Binary files slackware64-14.2/source/d/llvm/clang.toolchains.i586.triple.diff.gz and slackware64-14.2.patcharm/source/d/llvm/clang.toolchains.i586.triple.diff.gz differ
diff -ur slackware64-14.2/source/d/oprofile/oprofile.SlackBuild slackware64-14.2.patcharm/source/d/oprofile/oprofile.SlackBuild
--- slackware64-14.2/source/d/oprofile/oprofile.SlackBuild	2017-10-10 03:07:58.542103715 +0200
+++ slackware64-14.2.patcharm/source/d/oprofile/oprofile.SlackBuild	2020-03-23 21:19:35.336160818 +0100
@@ -76,6 +76,9 @@
   \( -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
+
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
 ./configure \
diff -ur slackware64-14.2/source/d/perl/perl.SlackBuild slackware64-14.2.patcharm/source/d/perl/perl.SlackBuild
--- slackware64-14.2/source/d/perl/perl.SlackBuild	2016-06-03 21:36:03.000000000 +0200
+++ slackware64-14.2.patcharm/source/d/perl/perl.SlackBuild	2018-08-23 17:06:41.920324005 +0200
@@ -102,7 +108,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-14.2/source/d/python/python.SlackBuild slackware64-14.2.patcharm/source/d/python/python.SlackBuild
--- slackware64-14.2/source/d/python/python.SlackBuild	2016-03-03 20:34:43.000000000 +0100
+++ slackware64-14.2.patcharm/source/d/python/python.SlackBuild	2017-10-30 19:41:22.204333695 +0100
@@ -73,12 +75,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-14.2/source/d/yasm/yasm.SlackBuild slackware64-14.2.patcharm/source/d/yasm/yasm.SlackBuild
--- slackware64-14.2/source/d/yasm/yasm.SlackBuild	2014-11-09 12:05:54.000000000 +0100
+++ slackware64-14.2.patcharm/source/d/yasm/yasm.SlackBuild	2017-10-10 03:24:19.657441099 +0200
@@ -99,6 +99,18 @@
   athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
              SLKLDFLAGS=""; LIBDIRSUFFIX=""
              ;;
+  armv7hl)   SLKCFLAGS="-march=armv7-a -O3 -mfpu=vfpv3-d16"
+             SLKLDFLAGS=""; LIBDIRSUFFIX=""
+             ;;
+  arm*)      SLKCFLAGS="-march=armv5te -O3"
+             SLKLDFLAGS=""; LIBDIRSUFFIX=""
+             ;;
+  aarch64)   SLKCFLAGS="-O3"
+             SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+             ;;
+  *)         SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+             SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+             ;;
 esac
 
 # Create working directories:
diff -ur slackware64-14.2/source/l/boost/boost.SlackBuild slackware64-14.2.patcharm/source/l/boost/boost.SlackBuild
--- slackware64-14.2/source/l/boost/boost.SlackBuild	2015-11-17 00:40:03.384718643 +0100
+++ slackware64-14.2.patcharm/source/l/boost/boost.SlackBuild	2023-05-08 12:21:05.213304407 +0200
@@ -123,6 +126,7 @@
   runtime-link=shared \
   cflags="$SLKCFLAGS" \
   cxxflags="$SLKCFLAGS $EXTRA_CXXFLAGS" \
+  linkflags="$SLKLDFLAGS" \
   $PYTHON_FLAGS \
   stage
 
diff -ur slackware64-14.2/source/l/eigen2/eigen2.SlackBuild slackware64-14.2.patcharm/source/l/eigen2/eigen2.SlackBuild
--- slackware64-14.2/source/l/eigen2/eigen2.SlackBuild	2015-11-12 20:28:02.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/eigen2/eigen2.SlackBuild	2020-04-14 12:37:08.872485185 +0200
@@ -66,6 +66,9 @@
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \;
 
+# Fix missign parentheses on __attribute__(aligned) for AltiVec
+zcat $CWD/fix_aligned_altivec.patch.gz | patch -p1 --verbose || exit 1
+
 mkdir -p build
 cd build
   QTDIR=/usr/lib${LIBDIRSUFFIX}/qt \
Only in slackware64-14.2.patcharm/source/l/icu4c: arm.patch.gz
diff -ur slackware64-14.2/source/l/fftw/fftw.SlackBuild slackware64-14.2.patcharm/source/l/fftw/fftw.SlackBuild
--- slackware64-14.2/source/l/fftw/fftw.SlackBuild	2014-11-29 17:02:05.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/fftw/fftw.SlackBuild	2018-08-23 17:45:49.739194146 +0200
@@ -27,18 +27,32 @@
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
   LIBDIRSUFFIX=""
   SIMD="--enable-sse2 --enable-avx"
+  SIMDF="$SIMD"
 elif [ "$ARCH" = "i686" ]; then
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
   LIBDIRSUFFIX=""
   SIMD="--enable-sse2 --enable-avx"
+  SIMDF="$SIMD"
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
   SIMD="--enable-sse2 --enable-avx"
-else
-  SLKCFLAGS="-O2"
+  SIMDF="$SIMD"
+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:-""}
 fi
 
 rm -rf $PKG
@@ -87,7 +101,7 @@
     --enable-threads \
     --enable-openmp \
     --enable-float \
-    $SIMD \
+    $SIMDF \
     --build=$ARCH-slackware-linux
 
 make $NUMJOBS || make || exit 1
diff -ur slackware64-14.2/source/l/fuse/fuse.SlackBuild slackware64-14.2.patcharm/source/l/fuse/fuse.SlackBuild
--- slackware64-14.2/source/l/fuse/fuse.SlackBuild	2015-12-20 19:48:00.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/fuse/fuse.SlackBuild	2017-11-07 23:45:51.899587013 +0100
@@ -63,6 +66,10 @@
 rm -rf $PKGNAM-$VERSION
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
 cd $PKGNAM-$VERSION
+
+# 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 \) \
Only in slackware64-14.2.patcharm/source/l/fuse: fuse_kernel-types.patch.gz
diff -ur slackware64-14.2/source/l/gc/gc.SlackBuild slackware64-14.2.patcharm/source/l/gc/gc.SlackBuild
--- slackware64-14.2/source/l/gc/gc.SlackBuild	2016-02-20 18:34:55.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/gc/gc.SlackBuild	2018-09-09 14:39:21.143632772 +0200
@@ -64,6 +67,12 @@
 cd $PKGNAM-$VERSION 2> /dev/null || cd $PKGNAM-$(echo $VERSION | cut -b 1-3) || exit 1
 tar xvf $CWD/libatomic_ops-$VERSION.tar.xz || exit 1
 mv libatomic_ops-$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 \) \
@@ -105,6 +114,11 @@
 # some things that use gc to break.  So it is recommended to build the static
 # libraries and then remove them before packaging.
 
+if [ "$ARCH" = "sparc" ]; then
+  # Wrongly defined Makefile:
+  make src/sparc_mach_dep.lo
+fi
+
 # Does not like parallel make...
 make $NUMJOBS || make || exit 1
 make install DESTDIR=$PKG || exit 1
diff -ur slackware64-14.2/source/l/glibc/glibc.SlackBuild slackware64-14.2.patcharm/source/l/glibc/glibc.SlackBuild
--- slackware64-14.2/source/l/glibc/glibc.SlackBuild	2016-02-20 18:34:55.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/glibc/glibc.SlackBuild	2018-09-09 14:39:21.143632772 +0200
@@ -70,20 +70,23 @@
     OPTIMIZ="-O3 -fPIC"
     LIBDIRSUFFIX="64"
     ;;
+  aarch64)
+    OPTIMIZ="-O3"
+    LIBDIRSUFFIX="64"
+    ;;
+  sparc)
+    OPTIMIZ="-O3 -mcpu=leon3"
+    LIBDIRSUFFIX=""
+    ;;
   *)
     OPTIMIZ="-O3"
-    LIBDIRSUFFIX=""
+    LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
     ;;
 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:
@@ -108,18 +107,42 @@
 # This function fixes a doinst.sh file for x86_64.
 # With thanks to Fred Emmott.
 fix_doinst() {
-  if [ "x$LIBDIRSUFFIX" = "x" ]; then
-    return;
-  fi;
+  if [ "x$LIBDIRSUFFIX" != "x" ]; then
   # Fix "( cd usr/lib ;" occurrences
   sed -i "s#lib ;#lib${LIBDIRSUFFIX} ;#" install/doinst.sh
   # Fix "lib/" occurrences
   sed -i "s#lib/#lib${LIBDIRSUFFIX}/#g" install/doinst.sh
   # Fix "( cd lib" occurrences
   sed -i "s#( cd lib\$#( cd lib${LIBDIRSUFFIX}#" 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" = "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
+      sed -i "s|^# Reload|(cd lib; ln -sf ../lib$LIBDIRSUFFIX/ld-linux-aarch64.so.1 .)\n\n# Reload|" install/doinst.sh
+    fi
+  elif [ "$SLACKWARE_ARCH" = "s390x" ]; then
+    sed -i 's#ld-linux.so.2#ld64.so.1#' install/doinst.sh
+    if [[ "x$LIBDIRSUFFIX" != "x" ]]
+    then
+      # All binaries are linked by default to /lib/ld64.so.1, so make sure
+      # the file/link exists
+      sed -i "s|^# Reload|(cd lib; ln -sf ../lib$LIBDIRSUFFIX/ld64.so.1 .)\n\n# Reload|" install/doinst.sh
+    fi
+  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
+      sed -i "s|^# Reload|(cd lib$LIBDIRSUFFIX; ln -s $lib.1 $lib 2>/dev/null)\n# Reload|" install/doinst.sh
+    done
   fi
 }
 
@@ -228,7 +240,7 @@
   --with-tls \
   --with-__thread \
   --without-cvs \
-  $TARGET-slackware-linux
+  $TARGET
 
 make $NUMJOBS || make || exit 1
 make install install_root=$PKG || exit 1
Only in slackware64-14.2.patcharm/source/l/gnu-efi: fix-memcpy-aarch64.patch.gz
diff -ur slackware64-14.2/source/l/gnu-efi/gnu-efi.SlackBuild slackware64-14.2.patcharm/source/l/gnu-efi/gnu-efi.SlackBuild
--- slackware64-14.2/source/l/gnu-efi/gnu-efi.SlackBuild	2016-04-01 20:35:30.000000000 +0200
+++ slackware64-14.2.patcharm/source/l/gnu-efi/gnu-efi.SlackBuild	2017-11-02 00:31:20.997228776 +0100
@@ -64,6 +67,9 @@
 
 sed -i "s,/usr/local,/usr,g" Make.defaults
 
+# Fix incorrect non-const variable in aarch64:
+zcat $CWD/fix-memcpy-aarch64.patch.gz | patch -p1 --verbose 
+
 make CPPFLAGS="$SLKCFLAGS" || exit 1
 make CPPFLAGS="$SLKCFLAGS" install INSTALLROOT=$PKG || exit
 
diff -ur slackware64-14.2/source/l/gtk+2/gtk+2.SlackBuild slackware64-14.2.patcharm/source/l/gtk+2/gtk+2.SlackBuild
--- slackware64-14.2/source/l/gtk+2/gtk+2.SlackBuild	2016-03-07 20:01:31.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/gtk+2/gtk+2.SlackBuild	2020-04-01 10:07:51.171555854 +0200
@@ -109,9 +112,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 \
@@ -131,7 +134,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-14.2/source/l/gtk+3/gtk+3.SlackBuild slackware64-14.2.patcharm/source/l/gtk+3/gtk+3.SlackBuild
--- slackware64-14.2/source/l/gtk+3/gtk+3.SlackBuild	2015-12-06 21:26:01.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/gtk+3/gtk+3.SlackBuild	2020-04-01 10:09:34.767029144 +0200
@@ -107,7 +110,7 @@
 # for places where we have two copies of the GTK+ package installed.
 # (we might have x86_64 and i586 packages on the same system, for example.)
 case "$host" in
-  s390x*|x86_64*)
+  s390x*|*64*)
    mv $PKG/usr/bin/gtk-query-immodules-3.0{,-64}
    ( cd $PKG/usr/bin
      ln -sf gtk-query-immodules-3.0-64 gtk-query-immodules-3.0
diff -ur slackware64-14.2/source/l/icu4c/icu4c.SlackBuild slackware64-14.2.patcharm/source/l/icu4c/icu4c.SlackBuild
--- slackware64-14.2/source/l/icu4c/icu4c.SlackBuild	2016-05-02 20:49:11.000000000 +0200
+++ slackware64-14.2.patcharm/source/l/icu4c/icu4c.SlackBuild	2017-10-29 23:20:42.627952715 +0100
@@ -73,6 +76,11 @@
 
 zcat $CWD/icu4c.closenull.patch.gz | patch -p1 --verbose || exit 1
 
+if [ "$ARCH" = "armv7hl" ]; then
+  # On Arm it generated wrong libicudata
+  zcat $CWD/arm.patch.gz | patch -p1 || exit 1
+fi
+
 cd source/
   CFLAGS="$SLKCFLAGS" \
   CXXFLAGS="$SLKCFLAGS" \
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	2015-04-03 01:45:31.205650342 +0200
+++ slackware64-current.3/source/l/jemalloc/jemalloc.SlackBuild	2023-06-17 17:18:35.399301021 +0200
@@ -61,6 +70,10 @@
 rm -rf $PKGNAM-$VERSION
 tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || 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 \
Only in slackware64-14.2.patcharm/source/l/js185: disable_assembler.patch.gz
diff -ur slackware64-14.2/source/l/js185/js185.SlackBuild slackware64-14.2.patcharm/source/l/js185/js185.SlackBuild
--- slackware64-14.2/source/l/js185/js185.SlackBuild	2012-07-19 00:16:35.000000000 +0200
+++ slackware64-14.2.patcharm/source/l/js185/js185.SlackBuild	2018-08-23 17:55:44.530888661 +0200
@@ -45,6 +45,8 @@
 TMP=${TMP:-/tmp}
 PKG=$TMP/package-$PKGNAM
 
+PATCH_ASSEMBLER=${PATCH_ASSEMBLER:-0}
+
 if [ "$ARCH" = "i486" ]; then
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
   LIBDIRSUFFIX=""
@@ -54,9 +56,33 @@
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
-else
+elif [ "$ARCH" = "aarch64" ]; then
   SLKCFLAGS="-O2"
-  LIBDIRSUFFIX=""
+  LIBDIRSUFFIX="64"
+  PATCH_ASSEMBLER=1
+elif [ "$ARCH" = "s390x" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX="64"
+  PATCH_ASSEMBLER=1
+elif [ "$ARCH" = "alpha" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX=""
+  PATCH_ASSEMBLER=1
+elif [ "$ARCH" = "hppa" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX=""
+  PATCH_ASSEMBLER=1
+elif [ "$ARCH" = "sparc" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX=""
+  PATCH_ASSEMBLER=1
+elif [ "$ARCH" = "sparc64" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX="64"
+  PATCH_ASSEMBLER=1
+else
+  SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
 fi
 
 rm -rf $PKG
@@ -75,6 +87,12 @@
 cd js/src
 
 patch -p0 < $CWD/js185-destdir.patch || exit 1
+patch -p0 < $CWD/softfp_armv7.patch || exit 1
+patch -p0 < $CWD/bigendian_word_missing.patch || exit 1
+patch -p0 < $CWD/sparcv9_native_compare_and_swap.patch || exit 1
+if [ $PATCH_ASSEMBLER -eq 1 ] ; then
+  patch -p0 < $CWD/disable_assembler.patch || exit 1
+fi
 
 CXXFLAGS="$SLKCFLAGS" \
 CFLAGS="$SLKCFLAGS" \
Only in slackware64-14.2.patcharm/source/l/js185: softfp_armv7.patch.gz
Only in slackware64-14.2.patcharm/source/l/libaio: aarch64-support.patch.gz
diff -ur slackware64-14.2/source/l/lcms2/lcms2.SlackBuild slackware64-14.2.patcharm/source/l/lcms2/lcms2.SlackBuild
--- slackware64-14.2/source/l/lcms2/lcms2.SlackBuild	2020-04-02 13:41:18.341675414 +0000
+++ slackware64-14.2.patcharm/source/l/lcms2/lcms2.SlackBuild	2023-05-15 11:09:24.924200504 +0000
@@ -77,6 +77,10 @@
 rm -rf $PKGNAM-$VERSION
 tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
 cd $PKGNAM-$VERSION
+
+# Add SPARC and ARMv5 8-bytes alignement handling for 64bit load/store:
+zcat $CWD/arm_unaligned_64bit_load-store.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-14.2/source/l/libaio/libaio.SlackBuild slackware64-14.2.patcharm/source/l/libaio/libaio.SlackBuild
--- slackware64-14.2/source/l/libaio/libaio.SlackBuild	2010-05-11 03:13:29.000000000 +0200
+++ slackware64-14.2.patcharm/source/l/libaio/libaio.SlackBuild	2017-11-03 22:35:56.520023825 +0100
@@ -54,6 +54,17 @@
 tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
 cd ${PKGNAM}-$VERSION
 
+# Add AArch64 architecture support:
+zcat $CWD/aarch64-support.patch.gz | patch -p1 --verbose
+# Add PPC64LE and MIPS architectures support:
+zcat $CWD/ppc64le+mips-support.patch.gz | patch -p1 --verbose
+
+# For arch[s] that does not have specific syscall, re-enable stdlib,
+# otherwise error "hidden symbol `$$dyncall' in /usr/lib/gcc/hppa-slackware-linux/5.3.0/libgcc.a(_dyncall.o) is referenced by DSO" will raise
+if [ "$ARCH" = "hppa"  ]; then
+  sed -i 's/-nostdlib//g' src/Makefile
+fi
+
 # Make sure ownerships and permissions are sane:
 chown -R root:root .
 find . \
diff -ur slackware64-14.2/source/l/libkarma/libkarma.SlackBuild slackware64-14.2.patcharm/source/l/libkarma/libkarma.SlackBuild
--- slackware64-14.2/source/l/libkarma/libkarma.SlackBuild	2010-12-04 20:32:49.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/libkarma/libkarma.SlackBuild	2017-12-10 17:10:59.786486672 +0100
@@ -71,7 +77,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-14.2/source/l/libmad/libmad.SlackBuild slackware64-14.2.patcharm/source/l/libmad/libmad.SlackBuild
--- slackware64-14.2/source/l/libmad/libmad.SlackBuild	2017-11-03 22:02:50.196859191 +0100
+++ slackware64-14.2.patcharm/source/l/libmad/libmad.SlackBuild	2020-04-17 14:38:48.866219923 +0200
@@ -67,6 +67,8 @@
 
 # Remove force-mem optimization (GCC 5 does not have this option anymore)
 zcat $CWD/force-mem.patch.gz | patch -p0 || exit 1
+# Remove asm for mips (GCC 5 does no more have "=h" contraint)
+zcat $CWD/mips.contraint.patch.gz | patch -p0 || exit 1
 
 # Make sure ownerships and permissions are sane:
 chown -R root:root .
diff -ur slackware64-14.2/source/l/libpcap/libpcap.SlackBuild slackware64-14.2.patcharm/source/l/libpcap/libpcap.SlackBuild
--- slackware64-14.2/source/l/libpcap/libpcap.SlackBuild	2017-11-03 22:02:50.196859191 +0100
+++ slackware64-14.2.patcharm/source/l/libpcap/libpcap.SlackBuild	2020-04-17 14:38:48.866219923 +0200
@@ -62,7 +62,15 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \;
 
-CFLAGS="$(getconf LFS_CFLAGS)" \
+SLKCFLAGS="$(getconf LFS_CFLAGS)"
+
+if [ "$ARCH" = "sparc64" ]
+then
+  # Avoit error "relocation truncated to fit: R_SPARC_GOT13 against symbol `stderr@@GLIBC_2.2' defined in .data section in /lib64/libc.so.6"
+  SLKCFLAGS="$SLKCFLAGS -fPIC"
+fi
+
+CFLAGS="$SLKCFLAGS" \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
diff -ur slackware64-14.2/source/l/libsigsegv/libsigsegv.SlackBuild slackware64-14.2.patcharm/source/l/libsigsegv/libsigsegv.SlackBuild
--- slackware64-14.2/source/l/libsigsegv/libsigsegv.SlackBuild	2015-10-15 22:22:29.000000000 +0200
+++ slackware64-14.2.patcharm/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-14.2/source/l/libvpx/libvpx.SlackBuild slackware64-14.2.patcharm/source/l/libvpx/libvpx.SlackBuild
--- slackware64-14.2/source/l/libvpx/libvpx.SlackBuild	2015-10-15 22:22:29.000000000 +0200
+++ slackware64-14.2.patcharm/source/l/libvpx/libvpx.SlackBuild	2017-11-07 20:03:35.998841066 +0100
@@ -49,9 +49,21 @@
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
   ARCHOPTS="--target=x86_64-linux-gcc --enable-pic"
-else
+elif [ "$ARCH" = "armv7hl" ]; then
   SLKCFLAGS="-O2"
   LIBDIRSUFFIX=""
+  ARCHOPTS="--target=armv7-linux-gcc --cpu=cortex-a8"
+  export CC=gcc
+  export LD=gcc
+  export AS=as
+  export AR=ar
+elif [ "$ARCH" = "aarch64" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX="64"
+  ARCHOPTS="--target=generic-gnu"
+else
+  SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
   ARCHOPTS="--target=${ARCH}-linux-gcc"
 fi
 
diff -ur slackware64-14.2/source/l/mozilla-nss/mozilla-nss.SlackBuild slackware64-14.2.patcharm/source/l/mozilla-nss/mozilla-nss.SlackBuild
--- slackware64-14.2/source/l/mozilla-nss/mozilla-nss.SlackBuild	2016-03-09 18:57:25.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/mozilla-nss/mozilla-nss.SlackBuild	2018-08-23 20:45:53.965492043 +0200
@@ -46,7 +46,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=""
@@ -62,6 +64,11 @@
 # Seems parallel build does not work with this.
 #NUMJOBS=${NUMJOBS:-" -j7 "}
 
+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
 
@@ -92,7 +99,7 @@
 cd nss
   # Seems parallel build does not work with this.
   #make $NUMJOBS nss_build_all export
-  make nss_build_all export
+  make nss_build_all export || exit 1
 cd -
 
 # Install all the needed stuff to the package dir:
diff -ur slackware64-14.2/source/l/netpbm/netpbm.SlackBuild slackware64-14.2.patcharm/source/l/netpbm/netpbm.SlackBuild
--- slackware64-14.2/source/l/netpbm/netpbm.SlackBuild	2015-10-15 22:22:29.000000000 +0200
+++ slackware64-14.2.patcharm/source/l/netpbm/netpbm.SlackBuild	2017-11-07 20:03:35.998841066 +0100
@@ -62,6 +65,7 @@
 
 zcat $CWD/netpbm-noppmtompeg.patch.gz | patch -p1 --verbose || exit 1
 zcat $CWD/netpbm-pnmtops.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/word_align_be.diff.gz | patch -p1 --verbose || exit 1
 
 # Make sure ownerships and permissions are sane:
 chown -R root:root .
diff -ur slackware64-14.2/source/l/pcre/pcre.SlackBuild slackware64-14.2.patcharm/source/l/pcre/pcre.SlackBuild
--- slackware64-14.2/source/l/pcre/pcre.SlackBuild.orig	2016-06-20 22:44:48.000000000 +0200
+++ slackware64-14.2.patcharm/source/l/pcre/pcre.SlackBuild	2021-10-13 18:35:24.177484924 +0200
@@ -37,12 +37,27 @@
 
 NUMJOBS=${NUMJOBS:-" -j7 "}
 
+EXTRACONF="--enable-jit"
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
 elif [ "$ARCH" = "s390" ]; then
   SLKCFLAGS="-O2"
   LIBDIRSUFFIX=""
+  EXTRACONF=""
+elif [ "$ARCH" = "s390x" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX="64"
+  EXTRACONF=""
+elif [ "$ARCH" = "alpha" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX=""
+  EXTRACONF=""
+elif [ "$ARCH" = "hppa" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX=""
+  EXTRACONF=""
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
@@ -79,7 +86,7 @@
   --enable-utf8 \
   --enable-pcre16 \
   --enable-pcre32 \
-  --enable-jit \
+  $EXTRACONF \
   --enable-unicode-properties \
   --enable-pcregrep-libz \
   --enable-pcregrep-libbz2 \
Only in slackware64-14.2.patcharm/source/l/qt: qatomic_generic-fix.patch.gz
diff -ur slackware64-14.2/source/l/qt/qt-nowebkit.SlackBuild slackware64-14.2.patcharm/source/l/qt/qt-nowebkit.SlackBuild
--- slackware64-14.2/source/l/qt/qt-nowebkit.SlackBuild	2016-03-02 06:37:06.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/qt/qt-nowebkit.SlackBuild	2017-11-06 00:11:07.402799182 +0100
@@ -125,6 +128,32 @@
 zcat $CWD/qt.qclipboard_fix_recursive.patch.gz | patch -p1 --verbose || exit 1
 zcat $CWD/qt.qclipboard_delay.patch.gz | patch -p1 --verbose || exit 1
 
+# Apply patch for generic platform to avoid 
+# "error: invalid conversion from 'const void*' to 'void*'"
+zcat $CWD/qatomic_generic-fix.patch.gz | patch -p1 --verbose || exit 1
+
+# Apply patch for AArch64 support on WebKit
+zcat $CWD/webkit-aarch64_support.patch.gz | patch -p1 --verbose || exit 1
+
+# Add missing QBasicAtomicPointer<T>::fetchAndAddOrdered for s390(x):
+zcat $CWD/qatomic_s390_missing_pointer_addordered.patch.gz | patch -p1 --verbose || exit 1
+
+if [ "$ARCH" = "sparc64" ]
+then
+# Fix 64 bit qatomic detecting for SPARC:
+zcat $CWD/qt.sparc64.patch.gz | patch -p1 --verbose || exit 1
+fi
+
+# Remove assembler for hppa, since it does not work:
+(cd src/corelib/arch
+ mv qatomic_parisc.h qatomic_parisc.h.nowork 
+ ln -s qatomic_generic.h qatomic_parisc.h
+ mv parisc parisc.nowork
+ ln -s generic parisc
+ # Prevent smokegen to generate invaild x_3.cpp: (int[4] _q_lock)
+ sed -i 's/QT_ARCH_PARISC/QT_ARCH_PARISC_DISABLED/' q*atomic.h
+)
+
 # All other distros I checked build with -no-webkit. But this has the downside of
 # breaking the build when QtWebKit is present on the build system and some things
 # (assistant for one) are built without support for QtWebKit. So let's go with
Only in slackware64-14.2.patcharm/source/l/qt/qtwebkit: aarch64.patch.gz
diff -ur slackware64-14.2/source/l/qt/qtwebkit/qtwebkit.SlackBuild slackware64-14.2.patcharm/source/l/qt/qtwebkit/qtwebkit.SlackBuild
--- slackware64-14.2/source/l/qt/qtwebkit/qtwebkit.SlackBuild	2015-11-19 05:42:44.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/qt/qtwebkit/qtwebkit.SlackBuild	2018-08-23 18:16:05.762660130 +0200
@@ -89,6 +93,12 @@
 # Patch to fix compiling with gcc5:
 zcat $CWD/qtwebkit.putByIndexBeyondVectorLengthWithArrayStorage.diff.gz | patch -p1 --verbose || exit 1
 
+# Patch to disable assembler on AArch64
+zcat $CWD/aarch64.patch.gz | patch -p1 --verbose || exit 1
+
+# Patch to re-enable atomic increment/decrement on SPARC64
+zcat $CWD/sparc64_atomic_missing.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 \) \
Only in slackware64-14.2.patcharm/source/l/qt: webkit-aarch64_support.patch.gz
diff -ur slackware64-14.2/source/l/speexdsp/speexdsp.SlackBuild slackware64-14.2.patcharm/source/l/speexdsp/speexdsp.SlackBuild
--- slackware64-14.2/source/l/speexdsp/speexdsp.SlackBuild	2015-12-31 07:37:29.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/speexdsp/speexdsp.SlackBuild	2018-08-23 18:18:31.433018915 +0200
@@ -44,6 +44,8 @@
   esac
 fi
 
+EXTRACONF=""
+
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
@@ -79,7 +86,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-14.2/source/l/virtuoso-ose/virtuoso-ose.SlackBuild slackware64-14.2.patcharm/source/l/virtuoso-ose/virtuoso-ose.SlackBuild
--- slackware64-14.2/source/l/virtuoso-ose/virtuoso-ose.SlackBuild	2015-11-21 00:24:33.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/virtuoso-ose/virtuoso-ose.SlackBuild	2021-10-25 11:35:39.766567552 +0200
@@ -62,6 +65,9 @@
 tar xvf $CWD/virtuoso-opensource-$VERSION.tar.xz || exit 1
 cd virtuoso-opensource-$VERSION || exit 1
 
+# Fix duplicated "saddr_t" definition on s390x architecture (from /usr/include/asm/types.h):
+zcat $CWD/fix-saddr_t-on-s390x.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-14.2/source/l/wavpack/wavpack.SlackBuild slackware64-14.2.patcharm/source/l/wavpack/wavpack.SlackBuild
--- slackware64-14.2/source/l/wavpack/wavpack.SlackBuild	2016-03-19 21:47:15.000000000 +0100
+++ slackware64-14.2.patcharm/source/l/wavpack/wavpack.SlackBuild	2017-10-30 02:02:46.148343034 +0100
@@ -50,15 +50,26 @@
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
+  MMX=""
 elif [ "$ARCH" = "i686" ]; then
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
   LIBDIRSUFFIX=""
+  MMX="--enable-mmx"
 elif [ "$ARCH" = "s390" ]; then
   SLKCFLAGS="-O2"
   LIBDIRSUFFIX=""
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
+  MMX="--enable-mmx"
+elif [ "$ARCH" = "aarch64" ]; then
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX="64"
+  MMX=""
+else
+  SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+  MMX=""
 fi
 
 rm -rf $PKG
@@ -82,7 +93,7 @@
   --localstatedir=/var \
   --mandir=/usr/man \
   --enable-static=no \
-  --enable-mmx \
+  $MMX \
   --build=$ARCH-slackware-linux \
   || exit 1
 
diff -ur slackware64-14.2/source/n/ebtables/ebtables.SlackBuild slackware64-14.2.patcharm/source/n/ebtables/ebtables.SlackBuild
--- slackware64-14.2/source/n/ebtables/ebtables.SlackBuild	2020-03-23 14:16:11.373018334 +0000
+++ slackware64-14.2.patcharm/source/n/ebtables/ebtables.SlackBuild	2020-03-23 14:17:00.045587711 +0000
@@ -80,6 +95,9 @@
   -e "s|-Wunused|-Wno-error=unused-but-set-variable|" \
   Makefile
 
+# Fix incorrect userspace 32 for sparc64:
+sed -i 's/-DKERNEL_64_USERSPACE_32//' Makefile
+
 make -j 4 || exit 1
 
 make install \
diff -ur slackware64-14.2/source/n/nn/nn.SlackBuild slackware64-14.2.patcharm/source/n/nn/nn.SlackBuild
--- slackware64-14.2/source/n/nn/nn.SlackBuild	2009-11-12 01:23:37.000000000 +0100
+++ slackware64-14.2.patcharm/source/n/nn/nn.SlackBuild	2018-08-23 18:43:49.122959880 +0200
@@ -70,7 +74,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-14.2/source/n/openssh/openssh.SlackBuild slackware64-14.2.patcharm/source/n/openssh/openssh.SlackBuild
--- slackware64-14.2/source/n/openssh/openssh.SlackBuild	2020-03-23 14:16:11.373018334 +0000
+++ slackware64-14.2.patcharm/source/n/openssh/openssh.SlackBuild	2020-03-23 14:17:00.045587711 +0000
@@ -72,6 +72,13 @@
 zcat $CWD/openssh-7.2p1-libwrap.diff.gz | patch -p1 --verbose || exit 1
 autoreconf -vif
 
+if [ "$ARCH" = "hppa" ]
+then
+  # Fix invalid gcc flags that lead to "error while loading shared libraries: libc.so.6: 
+  # cannot enable executable stack as shared object requires: Invalid argument"
+  zcat $CWD/hppa_noexecstack.diff.gz | patch -p0 --verbose || exit 1
+fi
+
 # Compile package:
 CFLAGS="$SLKCFLAGS" \
 ./configure \
diff -ur slackware64-14.2/source/n/openssl/openssl.SlackBuild slackware64-14.2.patcharm/source/n/openssl/openssl.SlackBuild
--- slackware64-14.2/source/n/openssl/openssl.SlackBuild	2020-03-23 14:16:11.373018334 +0000
+++ slackware64-14.2.patcharm/source/n/openssl/openssl.SlackBuild	2020-03-23 14:17:00.045587711 +0000
@@ -103,6 +103,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.
@@ -113,7 +116,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 \
diff -ur slackware64-14.2/source/n/trn/trn.SlackBuild slackware64-14.2.patcharm/source/n/trn/trn.SlackBuild
--- slackware64-14.2/source/n/trn/trn.SlackBuild	2010-08-12 18:05:09.000000000 +0200
+++ slackware64-14.2.patcharm/source/n/trn/trn.SlackBuild	2017-11-08 00:43:15.725031287 +0100
@@ -53,7 +53,12 @@
 tar xvf $CWD/trn-$VERSION.tar.gz || exit 1
 cd trn-$VERSION || exit 1
 #zcat $CWD/trn-$VERSION.nntp.diff.gz | patch -p1
-if [ "$ARCH" = "x86_64" ]; then
+if [ "$ARCH" = "x86_64" -o "$ARCH" = "aarch64" ]; then
+  LIBDIRSUFFIX=64
+else
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+fi
+if [ "$LIBDIRSUFFIX" = "64" ]; then
   zcat $CWD/config.x86_64.sh.gz > config.sh
 else
   zcat $CWD/config.sh.gz > config.sh
diff -ur slackware64-14.2/source/n/vsftpd/vsftpd.SlackBuild slackware64-14.2.patcharm/source/n/vsftpd/vsftpd.SlackBuild
--- slackware64-14.2/source/n/vsftpd/vsftpd.SlackBuild	2010-08-12 18:05:09.000000000 +0200
+++ slackware64-14.2.patcharm/source/n/vsftpd/vsftpd.SlackBuild	2017-11-08 00:43:15.725031287 +0100
@@ -64,6 +64,14 @@
 zcat $CWD/vsftpd.conf.diff.gz | patch -p1 --verbose || exit 1
 zcat $CWD/vsftpd.crypt.diff.gz | patch -p1 --verbose || exit 1
 
+# Fix Alpha missing __NR_getpid:
+zcat $CWD/alpha_getxpid.diff.gz | patch -p1 --verbose || exit 1
+if [ "$ARCH" = "alpha" -o "$ARCH" = "hppa" ]
+then
+  # GCC 5.x for alpha does not implement -fstack-protector
+  sed -i 's/-fstack-protector//' Makefile
+fi
+
 make $NUMJOBS || make || exit 1
 
 mkdir -p $PKG/usr/sbin
diff -ur slackware64-14.2/source/x/glew/glew.SlackBuild slackware64-14.2.patcharm/source/x/glew/glew.SlackBuild
--- slackware64-14.2/source/x/glew/glew.SlackBuild	2015-11-23 20:32:15.000000000 +0100
+++ slackware64-14.2.patcharm/source/x/glew/glew.SlackBuild	2017-11-01 23:51:12.471141946 +0100
@@ -74,8 +77,8 @@
 fromdos < config/config.guess > $TEMPFILE
 cat $TEMPFILE > config/config.guess ; rm -f $TEMPFILE
 
-make $NUMJOBS OPT="$SLKCFLAGS" || make OPT="$SLKCFLAGS" || exit 1
-make install.all GLEW_DEST=$PKG/usr || exit 1
+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-14.2/source/x/libdrm/libdrm.SlackBuild slackware64-14.2.patcharm/source/x/libdrm/libdrm.SlackBuild
--- slackware64-14.2/source/x/libdrm/libdrm.SlackBuild	2015-08-19 20:25:59.000000000 +0200
+++ slackware64-14.2.patcharm/source/x/libdrm/libdrm.SlackBuild	2017-11-01 05:19:34.035852507 +0100
@@ -71,6 +74,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="--enable-intel
+              --enable-omap-experimental-api
+	      --enable-exynos-experimental-api
+	      --enable-tegra-experimental-api
+	     "
+elif [ "${ARCH::3}" = "ppc" -o "${ARCH::4}" = "mips" -o "${ARCH::4}" = "s390" ]; then
+  EXTRABUILD="--enable-intel"
+else
+  EXTRABUILD=${EXTRABUILD:-"--enable-intel"}
+fi
 # Configure:
 CFLAGS="$SLKCFLAGS" \
 ./configure \
@@ -78,6 +91,7 @@
   --libdir=/usr/lib${LIBDIRSUFFIX} \
   --mandir=/usr/man \
   --enable-udev \
+  $EXTRABUILD \
   --build=$ARCH-slackware-linux
 
 # Build and install:
Only in slackware64-14.2.patcharm/source/x/x11/configure: xf86-video-armsoc
Only in slackware64-14.2.patcharm/source/x/x11/configure: xf86-video-fbturbo
Only in slackware64-14.2.patcharm/source/x/x11/configure: xf86-video-opentegra
diff -ur slackware64-14.2/source/x/x11/arch.use.flags slackware64-14.2.patcharm/source/x/x11/arch.user.flags
--- slackware64-14.2/source/x/x11/arch.use.flags	2015-08-19 08:05:11.000000000 +0200
+++ slackware64-14.2.patcharm/source/x/x11/arch.use.flags	2019-08-24 17:48:48.902266073 +0200
@@ -6,4 +6,6 @@
   SLKCFLAGS="-O2"
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
+else
+  SLKCFLAGS="-O2"
 fi
diff -ur slackware64-14.2/source/x/x11/modularize slackware64-14.2.patcharm/source/x/x11/modularize
--- slackware64-14.2/source/x/x11/modularize	2015-11-19 18:51:28.000000000 +0100
+++ slackware64-14.2.patcharm/source/x/x11/modularize	2017-11-03 02:28:47.941626250 +0100
@@ -181,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
@@ -200,6 +203,7 @@
 xf86-video-nv
 xf86-video-omap
 xf86-video-openchrome
+xf86-video-opentegra
 xf86-video-qxl
 xf86-video-r128
 xf86-video-rendition
Only in slackware64-14.2.patcharm/source/x/x11: package-blacklist.aarch64
Only in slackware64-14.2.patcharm/source/x/x11: package-blacklist.armv7hl
Only in slackware64-14.2.patcharm/source/x/x11/patch: intel-gpu-tools.patch
Only in slackware64-14.2.patcharm/source/x/x11/patch: sessreg
Only in slackware64-14.2.patcharm/source/x/x11/patch: sessreg.patch
diff -ur slackware64-14.2/source/x/x11/post-install/xorg-cf-files.post-install slackware64-14.2.patcharm/source/x/x11/post-install/xorg-cf-files.post-install
--- slackware64-14.2/source/x/x11/post-install/xorg-cf-files.post-install	2009-08-11 05:32:49.000000000 +0200
+++ slackware64-14.2.patcharm/source/x/x11/post-install/xorg-cf-files.post-install	2017-12-10 15:46:26.983600786 +0100
@@ -1,4 +1,4 @@
-if [ "$(uname -m)" = "x86_64" ]; then
+if [ "$(uname -m)" = "x86_64" -o "$(uname -m)" = "aarch64" -o "$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
   )
Only in slackware64-14.2.patcharm/source/x/x11/src/driver: xf86-video-armsoc-1.4.0.tar.gz
Only in slackware64-14.2.patcharm/source/x/x11/src/driver: xf86-video-fbdev-0.4.4.tar.xz
Only in slackware64-14.2.patcharm/source/x/x11/src/driver: xf86-video-fbturbo-199.f9a6ed7.tar.xz
Only in slackware64-14.2.patcharm/source/x/x11/src/driver: xf86-video-opentegra-1.5158a25.tar.xz
diff -ur slackware64-14.2/source/x/x11/x11.SlackBuild slackware64-14.2.patcharm/source/x/x11/x11.SlackBuild
--- slackware64-14.2/source/x/x11/x11.SlackBuild	2015-08-19 08:04:33.000000000 +0200
+++ slackware64-14.2.patcharm/source/x/x11/x11.SlackBuild	2017-11-01 04:03:49.936165119 +0100
@@ -156,7 +156,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
@@ -196,6 +201,18 @@
           . $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
+
+	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-14.2/source/xap/MPlayer/MPlayer.SlackBuild slackware64-14.2.patcharm/source/xap/MPlayer/MPlayer.SlackBuild
--- slackware64-14.2/source/xap/MPlayer/MPlayer.SlackBuild	2016-05-23 22:28:36.000000000 +0200
+++ slackware64-14.2.patcharm/source/xap/MPlayer/MPlayer.SlackBuild	2017-12-04 00:26:09.350956374 +0100
@@ -149,6 +149,10 @@
        "$ARCH" = "i686" ]; then
   LIBDIRSUFFIX=""
   EXTRACONFIGUREOPTIONS="--enable-runtime-cpudetection"
+elif [ "$ARCH" = "sparc" ]; then
+  LIBDIRSUFFIX=""
+  # sparc(32bit) needs latomic for ffmpeg
+  EXTRACONFIGUREOPTIONS="--extra-ldflags=-latomic"
 else
   LIBDIRSUFFIX=""
   EXTRACONFIGUREOPTIONS=""
@@ -352,6 +356,14 @@
 # fix flac playback with embedded album art:
 zcat $SRCDIR/MPlayer.demux_lavf.flac.diff.gz | patch -p1 --verbose || exit 1
 
+# fix ARMv8 architecture detection
+zcat $SRCDIR/aarch64.diff.gz | patch -p1 --verbose || exit 1
+
+if [ "$ARCH" = "sparc" ]; then
+  # SPARC (32bit) does not have __sync_* atomic operations. Use libatomic ones.
+  sed -i 's/HAVE_SYNC_VAL_COMPARE_AND_SWAP/HAVE_ATOMIC_COMPARE_EXCHANGE/' configure
+fi
+
 echo Building ...
 # MPlayer wants to automatically determine compiler flags,
 # so we don't provide CFLAGS.
Only in slackware64-14.2.patcharm/source/xap/MPlayer: aarch64.diff.gz
Only in slackware64-14.2.patcharm/source/xap/mozilla-firefox: armv5.diff.gz
diff -ur slackware64-14.2/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild slackware64-14.2.patcharm/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild
--- slackware64-14.2/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild	2016-05-04 18:40:59.000000000 +0200
+++ slackware64-14.2.patcharm/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild	2018-08-23 19:04:26.612484365 +0200
@@ -89,17 +89,23 @@
   LIBDIRSUFFIX="64"
   OPTIMIZE=" --enable-optimize=-O2 "
 elif [ "$ARCH" = "arm" ]; then
-  SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+  #SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+  SLKCFLAGS="-Os -march=armv5te -mfloat-abi=soft -mtune=arm926ej-s"
   LIBDIRSUFFIX=""
-  OPTIMIZE=" --enable-optimize=-O2 "
+  OPTIMIZE=" --enable-optimize=-Os  --with-arch=armv5te --with-float-abi=soft --with-soft-float --with-thumb=no"
+  PATCHV5=1
 elif [ "$ARCH" = "armel" ]; then
   SLKCFLAGS="-O2 -march=armv4t"
   LIBDIRSUFFIX=""
   OPTIMIZE=" --enable-optimize=-O2 "
-else
+elif [ "$ARCH" = "aarch64" ]; then
   SLKCFLAGS="-O2"
-  LIBDIRSUFFIX=""
+  LIBDIRSUFFIX="64"
   OPTIMIZE=" --enable-optimize=-O2 "
+else
+  SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+  OPTIMIZE=${OPTIMIZE:-" --enable-optimize=-O2 "}
 fi
 
 # Workaround to prevent unidentified crashes.  Since this seems to be
@@ -110,8 +116,15 @@
      -o $VERSION = 43.0.3 \
      -o $VERSION = 43.0.4 ]; then
   OPTIMIZE="$(echo "$OPTIMIZE" | sed 's/O2/Os/g')"
+  SLKCFLAGS="$(echo "$SLKCFLAGS" | sed 's/O2/Os/g')"
   echo "Detected Firefox $VERSION...  enabling crash workaround O2 -> Os."
   sleep 1
+elif [ "$ARCH" = "aarch64" ]
+then
+  echo "Force O2 -> Os on $ARCH."
+  OPTIMIZE="$(echo "$OPTIMIZE" | sed 's/O2/Os/g')"
+  SLKCFLAGS="$(echo "$SLKCFLAGS" | sed 's/O2/Os/g')"
+  sleep 1
 fi
 
 CWD=$(pwd)
@@ -148,6 +161,10 @@
   mv $MOZLOCALIZE-$LOC_TAG $MOZLOCALIZE
 fi
 
+if [ ! -z $PATCHV5 ]; then
+  zcat $CWD/armv5.diff.gz | patch -p1 || exit 1
+fi
+
 # Patch mimeTypes.rdf
 # Uncomment this if you want to use the patch; otherwise, we overwrite the
 # mimeTypes.rdf inside the package directory later
diff -ur slackware64-14.2/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild slackware64-14.2.patcharm/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
--- slackware64-14.2/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild	2016-04-13 20:55:05.000000000 +0200
+++ slackware64-14.2.patcharm/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild	2017-12-29 01:26:19.908685978 +0100
@@ -58,9 +58,15 @@
 elif [ "$ARCH" = "x86_64" ]; then
   LIBDIRSUFFIX="64"
   OPTIMIZE=" --enable-optimize=-O2 "
-else
+elif [ "$ARCH" = "arm" ]; then
   LIBDIRSUFFIX=""
-  OPTIMIZE=" --enable-optimize=-O2 "
+  OPTIMIZE=" --enable-optimize=-Os "
+elif [ "$ARCH" = "aarch64" ]; then
+  LIBDIRSUFFIX="64"
+  OPTIMIZE=" --enable-optimize=-Os "
+else
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+  OPTIMIZE=${OPTIMIZE:-" --enable-optimize=-O2 "}
 fi
 
 CWD=$(pwd)
@@ -97,7 +103,7 @@
 case "$ARCH" in
     armv7hl) ARCH_CONFIG="--with-arch=armv7-a --with-float-abi=hard --with-fpu=vfpv3-d16 --disable-elf-hack"
              # Make firefox compile on ARM platforms lacking neon support:
-             zcat $CWD/mozilla-firefox.xpcom_arm.patch.gz | patch -p1 --verbose || exit 1
+             #zcat $CWD/mozilla-firefox.xpcom_arm.patch.gz | patch -p1 --verbose || exit 1
              ;;
     *)       ARCH_CONFIG=" "
              ;;
diff -ur slackware64-14.2/source/xap/seamonkey/seamonkey.SlackBuild slackware64-14.2.patcharm/source/xap/seamonkey/seamonkey.SlackBuild
--- slackware64-14.2/source/xap/seamonkey/seamonkey.SlackBuild	2016-03-15 23:26:46.000000000 +0100
+++ slackware64-14.2.patcharm/source/xap/seamonkey/seamonkey.SlackBuild	2017-12-30 01:52:19.936631169 +0100
@@ -45,9 +45,15 @@
 elif [ "$ARCH" = "x86_64" ]; then
   LIBDIRSUFFIX="64"
   OPTIMIZE_FLAG="-O2"
-else
+elif [ "$ARCH" = "arm" ]; then
+  OPTIMIZE_FLAG="-Os -march=armv5te "
   LIBDIRSUFFIX=""
+elif [ "$ARCH" = "aarch64" ]; then
   OPTIMIZE_FLAG="-O2"
+  LIBDIRSUFFIX="64"
+else
+  OPTIMIZE_FLAG=${OPTIMIZE_FLAG:-"-O2"}
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
 fi
 
 NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -74,6 +80,9 @@
 tar xvf $CWD/seamonkey-${TARBALLVER}.source.tar.?z* || exit 1
 cd seamonkey-${TARBALLVER} || exit 1
 
+# Adding AArch64 support to webrtc:
+zcat $CWD/webrtc_aarch64.patch.gz | patch -p1 --verbose
+
 # Make sure the perms/ownerships are sane:
 chown -R root:root .
 find . \
Only in slackware64-14.2.patcharm/source/xap/seamonkey: webrtc_aarch64.patch.gz
diff -ur slackware64-14.2/source/xap/xine-lib/xine-lib.SlackBuild slackware64-14.2.patcharm/source/xap/xine-lib/xine-lib.SlackBuild
--- slackware64-14.2/source/xap/xine-lib/xine-lib.SlackBuild	2016-03-15 23:26:46.000000000 +0100
+++ slackware64-14.2.patcharm/source/xap/xine-lib/xine-lib.SlackBuild	2017-12-30 01:52:19.936631169 +0100
@@ -143,6 +152,7 @@
   --with-wavpack \
   --disable-nosefart \
   --disable-vcd \
+  --disable-vis \
   --without-speex \
   --with-external-dvdnav
 
diff -ur slackware64-14.2/pasture/source/apmd/apmd.SlackBuild slackware64-14.2.patcharm/pasture/source/apmd/apmd.SlackBuild
--- slackware64-14.2/pasture/source/apmd/apmd.SlackBuild	2011-04-11 08:19:53.000000000 +0200
+++ slackware64-14.2.patcharm/pasture/source/apmd/apmd.SlackBuild	2020-04-17 16:03:54.334141988 +0200
@@ -55,7 +55,7 @@
 tar xvf $CWD/apmd-$VERSION.tar.bz2 || exit 1
 cd apmd-$VERSION
 
-if [ "$ARCH" = "x86_64" ]; then
+if [ "$ARCH" = "x86_64" -o "$LIBDIRSUFFIX" = "64" ]; then
   sed -i -e "s#/lib#/lib64#" Makefile
 fi
 
