Lines 2-11
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
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.4.5.ebuild,v 1.1 2006/10/11 22:13:28 gustavoz Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-embedded/avr-libc/avr-libc-1.4.5.ebuild,v 1.1 2006/10/11 22:13:28 gustavoz Exp $ |
4 |
|
4 |
|
5 |
CHOST="avr" |
5 |
inherit flag-o-matic autotools |
6 |
CTARGET="avr" |
|
|
7 |
|
8 |
inherit flag-o-matic |
9 |
|
6 |
|
10 |
DESCRIPTION="C library for Atmel AVR microcontrollers" |
7 |
DESCRIPTION="C library for Atmel AVR microcontrollers" |
11 |
HOMEPAGE="http://www.nongnu.org/avr-libc/" |
8 |
HOMEPAGE="http://www.nongnu.org/avr-libc/" |
Lines 18-44
Link Here
|
18 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
15 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
19 |
IUSE="doc nls" |
16 |
IUSE="doc nls" |
20 |
|
17 |
|
21 |
DEPEND=">=sys-devel/crossdev-0.9.1" |
18 |
DEPEND="" |
22 |
[[ ${CATEGORY/cross-} != ${CATEGORY} ]] \ |
19 |
RDEPEND="" |
23 |
&& RDEPEND="!dev-embedded/avr-libc" \ |
20 |
|
24 |
|| RDEPEND="" |
21 |
# If it's a cross-compile, assume someone's doing it properly and DEPEND on the |
|
|
22 |
# rest of the gentoo-built toolchain. If they're just installing the package |
23 |
# normally, perhaps they installed avr-gcc from a non-gentoo package. |
24 |
|
25 |
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then |
26 |
DEPEND="${CATEGORY}/gcc" |
27 |
RDEPEND="!dev-embedded/avr-libc" |
28 |
CHOST="${CATEGORY/cross-}" |
29 |
CTARGET="${CATEGORY/cross-}" |
30 |
else |
31 |
CHOST="avr" |
32 |
CTARGET="avr" |
33 |
fi |
25 |
|
34 |
|
26 |
pkg_setup() { |
35 |
pkg_setup() { |
27 |
# check for avr-gcc, bug #134738 |
36 |
# check for avr-gcc, bug #134738 |
28 |
ebegin "Checking for avr-gcc" |
37 |
ebegin "Checking for ${CHOST}-gcc" |
29 |
if type -p avr-gcc > /dev/null ; then |
38 |
if type -p "${CHOST}-gcc" > /dev/null ; then |
30 |
eend 0 |
39 |
eend 0 |
31 |
else |
40 |
else |
32 |
eend 1 |
41 |
eend 1 |
33 |
|
42 |
|
34 |
eerror |
43 |
eerror |
35 |
eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:" |
44 |
eerror "Failed to locate '${CHOST}-gcc' in \$PATH. You can install an AVR toolchain using:" |
36 |
eerror " $ crossdev -t avr" |
45 |
eerror " $ crossdev -t avr" |
37 |
eerror |
46 |
eerror |
38 |
die "AVR toolchain not found" |
47 |
die "AVR toolchain not found" |
39 |
fi |
48 |
fi |
40 |
} |
49 |
} |
41 |
|
50 |
|
|
|
51 |
src_unpack() { |
52 |
unpack ${A} |
53 |
cd ${S} |
54 |
sed -i -e "s#\*avr-\([a-z]\+\)\*#${CHOST}-\1#" configure.ac |
55 |
sed -i -e "s#/avr/#/${CHOST}/#" AvrCommonLibC.am AvrCommon.am \ |
56 |
include/avr/Makefile.am include/compat/Makefile.am \ |
57 |
include/util/Makefile.am include/Makefile.am |
58 |
eautoreconf |
59 |
} |
60 |
|
42 |
src_compile() { |
61 |
src_compile() { |
43 |
strip-flags |
62 |
strip-flags |
44 |
strip-unsupported-flags |
63 |
strip-unsupported-flags |
Lines 68-72
Link Here
|
68 |
doins "${WORKDIR}"/man/man3/* |
87 |
doins "${WORKDIR}"/man/man3/* |
69 |
prepman /usr/share/doc/${PF} |
88 |
prepman /usr/share/doc/${PF} |
70 |
|
89 |
|
71 |
use doc && dohtml "${WORKDIR}"/${PN}-user-manual-${PV}/* |
90 |
use doc && dohtml "${WORKDIR}"/${PN}-user-manual-${PV}/* |
72 |
} |
91 |
} |