sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / dev-embedded / avrdude / avrdude-9999.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools subversion toolchain-funcs
7
8 DESCRIPTION="AVR Downloader/UploaDEr"
9 HOMEPAGE="https://savannah.nongnu.org/projects/avrdude"
10 ESVN_REPO_URI="svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude"
11 MY_DOC_PV=6.3
12 SRC_URI="
13         doc? (
14                 mirror://nongnu/${PN}/${PN}-doc-${MY_DOC_PV}.tar.gz
15                 mirror://nongnu/${PN}/${PN}-doc-${MY_DOC_PV}.pdf
16         )"
17
18 LICENSE="GPL-2"
19 SLOT="0"
20 KEYWORDS=""
21 IUSE="doc ftdi ncurses readline"
22
23 RDEPEND="virtual/libusb:1
24         virtual/libusb:0
25         ftdi? ( dev-embedded/libftdi:= )
26         ncurses? ( sys-libs/ncurses:0= )
27         readline? ( sys-libs/readline:0= )"
28 DEPEND="${RDEPEND}"
29
30 DOCS="AUTHORS ChangeLog* NEWS README"
31
32 src_unpack() {
33         default
34         subversion_src_unpack
35 }
36
37 src_prepare() {
38         default
39
40         # let the build system re-generate these, bug #120194
41         rm -f lexer.c config_gram.c config_gram.h || die
42
43         eautoreconf
44 }
45
46 src_configure() {
47         # somehow this doesnt get set when cross-compiling and breaks build
48         tc-export AR
49         export ac_cv_lib_ftdi_ftdi_usb_get_strings=$(usex ftdi)
50         export ac_cv_lib_ncurses_tputs=$(usex ncurses)
51         export ac_cv_lib_readline_readline=$(usex readline)
52         default
53 }
54
55 src_compile() {
56         # The automake target for these files does not use tempfiles or create
57         # these atomically, confusing a parallel build. So we force them first.
58         emake lexer.c config_gram.c config_gram.h
59         emake
60 }
61
62 src_install() {
63         default
64
65         if use doc ; then
66                 newdoc "${DISTDIR}/${PN}-doc-${MY_DOC_PV}.pdf" avrdude.pdf
67                 dodoc -r "${WORKDIR}/avrdude-html/"
68
69                 dodoc -r atmel-docs
70         fi
71 }