git » litehtml.git » main » tree

[main] / PKGBUILD

# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=litehtml
pkgver=0.9
pkgrel=2
pkgdesc='Fast and lightweight HTML/CSS rendering engine'
url='http://www.litehtml.com/'
arch=(x86_64 'armv7h')
license=(BSD-3-Clause)
depends=(gcc-libs
         glibc
         gumbo-parser)
makedepends=(cmake)
source=(https://github.com/litehtml/litehtml/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('ef957307da15b1258a70961942840bcf54225a8d75315dcbc156186eba35b1a7')

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DEXTERNAL_GUMBO=ON \
    -DBUILD_SHARED_LIBS=ON \
    -DLITEHTML_BUILD_TESTING=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 $pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
# Don't search for non-existant gumbo cmake config
  sed -e '/gumbo/d' -i "$pkgdir"/usr/lib/cmake/litehtml/litehtmlConfig.cmake
}