diff options
author | Tim Harder <radhermit@gentoo.org> | 2011-09-03 08:40:14 +0000 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2011-09-03 08:40:14 +0000 |
commit | 5ae916e1f940c52d41e0235a9fca5ff9b2bfa4c6 (patch) | |
tree | 89af2098e1e88bd1d53c04b1f1b85461f93113c3 /dev-embedded/avr-libc | |
parent | ppc/ppc64 stable wrt #380475 (diff) | |
download | gentoo-2-5ae916e1f940c52d41e0235a9fca5ff9b2bfa4c6.tar.gz gentoo-2-5ae916e1f940c52d41e0235a9fca5ff9b2bfa4c6.tar.bz2 gentoo-2-5ae916e1f940c52d41e0235a9fca5ff9b2bfa4c6.zip |
Version bump. Apply fix for gcc-4.6 issue (bug #371043 by klondike).
(Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
Diffstat (limited to 'dev-embedded/avr-libc')
-rw-r--r-- | dev-embedded/avr-libc/ChangeLog | 8 | ||||
-rw-r--r-- | dev-embedded/avr-libc/avr-libc-1.7.1.ebuild | 75 | ||||
-rw-r--r-- | dev-embedded/avr-libc/files/avr-libc-1.7.1-gcc46.patch | 25 |
3 files changed, 107 insertions, 1 deletions
diff --git a/dev-embedded/avr-libc/ChangeLog b/dev-embedded/avr-libc/ChangeLog index 7e81341d068b..7e9d9592c565 100644 --- a/dev-embedded/avr-libc/ChangeLog +++ b/dev-embedded/avr-libc/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-embedded/avr-libc # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-embedded/avr-libc/ChangeLog,v 1.47 2011/07/20 13:53:03 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-embedded/avr-libc/ChangeLog,v 1.48 2011/09/03 08:40:14 radhermit Exp $ + +*avr-libc-1.7.1 (03 Sep 2011) + + 03 Sep 2011; Tim Harder <radhermit@gentoo.org> +avr-libc-1.7.1.ebuild, + +files/avr-libc-1.7.1-gcc46.patch: + Version bump. Apply fix for gcc-4.6 issue (bug #371043 by klondike). 20 Jul 2011; Pacho Ramos <pacho@gentoo.org> metadata.xml: Drop maintainer due retirement, bug #34534 diff --git a/dev-embedded/avr-libc/avr-libc-1.7.1.ebuild b/dev-embedded/avr-libc/avr-libc-1.7.1.ebuild new file mode 100644 index 000000000000..6e1f89b45e02 --- /dev/null +++ b/dev-embedded/avr-libc/avr-libc-1.7.1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-embedded/avr-libc/avr-libc-1.7.1.ebuild,v 1.1 2011/09/03 08:40:14 radhermit Exp $ + +CHOST="avr" +CTARGET="avr" + +EAPI="4" + +inherit flag-o-matic eutils + +DESCRIPTION="C library for Atmel AVR microcontrollers" +HOMEPAGE="http://www.nongnu.org/avr-libc/" +SRC_URI="http://savannah.nongnu.org/download/avr-libc/${P}.tar.bz2 + http://savannah.nongnu.org/download/avr-libc/${PN}-manpages-${PV}.tar.bz2 + doc? ( http://savannah.nongnu.org/download/avr-libc/${PN}-user-manual-${PV}.tar.bz2 )" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="doc crosscompile_opts_headers-only" + +DEPEND=">=sys-devel/crossdev-0.9.1" +[[ ${CATEGORY/cross-} != ${CATEGORY} ]] \ + && RDEPEND="!dev-embedded/avr-libc" \ + || RDEPEND="" + +DOCS="AUTHORS ChangeLog* NEWS README" + +pkg_setup() { + # check for avr-gcc, bug #134738 + ebegin "Checking for avr-gcc" + if type -p avr-gcc > /dev/null ; then + eend 0 + else + eend 1 + + eerror + eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:" + eerror " $ crossdev -t avr" + eerror + die "AVR toolchain not found" + fi +} + +src_prepare() { + #Fix avr-libc bug #32988 causing and ICE with gcc-4.6.0 + epatch "${FILESDIR}/${P}-gcc46.patch" + + # work around broken gcc versions PR45261 + local mcu + for mcu in $(sed -r -n '/CHECK_AVR_DEVICE/{s:.*[(](.*)[)]:\1:;p}' configure.ac) ; do + if avr-gcc -E - -mmcu=${mcu} <<<"" |& grep -q 'unknown MCU' ; then + sed -i "/HAS_${mcu}=yes/s:yes:no:" configure + fi + done + + # Install docs in correct directory + sed -i -e "/DOC_INST_DIR/s:\$(VERSION):${PVR}:" configure || die + + strip-flags + strip-unsupported-flags +} + +src_install() { + default + + # man pages can not go into standard locations + # as they would then overwrite libc man pages + insinto /usr/share/doc/${PF}/man/man3 + doins "${WORKDIR}"/man/man3/* + prepman /usr/share/doc/${PF} + + use doc && dohtml "${WORKDIR}"/${PN}-user-manual-${PV}/* +} diff --git a/dev-embedded/avr-libc/files/avr-libc-1.7.1-gcc46.patch b/dev-embedded/avr-libc/files/avr-libc-1.7.1-gcc46.patch new file mode 100644 index 000000000000..1f0922196c36 --- /dev/null +++ b/dev-embedded/avr-libc/files/avr-libc-1.7.1-gcc46.patch @@ -0,0 +1,25 @@ +--- avr-libc-1.7.1.orig/include/avr/pgmspace.h ++++ avr-libc-1.7.1/include/avr/pgmspace.h +@@ -252,7 +252,7 @@ + # define PSTR(s) ((const PROGMEM char *)(s)) + #else /* !DOXYGEN */ + /* The real thing. */ +-# define PSTR(s) (__extension__({static char __c[] PROGMEM = (s); &__c[0];})) ++# define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];})) + #endif /* DOXYGEN */ + + #define __LPM_classic__(addr) \ +--- avr-libc-1.7.1.orig/libc/stdlib/dtostre.c ++++ avr-libc-1.7.1/libc/stdlib/dtostre.c +@@ -37,9 +37,9 @@ + char * + dtostre (double val, char *sbeg, unsigned char prec, unsigned char flags) + { +- __attribute__((progmem)) static char str_nan[2][4] = ++ __attribute__((progmem)) static const char str_nan[2][4] = + {"nan", "NAN"}; +- __attribute__((progmem)) static char str_inf[2][sizeof(str_nan[0])] = ++ __attribute__((progmem)) static const char str_inf[2][sizeof(str_nan[0])] = + {"inf", "INF"}; + char *d; /* dst */ + char *s; /* src */ |