pkgname=fribidi
pkgver=1.0.16
pkgdesc="A Free Implementation of the Unicode Bidirectional Algorithm"
homepage="https://github.com/fribidi/fribidi"
arch=(x86_64)
license=(LGPL-2.1-or-later)
depends=(glibc)
makedepends=(meson)
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://github.com/fribidi/fribidi/releases/download/v${pkgver}/${sources[0]}")
md5sums=("333ad150991097a627755b752b87f9ff")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  local meson_args=(
    --prefix=/usr
    --buildtype=release
    --wrap-mode=nodownload
    -D deprecated=true
    -D docs=false
    -D bin=true
    -D tests=false
  )
  meson setup build "${meson_args[@]}"
  meson compile -C build
}

src_install() {
  DESTDIR="${pkgdir}" meson install -C build
  install -Dm 644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}/
}

# vim:ft=sh syn=sh et sw=2:
