summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD86
-rw-r--r--expose-cargs-and-largs-makefile.patch4
-rw-r--r--relocatable-build.patch11
4 files changed, 65 insertions, 60 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0dfe3d82b0f9..34abececa6e7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,24 +1,24 @@
-# Generated by mksrcinfo v8
-# Tue Sep 19 13:24:36 UTC 2017
pkgbase = gprbuild
- pkgdesc = Multi-language build system.
- pkgver = 2017
- pkgrel = 3
- url = http://www.adacore.com/gnatpro/toolsuite/gprbuild/
+ pkgdesc = Builder for multi-language systems
+ pkgver = 2018
+ pkgrel = 1
+ url = https://github.com/AdaCore/gprbuild/
arch = i686
arch = x86_64
- license = GPL
- makedepends = git
+ license = GPL3
makedepends = gprbuild-bootstrap
- depends = xmlada
+ makedepends = libgpr
+ depends = libgpr
provides = gprbuild
provides = gprbuild-bootstrap
conflicts = gprbuild
conflicts = gprbuild-bootstrap
- source = http://mirrors.cdn.adacore.com/art/591c45e2c7a447af2deecff7
+ source = http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27a68
+ source = relocatable-build.patch
source = expose-cargs-and-largs-makefile.patch
- sha1sums = f956aa57c58c342a958332c8cd98e6481e9ce593
- sha1sums = bda77367bc6985c3daf96929cccf5551a0544237
+ sha1sums = f2cfc62fc05ae510e7e3aa7138d27ccb38096bdd
+ sha1sums = 4aaab0df8b611750d2cb35973ed28823fb233989
+ sha1sums = db88bcb65d1a5f41c5b30e0c3dea996c47c4f5b9
pkgname = gprbuild
diff --git a/PKGBUILD b/PKGBUILD
index 8d8d098abb6f..d89471f02e8d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,59 +1,53 @@
-pkgname=gprbuild
-pkgver=2017
-pkgrel=3
+# Maintainer: Pierre-Marie de Rodat <pmderodat on #ada at freenode.net>
+# Contributor: Rod Kay <charlie5 on #ada at freenode.net>
+# Contributor: Earnestly <zibeon AT googlemail.com>
-pkgdesc='Multi-language build system.'
-url='http://www.adacore.com/gnatpro/toolsuite/gprbuild/'
+pkgname=gprbuild
+pkgver=2018
+pkgrel=1
+pkgdesc="Builder for multi-language systems"
arch=('i686' 'x86_64')
-license=('GPL')
-
-depends=('xmlada')
-makedepends=('git' 'gprbuild-bootstrap')
-
-# We provide gprbuild-bootstrap here so we can use this gprbuild to bootstrap
-# itself and ada-xmlada.
-provides=('gprbuild' 'gprbuild-bootstrap')
-conflicts=('gprbuild' 'gprbuild-bootstrap')
-
-source=('http://mirrors.cdn.adacore.com/art/591c45e2c7a447af2deecff7'
+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=('f956aa57c58c342a958332c8cd98e6481e9ce593'
- 'bda77367bc6985c3daf96929cccf5551a0544237')
-
-
-prepare()
-{
- cd gprbuild-gpl-2017-src
- patch -Np1 -i "$srcdir"/expose-cargs-and-largs-makefile.patch
-
- # Not everyone is Debian
- sed -i 's/libexec/lib/g' bootstrap.sh doinstall gprbuild.gpr \
+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 gprbuild-gpl-2017-src
-
- export OS=UNIX
-
- make prefix=/usr setup
- make all
+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"
-package()
-{
- cd gprbuild-gpl-2017-src
-
- export OS=UNIX
-
- make prefix="$pkgdir"/usr install
+ # 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
- # Cleanup
- rm -f -- "$pkgdir"/usr/doinstall
+ # We don't need to distribute the installation script
+ rm -f -- "$pkgdir/usr/doinstall"
}
diff --git a/expose-cargs-and-largs-makefile.patch b/expose-cargs-and-largs-makefile.patch
index 8f5ab3b06ffd..113a29a9bd7b 100644
--- a/expose-cargs-and-largs-makefile.patch
+++ b/expose-cargs-and-largs-makefile.patch
@@ -21,8 +21,8 @@ index b591cb9a..4d711028 100644
CLEANER=gprclean -q $(RBD)
GPRBUILD_BUILDER=$(BUILDER) $(GPRBUILD_GPR) \
-- -XLIBRARY_TYPE=static -XXMLADA_BUILD=static
-+ -XLIBRARY_TYPE=static -XXMLADA_BUILD=static $(CARGS) $(LARGS)
+- -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable
++ -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable $(CARGS) $(LARGS)
LIBGPR_BUILDER=$(BUILDER) $(GPR_GPR)
LIBGPR_INSTALLER=$(LIB_INSTALLER) $(GPR_GPR) -XBUILD=${BUILD} \
--install-name=gpr --build-var=LIBRARY_TYPE $(GTARGET)
diff --git a/relocatable-build.patch b/relocatable-build.patch
new file mode 100644
index 000000000000..0ed02e6ba1a9
--- /dev/null
+++ b/relocatable-build.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -75,7 +75,7 @@
+ CLEANER=gprclean -q $(RBD)
+
+ GPRBUILD_BUILDER=$(BUILDER) $(GPRBUILD_GPR) \
+- -XLIBRARY_TYPE=static -XXMLADA_BUILD=static
++ -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable
+ LIBGPR_BUILDER=$(BUILDER) $(GPR_GPR)
+ LIBGPR_INSTALLER=$(LIB_INSTALLER) $(GPR_GPR) -XBUILD=${BUILD} \
+ --install-name=gpr --build-var=LIBRARY_TYPE $(GTARGET)