Annotation of /branches/magellan-next/core/binutils/binutils-2.21.53.0.2-r1.smage2
Parent Directory | Revision Log
Revision 9132 -
(hide annotations)
(download)
Mon Nov 7 17:25:11 2011 UTC (12 years, 6 months ago) by niro
File size: 1872 byte(s)
Mon Nov 7 17:25:11 2011 UTC (12 years, 6 months ago) by niro
File size: 1872 byte(s)
-multlib fixes with fedora patches
1 | niro | 8988 | # $Id$ |
2 | |||
3 | PNAME="binutils" | ||
4 | PVER="2.21.53.0.2" | ||
5 | niro | 9132 | PBUILD="r2" |
6 | niro | 8988 | |
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 | niro | 9132 | mirror://${PNAME}/${PNAME}-2.20.51.0.2-multilib.patch |
24 | mirror://${PNAME}/${PNAME}-2.20.51.0.2-lib64-first.patch | ||
25 | niro | 8988 | ) |
26 | |||
27 | UP2DATE="updatecmd ${HOMEPAGE} | sed -n 's/.*release.binutils-\(.*\).*/\1/;$ p'" | ||
28 | |||
29 | # binutils don't like strong CFLAGS | ||
30 | export CFLAGS="${CFLAGS//-O?} -O2" | ||
31 | export CXXFLAGS="${CFLAGS}" | ||
32 | |||
33 | if [[ -z ${CCHOST} ]] | ||
34 | then | ||
35 | # no crosscompile defined | ||
36 | export CCHOST=${CHOST} | ||
37 | else | ||
38 | # use crosscompile host | ||
39 | export CCHOST=${CCHOST} | ||
40 | fi | ||
41 | |||
42 | src_prepare() | ||
43 | { | ||
44 | munpack ${SRCFILE} || die | ||
45 | install -d ${SRCDIR}/build || die | ||
46 | |||
47 | cd ${SRCDIR} | ||
48 | niro | 9132 | # multilib patch from fedora |
49 | mpatch ${PNAME}-2.20.51.0.2-multilib.patch || die | ||
50 | # use lib64 first on multilib systems - from fedora | ||
51 | if [[ $(mlibdir) != lib ]] | ||
52 | then | ||
53 | mpatch ${PNAME}-2.20.51.0.2-lib64-first.patch || die | ||
54 | fi | ||
55 | niro | 8988 | } |
56 | |||
57 | src_compile() | ||
58 | { | ||
59 | cd ${SRCDIR}/build | ||
60 | |||
61 | # fixes compilation, use 'ar' instead of '${CHOST}-ar' | ||
62 | AR=ar \ | ||
63 | ../configure \ | ||
64 | --host=${CHOST} \ | ||
65 | --target=${CCHOST} \ | ||
66 | --prefix=/usr \ | ||
67 | --mandir=/usr/share/man \ | ||
68 | --infodir=/usr/share/info \ | ||
69 | --libdir=/usr/$(mlibdir) \ | ||
70 | --enable-shared \ | ||
71 | --enable-gold \ | ||
72 | --enable-plugins \ | ||
73 | --enable-threads \ | ||
74 | --enable-64-bit-bfd \ | ||
75 | --disable-werror \ | ||
76 | || die | ||
77 | |||
78 | make configure-host || die | ||
79 | mmake tooldir=/usr all || die | ||
80 | } | ||
81 | |||
82 | src_install() | ||
83 | { | ||
84 | cd ${SRCDIR}/build | ||
85 | |||
86 | mmake DESTDIR=${BINDIR} tooldir=/usr install || die | ||
87 | minstallfile ../include/libiberty.h /usr/include || die | ||
88 | |||
89 | cd ${SRCDIR} | ||
90 | minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die | ||
91 | } |