diff options
author | Pierre-Marie de Rodat | 2021-01-24 16:27:38 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat | 2021-01-24 16:32:43 +0100 |
commit | 3d412a6d16a1b454f69915a9e8a883110f7c6a68 (patch) | |
tree | 6de0d5d09373533f0bbbeb89452a386886fbb555 | |
parent | 5e17ac788f4ebf9a1e3d68ec480629b286605d85 (diff) | |
download | aur-3d412a6d16a1b454f69915a9e8a883110f7c6a68.tar.gz |
Update for recent versions
* Add gprconfig_kb sources from git and copy them so that gprinstall
processes them.
* Patch project files not to pass the "-gnat2020" flag.
* Update the sed scripts to reflect change of locations of XML files.
* Import the CFLAGS/LDFLAGS patch from libgpr-git.
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | expose-cargs-and-largs-makefile.patch | 38 | ||||
-rw-r--r-- | gnat2020.patch | 26 |
5 files changed, 98 insertions, 10 deletions
@@ -1,6 +1,6 @@ pkgbase = gprbuild-git pkgdesc = Builder for multi-language systems - pkgver = r3601.cf5c323f + pkgver = r3723.815226d6 pkgrel = 1 url = https://github.com/AdaCore/gprbuild/ arch = i686 @@ -10,11 +10,17 @@ pkgbase = gprbuild-git makedepends = gprbuild-bootstrap makedepends = xmlada source = git+https://github.com/AdaCore/gprbuild.git + source = git+https://github.com/AdaCore/gprconfig_kb.git + source = gnat2020.patch source = relocatable-build.patch source = always-use-host-gprinstall.patch + source = expose-cargs-and-largs-makefile.patch sha1sums = SKIP + sha1sums = SKIP + sha1sums = 683f8a6b5e7da3ba5bef3f7f40bcf6054527696b sha1sums = 91b20bde99cf02410cdb2b74aa1adb014458a9b3 sha1sums = 66792ebc73aff76a368bd902adc6a6f181d1d878 + sha1sums = 85c3e5facda8ce8316955a501ef56086f1c41bc0 pkgname = libgpr-git pkgdesc = Ada library to handle GPRbuild project files diff --git a/.gitignore b/.gitignore index 0fe8e029c33e..0480deb1ac4a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ gprbuild +gprconfig_kb pkg src *.pkg.tar.xz @@ -4,7 +4,7 @@ # Contributor: Earnestly <zibeon AT googlemail.com> pkgbase=gprbuild-git pkgname=(libgpr-git gprbuild-git) -pkgver=r3601.cf5c323f +pkgver=r3723.815226d6 pkgrel=1 pkgdesc="Builder for multi-language systems" arch=('i686' 'x86_64') @@ -13,11 +13,17 @@ license=('GPL3') makedepends=('git' 'gprbuild-bootstrap' 'xmlada') source=('git+https://github.com/AdaCore/gprbuild.git' + 'git+https://github.com/AdaCore/gprconfig_kb.git' + 'gnat2020.patch' 'relocatable-build.patch' - 'always-use-host-gprinstall.patch') + 'always-use-host-gprinstall.patch' + 'expose-cargs-and-largs-makefile.patch') sha1sums=('SKIP' + 'SKIP' + '683f8a6b5e7da3ba5bef3f7f40bcf6054527696b' '91b20bde99cf02410cdb2b74aa1adb014458a9b3' - '66792ebc73aff76a368bd902adc6a6f181d1d878') + '66792ebc73aff76a368bd902adc6a6f181d1d878' + '85c3e5facda8ce8316955a501ef56086f1c41bc0') pkgver() { cd "$srcdir/${pkgbase%-git}" @@ -28,17 +34,24 @@ pkgver() { prepare() { cd "$srcdir/${pkgbase%-git}" + patch -Np1 -i "$srcdir/expose-cargs-and-largs-makefile.patch" patch -Np1 -i "$srcdir/relocatable-build.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 + + # Do not pass the "-gnat2020" flag. This is necessary with GCC 10, which + # has buggy support for Ada 2020. TODO: remove this once GCC 11 is out. + patch -Np1 -i "$srcdir/gnat2020.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. - sed -i 's/libexec/lib/g' doinstall gprbuild.gpr \ - share/gprconfig/compilers.xml \ - share/gprconfig/linker.xml \ - share/gprconfig/gnat.xml + sed -i 's/libexec/lib/g' doinstall gprbuild.gpr + + cd "$srcdir/gprconfig_kb" + sed -i 's/libexec/lib/g' db/{compilers,gnat,linker}.xml } build() { @@ -50,6 +63,10 @@ build() { make GPRBUILD_OPTIONS="$GPRBUILD_OPTIONS" libgpr.build make GPRBUILD_OPTIONS="$GPRBUILD_OPTIONS" build + + # Copy the knowledge database so that gprinstall processes it + rm -rf share/gprconfig + cp -ar "$srcdir/gprconfig_kb/db" share/gprconfig } package_libgpr-git() { diff --git a/expose-cargs-and-largs-makefile.patch b/expose-cargs-and-largs-makefile.patch new file mode 100644 index 000000000000..86e7ac2e71f4 --- /dev/null +++ b/expose-cargs-and-largs-makefile.patch @@ -0,0 +1,38 @@ +diff --git a/Makefile b/Makefile +index bf79aaa4..4cccf0e0 100644 +--- a/Makefile ++++ b/Makefile +@@ -70,6 +70,14 @@ else + LIBGPR_TYPES=static + endif + ++ifneq ($(strip $(CFLAGS)),) ++ CARGS := -cargs $(CFLAGS) ++endif ++ ++ifneq ($(strip $(LDFLAGS)),) ++ LARGS := -largs $(LDFLAGS) ++endif ++ + # Used to pass extra options to GPRBUILD, like -d for instance + GPRBUILD_OPTIONS= + +@@ -140,15 +148,15 @@ libgpr.build: $(foreach t, $(LIBGPR_TYPES), libgpr.build.$(t)) + + libgpr.build.shared: + ${LIBGPR_BUILDER} -XLIBRARY_TYPE=relocatable \ +- -XXMLADA_BUILD=relocatable ++ -XXMLADA_BUILD=relocatable $(CARGS) $(LARGS) + + libgpr.build.static: + ${LIBGPR_BUILDER} -XLIBRARY_TYPE=static \ +- -XXMLADA_BUILD=static ++ -XXMLADA_BUILD=static $(CARGS) $(LARGS) + + libgpr.build.static-pic: + ${LIBGPR_BUILDER} -XLIBRARY_TYPE=static-pic \ +- -XXMLADA_BUILD=static-pic ++ -XXMLADA_BUILD=static-pic $(CARGS) $(LARGS) + + libgpr.install: libgpr.uninstall $(foreach t, $(LIBGPR_TYPES), libgpr.install.$(t)) + diff --git a/gnat2020.patch b/gnat2020.patch new file mode 100644 index 000000000000..970d7efb3223 --- /dev/null +++ b/gnat2020.patch @@ -0,0 +1,26 @@ +diff --git a/gpr/gpr.gpr b/gpr/gpr.gpr +index 7ff9ff81..98180a3e 100644 +--- a/gpr/gpr.gpr ++++ b/gpr/gpr.gpr +@@ -43,7 +43,7 @@ library project GPR is + -------------- + + package Compiler is +- Common_Switches := ("-gnat2020", "-gnaty", "-gnatQ", "-gnata"); ++ Common_Switches := ("-gnaty", "-gnatQ", "-gnata"); + + case Bld is + when "debug" => +diff --git a/gprbuild.gpr b/gprbuild.gpr +index 0fa1df76..35e04535 100644 +--- a/gprbuild.gpr ++++ b/gprbuild.gpr +@@ -81,7 +81,7 @@ project Gprbuild is + -------------- + + package Compiler is +- Common_Switches := ("-gnat2020", "-gnaty", "-gnatQ", "-gnata", "-gnateE"); ++ Common_Switches := ("-gnaty", "-gnatQ", "-gnata", "-gnateE"); + + case Bld is + when "debug" => |