summaryrefslogtreecommitdiffstats
path: root/source/l/zstd/zstd.SlackBuild
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2023-09-03 19:37:21 +0000
committer Eric Hameleers <alien@slackware.com>2023-09-03 21:58:58 +0200
commitd38882e8c15b5ee4bf8d95df04c58ec9c63582bb (patch)
treebff46d0c9e2c72661b3e23acddaf0a924c3bbbaf /source/l/zstd/zstd.SlackBuild
parent34150f47ee1ea9ba191b255bb9aecd9aba26a832 (diff)
downloadcurrent-d38882e8c15b5ee4bf8d95df04c58ec9c63582bb.tar.gz
current-d38882e8c15b5ee4bf8d95df04c58ec9c63582bb.tar.xz
Sun Sep 3 19:37:21 UTC 202320230903193721
l/zstd-1.5.5-x86_64-2.txz: Rebuilt. Build with cmake. Thanks to F0nix. n/postfix-3.8.2-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/l/zstd/zstd.SlackBuild')
-rwxr-xr-xsource/l/zstd/zstd.SlackBuild31
1 files changed, 18 insertions, 13 deletions
diff --git a/source/l/zstd/zstd.SlackBuild b/source/l/zstd/zstd.SlackBuild
index bc90631b4..e9eb64503 100755
--- a/source/l/zstd/zstd.SlackBuild
+++ b/source/l/zstd/zstd.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# Copyright 2018 Eric Hameleers, Eindhoven, Netherlands
-# Copyright 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2018, 2023 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@ 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}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -85,7 +85,6 @@ 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 .
@@ -95,18 +94,24 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-# Compile it:
+# Compile and install:
+mkdir build/cmake/build
+cd build/cmake/build
+cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+ -DDOC_INSTALL_DIR="doc" \
+ -DMAN_INSTALL_DIR=/usr/man/man1 \
+ .. || exit 1
make $NUMJOBS CFLAGS="$SLKCFLAGS" || exit 1
-make $NUMJOBS CFLAGS="$SLKCFLAGS" -C contrib/pzstd || exit 1
+make install DESTDIR=$PKG || exit 1
+cd ../../..
-# Install it:
-make \
- $NUMJOBS \
- prefix=/usr \
- libdir=/usr/lib${LIBDIRSUFFIX} \
- mandir=/usr/man \
- DESTDIR=$PKG \
- install || exit 1
+# Compile and install pzstd:
+zcat $CWD/zstd.dont.link.pzstd.to.static.libzstd.a.diff.gz | patch -p1 --verbose || exit 1
+make $NUMJOBS CFLAGS="$SLKCFLAGS" -C contrib/pzstd || exit 1
install -Dm755 contrib/pzstd/pzstd $PKG/usr/bin/pzstd || exit 1
# Don't ship static library: