media-libs/aalib: revbump to fix undefined behavior
[gentoo.git] / dev-embedded / avrdude / avrdude-5.11.1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="4"
6
7 inherit eutils
8
9 DESCRIPTION="AVR Downloader/UploaDEr"
10 HOMEPAGE="https://savannah.nongnu.org/projects/avrdude"
11 SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz
12         doc? (
13                 mirror://nongnu/${PN}/${PN}-doc-${PV}.tar.gz
14                 mirror://nongnu/${PN}/${PN}-doc-${PV}.pdf
15         )"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="amd64 arm ppc ppc64 x86"
20 IUSE="doc ftdi ncurses readline"
21
22 RDEPEND="virtual/libusb:1
23         ftdi? ( dev-embedded/libftdi:0 )
24         ncurses? ( sys-libs/ncurses )
25         readline? ( sys-libs/readline )"
26 DEPEND="${RDEPEND}"
27
28 DOCS="AUTHORS ChangeLog* NEWS README"
29
30 src_prepare() {
31         # let the build system re-generate these, bug #120194
32         rm -f lexer.c config_gram.c config_gram.h
33 }
34
35 src_configure() {
36         export ac_cv_lib_ftdi_ftdi_usb_get_strings=$(usex ftdi)
37         export ac_cv_lib_ncurses_tputs=$(usex ncurses)
38         export ac_cv_lib_readline_readline=$(usex readline)
39         default
40 }
41
42 src_compile() {
43         # The automake target for these files does not use tempfiles or create
44         # these atomically, confusing a parallel build. So we force them first.
45         emake lexer.c config_gram.c config_gram.h
46         emake
47 }
48
49 src_install() {
50         default
51
52         if use doc ; then
53                 newdoc "${DISTDIR}/${PN}-doc-${PV}.pdf" avrdude.pdf
54                 dohtml -r "${WORKDIR}/avrdude-html/"
55         fi
56 }