1 |
commit: 971cd7ef97dd3035583b89f63a5fa24d68c021fc |
2 |
Author: Bjørn Kagelmacher <DL7RAY <AT> t-online <DOT> de> |
3 |
AuthorDate: Wed Mar 23 22:34:15 2016 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 29 03:15:05 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=971cd7ef |
7 |
|
8 |
dev-embedded/avr-libc: version bump |
9 |
|
10 |
dev-embedded/avr-libc/avr-libc-2.0.0.ebuild | 76 +++++++++++++++++++++++++++++ |
11 |
1 file changed, 76 insertions(+) |
12 |
|
13 |
diff --git a/dev-embedded/avr-libc/avr-libc-2.0.0.ebuild b/dev-embedded/avr-libc/avr-libc-2.0.0.ebuild |
14 |
new file mode 100644 |
15 |
index 0000000..395c23a |
16 |
--- /dev/null |
17 |
+++ b/dev-embedded/avr-libc/avr-libc-2.0.0.ebuild |
18 |
@@ -0,0 +1,76 @@ |
19 |
+# Copyright 1999-2015 Gentoo Foundation |
20 |
+# Distributed under the terms of the GNU General Public License v2 |
21 |
+# $Id$ |
22 |
+ |
23 |
+EAPI="5" |
24 |
+ |
25 |
+CHOST="avr" |
26 |
+CTARGET="avr" |
27 |
+ |
28 |
+inherit flag-o-matic eutils |
29 |
+ |
30 |
+DESCRIPTION="C library for Atmel AVR microcontrollers" |
31 |
+HOMEPAGE="http://www.nongnu.org/avr-libc/" |
32 |
+SRC_URI="http://savannah.nongnu.org/download/avr-libc/${P}.tar.bz2 |
33 |
+ http://savannah.nongnu.org/download/avr-libc/${PN}-manpages-${PV}.tar.bz2 |
34 |
+ doc? ( http://savannah.nongnu.org/download/avr-libc/${PN}-user-manual-${PV}.tar.bz2 )" |
35 |
+ |
36 |
+LICENSE="BSD" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
39 |
+IUSE="doc crosscompile_opts_headers-only" |
40 |
+ |
41 |
+DEPEND=">=sys-devel/crossdev-0.9.1" |
42 |
+[[ ${CATEGORY/cross-} != ${CATEGORY} ]] \ |
43 |
+ && RDEPEND="!dev-embedded/avr-libc" \ |
44 |
+ || RDEPEND="" |
45 |
+ |
46 |
+DOCS="AUTHORS ChangeLog* NEWS README" |
47 |
+ |
48 |
+pkg_setup() { |
49 |
+ # check for avr-gcc, bug #134738 |
50 |
+ ebegin "Checking for avr-gcc" |
51 |
+ if type -p avr-gcc > /dev/null ; then |
52 |
+ eend 0 |
53 |
+ else |
54 |
+ eend 1 |
55 |
+ |
56 |
+ eerror |
57 |
+ eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:" |
58 |
+ eerror " $ crossdev -t avr" |
59 |
+ eerror |
60 |
+ die "AVR toolchain not found" |
61 |
+ fi |
62 |
+} |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ epatch_user #455828 |
66 |
+ |
67 |
+ # work around broken gcc versions PR45261 |
68 |
+ local mcu |
69 |
+ for mcu in $(sed -r -n '/CHECK_AVR_DEVICE/{s:.*[(](.*)[)]:\1:;p}' configure.ac) ; do |
70 |
+ if avr-gcc -E - -mmcu=${mcu} <<<"" |& grep -q 'unknown MCU' ; then |
71 |
+ sed -i "/HAS_${mcu}=yes/s:yes:no:" configure |
72 |
+ fi |
73 |
+ done |
74 |
+ |
75 |
+ # Install docs in correct directory |
76 |
+ sed -i -e "/DOC_INST_DIR/s:\$(VERSION):${PVR}:" configure || die |
77 |
+ |
78 |
+ strip-flags |
79 |
+ strip-unsupported-flags |
80 |
+} |
81 |
+ |
82 |
+src_install() { |
83 |
+ default |
84 |
+ |
85 |
+ # man pages can not go into standard locations |
86 |
+ # as they would then overwrite libc man pages |
87 |
+ insinto /usr/share/doc/${PF}/man/man3 |
88 |
+ doins "${WORKDIR}"/man/man3/* |
89 |
+ |
90 |
+ use doc && dohtml "${WORKDIR}"/${PN}-user-manual-${PV}/* |
91 |
+ |
92 |
+ # Make sure diff cross-compilers don't collide #414075 |
93 |
+ mv "${ED}"/usr/share/doc/{${PF},${CTARGET}-${PF}} || die |
94 |
+} |