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

pkgname=swig
pkgver=4.1.1
pkgrel=01
pkgdesc="Generate scripting interfaces to C/C++ code"
url="http://www.swig.org/"
depends=('pcre2' 'gcc-libs')
checkdepends=('ruby' 'python' 'java-environment' 'tcl' 'php' 'lua' 'r' 'go' 'boost')
source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz)
#        jdk17.patch
#        python310.patch)

prepare() {
  cd ${pkgname}-${pkgver}
#  patch -Np1 -i ../jdk17.patch

  # https://github.com/swig/swig/issues/2044
#  patch -Np1 -i ../python310.patch
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr
  make
}

check() {
  cd ${pkgname}-${pkgver}
  make check PY3=y
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
  install -D -m644 LICENSE-UNIVERSITIES "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE-UNIVERSITIES
}

#---- arch license gpg-key & sha256sums ----

arch=(x86_64)

license=('custom')

sha512sums=('1cea1918455a75ebc9b2653dd1715bd5dcd974554955f324295c6a6f14c0a715651b221b85fad4a8af5197e0c75bfe7b590bc6ba7178c26245fbbd9a7e110100')
 
sha256sums=(2af08aced8fcd65cdb5cc62426768914bedc735b1c250325203716f78e39ac9b) # swig-4.1.1.tar.gz

##  3b4561ca9e5cda50b41330a3606096ddbbe3ae5df5ae363038fb7993235b4307  swig-4.1.1-01-x86_64.pkg.tar.lz

