#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=pcre
pkgver=8.45
pkgrel=03
pkgdesc='A library that implements Perl 5-style regular expressions'
arch=('x86_64')
url='https://www.pcre.org/'
depends=('gcc-libs' 'readline' 'zlib' 'bzip2' 'bash')
#options=(debug) ## uncomment this to have the debug pkg produced
options=(staticlibs)
provides=(libpcre{,16,32,posix,cpp}.so)
source=("https://sourceforge.net/projects/pcre/files/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2"{,.sig})

build() {
  cd $pkgname-$pkgver
  ./configure \
    --prefix=/usr \
    --enable-unicode-properties \
    --enable-pcre16 \
    --enable-pcre32 \
    --enable-jit \
    --enable-pcregrep-libz \
    --enable-pcregrep-libbz2 \
    --enable-pcretest-libreadline
  make
}

check() {
  cd $pkgname-$pkgver
  make -j1 check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install

  install -Dm644 LICENCE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

#---- license gpg-key sha256sums ----

license=('BSD')

validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') # Philip Hazel <ph10@hermes.cam.ac.uk>

sha256sums=(4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8 # pcre-8.45.tar.bz2
	b3480bc76adf5f220c21331d0efe24bc139c52ea687495765daad2b696b563c2) # pcre-8.45.tar.bz2.sig

