Date: Sunday, April 23, 2023 @ 14:29:14
  Author: jelle
Revision: 1448395

archrelease: copy trunk to community-x86_64

Added:
  lib32-zstd/repos/community-x86_64/
  lib32-zstd/repos/community-x86_64/PKGBUILD
    (from rev 1448394, lib32-zstd/trunk/PKGBUILD)
  lib32-zstd/repos/community-x86_64/keys/

----------+
 PKGBUILD |   64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

Copied: lib32-zstd/repos/community-x86_64/PKGBUILD (from rev 1448394, 
lib32-zstd/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD                           (rev 0)
+++ community-x86_64/PKGBUILD   2023-04-23 14:29:14 UTC (rev 1448395)
@@ -0,0 +1,64 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Bartłomiej Piotrowski <[email protected]>
+# Contributor: Andrzej Giniewicz <[email protected]>
+# Contributor: Johan Förberg <[email protected]>
+
+_pkgname=zstd
+pkgname=lib32-zstd
+pkgver=1.5.5
+pkgrel=1
+pkgdesc='Zstandard - Fast real-time compression algorithm (32-bit)'
+url='https://facebook.github.io/zstd/'
+arch=(x86_64)
+license=(BSD GPL2)
+depends=(zstd lib32-glibc)
+makedepends=(cmake gtest ninja)
+provides=(libzstd.so)
+source=(https://github.com/facebook/zstd/releases/download/v${pkgver}/zstd-${pkgver}.tar.zst{,.sig})
+sha256sums=('ce264bca60eb2f0e99e4508cffd0d4d19dd362e84244d7fc941e79fa69ccf673'
+            'SKIP')
+b2sums=('2c2dc95f227e661ada23d8f6141bcd293505ce14e605f946ae00d4d4ac37d10b4eb08279ef7560618c67caf266431f76686fda5ae1921d698a6a93bbaf9a0052'
+        'SKIP')
+validpgpkeys=(4EF4AC63455FC9F4545D9B7DEF8FE99528B52FFD)
+
+prepare() {
+  cd ${_pkgname}-${pkgver}
+  # avoid error on tests without static libs, we use LD_LIBRARY_PATH
+  sed '/build static library to build tests/d' -i build/cmake/CMakeLists.txt
+  sed 's/libzstd_static/libzstd_shared/g' -i build/cmake/tests/CMakeLists.txt
+}
+
+build() {
+  cd ${_pkgname}-${pkgver}
+  export CC="gcc -m32"
+  export CXX="g++ -m32"
+  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+
+  export CFLAGS+=' -ffat-lto-objects'
+  export CXXFLAGS+=' -ffat-lto-objects'
+
+  cmake -S build/cmake -B build -G Ninja \
+    -DCMAKE_BUILD_TYPE=None \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib32 \
+    -DZSTD_BUILD_CONTRIB=ON \
+    -DZSTD_BUILD_STATIC=OFF \
+    -DZSTD_BUILD_TESTS=ON \
+    -DZSTD_PROGRAMS_LINK_SHARED=ON
+  cmake --build build
+}
+
+check() {
+  cd ${_pkgname}-${pkgver}
+  LD_LIBRARY_PATH="$(pwd)/build/lib" \
+    ctest -VV --test-dir build
+}
+
+package() {
+  cd ${_pkgname}-${pkgver}
+  DESTDIR="${pkgdir}" cmake --install build
+  rm -rf "${pkgdir}"/usr/{share,include,bin}
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
+
+# vim: ts=2 sw=2 et:

Reply via email to