# Maintainer: Pierre-Marie de Rodat # Contributor: Rod Kay # Contributor: Earnestly pkgname=gprbuild pkgver=2018 pkgrel=1 pkgdesc="Builder for multi-language systems" arch=('i686' 'x86_64') url="https://github.com/AdaCore/gprbuild/" license=('GPL3') depends=('libgpr') makedepends=('gprbuild-bootstrap' 'libgpr') # gprbuild-bootstrap is here only to bootstrap gprbuild and xmlada provides=("${pkgname%}" "gprbuild-bootstrap") conflicts=("${pkgname%}" "gprbuild-bootstrap") source=('http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27a68' 'relocatable-build.patch' 'expose-cargs-and-largs-makefile.patch') sha1sums=('f2cfc62fc05ae510e7e3aa7138d27ccb38096bdd' '4aaab0df8b611750d2cb35973ed28823fb233989' 'db88bcb65d1a5f41c5b30e0c3dea996c47c4f5b9') prepare() { cd "$srcdir/gprbuild-gpl-2018-src" patch -Np1 -i "$srcdir/relocatable-build.patch" patch -Np1 -i "$srcdir/expose-cargs-and-largs-makefile.patch" # GPRbuild hard-codes references to /usr/libexec, but ArchLinux packages # must use /usr/lib instead. sed -i 's/libexec/lib/g' doinstall gprbuild.gpr \ share/gprconfig/compilers.xml \ share/gprconfig/linker.xml \ share/gprconfig/gnat.xml } build() { cd "$srcdir/gprbuild-gpl-2018-src" make prefix=/usr BUILD=production PROCESSORS="$(nproc)" setup make GPRBUILD_OPTIONS=-R BUILD=production } package() { cd "$srcdir/gprbuild-gpl-2018-src" # Make one install at a time to avoid GPRinstall reading/writing to # the same installed project files at the same time. make prefix="$pkgdir/usr" install -j1 BUILD=production # We don't need to distribute the installation script rm -f -- "$pkgdir/usr/doinstall" }