makedepends=()

description="Portable and efficient C programming interface (API) to determine the call-chain of a program"
url="http://www.nongnu.org/libunwind/"

packager="Great-OS Team"
maintainer="Great-OS Team"

name=libunwind
version=1.8.3
release=1

source=(https://github.com/libunwind/libunwind/releases/download/v$version/$name-$version.tar.gz
        https://github.com/libunwind/libunwind/commit/b67d508a.patch)

build() {
  cd $name-$version

  patch -Np1 -i ../b67d508a.patch # build with GCC 15

  CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common

  ./configure --prefix=/usr --libdir=/usr/lib

  make
  make DESTDIR=$PKG install
}
