# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=re2
_re2ver=2024-07-02
pkgrel=2
epoch=1
pkgver=${_re2ver//-}
pkgdesc="Fast, safe, thread-friendly regular expression engine"
arch=('x86_64')
url="https://github.com/google/re2"
license=('BSD-3-Clause')
depends=('gcc-libs' 'abseil-cpp')
checkdepends=('gtest' 'benchmark')
provides=('libre2.so')
source=(re2-$pkgver.tar.gz::https://github.com/google/re2/archive/$_re2ver.tar.gz)
sha256sums=('eb2df807c781601c14a260a507a5bb4509be1ee626024cb45acbd57cb9d4032b')

build() {
  cd $pkgname-$_re2ver
  make
}

check() {
  cd $pkgname-$_re2ver
  make test
}

package() {
  cd $pkgname-$_re2ver
  make prefix=/usr DESTDIR="$pkgdir" install
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
