summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Lagnese2021-02-14 00:37:54 -0800
committerTim Lagnese2021-02-14 00:37:54 -0800
commitc55cf66984cc88f9b33706bd1c67bfafa941a625 (patch)
tree4b0dbd924c0530269c1c5aa7adc94b2ab916218d
downloadaur-c55cf66984cc88f9b33706bd1c67bfafa941a625.tar.gz
First release of ada-libfswatch-git
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD47
-rw-r--r--ada-libfswatch-git.patch47
3 files changed, 113 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a591bb93ce84
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = ada-libfswatch-git
+ pkgdesc = High level string and text processing library
+ pkgver = r16.94c0a5f
+ pkgrel = 1
+ url = https://github.com/AdaCore/ada_libfswatch
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ depends = gcc-libs
+ depends = fswatch
+ provides = ada-libfswatch
+ options = strip
+ source = git+https://github.com/AdaCore/ada_libfswatch.git
+ source = ada-libfswatch-git.patch
+ sha1sums = SKIP
+ sha1sums = cb3ddf5c8e8c5988c2f60111dfc18e132db00617
+
+pkgname = ada-libfswatch-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..87a68baa7f58
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Tim Lagnese <tim at inept tech>
+
+pkgname=ada-libfswatch-git
+pkgver=r16.94c0a5f
+pkgrel=1
+
+pkgdesc='High level string and text processing library'
+url='https://github.com/AdaCore/ada_libfswatch'
+arch=('x86_64')
+license=('GPL3')
+
+depends=('gcc-libs' 'fswatch')
+makedepends=('git')
+
+provides=('ada-libfswatch')
+options=(strip)
+
+source=('git+https://github.com/AdaCore/ada_libfswatch.git' 'ada-libfswatch-git.patch')
+sha1sums=('SKIP'
+ 'cb3ddf5c8e8c5988c2f60111dfc18e132db00617')
+
+pkgver() {
+ cd "$srcdir/ada_libfswatch"
+ printf "r%s.%s" \
+ "$(git rev-list --count HEAD)" \
+ "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/ada_libfswatch"
+ git apply $srcdir/ada-libfswatch-git.patch
+}
+
+build() {
+ cd "$srcdir/ada_libfswatch"
+ make
+}
+
+package() {
+ cd "$srcdir/ada_libfswatch"
+
+ make install DESTDIR="$pkgdir/usr"
+
+ # gprinstall installs a soft link for /usr/lib/libfswatch.so which is already owned by fswatch
+ # Remove it
+ rm "$pkgdir/usr/lib/libfswatch.so"
+}
diff --git a/ada-libfswatch-git.patch b/ada-libfswatch-git.patch
new file mode 100644
index 000000000000..5c8ded461ef5
--- /dev/null
+++ b/ada-libfswatch-git.patch
@@ -0,0 +1,47 @@
+Index: ada_libfswatch/Makefile
+===================================================================
+--- ada_libfswatch.orig/Makefile
++++ ada_libfswatch/Makefile
+@@ -3,16 +3,12 @@ DESTDIR=
+ all: generated
+ gprbuild -p -P ada_libfswatch
+
+-# warn if libfswatch/ is not populated
+-libfswatch:
+- @echo "you need to install the libfswatch library in libfswatch/"
+- @exit 1
+-
+ # generate the Ada binding
+-generated: libfswatch
+- (mkdir -p generated; cd libfswatch/include/libfswatch/c/ ; \
+- gcc -C -fdump-ada-spec libfswatch.h -D_TIMEZONE_DEFINED; \
+- mv *.ads ../../../../generated/)
++generated:
++ (mkdir -p generated; cd generated ; \
++ gcc -C -fdump-ada-spec /usr/include/libfswatch/c/libfswatch.h -D_TIMEZONE_DEFINED ; \
++ rename 'libfswatch_c_' '' *.ads ; \
++ sed -i 's/libfswatch_c_//g' *.ads)
+
+ 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
+@@ -1,6 +1,6 @@
+ library project C_Libfswatch is
+
+- libfswatch_prefix := External("LIBFSWATCH_PREFIX", "../libfswatch");
++ libfswatch_prefix := External("LIBFSWATCH_PREFIX", "/usr");
+
+ 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