summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiretza2021-08-17 09:32:45 +0200
committerXiretza2021-08-17 09:33:27 +0200
commit058ad1314010c26398b5f3e83f06db76238589f4 (patch)
tree6e66b9b50367b2ed1738727a39187011ed7268f2
parentda3b6a49d4e02a6354670f585322431053ab4ecf (diff)
downloadaur-058ad1314010c26398b5f3e83f06db76238589f4.tar.gz
Split patches, add dependencies, fix build flags
-rw-r--r--.SRCINFO13
-rw-r--r--0001-Use-system-libfswatch-install.patch (renamed from ada-libfswatch-git.patch)38
-rw-r--r--0002-Build-dynamic-library.patch25
-rw-r--r--0003-Makefile-allow-passing-custom-flags-to-gprbuild.patch25
-rw-r--r--PKGBUILD26
5 files changed, 100 insertions, 27 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6e11a18ca1a..6fb873c3da3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,23 @@
pkgbase = ada-libfswatch-git
pkgdesc = High level string and text processing library
pkgver = r16.94c0a5f
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/AdaCore/ada_libfswatch
arch = x86_64
license = GPL3
makedepends = git
+ makedepends = gprbuild
+ makedepends = gnatcoll-core
depends = gcc-libs
depends = fswatch
provides = ada-libfswatch
source = git+https://github.com/AdaCore/ada_libfswatch.git
- source = ada-libfswatch-git.patch
+ source = 0001-Use-system-libfswatch-install.patch
+ source = 0002-Build-dynamic-library.patch
+ source = 0003-Makefile-allow-passing-custom-flags-to-gprbuild.patch
sha1sums = SKIP
- sha1sums = cb3ddf5c8e8c5988c2f60111dfc18e132db00617
+ sha1sums = 511ac217679b16c6dc8d1276556fd532fa10b0cf
+ sha1sums = b08e1c9d415982b1e5388d1fa2b17fe4a1558be8
+ sha1sums = 066d1578f3b6f4c8eece49d2650a79b5a0c084c8
pkgname = ada-libfswatch-git
-
diff --git a/ada-libfswatch-git.patch b/0001-Use-system-libfswatch-install.patch
index 5c8ded461ef..585454393ea 100644
--- a/ada-libfswatch-git.patch
+++ b/0001-Use-system-libfswatch-install.patch
@@ -1,7 +1,17 @@
-Index: ada_libfswatch/Makefile
-===================================================================
---- ada_libfswatch.orig/Makefile
-+++ ada_libfswatch/Makefile
+From 4b0148a5d9b21365606e75e3031e243765374b6c Mon Sep 17 00:00:00 2001
+From: Xiretza <xiretza@xiretza.xyz>
+Date: Fri, 6 Aug 2021 13:54:00 +0200
+Subject: [PATCH 1/3] Use system libfswatch install
+
+---
+ Makefile | 14 +++++---------
+ c_lib/c_libfswatch.gpr | 2 +-
+ 2 files changed, 6 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c3bd85a..8d02469 100644
+--- a/Makefile
++++ b/Makefile
@@ -3,16 +3,12 @@ DESTDIR=
all: generated
gprbuild -p -P ada_libfswatch
@@ -24,10 +34,10 @@ Index: ada_libfswatch/Makefile
clean:
gprclean -P ada_libfswatch
-Index: ada_libfswatch/c_lib/c_libfswatch.gpr
-===================================================================
---- ada_libfswatch.orig/c_lib/c_libfswatch.gpr
-+++ ada_libfswatch/c_lib/c_libfswatch.gpr
+diff --git a/c_lib/c_libfswatch.gpr b/c_lib/c_libfswatch.gpr
+index a12b28f..a032dca 100644
+--- a/c_lib/c_libfswatch.gpr
++++ b/c_lib/c_libfswatch.gpr
@@ -1,6 +1,6 @@
library project C_Libfswatch is
@@ -36,12 +46,6 @@ Index: ada_libfswatch/c_lib/c_libfswatch.gpr
type OS_Type is ("unix", "Windows_NT");
OS : OS_Type := External ("OS", "unix");
-@@ -10,7 +10,7 @@ library project C_Libfswatch is
- for Externally_Built use "true";
- for Library_Name use "fswatch";
- for Library_Dir use libfswatch_prefix & "/lib";
-- for Library_Kind use "static";
-+ for Library_Kind use "dynamic";
-
- package Linker is
- case OS is
+--
+2.32.0
+
diff --git a/0002-Build-dynamic-library.patch b/0002-Build-dynamic-library.patch
new file mode 100644
index 00000000000..8c03d3b4539
--- /dev/null
+++ b/0002-Build-dynamic-library.patch
@@ -0,0 +1,25 @@
+From 100f4ee4b22f93061bacd31d7479a7c8d7107db1 Mon Sep 17 00:00:00 2001
+From: Xiretza <xiretza@xiretza.xyz>
+Date: Fri, 6 Aug 2021 13:54:10 +0200
+Subject: [PATCH 2/3] Build dynamic library
+
+---
+ c_lib/c_libfswatch.gpr | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/c_lib/c_libfswatch.gpr b/c_lib/c_libfswatch.gpr
+index a032dca..9210f6b 100644
+--- a/c_lib/c_libfswatch.gpr
++++ b/c_lib/c_libfswatch.gpr
+@@ -10,7 +10,7 @@ library project C_Libfswatch is
+ for Externally_Built use "true";
+ for Library_Name use "fswatch";
+ for Library_Dir use libfswatch_prefix & "/lib";
+- for Library_Kind use "static";
++ for Library_Kind use "dynamic";
+
+ package Linker is
+ case OS is
+--
+2.32.0
+
diff --git a/0003-Makefile-allow-passing-custom-flags-to-gprbuild.patch b/0003-Makefile-allow-passing-custom-flags-to-gprbuild.patch
new file mode 100644
index 00000000000..f2a99f39f8b
--- /dev/null
+++ b/0003-Makefile-allow-passing-custom-flags-to-gprbuild.patch
@@ -0,0 +1,25 @@
+From d083c93ea98b87404382d2895413f9cf94e6d593 Mon Sep 17 00:00:00 2001
+From: Xiretza <xiretza@xiretza.xyz>
+Date: Fri, 6 Aug 2021 13:54:19 +0200
+Subject: [PATCH 3/3] Makefile: allow passing custom flags to gprbuild
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8d02469..ffbf1e3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ DESTDIR=
+
+ all: generated
+- gprbuild -p -P ada_libfswatch
++ gprbuild -p -P ada_libfswatch $(GPRBUILD_FLAGS)
+
+ # generate the Ada binding
+ generated:
+--
+2.32.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 4101c1e9ee0..decc163045d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=ada-libfswatch-git
pkgver=r16.94c0a5f
-pkgrel=2
+pkgrel=3
pkgdesc='High level string and text processing library'
url='https://github.com/AdaCore/ada_libfswatch'
@@ -10,13 +10,20 @@ arch=('x86_64')
license=('GPL3')
depends=('gcc-libs' 'fswatch')
-makedepends=('git')
+makedepends=('git' 'gprbuild' 'gnatcoll-core')
provides=('ada-libfswatch')
-source=('git+https://github.com/AdaCore/ada_libfswatch.git' 'ada-libfswatch-git.patch')
+source=(
+ 'git+https://github.com/AdaCore/ada_libfswatch.git'
+ '0001-Use-system-libfswatch-install.patch'
+ '0002-Build-dynamic-library.patch'
+ '0003-Makefile-allow-passing-custom-flags-to-gprbuild.patch'
+)
sha1sums=('SKIP'
- 'cb3ddf5c8e8c5988c2f60111dfc18e132db00617')
+ '511ac217679b16c6dc8d1276556fd532fa10b0cf'
+ 'b08e1c9d415982b1e5388d1fa2b17fe4a1558be8'
+ '066d1578f3b6f4c8eece49d2650a79b5a0c084c8')
pkgver() {
cd "$srcdir/ada_libfswatch"
@@ -27,12 +34,19 @@ pkgver() {
prepare() {
cd "$srcdir/ada_libfswatch"
- git apply $srcdir/ada-libfswatch-git.patch
+ patch -p1 < "$srcdir/0001-Use-system-libfswatch-install.patch"
+ patch -p1 < "$srcdir/0002-Build-dynamic-library.patch"
+ patch -p1 < "$srcdir/0003-Makefile-allow-passing-custom-flags-to-gprbuild.patch"
}
build() {
cd "$srcdir/ada_libfswatch"
- make
+
+ ADA_FLAGS="$CFLAGS"
+ ADA_FLAGS="${ADA_FLAGS//-Wformat}"
+ ADA_FLAGS="${ADA_FLAGS//-Werror=format-security}"
+
+ make GPRBUILD_FLAGS="-vh -R -cargs $ADA_FLAGS -largs $LDFLAGS -gargs"
}
package() {