summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6337b32bccf54181947cacde538b6c1555558de3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
pkgname=mingw-w64-laz-perf
pkgver=1.4.4
pkgrel=1
pkgdesc='Alternative LAZ implementation for C++ and JavaScript (mingw-w64)'
arch=('any')
url='https://github.com/hobu/laz-perf'
license=('LGPL')
depends=('mingw-w64-crt')
makedepends=('mingw-w64-cmake')
options=('!buildflags' '!strip' 'staticlibs')
source=("https://github.com/hobu/laz-perf/archive/${pkgver}.tar.gz")
sha512sums=('2d1016c7d477be2264a9df57b0df822d1e40de033763f12caba0b8a7267826f3278fdfadc81d6ee800a6110af1a53ed9c11ca8173b10dc6b848697c20a70b6eb')

_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

prepare () {
  cd "${srcdir}/laz-perf-${pkgver}"
  # minwindef.h:131:15: error: conflicting declaration ‘typedef int BOOL’
  sed -i "s|typedef bool               BOOL|typedef int BOOL|g" laz-perf/common/types.hpp
}

build() {
  cd "${srcdir}/laz-perf-${pkgver}"
    for _arch in ${_architectures}; do
    mkdir -p build-${_arch} && pushd build-${_arch}
    ${_arch}-cmake -DWITH_TESTS=OFF ..
    make
    popd
  done
}

package() {
  for _arch in ${_architectures}; do
    cd "$srcdir/laz-perf-${pkgver}/build-${_arch}"
    make install DESTDIR="$pkgdir"
  done
}