diff options
author | Michel Zou | 2019-07-28 08:34:17 +0200 |
---|---|---|
committer | Michel Zou | 2019-07-28 08:34:17 +0200 |
commit | 1d5541b2ed54e809942f98eeb688715d966d67e5 (patch) | |
tree | 7d0cf8210ea16fb76a1817053f8630143b0180b2 | |
download | aur-1d5541b2ed54e809942f98eeb688715d966d67e5.tar.gz |
1.16.3
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 48 |
2 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9a1094256efa --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = mingw-w64-blosc + pkgdesc = A blocking, shuffling and loss-less compression library. (mingw-w64) + pkgver = 1.16.3 + pkgrel = 1 + url = http://blosc.org/ + arch = any + license = BSD + makedepends = mingw-w64-cmake + depends = mingw-w64-zstd + depends = mingw-w64-snappy + options = !buildflags + options = !strip + options = staticlibs + source = https://github.com/Blosc/c-blosc/archive/v1.16.3.tar.gz + sha256sums = bec56cb0956725beb93d50478e918aca09f489f1bfe543dbd3087827a7344396 + +pkgname = mingw-w64-blosc + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b7183ff5e00d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +pkgname=mingw-w64-blosc +pkgver=1.16.3 +pkgrel=1 +pkgdesc="A blocking, shuffling and loss-less compression library. (mingw-w64)" +url="http://blosc.org/" +license=('BSD') +arch=('any') +depends=('mingw-w64-zstd' 'mingw-w64-snappy') +makedepends=('mingw-w64-cmake') +options=('!buildflags' '!strip' 'staticlibs') +source=("https://github.com/Blosc/c-blosc/archive/v${pkgver}.tar.gz") +sha256sums=('bec56cb0956725beb93d50478e918aca09f489f1bfe543dbd3087827a7344396') + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +prepare() { + cd "$srcdir/c-blosc-${pkgver}" + + sed -i 's|#include "win32/pthread.h"|#include <pthread.h>|g' blosc/blosc.c blosc/shuffle.c + sed -i 's|#include "win32/pthread.c"||g' blosc/blosc.c + + sed -i 's|DESTINATION ${lib_dir}|LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin|g' blosc/CMakeLists.txt +} + +build() { + cd "$srcdir/c-blosc-${pkgver}" + for _arch in ${_architectures}; do + mkdir -p build-${_arch} && pushd build-${_arch} + ${_arch}-cmake \ + -DPREFER_EXTERNAL_LZ4="ON" \ + -DPREFER_EXTERNAL_ZLIB="ON" \ + -DPREFER_EXTERNAL_SNAPPY="ON" \ + -DPREFER_EXTERNAL_ZSTD="ON" \ + -DBUILD_TESTS="OFF" \ + .. + make + popd + done +} + +package() { + for _arch in ${_architectures}; do + cd "$srcdir/c-blosc-${pkgver}/build-${_arch}" + make install DESTDIR="$pkgdir" + ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll + ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a + done +} |