Guest User

blend2d-git PKGBUILD

a guest
Sep 21st, 2026
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.73 KB | Source Code | 0 0
  1. # Maintainer:  dreieck (https://aur.archlinux.org/account/dreieck)
  2. # Contributor: Cebtenzzre <cebtenzzre (at) gmail (dot) com>
  3.  
  4. _pkgname=blend2d
  5. pkgname=${_pkgname}-git
  6. pkgver=r308.58ca946
  7. pkgrel=2
  8. pkgdesc='A high-performance 2D vector graphics engine written in C++'
  9. url='https://blend2d.com'
  10. arch=('i686' 'x86_64')
  11. license=('Zlib')
  12. depends=(
  13.   'asmjit'
  14.   'glibc'
  15.   'libasmjit.so'
  16.   'libstdc++.so'
  17. )
  18. makedepends=(
  19.   'clang'
  20.   'cmake'
  21.   'git'
  22.   'asmjit'
  23.   'libstdc++'
  24. )
  25. provides=("$_pkgname")
  26. conflicts=("$_pkgname")
  27. source=("${_pkgname}::git+https://github.com/blend2d/blend2d")
  28. sha256sums=('SKIP')
  29.  
  30. pkgver() {
  31.   cd "$_pkgname"
  32.   printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  33. }
  34.  
  35. build() {
  36.   cd "$_pkgname"
  37.  
  38.   [[ -d build ]] && rm -rf build
  39.   mkdir build && cd build
  40.  
  41.   # "It's strongly advised to use Clang to compile Blend2D on all platforms to achieve maximum performance."
  42.   export CC='clang'
  43.   export CXX='clang++'
  44.  
  45.   # Build a shared library with tests and demo
  46.   cmake .. \
  47.     -DCMAKE_INSTALL_PREFIX=/usr \
  48.     -DCMAKE_BUILD_TYPE=Release \
  49.     -DBLEND2D_DEMOS=ON \
  50.     -DBLEND2D_EXTERNAL_ASMJIT=ON \
  51.     -DBLEND2D_NO_FUTEX=OFF \
  52.     -DBLEND2D_NO_INSTALL=OFF \
  53.     -DBLEND2D_NO_JIT=OFF \
  54.     -DBLEND2D_NO_JIT_LOGGING=OFF \
  55.     -DBLEND2D_NO_NATVIS=OFF \
  56.     -DBLEND2D_NO_STDCXX=OFF \
  57.     -DBLEND2D_NO_TLS=OFF \
  58.     -DBLEND2D_STATIC=OFF \
  59.     -DBLEND2D_TEST=ON \
  60.     -Wno-dev
  61.  
  62.   make
  63. }
  64.  
  65. check() {
  66.   cd "$_pkgname"/build
  67.   ./bl_test_runner
  68. }
  69.  
  70. package() {
  71.   cd "$_pkgname"/build
  72.   make DESTDIR="$pkgdir" install
  73.  
  74.   # Do not include the unit test program
  75.   rm -rf "$pkgdir"/usr/bin
  76.  
  77.   install -Dm644 -t "$pkgdir"/usr/share/licenses/"$pkgname" ../LICENSE.md
  78. }
  79.  
Advertisement
Add Comment
Please, Sign In to add comment