Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-libs/protothreads/
Date: Sun, 29 Mar 2020 08:29:37
Message-Id: 1585414724.daff07336732916b007da46f959566ea87d57a4f.andrewammerlaan@gentoo
1 commit: daff07336732916b007da46f959566ea87d57a4f
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sat Mar 28 16:58:44 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Sat Mar 28 16:58:44 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=daff0733
7
8 dev-libs/protothreads: new package
9
10 Package-Manager: Portage-2.3.96, Repoman-2.3.22
11 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
12
13 dev-libs/protothreads/Manifest | 2 +
14 dev-libs/protothreads/metadata.xml | 10 +++++
15 dev-libs/protothreads/protothreads-1.4.ebuild | 57 +++++++++++++++++++++++++++
16 3 files changed, 69 insertions(+)
17
18 diff --git a/dev-libs/protothreads/Manifest b/dev-libs/protothreads/Manifest
19 new file mode 100644
20 index 0000000..7b1e527
21 --- /dev/null
22 +++ b/dev-libs/protothreads/Manifest
23 @@ -0,0 +1,2 @@
24 +DIST graham-pt.h 11519 BLAKE2B 4a3a3be1842b114364f075088c7c0cba3f6ef893b90276e274c5f0f098dc0ea07e8d8fbc02a9393b85a283d745cd32b4352dbc6c228c5e6f0667ac346776a58c SHA512 c49338748c4b88dd2a06f1b569ba506b80864829ee9ae9301b031ba192ddcd60b3a21b3131d6d2a022678f83a0d5398019d1e92032825d37f2ddec1574e4c52c
25 +DIST protothreads-1.4.tar 634880 BLAKE2B 8efbbaf5df21aef9416959f9fc307cba88a333495c4c53e60fa47cbb2c2de2d1c793298015c266e8e0a480e0a7569b9c047aa138692b8df8c82b0d3907aeb83e SHA512 8ea2868d3ba7e76ffaab668cbb7c76b13857d9204f88169831f828089e852c7c0928269c3e7e439a5f5cd50fe3c3a9c5cbc0e80cf844bd9757770880065cfba7
26
27 diff --git a/dev-libs/protothreads/metadata.xml b/dev-libs/protothreads/metadata.xml
28 new file mode 100644
29 index 0000000..57e5834
30 --- /dev/null
31 +++ b/dev-libs/protothreads/metadata.xml
32 @@ -0,0 +1,10 @@
33 +<?xml version="1.0" encoding="UTF-8"?>
34 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
35 +<pkgmetadata>
36 + <maintainer type="person">
37 + <email>lssndrbarbieri@×××××.com</email>
38 + <name>Alessandro Barbieri</name>
39 + </maintainer>
40 + <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.
41 + </longdescription>
42 +</pkgmetadata>
43
44 diff --git a/dev-libs/protothreads/protothreads-1.4.ebuild b/dev-libs/protothreads/protothreads-1.4.ebuild
45 new file mode 100644
46 index 0000000..dd783a3
47 --- /dev/null
48 +++ b/dev-libs/protothreads/protothreads-1.4.ebuild
49 @@ -0,0 +1,57 @@
50 +# Copyright 1999-2020 Gentoo Authors
51 +# Distributed under the terms of the GNU General Public License v2
52 +
53 +EAPI="7"
54 +
55 +DESCRIPTION="Protothreads - Lightweight, Stackless Threads in C"
56 +HOMEPAGE="https://web.archive.org/web/20190923093100/http://dunkels.com/adam/pt/"
57 +SRC_URI="
58 + https://web.archive.org/web/20190518175329/http://dunkels.com/adam/download/pt-${PV}.tar.gz -> ${P}.tar
59 + https://web.archive.org/web/20190518175329/http://dunkels.com/adam/download/graham-pt.h
60 +"
61 +
62 +LICENSE="BSD"
63 +SLOT="0"
64 +KEYWORDS="~amd64"
65 +IUSE="doc examples"
66 +
67 +BDEPEND="doc? ( app-doc/doxygen )"
68 +
69 +S="${WORKDIR}/pt-${PV}"
70 +
71 +src_unpack() {
72 + default
73 + cp "${DISTDIR}/graham-pt.h" "${S}"
74 +}
75 +
76 +src_prepare() {
77 + sed -i 's/-Werror//g' Makefile
78 + sed -i 's/-O//g' Makefile
79 + default
80 +}
81 +
82 +src_compile() {
83 + default
84 + use doc && cd doc && emake
85 +}
86 +
87 +src_install() {
88 + insinto "/usr/include/${PN}"
89 + doins *.h
90 + if use doc ; then
91 + dodoc doc/*.pdf
92 + dodoc doc/*.txt
93 + dodoc README
94 + docinto html
95 + dodoc -r doc/html/.
96 +
97 + fi
98 + if use examples ; then
99 + insinto "/usr/share/${P}/examples"
100 + doins *.c
101 + exeinto "/usr/libexec/${P}"
102 + doexe example-buffer
103 + doexe example-codelock
104 + doexe example-small
105 + fi
106 +}