Contents of /branches/magellan-next/core/binutils/binutils-2.21.53.0.2-r1.smage2
Parent Directory | Revision Log
Revision 8988 -
(show annotations)
(download)
Fri Sep 2 19:30:42 2011 UTC (13 years ago) by niro
File size: 1638 byte(s)
Fri Sep 2 19:30:42 2011 UTC (13 years ago) by niro
File size: 1638 byte(s)
auto added: ver bump to 2.21.53.0.2-r1
1 | # $Id$ |
2 | |
3 | PNAME="binutils" |
4 | PVER="2.21.53.0.2" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="sys-dev" |
8 | |
9 | DESCRIPTION="Tools necessary to build programs." |
10 | HOMEPAGE="http://www.kernel.org/pub/linux/devel/binutils/" |
11 | |
12 | DEPEND="" |
13 | SDEPEND=">= virtual/kernel-headers" |
14 | |
15 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
16 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
17 | |
18 | sminclude mtools |
19 | |
20 | SRC_URI=( |
21 | http://www.kernel.org/pub/linux/devel/${PNAME}/${SRCFILE} |
22 | mirror://${PNAME}/${SRCFILE} |
23 | mirror://${PNAME}/${PNAME}-2.16.91.0.5-multilib.patch |
24 | ) |
25 | |
26 | UP2DATE="updatecmd ${HOMEPAGE} | sed -n 's/.*release.binutils-\(.*\).*/\1/;$ p'" |
27 | |
28 | # binutils don't like strong CFLAGS |
29 | export CFLAGS="${CFLAGS//-O?} -O2" |
30 | export CXXFLAGS="${CFLAGS}" |
31 | |
32 | if [[ -z ${CCHOST} ]] |
33 | then |
34 | # no crosscompile defined |
35 | export CCHOST=${CHOST} |
36 | else |
37 | # use crosscompile host |
38 | export CCHOST=${CCHOST} |
39 | fi |
40 | |
41 | src_prepare() |
42 | { |
43 | munpack ${SRCFILE} || die |
44 | install -d ${SRCDIR}/build || die |
45 | |
46 | cd ${SRCDIR} |
47 | mpatch ${PNAME}-2.16.91.0.5-multilib.patch || die |
48 | } |
49 | |
50 | src_compile() |
51 | { |
52 | cd ${SRCDIR}/build |
53 | |
54 | # fixes compilation, use 'ar' instead of '${CHOST}-ar' |
55 | AR=ar \ |
56 | ../configure \ |
57 | --host=${CHOST} \ |
58 | --target=${CCHOST} \ |
59 | --prefix=/usr \ |
60 | --mandir=/usr/share/man \ |
61 | --infodir=/usr/share/info \ |
62 | --libdir=/usr/$(mlibdir) \ |
63 | --enable-shared \ |
64 | --enable-gold \ |
65 | --enable-plugins \ |
66 | --enable-threads \ |
67 | --enable-64-bit-bfd \ |
68 | --disable-werror \ |
69 | || die |
70 | |
71 | make configure-host || die |
72 | mmake tooldir=/usr all || die |
73 | } |
74 | |
75 | src_install() |
76 | { |
77 | cd ${SRCDIR}/build |
78 | |
79 | mmake DESTDIR=${BINDIR} tooldir=/usr install || die |
80 | minstallfile ../include/libiberty.h /usr/include || die |
81 | |
82 | cd ${SRCDIR} |
83 | minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die |
84 | } |