summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiretza2020-05-21 19:09:27 +0200
committerPierre-Marie de Rodat2020-06-13 17:58:04 +0200
commit5e17ac788f4ebf9a1e3d68ec480629b286605d85 (patch)
treebf3a4d3bd130c89e66fb4378c367ad296ed44b14
parent9de5f9d799d099274ba145f3a7ad91037a509950 (diff)
downloadaur-5e17ac788f4ebf9a1e3d68ec480629b286605d85.tar.gz
Merge gprbuild and libgpr into single package
-rw-r--r--.SRCINFO31
-rw-r--r--PKGBUILD60
-rw-r--r--always-use-host-gprinstall.patch11
-rw-r--r--expose-cargs-and-largs-makefile.patch71
4 files changed, 68 insertions, 105 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2ea672fc314e..45757f88cd75 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,32 @@
pkgbase = gprbuild-git
- pkgdesc = Build system for multi-language systems
- pkgver = r3307.832b1ce6
+ pkgdesc = Builder for multi-language systems
+ pkgver = r3601.cf5c323f
pkgrel = 1
url = https://github.com/AdaCore/gprbuild/
arch = i686
arch = x86_64
license = GPL3
makedepends = git
- makedepends = gprbuild-bootstrap-git
- makedepends = libgpr
- depends = libgpr
- provides = gprbuild
- provides = gprbuild-bootstrap-git
- conflicts = gprbuild
- conflicts = gprbuild-bootstrap-git
+ makedepends = gprbuild-bootstrap
+ makedepends = xmlada
source = git+https://github.com/AdaCore/gprbuild.git
source = relocatable-build.patch
- source = expose-cargs-and-largs-makefile.patch
+ source = always-use-host-gprinstall.patch
sha1sums = SKIP
- sha1sums = 4aaab0df8b611750d2cb35973ed28823fb233989
- sha1sums = db88bcb65d1a5f41c5b30e0c3dea996c47c4f5b9
+ sha1sums = 91b20bde99cf02410cdb2b74aa1adb014458a9b3
+ sha1sums = 66792ebc73aff76a368bd902adc6a6f181d1d878
+
+pkgname = libgpr-git
+ pkgdesc = Ada library to handle GPRbuild project files
+ depends = xmlada
+ provides = libgpr
+ conflicts = libgpr
pkgname = gprbuild-git
+ depends = libgpr
+ depends = xmlada
+ provides = gprbuild-bootstrap
+ provides = gprbuild
+ conflicts = gprbuild-bootstrap
+ conflicts = gprbuild
diff --git a/PKGBUILD b/PKGBUILD
index 76b45fd535db..73367cd703b9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,39 +1,37 @@
# Maintainer: Pierre-Marie de Rodat <pmderodat on #ada at freenode.net>
+# Contributor: xiretza <xiretza+aur@gmail.com>
# Contributor: Rod Kay <charlie5 on #ada at freenode.net>
# Contributor: Earnestly <zibeon AT googlemail.com>
-pkgname=gprbuild-git
+pkgbase=gprbuild-git
+pkgname=(libgpr-git gprbuild-git)
pkgver=r3601.cf5c323f
pkgrel=1
pkgdesc="Builder for multi-language systems"
arch=('i686' 'x86_64')
url="https://github.com/AdaCore/gprbuild/"
license=('GPL3')
-depends=('libgpr')
-makedepends=('git' 'gprbuild-bootstrap-git')
-provides=("gprbuild-bootstrap")
-conflicts=("gprbuild-bootstrap")
-
-# gprbuild-bootstrap is here only to bootstrap gprbuild and xmlada
-provides=("${pkgname%-git}" "gprbuild-bootstrap-git")
-conflicts=("${pkgname%-git}" "gprbuild-bootstrap-git")
+makedepends=('git' 'gprbuild-bootstrap' 'xmlada')
+
source=('git+https://github.com/AdaCore/gprbuild.git'
'relocatable-build.patch'
- 'expose-cargs-and-largs-makefile.patch')
+ 'always-use-host-gprinstall.patch')
sha1sums=('SKIP'
'91b20bde99cf02410cdb2b74aa1adb014458a9b3'
- 'ddaf20842ed9879c3f1cb24b3eb7615d5cfe61a5')
+ '66792ebc73aff76a368bd902adc6a6f181d1d878')
pkgver() {
- cd "$srcdir/${pkgname%-git}"
+ cd "$srcdir/${pkgbase%-git}"
printf "r%s.%s" \
"$(git rev-list --count HEAD)" \
"$(git rev-parse --short HEAD)"
}
prepare() {
- cd "$srcdir/${pkgname%-git}"
+ cd "$srcdir/${pkgbase%-git}"
patch -Np1 -i "$srcdir/relocatable-build.patch"
- patch -Np1 -i "$srcdir/expose-cargs-and-largs-makefile.patch"
+ # By default, it tries to use the freshly-built gprinstall to install gprbuild, but that requires libgpr,
+ # which can't be installed yet. Simply fall back to gprinstall from gprbuild-bootstrap
+ patch -Np1 -i "$srcdir/always-use-host-gprinstall.patch"
# GPRbuild hard-codes references to /usr/libexec, but ArchLinux packages
# must use /usr/lib instead.
@@ -44,17 +42,35 @@ prepare() {
}
build() {
- cd "$srcdir/${pkgname%-git}"
- make prefix=/usr BUILD=production PROCESSORS="$(nproc)" setup
- make GPRBUILD_OPTIONS=-R BUILD=production
+ cd "$srcdir/${pkgbase%-git}"
+
+ export OS=UNIX
+ GPRBUILD_OPTIONS="-R -cargs $CFLAGS -largs $LDFLAGS -gargs"
+ make BUILD=production setup
+
+ make GPRBUILD_OPTIONS="$GPRBUILD_OPTIONS" libgpr.build
+ make GPRBUILD_OPTIONS="$GPRBUILD_OPTIONS" build
+}
+
+package_libgpr-git() {
+ pkgdesc="Ada library to handle GPRbuild project files"
+ provides=('libgpr')
+ conflicts=('libgpr')
+ depends=('xmlada')
+
+ cd "$srcdir/${pkgbase%-git}"
+
+ make prefix="$pkgdir/usr" libgpr.install
}
-package() {
- cd "$srcdir/${pkgname%-git}"
+package_gprbuild-git() {
+ provides=('gprbuild-bootstrap' 'gprbuild')
+ conflicts=('gprbuild-bootstrap' 'gprbuild')
+ depends=('libgpr' 'xmlada')
+
+ cd "$srcdir/${pkgbase%-git}"
- # 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
+ make prefix="$pkgdir/usr" install
# We don't need to distribute the installation script
rm -f -- "$pkgdir/usr/doinstall"
diff --git a/always-use-host-gprinstall.patch b/always-use-host-gprinstall.patch
new file mode 100644
index 000000000000..fbbad280b5fd
--- /dev/null
+++ b/always-use-host-gprinstall.patch
@@ -0,0 +1,11 @@
+--- a/Makefile 2020-05-21 18:07:25.521090704 +0200
++++ b/Makefile 2020-05-21 18:07:45.827341018 +0200
+@@ -40,7 +40,7 @@
+ # target options for cross-build
+ ifeq ($(HOST),$(TARGET))
+ GTARGET=
+-INSTALLER=exe/$(BUILD)/$(LIB_INSTALLER)
++INSTALLER=$(LIB_INSTALLER)
+ else
+ GTARGET=--target=$(TARGET)
+ INSTALLER=$(LIB_INSTALLER)
diff --git a/expose-cargs-and-largs-makefile.patch b/expose-cargs-and-largs-makefile.patch
deleted file mode 100644
index 5021c9d78aec..000000000000
--- a/expose-cargs-and-largs-makefile.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -70,6 +70,14 @@
- LIBGPR_TYPES=static
- endif
-
-+ifneq ($(strip $(CFLAGS)),)
-+ TOOLFLAGS += -cargs $(CFLAGS)
-+endif
-+
-+ifneq ($(strip $(LDFLAGS)),)
-+ TOOLFLAGS += -largs $(LDFLAGS)
-+endif
-+
- # Used to pass extra options to GPRBUILD, like -d for instance
- GPRBUILD_OPTIONS=
-
-@@ -92,27 +100,27 @@
- .PHONY: all distall gprbuild gprconfig gprclean gprinstall gprname gprls
-
- build all:
-- $(GPRBUILD_BUILDER)
-+ $(GPRBUILD_BUILDER) $(TOOLFLAGS)
-
- distall: all install
-
- gprbuild:
-- $(GPRBUILD_BUILDER) gprbuild-main.adb
-+ $(GPRBUILD_BUILDER) gprbuild-main.adb $(TOOLFLAGS)
-
- gprinstall:
-- $(GPRBUILD_BUILDER) gprinstall-main.adb
-+ $(GPRBUILD_BUILDER) gprinstall-main.adb $(TOOLFLAGS)
-
- gprclean:
-- $(GPRBUILD_BUILDER) gprclean-main.adb
-+ $(GPRBUILD_BUILDER) gprclean-main.adb $(TOOLFLAGS)
-
- gprconfig:
-- $(GPRBUILD_BUILDER) gprconfig-main.adb
-+ $(GPRBUILD_BUILDER) gprconfig-main.adb $(TOOLFLAGS)
-
- gprname:
-- $(GPRBUILD_BUILDER) gprname-main.adb
-+ $(GPRBUILD_BUILDER) gprname-main.adb $(TOOLFLAGS)
-
- gprls:
-- $(GPRBUILD_BUILDER) gprls-main.adb
-+ $(GPRBUILD_BUILDER) gprls-main.adb $(TOOLFLAGS)
-
- #################################
- # Gprbuild installation targets #
-@@ -140,15 +148,15 @@
-
- libgpr.build.shared:
- ${BUILDER} -XLIBRARY_TYPE=relocatable \
-- -XXMLADA_BUILD=relocatable $(GPR_GPR)
-+ -XXMLADA_BUILD=relocatable $(GPR_GPR) $(TOOLFLAGS)
-
- libgpr.build.static:
- ${BUILDER} -XLIBRARY_TYPE=static \
-- -XXMLADA_BUILD=static $(GPR_GPR)
-+ -XXMLADA_BUILD=static $(GPR_GPR) $(TOOLFLAGS)
-
- libgpr.build.static-pic:
- ${BUILDER} -XLIBRARY_TYPE=static-pic \
-- -XXMLADA_BUILD=static-pic $(GPR_GPR)
-+ -XXMLADA_BUILD=static-pic $(GPR_GPR) $(TOOLFLAGS)
-
- libgpr.install: libgpr.uninstall $(foreach t, $(LIBGPR_TYPES), libgpr.install.$(t))
-