Skip to content
Snippets Groups Projects
Verified Commit b3a1849e authored by alice's avatar alice
Browse files

main/zstd: add cmake files

parent 0f984c6d
No related branches found
No related tags found
1 merge request!39304[3.16] main/expat: security upgrade to 2.4.9
......@@ -4,12 +4,12 @@
# Maintainer: psykose <alice@ayaya.dev>
pkgname=zstd
pkgver=1.5.2
pkgrel=5
pkgrel=6
pkgdesc="Zstandard - Fast real-time compression algorithm"
url="https://www.zstd.net/"
arch="all"
license="BSD-3-Clause GPL-2.0-or-later"
makedepends="grep"
makedepends="cmake grep"
checkdepends="file"
subpackages="
$pkgname-static
......@@ -27,11 +27,16 @@ source="zstd-$pkgver.tar.gz::https://github.com/facebook/zstd/archive/v$pkgver.t
# 1.3.8-r0:
# - CVE-2019-11922
export CFLAGS="${CFLAGS/-Os/-O2} -flto -ffat-lto-objects"
export CXXFLAGS="${CXXFLAGS/-Os/-O2} -flto -ffat-lto-objects"
export LDFLAGS="$LDFLAGS -flto"
build() {
export CFLAGS="${CFLAGS/-Os/-O2} -flto -ffat-lto-objects"
export CXXFLAGS="${CXXFLAGS/-Os/-O2} -flto -ffat-lto-objects"
export LDFLAGS="$LDFLAGS -flto"
# just used to generate the .cmake files
cmake -B build-zstd \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-S build/cmake
make -C lib prefix=/usr HAVE_PTHREAD=1
make -C programs prefix=/usr HAVE_PTHREAD=1
make -C contrib/pzstd prefix=/usr HAVE_PTHREAD=1
......@@ -45,6 +50,10 @@ check() {
package() {
make prefix=/usr DESTDIR="$pkgdir" HAVE_PTHREAD=1 install
install -Dm755 contrib/pzstd/pzstd -t "$pkgdir"/usr/bin/
install -Dm644 -t "$pkgdir"/usr/lib/cmake/zstd/ \
build-zstd/CMakeFiles/Export/*/*.cmake \
build-zstd/zstdConfig*.cmake
}
sha512sums="
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment