summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2a8d541c63559867e8922345b8f85133aea6ba35 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer:  Gustavo Alvarez <sl1pkn07@gmail.com>

pkgname=zimg-git
pkgver=3.0.5.155.ga0fac0f
pkgrel=1
pkgdesc="Scaling, colorspace conversion, and dithering library. (GIT version)"
arch=('x86_64')
url='http://forum.doom9.org/showthread.php?t=171334'
license=('custom:WTFPL')
depends=(
  'gcc-libs'
  'glibc'
)
makedepends=(
  'git'
  'cmake'
)
provides=(
  "zimg=${pkgver}"
  'libzimg.so'
)
conflicts=(
  'zimg'
  'vapoursynth-plugin-zimg'
  'vapoursynth-plugin-zimg-git'
)
source=(
  'git+https://bitbucket.org/the-sekrit-twc/zimg.git'
  'git+https://bitbucket.org/the-sekrit-twc/graphengine.git'
  'git+https://github.com/google/googletest.git'
)
sha256sums=(
  'SKIP'
  'SKIP'
  'SKIP'
)
options=('debug')

pkgver() {
  cd zimg
  echo "$(git describe --long --tags | tr - . | sed 's|release.||g')"
}

prepare() {
  mkdir -p build

  cd zimg
  git config submodule.graphengine.url "${srcdir}/graphengine"
  git config submodule.test/extra/googletest.url "${srcdir}/googletest"
  git -c protocol.file.allow=always submodule update --init \
    graphengine \
    test/extra/googletest
}

build() {
  cd zimg
  ./autogen.sh

  cd "${srcdir}/build"
  ../zimg/configure \
    --prefix=/usr \
    --enable-testapp \
    --enable-example \
    --enable-unit-test

  make
  make test/unit_test
}

check() {
  cd build
  ./testapp cpuinfo
  ./test/unit_test
}

package(){
  make -C build DESTDIR="${pkgdir}" install

  install -Dm644 zimg/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}