summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 372a961581ea645a05a1ecd88e65d046612d13fa (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=libbacktrace-git
pkgver=r87.g11427f3
pkgrel=1
pkgdesc="Library to produce symbolic backtraces"
arch=('i686' 'x86_64')
url="https://github.com/ianlancetaylor/libbacktrace"
license=('BSD-3-Clause')
depends=('gcc-libs' 'zlib')
makedepends=('git' 'libunwind')
provides=("libbacktrace=$pkgver" 'libbacktrace.so')
conflicts=('libbacktrace')
options=('staticlibs')
source=("git+https://github.com/ianlancetaylor/libbacktrace.git"
        "0001-Provide-project-information-to-autotools.patch::https://github.com/ianlancetaylor/libbacktrace/commit/e4f3220e535a7bc93730e50d1f10c89ef3996075.patch"
        "0002-Add-pkg-config-file.patch::https://github.com/ianlancetaylor/libbacktrace/commit/f75f3eee369686694c379619a134c473982c0951.patch")
sha256sums=('SKIP'
            'SKIP'
            'SKIP')


prepare() {
  cd "libbacktrace"

  patch -Np1 -i "$srcdir/0001-Provide-project-information-to-autotools.patch"
  patch -Np1 -i "$srcdir/0002-Add-pkg-config-file.patch" || true
}

pkgver() {
  cd "libbacktrace"

  _rev=$(git rev-list --count --all)
  _hash=$(git rev-parse --short HEAD)
  printf "r%s.g%s" "$_rev" "$_hash"
}

build() {
  cd "libbacktrace"

  autoreconf -fi
  CFLAGS="$CFLAGS -ffat-lto-objects" \
  ./configure \
    --prefix="/usr" \
    --enable-shared \
    --with-system-libunwind
  make
}

check() {
  cd "libbacktrace"

  #make check
}

package() {
  cd "libbacktrace"

  make DESTDIR="$pkgdir" install
  install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/libbacktrace"
}