summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiretza2021-07-13 16:28:02 +0200
committerXiretza2021-07-13 16:28:02 +0200
commitfea66d99a264cec571fd4ac8196d56d339f9d58e (patch)
treeee7918888fd0147b93dfa0b7463f3d236c060fbf
parent6c28a003ec247b4060dd09fd02ab44728115b268 (diff)
downloadaur-fea66d99a264cec571fd4ac8196d56d339f9d58e.tar.gz
Build and install library components
-rw-r--r--.SRCINFO10
-rw-r--r--0001-pp-actions.adb-patch-for-compatibility-with-release-.patch (renamed from pp-actions.adb-patch)25
-rw-r--r--0002-Makefile-add-GPRBUILD_FLAGS-variable.patch60
-rw-r--r--0003-Makefile-don-t-force-j-to-be-passed-to-gprbuild.patch60
-rw-r--r--PKGBUILD40
5 files changed, 173 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 243d140edeee..4ea556cba16b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = libadalang-tools
pkgdesc = Libadalang-based tools for Ada: gnatpp, gnatmetric and gnatstub
pkgver = 2021
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/AdaCore/libadalang-tools
arch = i686
arch = x86_64
@@ -9,8 +9,12 @@ pkgbase = libadalang-tools
makedepends = gprbuild
depends = libadalang
source = libadalang-tools-2021-20210519-19A69-src.tar.gz::https://community.download.adacore.com/v1/21b42a7e6ced5c227fa001eff9c9d39c75d3d58f?filename=libadalang-tools-2021-20210519-19A69-src.tar.gz
- source = pp-actions.adb-patch
+ source = 0001-pp-actions.adb-patch-for-compatibility-with-release-.patch
+ source = 0002-Makefile-add-GPRBUILD_FLAGS-variable.patch
+ source = 0003-Makefile-don-t-force-j-to-be-passed-to-gprbuild.patch
sha1sums = 21b42a7e6ced5c227fa001eff9c9d39c75d3d58f
- sha1sums = 9f0aa925c1af47340dd4b2e86899ec1fb74dde92
+ sha1sums = ef13af536f419fb8181810b17a5feebff1b98342
+ sha1sums = 31bc3f4b157782e95dc7cdbc3185e4f74f7fc576
+ sha1sums = af4b98efc227ac64c02f5dde4b20e39c8c967470
pkgname = libadalang-tools
diff --git a/pp-actions.adb-patch b/0001-pp-actions.adb-patch-for-compatibility-with-release-.patch
index 5a7a7f9003db..423127c06ef1 100644
--- a/pp-actions.adb-patch
+++ b/0001-pp-actions.adb-patch-for-compatibility-with-release-.patch
@@ -1,6 +1,18 @@
---- src/pp-actions.adb 2021-05-19 15:08:26.084203000 +1000
-+++ src/pp-actions.adb-new 2021-06-22 11:50:52.066150085 +1000
-@@ -645,10 +645,10 @@
+From 92ff22e80dfab775f2ee4e72cef0e05e136d5275 Mon Sep 17 00:00:00 2001
+From: Rod Kay <rodakay5@gmail.com>
+Date: Tue, 13 Jul 2021 15:20:42 +0200
+Subject: [PATCH 1/3] pp-actions.adb: patch for compatibility with release
+ versions of dependencies
+
+---
+ src/pp-actions.adb | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/src/pp-actions.adb b/src/pp-actions.adb
+index c50bf5c4..aecdfd0b 100644
+--- a/src/pp-actions.adb
++++ b/src/pp-actions.adb
+@@ -672,10 +672,10 @@ package body Pp.Actions is
-- ??? Ada 2020 related expressions, needs to be implemented. See
-- T519-017.
@@ -15,7 +27,7 @@
-- ??? SPARK related expressions, needs to be implemented. See
-- U305-048.
-@@ -1046,7 +1046,7 @@
+@@ -1075,7 +1075,7 @@ package body Pp.Actions is
when Ada_Anonymous_Type_Decl =>
L ("//!", Aspects),
when Ada_Synth_Anonymous_Type_Decl => null,
@@ -24,7 +36,7 @@
-- Anonymous expr decls cannot appear in source trees
when Ada_Anonymous_Type_Access_Def => null,
-@@ -1165,7 +1165,8 @@
+@@ -1194,7 +1194,8 @@ package body Pp.Actions is
L ("until"),
when Ada_With_Private_Absent => null,
when Ada_With_Private_Present =>
@@ -34,3 +46,6 @@
); -- end case
end Template_For_Kind;
+--
+2.32.0
+
diff --git a/0002-Makefile-add-GPRBUILD_FLAGS-variable.patch b/0002-Makefile-add-GPRBUILD_FLAGS-variable.patch
new file mode 100644
index 000000000000..c551c675746e
--- /dev/null
+++ b/0002-Makefile-add-GPRBUILD_FLAGS-variable.patch
@@ -0,0 +1,60 @@
+From e29b65259c26215749b13f1c44d3d840a6731f25 Mon Sep 17 00:00:00 2001
+From: Xiretza <xiretza@xiretza.xyz>
+Date: Tue, 13 Jul 2021 15:04:14 +0200
+Subject: [PATCH 2/3] Makefile: add GPRBUILD_FLAGS variable
+
+---
+ Makefile | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 68f738f2..5e75e50c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -5,6 +5,7 @@ BUILD_MODE ?= dev
+ LIBRARY_TYPE ?= static
+ LALTOOLS_SET ?= all
+ PROCESSORS ?= 0
++GPRBUILD_FLAGS ?=
+
+ ALL_LIBRARY_TYPES = static static-pic relocatable
+
+@@ -37,7 +38,7 @@ lib:
+ gprbuild -v -k \
+ -XLIBRARY_TYPE=$$kind \
+ -XBUILD_MODE=$(BUILD_MODE) \
+- -P $$proj -p -j$(PROCESSORS) ; \
++ -P $$proj -p -j$(PROCESSORS) $(GPRBUILD_FLAGS) ; \
+ done ; \
+ done
+
+@@ -51,7 +52,7 @@ bin:
+ -XXMLADA_BUILD=$(LIBRARY_TYPE) \
+ -XBUILD_MODE=$(BUILD_MODE) \
+ -XLALTOOLS_SET=$(LALTOOLS_SET) \
+- -P $$proj -p -j$(PROCESSORS) ; \
++ -P $$proj -p -j$(PROCESSORS) $(GPRBUILD_FLAGS) ; \
+ done
+
+ .PHONY: testsuite_drivers
+@@ -64,7 +65,7 @@ testsuite_drivers:
+ -XXMLADA_BUILD=$(LIBRARY_TYPE) \
+ -XBUILD_MODE=$(BUILD_MODE) \
+ -XLALTOOLS_SET=$(LALTOOLS_SET) \
+- -P $$proj -p -j$(PROCESSORS) ; \
++ -P $$proj -p -j$(PROCESSORS) $(GPRBUILD_FLAGS) ; \
+ done
+
+ .PHONY: all
+@@ -77,7 +78,7 @@ all:
+ -XXMLADA_BUILD=$(LIBRARY_TYPE) \
+ -XBUILD_MODE=$(BUILD_MODE) \
+ -XLALTOOLS_SET=$(LALTOOLS_SET) \
+- -P $$proj -p -j$(PROCESSORS) ; \
++ -P $$proj -p -j$(PROCESSORS) $(GPRBUILD_FLAGS) ; \
+ done
+
+
+--
+2.32.0
+
diff --git a/0003-Makefile-don-t-force-j-to-be-passed-to-gprbuild.patch b/0003-Makefile-don-t-force-j-to-be-passed-to-gprbuild.patch
new file mode 100644
index 000000000000..6657cf7fc582
--- /dev/null
+++ b/0003-Makefile-don-t-force-j-to-be-passed-to-gprbuild.patch
@@ -0,0 +1,60 @@
+From 7f35a68f9d72fa266ed1b5ffa93037c96ed5fe77 Mon Sep 17 00:00:00 2001
+From: Xiretza <xiretza@xiretza.xyz>
+Date: Tue, 13 Jul 2021 15:21:19 +0200
+Subject: [PATCH 3/3] Makefile: don't force -j to be passed to gprbuild
+
+---
+ Makefile | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 5e75e50c..66604550 100644
+--- a/Makefile
++++ b/Makefile
+@@ -4,7 +4,6 @@
+ BUILD_MODE ?= dev
+ LIBRARY_TYPE ?= static
+ LALTOOLS_SET ?= all
+-PROCESSORS ?= 0
+ GPRBUILD_FLAGS ?=
+
+ ALL_LIBRARY_TYPES = static static-pic relocatable
+@@ -38,7 +37,7 @@ lib:
+ gprbuild -v -k \
+ -XLIBRARY_TYPE=$$kind \
+ -XBUILD_MODE=$(BUILD_MODE) \
+- -P $$proj -p -j$(PROCESSORS) $(GPRBUILD_FLAGS) ; \
++ -P $$proj -p $(GPRBUILD_FLAGS) ; \
+ done ; \
+ done
+
+@@ -52,7 +51,7 @@ bin:
+ -XXMLADA_BUILD=$(LIBRARY_TYPE) \
+ -XBUILD_MODE=$(BUILD_MODE) \
+ -XLALTOOLS_SET=$(LALTOOLS_SET) \
+- -P $$proj -p -j$(PROCESSORS) $(GPRBUILD_FLAGS) ; \
++ -P $$proj -p $(GPRBUILD_FLAGS) ; \
+ done
+
+ .PHONY: testsuite_drivers
+@@ -65,7 +64,7 @@ testsuite_drivers:
+ -XXMLADA_BUILD=$(LIBRARY_TYPE) \
+ -XBUILD_MODE=$(BUILD_MODE) \
+ -XLALTOOLS_SET=$(LALTOOLS_SET) \
+- -P $$proj -p -j$(PROCESSORS) $(GPRBUILD_FLAGS) ; \
++ -P $$proj -p $(GPRBUILD_FLAGS) ; \
+ done
+
+ .PHONY: all
+@@ -78,7 +77,7 @@ all:
+ -XXMLADA_BUILD=$(LIBRARY_TYPE) \
+ -XBUILD_MODE=$(BUILD_MODE) \
+ -XLALTOOLS_SET=$(LALTOOLS_SET) \
+- -P $$proj -p -j$(PROCESSORS) $(GPRBUILD_FLAGS) ; \
++ -P $$proj -p $(GPRBUILD_FLAGS) ; \
+ done
+
+
+--
+2.32.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 7a64f8b9ad80..3533cc0edeb1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=libadalang-tools
_upstream_ver=2021-20210519-19A69
pkgver=2021
-pkgrel=1
+pkgrel=2
pkgdesc="Libadalang-based tools for Ada: gnatpp, gnatmetric and gnatstub"
url='https://github.com/AdaCore/libadalang-tools'
@@ -17,38 +17,50 @@ makedepends=('gprbuild')
_checksum=21b42a7e6ced5c227fa001eff9c9d39c75d3d58f
source=("${pkgname}-${_upstream_ver}-src.tar.gz::https://community.download.adacore.com/v1/${_checksum}?filename=${pkgname}-${_upstream_ver}-src.tar.gz"
- "pp-actions.adb-patch")
-sha1sums=("$_checksum"
- "9f0aa925c1af47340dd4b2e86899ec1fb74dde92")
+ "0001-pp-actions.adb-patch-for-compatibility-with-release-.patch"
+ "0002-Makefile-add-GPRBUILD_FLAGS-variable.patch"
+ "0003-Makefile-don-t-force-j-to-be-passed-to-gprbuild.patch"
+)
+sha1sums=('21b42a7e6ced5c227fa001eff9c9d39c75d3d58f'
+ 'ef13af536f419fb8181810b17a5feebff1b98342'
+ '31bc3f4b157782e95dc7cdbc3185e4f74f7fc576'
+ 'af4b98efc227ac64c02f5dde4b20e39c8c967470')
prepare()
{
cd "$srcdir/$pkgname-$_upstream_ver-src"
- patch -Np0 -i ../pp-actions.adb-patch
+ patch -p1 < "$srcdir/0001-pp-actions.adb-patch-for-compatibility-with-release-.patch"
+ patch -p1 < "$srcdir/0002-Makefile-add-GPRBUILD_FLAGS-variable.patch"
+ patch -p1 < "$srcdir/0003-Makefile-don-t-force-j-to-be-passed-to-gprbuild.patch"
}
-build()
+build()
{
cd "$srcdir/$pkgname-$_upstream_ver-src"
- gprbuild \
- -XBUILD_MODE=prod \
- -XLIBRARY_TYPE=relocatable \
- -XXMLADA_BUILD=relocatable \
- -XLALTOOLS_SET=all \
- -P src/build.gpr -p -j0 \
- -R -cargs $CFLAGS -largs $LDFLAGS
+ ADA_FLAGS="$CFLAGS"
+ ADA_FLAGS="${ADA_FLAGS//-Wformat}"
+ ADA_FLAGS="${ADA_FLAGS//-Werror=format-security}"
+
+ make -j1 \
+ BUILD_MODE=prod \
+ LIBRARY_TYPE=relocatable \
+ GPRBUILD_FLAGS="-R -j$(nproc) -cargs $ADA_FLAGS -largs $LDFLAGS" \
+ bin lib
}
package()
{
cd "$srcdir/$pkgname-$_upstream_ver-src"
+ make DESTDIR="$pkgdir/usr/" install-lib
install -Dm755 -t "$pkgdir/usr/bin/" bin/{gnatpp,gnatmetric,gnatstub}
-
+
# Install the license.
install -D -m644 \
"COPYING3" \
"$pkgdir/usr/share/licenses/$pkgname/COPYING3"
}
+
+# vim: set et ts=4: