summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a1a92b04a7e3a8762b2e498770c939f6e3407d7e (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
# Maintainer: Clemmitt Sigler <cmsigler.online@gmail.com>

pkgname=agg-2.6-git
_pkgname=agg
pkgver=2.6
_pkgver=2.6
pkgrel=1
pkgdesc='High Quality Rendering Engine for C++'
arch=('x86_64')
url='https://github.com/ghaerr/agg-2.6'
license=('BSD' 'custom:Anti-Grain Geometry Public License')
depends=('gcc-libs' 'sdl' 'freetype2')
makedepends=('git')
provides=('agg')
conflicts=('agg')
replaces=('antigrain')
source=("git+https://github.com/ghaerr/agg-2.6.git"
        'AGG-2.6-Anti-Grain-Geometry-Public-License.txt'
        'AGG-2.6-Modified-BSD-License.txt')
sha256sums=('SKIP'
            '74449c3b7082b77d63a23aba1c17ecc85c9dd292b3c6254f636746915d2c27b8'
            '308c93912836bb56fdd52c308bec06a5d3fe2b05947e35a89bab0bb52ce03d91')

pkgver() {
  cd "$_pkgname-$_pkgver"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

prepare() {
  cd "$_pkgname-$_pkgver/agg-src"

  autoupdate
  aclocal
  autoheader
  autoconf
  libtoolize -f
  automake --foreign -a -i
}

build() {
  cd "$_pkgname-$_pkgver/agg-src"

  # Do not use/remove GPC code to remove dependency on GPC license
  # See https://github.com/ghaerr/agg-2.6/blob/master/agg-web/license/index.html
  ./configure --prefix=/usr --disable-gpc --disable-static --disable-examples
  make
}

package() {
  make -C "$_pkgname-$_pkgver/agg-src" DESTDIR="$pkgdir" install

  # Do not use/remove GPC code to remove dependency on GPC license
  # See https://github.com/ghaerr/agg-2.6/blob/master/agg-web/license/index.html
  rm -f ./include/agg_conv_gpc.h "$pkgdir/usr/include/agg2/agg_conv_gpc.h"

  install -Dm644 AGG-2.6-Anti-Grain-Geometry-Public-License.txt -t "$pkgdir/usr/share/licenses/$pkgname"
  install -Dm644 AGG-2.6-Modified-BSD-License.txt -t "$pkgdir/usr/share/licenses/$pkgname"
}

# vim:set ts=2 sw=2 et: