summaryrefslogtreecommitdiffstats
path: root/source/a/coreutils/coreutils.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/coreutils/coreutils.SlackBuild')
-rwxr-xr-xsource/a/coreutils/coreutils.SlackBuild23
1 files changed, 20 insertions, 3 deletions
diff --git a/source/a/coreutils/coreutils.SlackBuild b/source/a/coreutils/coreutils.SlackBuild
index 3ba9bebe9..4805aa315 100755
--- a/source/a/coreutils/coreutils.SlackBuild
+++ b/source/a/coreutils/coreutils.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2005-2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005-2023 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,10 +24,17 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=coreutils
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+# "wc" seems to be the only thing used by pkgtools that can make use of AVX2,
+# and since the kernel has added a mitigation that makes AVX2 seem to be
+# available when it really isn't, it is not reliable. Even the author of this
+# wc optimization questioned how useful it really was... and for us, it isn't
+# worth it to have by default. But feel free to enable/recompile if you like.
+DISABLE_USE_AVX2_WC_LINECOUNT=${DISABLE_USE_AVX2_WC_LINECOUNT:-true}
+
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -93,6 +100,10 @@ zcat $CWD/$PKGNAM.uname.diff.gz | patch -p1 --verbose --backup --suffix=.orig ||
# Revert change to ls quoting style introduced in coreutils-8.25:
zcat $CWD/no_ls_quoting.patch.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+if [ "$DISABLE_USE_AVX2_WC_LINECOUNT" = "true" ]; then
+ zcat $CWD/coreutils.wc.noavx2.diff.gz | patch -p1 --verbose || exit 1
+fi
+
# Compilation with glibc version later than 2.3.2 needs the environment
# variable DEFAULT_POSIX2_VERSION set to 199209.
# Without that line, the coreutils will start complaining about 'obsolete'
@@ -101,6 +112,11 @@ zcat $CWD/no_ls_quoting.patch.gz | patch -p1 --verbose --backup --suffix=.orig |
# too commonly used to disregard them. Better to stick with the older more
# widely accepted standards until things begin to demand the new way.
+# Don't use the openssl crypto library, otherwise /bin/sort ends up linked
+# against openssl's libcrypto which creates problems for upgradepkg.
+# It is also possible to use --with-linux-crypto to enable the Linux kernel
+# crypto routines, but we'll skip this for now.
+
FORCE_UNSAFE_CONFIGURE=1 \
CFLAGS="$SLKCFLAGS" \
DEFAULT_POSIX2_VERSION=199209 \
@@ -111,8 +127,9 @@ DEFAULT_POSIX2_VERSION=199209 \
--infodir=/usr/info \
--sysconfdir=/etc \
--libdir=/usr/lib${LIBDIRSUFFIX} \
- --without-gmp \
--enable-install-program=arch \
+ --with-openssl=no \
+ --enable-year2038 \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1