/[gentoo-x86]/dev-embedded/avr-libc/avr-libc-1.8.0.ebuild
Gentoo

Contents of /dev-embedded/avr-libc/avr-libc-1.8.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun Jun 30 06:03:44 2013 UTC (13 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +5 -3 lines
Call epatch_user #455828 by Alexander Krause.

(Portage version: 2.2.0_alpha179/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-embedded/avr-libc/avr-libc-1.8.0.ebuild,v 1.4 2012/05/03 02:22:39 vapier Exp $
4
5 EAPI="4"
6
7 CHOST="avr"
8 CTARGET="avr"
9
10 inherit flag-o-matic eutils
11
12 DESCRIPTION="C library for Atmel AVR microcontrollers"
13 HOMEPAGE="http://www.nongnu.org/avr-libc/"
14 SRC_URI="http://savannah.nongnu.org/download/avr-libc/${P}.tar.bz2
15 http://savannah.nongnu.org/download/avr-libc/${PN}-manpages-${PV}.tar.bz2
16 doc? ( http://savannah.nongnu.org/download/avr-libc/${PN}-user-manual-${PV}.tar.bz2 )"
17
18 LICENSE="BSD"
19 SLOT="0"
20 KEYWORDS="amd64 ppc ppc64 x86"
21 IUSE="doc crosscompile_opts_headers-only"
22
23 DEPEND=">=sys-devel/crossdev-0.9.1"
24 [[ ${CATEGORY/cross-} != ${CATEGORY} ]] \
25 && RDEPEND="!dev-embedded/avr-libc" \
26 || RDEPEND=""
27
28 DOCS="AUTHORS ChangeLog* NEWS README"
29
30 pkg_setup() {
31 # check for avr-gcc, bug #134738
32 ebegin "Checking for avr-gcc"
33 if type -p avr-gcc > /dev/null ; then
34 eend 0
35 else
36 eend 1
37
38 eerror
39 eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:"
40 eerror " $ crossdev -t avr"
41 eerror
42 die "AVR toolchain not found"
43 fi
44 }
45
46 src_prepare() {
47 epatch_user #455828
48
49 # work around broken gcc versions PR45261
50 local mcu
51 for mcu in $(sed -r -n '/CHECK_AVR_DEVICE/{s:.*[(](.*)[)]:\1:;p}' configure.ac) ; do
52 if avr-gcc -E - -mmcu=${mcu} <<<"" |& grep -q 'unknown MCU' ; then
53 sed -i "/HAS_${mcu}=yes/s:yes:no:" configure
54 fi
55 done
56
57 # Install docs in correct directory
58 sed -i -e "/DOC_INST_DIR/s:\$(VERSION):${PVR}:" configure || die
59
60 strip-flags
61 strip-unsupported-flags
62 }
63
64 src_install() {
65 default
66
67 # man pages can not go into standard locations
68 # as they would then overwrite libc man pages
69 insinto /usr/share/doc/${PF}/man/man3
70 doins "${WORKDIR}"/man/man3/*
71
72 use doc && dohtml "${WORKDIR}"/${PN}-user-manual-${PV}/*
73
74 # Make sure diff cross-compilers don't collide #414075
75 mv "${ED}"/usr/share/doc/{${PF},${CTARGET}-${PF}} || die
76 }

  ViewVC Help
Powered by ViewVC 1.1.20