Contents of /branches/branch-xorg18/core/libstdc++-v3/libstdc++-v3-3.3.6-r8.smage2
Parent Directory | Revision Log
Revision 5192 -
(show annotations)
(download)
Tue Apr 6 21:54:10 2010 UTC (14 years, 5 months ago) by niro
File size: 3218 byte(s)
Tue Apr 6 21:54:10 2010 UTC (14 years, 5 months ago) by niro
File size: 3218 byte(s)
created branch 'branch-xorg18'
1 | # $Id$ |
2 | |
3 | PNAME="libstdc++-v3" |
4 | PVER="3.3.6" |
5 | PBUILD="r8" |
6 | |
7 | PCATEGORIE="sys-libs" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="Compat GNU C++ version 3 library." |
11 | HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html" |
12 | |
13 | DEPEND=">= sys-apps/base-files-0.1" |
14 | |
15 | SDEPEND=">= sys-dev/binutils-2.20 |
16 | >= virtual/kernel-headers" |
17 | |
18 | SRCFILE="gcc-${PVER}.tar.bz2" |
19 | SRCDIR="${BUILDDIR}/gcc-${PVER}" |
20 | |
21 | sminclude cleanutils mtools |
22 | |
23 | SRC_URI=( |
24 | gnu://gcc/${SRCFILE} |
25 | mirror://gcc/${SRCFILE} |
26 | mirror://gcc/gcc-${PVER}-no_fixincludes-1.patch |
27 | mirror://gcc/gcc-${PVER}-magellan-version.patch |
28 | ) |
29 | |
30 | # stripping is not allowed |
31 | export NOSTRIP=true |
32 | |
33 | # prevent issues with gcc-3.4.x |
34 | export CFLAGS="-O" |
35 | export CXXFLAGS="-O" |
36 | |
37 | # check for crosscompile or export default CHOST |
38 | if [[ -z ${CCHOST} ]] |
39 | then |
40 | # no crosscompile defined |
41 | export CCHOST=${CHOST} |
42 | else |
43 | # use crosscompile host |
44 | export CCHOST=${CCHOST} |
45 | fi |
46 | |
47 | src_prepare() |
48 | { |
49 | munpack ${SRCFILE} || die |
50 | cd ${SRCDIR} |
51 | |
52 | mpatch gcc-${PVER}-no_fixincludes-1.patch || die |
53 | mpatch gcc-${PVER}-magellan-version.patch || die |
54 | |
55 | # suppress installation of libiberty, as we will be |
56 | # using the one from binutils |
57 | sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || die |
58 | |
59 | install -d ${SRCDIR}/build || die |
60 | cd ${SRCDIR}/build |
61 | } |
62 | |
63 | src_compile() |
64 | { |
65 | cd ${SRCDIR}/build |
66 | |
67 | # configure only with c++ |
68 | ../configure \ |
69 | --host=${CHOST} \ |
70 | --target=${CCHOST} \ |
71 | --prefix=/usr \ |
72 | --mandir=/usr/share/man \ |
73 | --infodir=/usr/share/info \ |
74 | --libdir=/usr/$(mlibdir) \ |
75 | --libexecdir=/usr/$(mlibdir) \ |
76 | --enable-shared \ |
77 | --enable-threads=posix \ |
78 | --enable-__cxa_atexit \ |
79 | --enable-clocale=gnu \ |
80 | --disable-checking \ |
81 | --disable-libunwind-exceptions \ |
82 | --with-system-zlib \ |
83 | --enable-long-long \ |
84 | --enable-cstdio=stdio \ |
85 | --enable-languages=c++ \ |
86 | || die |
87 | |
88 | touch ${SRCDIR}/gcc/c-gperf.h || die |
89 | |
90 | # build only libstdc++ |
91 | mmake all-target-libstdc++-v3 || die |
92 | } |
93 | |
94 | src_install() |
95 | { |
96 | cd ${SRCDIR}/build |
97 | minstalldir /etc/env.d || die |
98 | minstalldir /usr/$(mlibdir)/libstdc++-v3 || die |
99 | |
100 | make prefix=/usr \ |
101 | bindir=/usr/bin \ |
102 | includedir=/usr/include \ |
103 | datadir=/usr/share \ |
104 | mandir=/usr/share/man \ |
105 | infodir=/usr/share/info \ |
106 | DESTDIR=${BINDIR} \ |
107 | LIBPATH=/usr/$(mlibdir) \ |
108 | install-target-libstdc++-v3 || die |
109 | |
110 | # deletes everything excluding libstdc++*.* |
111 | zapmost ${BINDIR}/usr/$(mlibdir) libstdc++.so.* libstdc++-v3 || die |
112 | |
113 | # clean up the other stuff |
114 | rm -rf ${BINDIR}/$(mlibdir) || die |
115 | rm -rf ${BINDIR}/usr/{include,share} || die |
116 | |
117 | # now move the libs to a proper location |
118 | mv ${BINDIR}/usr/$(mlibdir)/libstdc++.so.* ${BINDIR}/usr/$(mlibdir)/libstdc++-v3 || die |
119 | |
120 | # for x86_64 doing the same for /usr/lib as well (-m32 libs) |
121 | if [[ ${ARCH} = x86_64 ]] |
122 | then |
123 | minstalldir /usr/lib/libstdc++-v3 || die |
124 | zapmost ${BINDIR}/usr/lib libstdc++.so.* libstdc++-v3 || die |
125 | mv ${BINDIR}/usr/lib/libstdc++.so.* ${BINDIR}/usr/lib/libstdc++-v3 || die |
126 | fi |
127 | |
128 | # strip the libraries |
129 | find ${BINDIR} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded || die |
130 | |
131 | # environment |
132 | echo "LDPATH=\"/usr/$(mlibdir)/libstdc++-v3\"" > ${BINDIR}/etc/env.d/99libstdc++-v3 || die |
133 | if [[ ${ARCH} = x86_64 ]] |
134 | then |
135 | echo 'LDPATH="/usr/lib/libstdc++-v3"' >> ${BINDIR}/etc/env.d/99libstdc++-v3 || die |
136 | fi |
137 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |