summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2023-04-05 18:31:03 +0000
committer Eric Hameleers <alien@slackware.com>2023-04-06 13:39:05 +0200
commit3ec3cf58c9a54e2aae88832358547c5f230581fd (patch)
treeeeb56c331db84d87e1590fce076d7821ecd4a548 /patches
parentb4079a7f22023739c046b28ecc905345241a614b (diff)
downloadcurrent-3ec3cf58c9a54e2aae88832358547c5f230581fd.tar.gz
current-3ec3cf58c9a54e2aae88832358547c5f230581fd.tar.xz
Wed Apr 5 18:31:03 UTC 202320230405183103_15.0
patches/packages/zstd-1.5.5-x86_64-1_slack15.0.txz: Upgraded. This is a bugfix release. The primary focus is to correct a rare corruption bug in high compression mode. While the probability might be very small, corruption issues are nonetheless very serious, so an update to this version is highly recommended, especially if you employ high compression modes (levels 16+).
Diffstat (limited to 'patches')
-rw-r--r--patches/packages/zstd-1.5.5-x86_64-1_slack15.0.txt11
-rw-r--r--patches/source/zstd/slack-desc19
-rwxr-xr-xpatches/source/zstd/zstd.SlackBuild159
-rw-r--r--patches/source/zstd/zstd.dont.link.pzstd.to.static.libzstd.a.diff13
-rw-r--r--patches/source/zstd/zstd.url1
5 files changed, 203 insertions, 0 deletions
diff --git a/patches/packages/zstd-1.5.5-x86_64-1_slack15.0.txt b/patches/packages/zstd-1.5.5-x86_64-1_slack15.0.txt
new file mode 100644
index 000000000..9282c7149
--- /dev/null
+++ b/patches/packages/zstd-1.5.5-x86_64-1_slack15.0.txt
@@ -0,0 +1,11 @@
+zstd: zstd (real-time compression algorithm)
+zstd:
+zstd: Zstandard, or zstd for short, is a real-time compression algorithm
+zstd: providing high compression ratios. It offers a very wide range of
+zstd: compression/speed trade-off, while being backed by a very fast
+zstd: decoder. It also offers a special mode for small data, called
+zstd: dictionary compression, and can create dictionaries from any sample
+zstd: set.
+zstd:
+zstd: Homepage: http://zstd.net/
+zstd:
diff --git a/patches/source/zstd/slack-desc b/patches/source/zstd/slack-desc
new file mode 100644
index 000000000..215674d54
--- /dev/null
+++ b/patches/source/zstd/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+zstd: zstd (real-time compression algorithm)
+zstd:
+zstd: Zstandard, or zstd for short, is a real-time compression algorithm
+zstd: providing high compression ratios. It offers a very wide range of
+zstd: compression/speed trade-off, while being backed by a very fast
+zstd: decoder. It also offers a special mode for small data, called
+zstd: dictionary compression, and can create dictionaries from any sample
+zstd: set.
+zstd:
+zstd: Homepage: http://zstd.net/
+zstd:
diff --git a/patches/source/zstd/zstd.SlackBuild b/patches/source/zstd/zstd.SlackBuild
new file mode 100755
index 000000000..b12880c12
--- /dev/null
+++ b/patches/source/zstd/zstd.SlackBuild
@@ -0,0 +1,159 @@
+#!/bin/sh
+# Copyright 2018 Eric Hameleers, Eindhoven, Netherlands
+# Copyright 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=zstd
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack15.0}
+
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | grep -E -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+zcat $CWD/zstd.dont.link.pzstd.to.static.libzstd.a.diff.gz | patch -p1 --verbose || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \+ -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \+
+
+# Compile it:
+make $NUMJOBS CFLAGS="$SLKCFLAGS" || exit 1
+make $NUMJOBS CFLAGS="$SLKCFLAGS" -C contrib/pzstd || exit 1
+
+# Install it:
+make \
+ $NUMJOBS \
+ prefix=/usr \
+ libdir=/usr/lib${LIBDIRSUFFIX} \
+ mandir=/usr/man \
+ DESTDIR=$PKG \
+ install || exit 1
+install -Dm755 contrib/pzstd/pzstd $PKG/usr/bin/pzstd || exit 1
+
+# Don't ship static library:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.a
+
+# It might be advisable to have the libraries in /lib${LIBDIRSUFFIX}:
+mkdir -p $PKG/lib${LIBDIRSUFFIX}
+mv $PKG/usr/lib${LIBDIRSUFFIX}/libzstd.so.* $PKG/lib${LIBDIRSUFFIX}
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ rm -f libzstd.so
+ ln -sf ../../lib${LIBDIRSUFFIX}/libzstd.so.? libzstd.so
+)
+
+# zstdmt as the same as zstd, so just make a symlink:
+( cd $PKG/usr/bin
+ ln -sf zstd zstdmt
+)
+
+# Strip binaries:
+find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ CONTRIBUTING* COPYING* LICENSE NEWS README* TESTING* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/zstd/zstd.dont.link.pzstd.to.static.libzstd.a.diff b/patches/source/zstd/zstd.dont.link.pzstd.to.static.libzstd.a.diff
new file mode 100644
index 000000000..6ecc373be
--- /dev/null
+++ b/patches/source/zstd/zstd.dont.link.pzstd.to.static.libzstd.a.diff
@@ -0,0 +1,13 @@
+--- ./contrib/pzstd/Makefile.orig 2018-12-29 22:36:55.196425576 -0600
++++ ./contrib/pzstd/Makefile 2018-12-29 22:37:54.123426836 -0600
+@@ -171,8 +171,8 @@
+ $(TESTPROG) ./test/RoundTripTest$(EXT) $(TESTFLAGS)
+
+ # Build the main binary
+-pzstd$(EXT): main.o $(PROGDIR)/util.o Options.o Pzstd.o SkippableFrame.o $(ZSTDDIR)/libzstd.a
+- $(LD_COMMAND)
++pzstd$(EXT): main.o $(PROGDIR)/util.o Options.o Pzstd.o SkippableFrame.o
++ $(LD_COMMAND) -L ../../lib -lzstd
+
+ # Target that depends on all the tests
+ .PHONY: tests
diff --git a/patches/source/zstd/zstd.url b/patches/source/zstd/zstd.url
new file mode 100644
index 000000000..8e7c94f8e
--- /dev/null
+++ b/patches/source/zstd/zstd.url
@@ -0,0 +1 @@
+https://github.com/facebook/zstd