blob: 5c340d7d1b99986f036eeac6d3c2e80d8c20ba01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# Maintainer: Andreas Baumann <mail@andreasbaumann.cc>
# Contributor: Antonio Rojas <arojas@archlinux.org>
pkgname=litehtml0.9
pkgver=0.9
pkgrel=4
pkgdesc='Fast and lightweight HTML/CSS rendering engine'
url='http://www.litehtml.com/'
arch=('x86_64' 'aarch64')
license=(BSD-3-Clause)
depends=(glibc
gumbo-parser
libgcc
libstdc++)
makedepends=(cmake
git)
source=(git+https://github.com/litehtml/litehtml#tag=v$pkgver
coinstallability.patch)
sha256sums=('75eca510af3a80fb429a6ec926ec883cfb73ab3aefb7b3cd867fb585d43ed387'
'819c4b2d8a02a215c50387c7b9e1df6f693a600322c5a5f5a0ef128b4e292d72')
prepare() {
cd litehtml
patch -p1 < ../coinstallability.patch # Make package coinstallable with newer versions
}
build() {
cmake -B build -S litehtml \
-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 litehtml/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/litehtml0.9/litehtmlConfig.cmake
# Add compatibility cmake target
echo "add_library(litehtml ALIAS litehtml0.9)" >> "$pkgdir"/usr/lib/cmake/litehtml0.9/litehtmlTargets.cmake
# Fix include dir
sed -e 's|litehtml/|litehtml0.9/|g' -i "$pkgdir"/usr/include/litehtml0.9/litehtml.h
}
|