summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2021-12-30 14:39:06 +0100
committerAlfredo Tupone <tupone@gentoo.org>2021-12-30 14:39:06 +0100
commitd3931ca44e454bd69a7d0913daef46c709632224 (patch)
tree4a518ca70a6a0f59289b3ca80f245c466d1bb78f /dev-ada/ada_libfswatch
parentapp-crypt/sequoia-sq: add missing BDEPEND (diff)
downloadgentoo-d3931ca44e454bd69a7d0913daef46c709632224.tar.gz
gentoo-d3931ca44e454bd69a7d0913daef46c709632224.tar.bz2
gentoo-d3931ca44e454bd69a7d0913daef46c709632224.zip
dev-ada/ada_libfswatch: ada binding to libfswatch
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-ada/ada_libfswatch')
-rw-r--r--dev-ada/ada_libfswatch/Manifest1
-rw-r--r--dev-ada/ada_libfswatch/ada_libfswatch-20201105.ebuild54
-rw-r--r--dev-ada/ada_libfswatch/files/ada_libfswatch-20201105-link.patch10
-rw-r--r--dev-ada/ada_libfswatch/metadata.xml7
4 files changed, 72 insertions, 0 deletions
diff --git a/dev-ada/ada_libfswatch/Manifest b/dev-ada/ada_libfswatch/Manifest
new file mode 100644
index 000000000000..9d82eae6d05c
--- /dev/null
+++ b/dev-ada/ada_libfswatch/Manifest
@@ -0,0 +1 @@
+DIST ada_libfswatch-20201105.tar.gz 20454 BLAKE2B 106bd67541bc36290d2868b0b7e8d468f5398d97a37af7d2b43a935cf2bee07a15783c7d48b7436b72079fdd306a1b66fe22bb7940a79b65d1ab62c75c600364 SHA512 02b42615cc9071ede6351bf69a6bb4267694a249eca992b00e926080c17a5da3f5f432b2e6b15a3ec6a1ae0659643cd1e0e5e216268243da0120b557fd5e42cd
diff --git a/dev-ada/ada_libfswatch/ada_libfswatch-20201105.ebuild b/dev-ada/ada_libfswatch/ada_libfswatch-20201105.ebuild
new file mode 100644
index 000000000000..fdc6149a32ce
--- /dev/null
+++ b/dev-ada/ada_libfswatch/ada_libfswatch-20201105.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ADA_COMPAT=( gnat_202{0,1} )
+inherit ada
+
+commitId=94c0a5f137b88113a791a148b60e5e7d019d6fa1
+
+DESCRIPTION="Ada binding to the libfswatch library"
+HOMEPAGE="https://github.com/AdaCore/ada_libfswatch"
+SRC_URI="https://github.com/AdaCore/${PN}/tarball/${commitId}
+ -> ${P}.tar.gz"
+
+LICENSE="GPL-3 gcc-runtime-library-exception-3.1"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="${ADA_DEPS}
+ dev-ada/gnatcoll-core[${ADA_USEDEP}]
+ sys-fs/fswatch"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-ada/gprbuild[${ADA_USEDEP}]"
+
+S="${WORKDIR}"/AdaCore-${PN}-${commitId:0:7}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-link.patch
+)
+
+src_prepare() {
+ default
+ mkdir -p generated || die
+ cp /usr/include/libfswatch/c/* generated || die
+ (cd generated && gcc -C -fdump-ada-spec libfswatch.h -D_TIMEZONE_DEFINED) \
+ || die
+ rm generated/*h || die
+ sed -i \
+ -e "1d" \
+ ada_libfswatch.gpr || die
+}
+
+src_compile() {
+ gprbuild -p -v -P ada_libfswatch -XLIBRARY_TYPE=static \
+ -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} \
+ || die
+}
+
+src_install() {
+ gprinstall -v -r -p -P ada_libfswatch -XLIBRARY_TYPE=static \
+ --prefix="${D}"/usr || die
+ einstalldocs
+}
diff --git a/dev-ada/ada_libfswatch/files/ada_libfswatch-20201105-link.patch b/dev-ada/ada_libfswatch/files/ada_libfswatch-20201105-link.patch
new file mode 100644
index 000000000000..ce820c2e455c
--- /dev/null
+++ b/dev-ada/ada_libfswatch/files/ada_libfswatch-20201105-link.patch
@@ -0,0 +1,10 @@
+--- a/ada_libfswatch.gpr 2021-12-30 13:24:40.561312372 +0100
++++ b/ada_libfswatch.gpr 2021-12-30 13:25:52.542192958 +0100
+@@ -11,4 +11,7 @@
+ for Default_Switches ("Ada") use ("-g", "-O0", "-gnatwa", "-gnaty");
+ end Compiler;
+
++ package Linker is
++ for Linker_Options use ("-lfswatch");
++ end Linker;
+ end Ada_Libfswatch;
diff --git a/dev-ada/ada_libfswatch/metadata.xml b/dev-ada/ada_libfswatch/metadata.xml
new file mode 100644
index 000000000000..91e8ad9f5e33
--- /dev/null
+++ b/dev-ada/ada_libfswatch/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ada@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>