Skip to content

Commit

Permalink
dev-ada/ada_libfswatch: ada binding to libfswatch
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Alfredo Tupone <[email protected]>
  • Loading branch information
atupone committed Dec 30, 2021
1 parent 78d9a69 commit d3931ca
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-ada/ada_libfswatch/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST ada_libfswatch-20201105.tar.gz 20454 BLAKE2B 106bd67541bc36290d2868b0b7e8d468f5398d97a37af7d2b43a935cf2bee07a15783c7d48b7436b72079fdd306a1b66fe22bb7940a79b65d1ab62c75c600364 SHA512 02b42615cc9071ede6351bf69a6bb4267694a249eca992b00e926080c17a5da3f5f432b2e6b15a3ec6a1ae0659643cd1e0e5e216268243da0120b557fd5e42cd
54 changes: 54 additions & 0 deletions dev-ada/ada_libfswatch/ada_libfswatch-20201105.ebuild
Original file line number Diff line number Diff line change
@@ -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
}
10 changes: 10 additions & 0 deletions dev-ada/ada_libfswatch/files/ada_libfswatch-20201105-link.patch
Original file line number Diff line number Diff line change
@@ -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;
7 changes: 7 additions & 0 deletions dev-ada/ada_libfswatch/metadata.xml
Original file line number Diff line number Diff line change
@@ -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>[email protected]</email>
</maintainer>
</pkgmetadata>

0 comments on commit d3931ca

Please sign in to comment.