# Contributor: knuxify # Maintainer: knuxify pkgname=stb pkgver=0_git20210910 _commit=af1a5bc352164740c1cc1354942b1c6b72eacb8a pkgrel=0 pkgdesc="stb single-file public domain libraries for C/C++" url="https://github.com/nothings/stb" arch="noarch" license="Public-Domain" subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/nothings/stb/archive/$_commit.tar.gz drop-cpp-test.patch stb_perlin.h" builddir="$srcdir/stb-$_commit" prepare() { default_prepare # Manually re-add stb_perlin; it was removed due to patent infringement, # but the patent is gone now, and the author has confirmed plans to re- # include it: # https://github.com/nothings/stb/commit/59e7dec3e8bb0a8d4050d03c2dc32cf71ffa87c6#commitcomment-64296536 install "$srcdir"/stb_perlin.h "$builddir" } build() { : } check() { cd "$builddir"/tests export CPP=g++ make } package() { mkdir -p "$pkgdir"/usr/include/stb install -Dm664 "$builddir"/*.h "$pkgdir"/usr/include/stb install -Dm664 "$builddir"/*.c "$pkgdir"/usr/include/stb } sha512sums=" 5937baa1a9b7342ddc0e41c37ba0ea6b0c878f670a81b55bb124681e6b5e381fdc1d9557c96637e3ba082d6d968ed67a78b47f16aa5555c1c43394d1f9e57f2d stb-0_git20210910.tar.gz 410e0ac6b3242e9f006e923e51d086a7d0472993a98de2971dbd53048522eba06d36604b759cc3d3c7bd6299dd953cfe77da3be8410947950b9a9e28b77f0d09 drop-cpp-test.patch 9dbc77a530ea368a47988393c7228ffaa8622ce5ffd83770306eaa6282bf289f7f6e55f4a4a5c746798e8c8a49e180344fd8837983ec734664abf9077e37d39f stb_perlin.h "