Magellan Linux

Contents of /smage/trunk/core/libstdc++/libstdc++-4.2.3-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6 - (show annotations) (download)
Sun Jan 11 01:07:49 2009 UTC (15 years, 3 months ago) by niro
File size: 2727 byte(s)
-fixed old cvs headers
1 # $Id$
2
3 PNAME="libstdc++"
4 PVER="4.2.3"
5 PBUILD="r2"
6
7 PCATEGORIE="sys-libs"
8 STATE="unstable"
9
10 DESCRIPTION="Standard GNU C and C++ libraries."
11 HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
12
13 # needed to prevent compat issues with gcc-3.4.x and gcc-4.0.x
14 DEPEND=">= sys-libs/libstdc++-v3-3.3.3
15 >= virtual/base-files"
16
17 SDEPEND=">= sys-dev/binutils-2.16
18 >= virtual/kernel-headers"
19
20 SRCFILE="gcc-${PVER}.tar.bz2"
21 SRCDIR="${BUILDDIR}/gcc-${PVER}"
22
23 # languages to build into gcc
24 MyLanguages=c,c++
25
26 sminclude cleanutils libtool alx
27
28 SRC_URI=(
29 gnu://gcc/gcc-${PVER}/${SRCFILE}
30 mirror://gcc/${SRCFILE}
31 mirror://gcc/gcc-${PVER}-no-fixincludes.patch
32 mirror://gcc/gcc-${PVER}-magellan-version.patch
33 )
34
35 # gcc don't like strong CFLAGS
36 export CFLAGS="${CFLAGS//-O?} -O2"
37 export CXXFLAGS="${CFLAGS}"
38
39 # check for crosscompile or export default CHOST
40 if [[ -z ${CCHOST} ]]
41 then
42 # no crosscompile defined
43 export CCHOST=${CHOST}
44 else
45 # use crosscompile host
46 export CCHOST=${CCHOST}
47 fi
48
49 src_prepare()
50 {
51 munpack ${SRCFILE} || die
52 cd ${SRCDIR}
53
54 mpatch gcc-${PVER}-no-fixincludes.patch || die
55 mpatch gcc-${PVER}-magellan-version.patch || die
56
57 # suppress installation of libiberty, as we will be
58 # using the one from binutils
59 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || die
60
61 install -d ${SRCDIR}/build || die
62 cd ${SRCDIR}/build
63 }
64
65 src_compile()
66 {
67 cd ${SRCDIR}/build
68
69 # you better off when not using distcc to compile
70 # your new compiler :) maybe not all are the same
71 export SMAGE_USE_DISTCC=false
72
73 ../configure \
74 --host=${CHOST} \
75 --target=${CCHOST} \
76 --prefix=/usr \
77 --mandir=/usr/share/man \
78 --infodir=/usr/share/info \
79 --libdir=/usr/$(mlibdir) \
80 --libexecdir=/usr/$(mlibdir) \
81 --enable-shared \
82 --enable-threads=posix \
83 --enable-__cxa_atexit \
84 --enable-clocale=gnu \
85 --disable-checking \
86 --disable-libunwind-exceptions \
87 --with-system-zlib \
88 --enable-long-long \
89 --enable-cstdio=stdio \
90 --enable-languages=${MyLanguages} \
91 --disable-libstdcxx-pch \
92 || die
93
94 # parallel builds seems to break sometimes on x86_64
95 local myopts
96 [[ ${ARCH} = x86_64 ]] && myopts=-j1
97
98 mmake ${myopts} bootstrap-lean || die
99 }
100
101 src_install()
102 {
103 cd ${SRCDIR}/build
104 install -d ${BINDIR}/$(mlibdir) || die
105
106 make DESTDIR=${BINDIR} install || die
107
108 # deletes everything excluding libgcc_s and libstdc++
109 zapmost ${BINDIR}/usr/$(mlibdir) libgcc_s*.* libstdc++*.* || die
110
111 # other not needed
112 rm -rf ${BINDIR}/$(mlibdir) || die
113 rm -rf ${BINDIR}/usr/{bin,include,share} || die
114 rm -rf ${BINDIR}/usr/libexec || die
115
116 # fix all .la files
117 # the contain invalid libpathes and they are not needed
118 local la
119 for la in $(find ${BINDIR} -name \*.la)
120 do
121 fix_la_file ${la} || die ${la}
122 done
123 }

Properties

Name Value
svn:keywords Id