pkgname=julia-git-gr-src
pkgver=0.73.26
_commit=71ee52938ae9a31b032f364b264815b1af47c9c9
pkgrel=1
pkgdesc="GR.jl"
url="https://github.com/jheinen/GR.jl.git"
arch=('any')
license=('MIT')
makedepends=(git julia-pkg-scripts)
depends=(julia-git)
source=("git+https://github.com/jheinen/GR.jl.git#commit=$_commit"
        0001-Get-rid-of-problematic-path-dance.patch)
sha256sums=('b7fc4725ee1f95e9c3a74f3890d9ec5b7b7c621620fd1c0a126465b5b70b59e2'
            '7bbfbff3f5c4976f2e0bc708230863f6b3611cce54dff0ef33d491e0d78f7441')

prepare() {
  cd GR.jl

  patch --no-backup-if-mismatch -Np1 < ../0001-Get-rid-of-problematic-path-dance.patch
}

package() {
  cd GR.jl/GR

  JULIA_INSTALL_SRCPKG=1 . /usr/lib/julia/julia-install-pkg.sh GR "${pkgdir}" "${pkgname}" julia-git
}
