Magellan Linux

Annotation of /smage/trunk/core/binutils/binutils-2.21.51.0.6-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2506 - (hide annotations) (download)
Thu Jun 30 13:55:15 2011 UTC (12 years, 11 months ago) by niro
Original Path: smage/branches/alx-0_6_0/core/binutils/binutils-2.21.51.0.6-r1.smage2
File size: 1675 byte(s)
-removed STATE variable from smage files, use global distribution file for package/distribution states
1 niro 1692 # $Id$
2    
3     PNAME="binutils"
4     PVER="2.21.51.0.6"
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     REMOVE_DEPRECATED_MAGE_TARGETS=1
19     sminclude mtools alx
20    
21     SRC_URI=(
22     http://www.kernel.org/pub/linux/devel/${PNAME}/${SRCFILE}
23     mirror://${PNAME}/${SRCFILE}
24     mirror://${PNAME}/${PNAME}-2.16.91.0.5-multilib.patch
25     )
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     mpatch ${PNAME}-2.16.91.0.5-multilib.patch || die
49     }
50    
51     src_compile()
52     {
53     cd ${SRCDIR}/build
54    
55     # fixes compilation, use 'ar' instead of '${CHOST}-ar'
56     AR=ar \
57     ../configure \
58     --host=${CHOST} \
59     --target=${CCHOST} \
60     --prefix=/usr \
61     --mandir=/usr/share/man \
62     --infodir=/usr/share/info \
63     --libdir=/usr/$(mlibdir) \
64     --enable-shared \
65     --enable-gold \
66     --enable-plugins \
67     --enable-threads \
68     --enable-64-bit-bfd \
69     --disable-werror \
70     || die
71    
72     make configure-host || die
73     mmake tooldir=/usr all || die
74     }
75    
76     src_install()
77     {
78     cd ${SRCDIR}/build
79    
80     mmake DESTDIR=${BINDIR} tooldir=/usr install || die
81     minstallfile ../include/libiberty.h /usr/include || die
82    
83     cd ${SRCDIR}
84     minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die
85     }