public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alfredo Tupone" <tupone@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ada/spawn/
Date: Sun, 26 Dec 2021 19:01:17 +0000 (UTC)	[thread overview]
Message-ID: <1640545256.1ff8eb84caa7000f9af2af61bfe41b98fd2f07df.tupone@gentoo> (raw)

commit:     1ff8eb84caa7000f9af2af61bfe41b98fd2f07df
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 26 19:00:36 2021 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun Dec 26 19:00:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ff8eb84

dev-ada/spawn: simple API to spawn processes

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-ada/spawn/Manifest            |   1 +
 dev-ada/spawn/metadata.xml        |  19 +++++++
 dev-ada/spawn/spawn-22.0.0.ebuild | 107 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 127 insertions(+)

diff --git a/dev-ada/spawn/Manifest b/dev-ada/spawn/Manifest
new file mode 100644
index 000000000000..b2a11eba762d
--- /dev/null
+++ b/dev-ada/spawn/Manifest
@@ -0,0 +1 @@
+DIST spawn-22.0.0.tar.gz 49836 BLAKE2B 2283eadae1477600934cbecb67e0fa4c0640150c4d05356ec3d047fdd664e68510c99f9e495dc448c83fe0fea25523727ecb45ee6e85a4b205255a9549031110 SHA512 706c53dabe82994a809c33e984d467ff0f72a2ed9566dedc8262b2c908393f241546ce379a03ea50eb73bf2326b52fc4804d6e192810c703695fc32c9da0b530

diff --git a/dev-ada/spawn/metadata.xml b/dev-ada/spawn/metadata.xml
new file mode 100644
index 000000000000..73dd402e4ab3
--- /dev/null
+++ b/dev-ada/spawn/metadata.xml
@@ -0,0 +1,19 @@
+<?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>
+	<use>
+		<flag name="glib">
+			Add support to <pkg>dev-libs/glib</pkg>-based mainloop.
+		</flag>
+		<flag name="shared">Build shared library</flag>
+		<flag name="static-pic">Build static library with pic code</flag>
+	</use>
+	<longdescription lang="en">
+		This library provides simple API to spawn processes and communicate
+		with them. We provide two implementations of the same API - the
+		integrated into Glib event loop and the independent.
+	</longdescription>
+</pkgmetadata>

diff --git a/dev-ada/spawn/spawn-22.0.0.ebuild b/dev-ada/spawn/spawn-22.0.0.ebuild
new file mode 100644
index 000000000000..9ac4af26e845
--- /dev/null
+++ b/dev-ada/spawn/spawn-22.0.0.ebuild
@@ -0,0 +1,107 @@
+# 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 multiprocessing
+
+DESCRIPTION="Simple API to spawn processes"
+HOMEPAGE="https://github.com/AdaCore/spawn"
+SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
+	-> ${P}.tar.gz"
+
+LICENSE="GPL-3 gcc-runtime-library-exception-3.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="glib +shared static-libs static-pic"
+REQUIRED_USE="|| ( shared static-libs static-pic )
+	${ADA_REQUIRED_USE}"
+
+RDEPEND="glib? (
+	dev-ada/gtkada[${ADA_USEDEP},shared?,static-libs?,static-pic?]
+	dev-libs/glib
+)"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-ada/gprbuild[${ADA_USEDEP}]"
+
+src_compile() {
+	build () {
+		gprbuild -p -j$(makeopts_jobs) -XBUILD=production -v \
+			-XLIBRARY_TYPE=$1 \
+			gnat/spawn.gpr -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} || die
+		if use glib; then
+			gprbuild -p -j$(makeopts_jobs) -XBUILD=production -v \
+				-XLIBRARY_TYPE=$1 \
+				gnat/spawn_glib.gpr -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} \
+				|| die
+		fi
+	}
+	if use shared; then
+		build relocatable
+	fi
+	if use static-libs; then
+		build static
+	fi
+	if use static-pic; then
+		build static-pic
+	fi
+}
+
+src_test() {
+	build () {
+		gprbuild -p -j$(makeopts_jobs) -XBUILD=production -v \
+			-XLIBRARY_TYPE=$1 \
+			gnat/spawn_tests.gpr -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} \
+			|| die
+		if use glib; then
+			gprbuild -p -j$(makeopts_jobs) -XBUILD=production -v \
+				-XLIBRARY_TYPE=$1 \
+				gnat/spawn_glib_tests.gpr \
+				-cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} || die
+		fi
+	}
+	if use shared; then
+		build relocatable
+	elif use static-libs; then
+		build static
+	elif use static-pic; then
+		build static-pic
+	fi
+	.obj/spawn_test/spawn_test || die
+	.obj/spawn_test/spawn_unexpected || die
+	.obj/spawn_test/spawn_kill || die
+	if use glib; then
+		.obj/spawn_test/spawn_glib_test || die
+		.obj/spawn_test/spawn_glib_args_test.exe || die
+	fi
+}
+
+src_install() {
+	build() {
+		gprinstall --prefix=/usr --sources-subdir="${D}"/usr/include/spawn \
+			-XLIBRARY_TYPE=$1 \
+			--lib-subdir="${D}"/usr/lib/spawn \
+			--project-subdir="${D}"/usr/share/gpr \
+			--link-lib-subdir="${D}"/usr/lib/ -p \
+			-P gnat/spawn.gpr || die
+		if use glib; then
+			gprinstall --prefix=/usr \
+				-XLIBRARY_TYPE=$1 \
+				--sources-subdir="${D}"/usr/include/spawn_glib \
+				--lib-subdir="${D}"/usr/lib/spawn_glib \
+				--project-subdir="${D}"/usr/share/gpr \
+				--link-lib-subdir="${D}"/usr/lib/ -p \
+				-P gnat/spawn_glib.gpr || die
+		fi
+	}
+	if use shared; then
+		build relocatable
+	fi
+	if use static-libs; then
+		build static
+	fi
+	if use static-pic; then
+		build static-pic
+	fi
+}


             reply	other threads:[~2021-12-26 19:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-26 19:01 Alfredo Tupone [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-27 15:38 [gentoo-commits] repo/gentoo:master commit in: dev-ada/spawn/ Alfredo Tupone
2022-02-02 20:01 Alfredo Tupone
2022-09-27  7:08 Alfredo Tupone
2022-11-21 17:37 Alfredo Tupone
2022-12-05 13:23 Alfredo Tupone
2022-12-07  7:15 Alfredo Tupone
2023-02-06 20:17 Alfredo Tupone
2023-02-06 20:17 Alfredo Tupone
2023-03-21  7:25 Alfredo Tupone
2023-03-21 21:02 Alfredo Tupone
2023-12-18  8:02 Alfredo Tupone
2024-03-18 17:42 Alfredo Tupone
2025-01-02 10:51 Alfredo Tupone
2025-01-02 12:22 Alfredo Tupone
2025-01-05 22:11 Alfredo Tupone
2025-01-05 22:12 Alfredo Tupone
2025-02-24 20:33 Alfredo Tupone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1640545256.1ff8eb84caa7000f9af2af61bfe41b98fd2f07df.tupone@gentoo \
    --to=tupone@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox