sys-process/glances: revbump 3.1.4.1, add missing doc dep
[gentoo.git] / net-libs / freaklabs-chibiarduino / freaklabs-chibiarduino-1.0.8_p20190329.ebuild
1 # Copyright 2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 DESCRIPTION="freaklabs fork of the lightweight wireless sensor library for Arduino"
7 HOMEPAGE="https://freaklabs.org/chibiarduino/"
8
9 if [ "${PV}" = "9999" ]; then
10         inherit git-r3
11         EGIT_REPO_URI="https://github.com/freaklabs/chibiArduino.git"
12 else
13         GIT_COMMIT="547ec8155c48b7eaa9aa8f1bd88a55c7ffd55868"
14         SRC_URI="https://github.com/freaklabs/chibiArduino/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
15         S="${WORKDIR}/chibiArduino-${GIT_COMMIT}"
16         KEYWORDS="~amd64"
17 fi
18
19 LICENSE="BSD"
20 SLOT="0"
21 IUSE="+promisc"
22
23 DEPEND=""
24 RDEPEND="${DEPEND}"
25 BDEPEND=""
26 PDEPEND="dev-embedded/arduino
27                 dev-embedded/freaklabs-boards"
28
29 src_prepare() {
30         if use promisc; then
31                 sed -i 's#CHIBI_PROMISCUOUS 0#CHIBI_PROMISCUOUS 1#' chibiUsrCfg.h || die
32         fi
33         default
34 }
35
36 src_install() {
37         insinto /usr/share/arduino/hardware/arduino/avr/libraries/chibiarduino
38         doins -r *
39 }
40
41 pkg_postinst() {
42         ewarn "For this to work you need to install cross-avr/gcc[-ssp,-pie]"
43         ewarn "Something like USE='-pie -ssp' crossdev -S -s4 avr"
44 }