summaryrefslogtreecommitdiff
path: root/net-libs/freaklabs-chibiarduino/freaklabs-chibiarduino-9999.ebuild
blob: c94d1dc490a08d970bb152297d9446bdb8f6d6c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright 2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

DESCRIPTION="freaklabs fork of the lightweight wireless sensor library for Arduino"
HOMEPAGE="https://freaklabs.org/chibiarduino/"
SRC_URI=""

inherit git-r3
EGIT_REPO_URI="https://github.com/freaklabs/chibiArduino.git"

LICENSE="BSD"
SLOT="0"
KEYWORDS=""
IUSE="+promisc"

DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""
PDEPEND="dev-embedded/arduino
		dev-embedded/freaklabs-boards"

src_prepare() {
	if use promisc; then
		sed -i 's#CHIBI_PROMISCUOUS 0#CHIBI_PROMISCUOUS 1#' chibiUsrCfg.h || die
	fi
	default
}

src_install() {
	insinto /usr/share/arduino/hardware/arduino/avr/libraries/chibi
	doins -r *
}

pkg_postinst() {
	ewarn "For this to work you need to install cross-avr/gcc[-ssp,-pie]"
	ewarn "Something like USE='-pie -ssp' crossdev -S -s4 avr"
}