dev-libs/protothreads: new package

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2020-03-28 17:58:44 +01:00
parent 20cd2d4c76
commit daff073367
3 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
DIST graham-pt.h 11519 BLAKE2B 4a3a3be1842b114364f075088c7c0cba3f6ef893b90276e274c5f0f098dc0ea07e8d8fbc02a9393b85a283d745cd32b4352dbc6c228c5e6f0667ac346776a58c SHA512 c49338748c4b88dd2a06f1b569ba506b80864829ee9ae9301b031ba192ddcd60b3a21b3131d6d2a022678f83a0d5398019d1e92032825d37f2ddec1574e4c52c
DIST protothreads-1.4.tar 634880 BLAKE2B 8efbbaf5df21aef9416959f9fc307cba88a333495c4c53e60fa47cbb2c2de2d1c793298015c266e8e0a480e0a7569b9c047aa138692b8df8c82b0d3907aeb83e SHA512 8ea2868d3ba7e76ffaab668cbb7c76b13857d9204f88169831f828089e852c7c0928269c3e7e439a5f5cd50fe3c3a9c5cbc0e80cf844bd9757770880065cfba7

View File

@@ -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>

View File

@@ -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
}