git » nanosvg.git » main » tree

[main] / PKGBUILD

# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
pkgname=nanosvg
_gitver=9da543e
pkgver=0.1.0.git1.$_gitver
pkgrel=4
pkgdesc="Simple stupid SVG parser"
arch=("x86_64" 'armv7h')
url="https://github.com/memononen/nanosvg"
license=('Zlib')
depends=('glibc')
makedepends=('git' 'cmake')
source=(nanosvg::git+https://github.com/memononen/nanosvg#commit=$_gitver
        https://github.com/fltk/nanosvg/commit/abcd277ea45e9098bed752cf9c6875b533c0892f.patch)
sha512sums=('298542fb22cedfaee4d521dfa1ba44b2cbe5154e5478ead75f553b2e82067534fb4b51138a3c7c397abc785b13b9baa2ac12eb59b9eb1ec898915937287da0eb'
            'b14f8048fbf6bda66803c65f4f34414154b37d17d75d55bc2eeaceaf56fb36984b6ecf4b22fc219820a2d4eba6bdaae57e18aceeec687ce55220fffd6af799d9')

prepare() {
  patch -d nanosvg -Np1 -i "$srcdir"/abcd277ea45e9098bed752cf9c6875b533c0892f.patch
}

build() {
  cmake -B build -S "$pkgname" \
    -DCMAKE_BUILD_TYPE='None' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DBUILD_SHARED_LIBS=ON \
    -Wno-dev
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -D $pkgname/LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
}