# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer : Laurent Carlier <lordheavym@gmail.com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Alessio 'mOlOk' Bolognino <themolok@gmail.com>

pkgname=iasl
pkgver=20200925
pkgrel=2
pkgdesc="Intel ACPI Source Language compiler"
arch=(x86_64 powerpc64le)
url="http://acpica.org"
license=('custom')
depends=('glibc')
makedepends=('flex' 'bison')
options=('!makeflags')
source=(https://acpica.org/sites/acpica/files/acpica-unix-${pkgver}.tar.gz
	LICENSE)
sha256sums=('d44388e21e3d2e47c6d39e9c897935d3f775f04fec76271dcba072c74f834589'
            'a8eeb8c94b709f91be8575c229cc1df7f8aacb018224b23b0ab6f833a7f18591')

build() {
  cd "${srcdir}/acpica-unix-${pkgver}"/generate/unix

  #sed -i -e 's/_CYGWIN/_LINUX/g' -e 's/-Werror//g' Makefile.config

  make clean
  make
}

package() {
  cd "${srcdir}/acpica-unix-${pkgver}"/generate/unix

  make DESTDIR=${pkgdir} install

  install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
