#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=libunwind
pkgver=1.6.2
pkgrel=02
pkgdesc='Portable and efficient C programming interface (API) to determine the call-chain of a program'
arch=('x86_64')
url='https://www.nongnu.org/libunwind/'
depends=('xz' 'zlib')
makedepends=('texlive-core')
## options=('debug') ##   uncomment to produce the debug pkg
source=("https://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig})

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd $pkgname-$pkgver
  # This function is ``supposed'' to fail. Upstream know, but haven't fixed it.
  make check || :
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}

#---- license gpg-key sha256sums ----

license=('GPL')

validpgpkeys=('5C96BDEAF5F47FB02BD4F6B965D98560914F3F48'  # Arun Sharma
              '1675C8DA2EF907FB116EB709EC52B396E6874AF2'  # Dave Watson
              '75D2CFC56CC2E935A4143297015A268A17D55FA4') # Dave Watson

sha256sums=(4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976 # libunwind-1.6.2.tar.gz
	c2f099d6d746e5a75db6e92838f1c3526f274a70be0e8e504891ee5f41e05060) # libunwind-1.6.2.tar.gz.sig



