Use CMake to build static-compat-zstd to provide CMake module
The regular zstd package has switched so the static-compat needs to switch as well as otherwise the CMake find module from the regular package is picked up (e.g. by Qt 6).
This commit is contained in:
parent
a88a8e3daa
commit
a866794539
|
@ -5,13 +5,13 @@
|
||||||
_pkgname=zstd
|
_pkgname=zstd
|
||||||
pkgname=static-compat-$_pkgname
|
pkgname=static-compat-$_pkgname
|
||||||
pkgver=1.5.2
|
pkgver=1.5.2
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc='Zstandard - Fast real-time compression algorithm'
|
pkgdesc='Zstandard - Fast real-time compression algorithm'
|
||||||
arch=(x86_64)
|
arch=(x86_64)
|
||||||
url='https://facebook.github.io/zstd/'
|
url='https://facebook.github.io/zstd/'
|
||||||
license=(BSD GPL2)
|
license=(BSD GPL2)
|
||||||
depends=(static-compat-{zlib,xz,lz4})
|
depends=(static-compat-{zlib,xz,lz4})
|
||||||
makedepends=(gtest static-compat-environment)
|
makedepends=(gtest static-compat-cmake ninja)
|
||||||
options=(!emptydirs staticlibs)
|
options=(!emptydirs staticlibs)
|
||||||
source=(https://github.com/facebook/zstd/releases/download/v${pkgver}/zstd-${pkgver}.tar.zst{,.sig})
|
source=(https://github.com/facebook/zstd/releases/download/v${pkgver}/zstd-${pkgver}.tar.zst{,.sig})
|
||||||
sha256sums=('3ea06164971edec7caa2045a1932d757c1815858e4c2b68c7ef812647535c23f'
|
sha256sums=('3ea06164971edec7caa2045a1932d757c1815858e4c2b68c7ef812647535c23f'
|
||||||
|
@ -22,21 +22,23 @@ validpgpkeys=(4EF4AC63455FC9F4545D9B7DEF8FE99528B52FFD)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
source static-compat-environment
|
source static-compat-environment
|
||||||
cd $_pkgname-$pkgver
|
static-compat-cmake -S ${_pkgname}-${pkgver}/build/cmake -B build -G Ninja \
|
||||||
make
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||||
|
-DZSTD_BUILD_CONTRIB=ON \
|
||||||
|
-DZSTD_BUILD_TESTS=ON \
|
||||||
|
-DZSTD_BUILD_SHARED=OFF \
|
||||||
|
-DZSTD_BUILD_STATIC=ON
|
||||||
|
cmake --build build
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
source static-compat-environment
|
cd build/tests
|
||||||
cd $_pkgname-$pkgver
|
ctest
|
||||||
make check
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
source static-compat-environment
|
source static-compat-environment
|
||||||
cd $_pkgname-$pkgver
|
DESTDIR="${pkgdir}" cmake --install build
|
||||||
make PREFIX="$static_compat_prefix" DESTDIR="$pkgdir/" install
|
install -Dm 644 ${_pkgname}-${pkgver}/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||||
rm -r "$pkgdir/$static_compat_prefix"/{bin,share/man}
|
rm -r "$pkgdir/$static_compat_prefix"/{bin,share/man}
|
||||||
find "$pkgdir/$static_compat_prefix" -iname '*.so*' -delete
|
|
||||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue