diff options
author | Alessandro Barbieri <lssndrbarbieri@gmail.com> | 2020-03-28 17:58:44 +0100 |
---|---|---|
committer | Alessandro Barbieri <lssndrbarbieri@gmail.com> | 2020-03-28 17:58:44 +0100 |
commit | daff07336732916b007da46f959566ea87d57a4f (patch) | |
tree | f72068c973c8dbf71369d83c7d23106d8cb1d692 | |
parent | dev-python/glicko2: add version (diff) | |
download | guru-daff0733.tar.gz guru-daff0733.tar.bz2 guru-daff0733.zip |
dev-libs/protothreads: new package
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
-rw-r--r-- | dev-libs/protothreads/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/protothreads/metadata.xml | 10 | ||||
-rw-r--r-- | dev-libs/protothreads/protothreads-1.4.ebuild | 57 |
3 files changed, 69 insertions, 0 deletions
diff --git a/dev-libs/protothreads/Manifest b/dev-libs/protothreads/Manifest new file mode 100644 index 0000000000..7b1e527828 --- /dev/null +++ b/dev-libs/protothreads/Manifest @@ -0,0 +1,2 @@ +DIST graham-pt.h 11519 BLAKE2B 4a3a3be1842b114364f075088c7c0cba3f6ef893b90276e274c5f0f098dc0ea07e8d8fbc02a9393b85a283d745cd32b4352dbc6c228c5e6f0667ac346776a58c SHA512 c49338748c4b88dd2a06f1b569ba506b80864829ee9ae9301b031ba192ddcd60b3a21b3131d6d2a022678f83a0d5398019d1e92032825d37f2ddec1574e4c52c +DIST protothreads-1.4.tar 634880 BLAKE2B 8efbbaf5df21aef9416959f9fc307cba88a333495c4c53e60fa47cbb2c2de2d1c793298015c266e8e0a480e0a7569b9c047aa138692b8df8c82b0d3907aeb83e SHA512 8ea2868d3ba7e76ffaab668cbb7c76b13857d9204f88169831f828089e852c7c0928269c3e7e439a5f5cd50fe3c3a9c5cbc0e80cf844bd9757770880065cfba7 diff --git a/dev-libs/protothreads/metadata.xml b/dev-libs/protothreads/metadata.xml new file mode 100644 index 0000000000..57e5834819 --- /dev/null +++ b/dev-libs/protothreads/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>lssndrbarbieri@gmail.com</email> + <name>Alessandro Barbieri</name> + </maintainer> + <longdescription>Protothreads are extremely lightweight stackless threads designed for severely memory constrained systems, such as small embedded systems or wireless sensor network nodes. Protothreads provide linear code execution for event-driven systems implemented in C. Protothreads can be used with or without an underlying operating system to provide blocking event-handlers. Protothreads provide sequential flow of control without complex state machines or full multi-threading. + </longdescription> +</pkgmetadata> diff --git a/dev-libs/protothreads/protothreads-1.4.ebuild b/dev-libs/protothreads/protothreads-1.4.ebuild new file mode 100644 index 0000000000..dd783a3517 --- /dev/null +++ b/dev-libs/protothreads/protothreads-1.4.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +DESCRIPTION="Protothreads - Lightweight, Stackless Threads in C" +HOMEPAGE="https://web.archive.org/web/20190923093100/http://dunkels.com/adam/pt/" +SRC_URI=" + https://web.archive.org/web/20190518175329/http://dunkels.com/adam/download/pt-${PV}.tar.gz -> ${P}.tar + https://web.archive.org/web/20190518175329/http://dunkels.com/adam/download/graham-pt.h +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc examples" + +BDEPEND="doc? ( app-doc/doxygen )" + +S="${WORKDIR}/pt-${PV}" + +src_unpack() { + default + cp "${DISTDIR}/graham-pt.h" "${S}" +} + +src_prepare() { + sed -i 's/-Werror//g' Makefile + sed -i 's/-O//g' Makefile + default +} + +src_compile() { + default + use doc && cd doc && emake +} + +src_install() { + insinto "/usr/include/${PN}" + doins *.h + if use doc ; then + dodoc doc/*.pdf + dodoc doc/*.txt + dodoc README + docinto html + dodoc -r doc/html/. + + fi + if use examples ; then + insinto "/usr/share/${P}/examples" + doins *.c + exeinto "/usr/libexec/${P}" + doexe example-buffer + doexe example-codelock + doexe example-small + fi +} |