/[gentoo-x86]/sys-libs/uclibc++/uclibc++-0.2.0.ebuild
Gentoo

Contents of /sys-libs/uclibc++/uclibc++-0.2.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue Oct 13 11:14:14 2009 UTC (10 years, 3 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Remove uclibc++ as planned.

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc++/uclibc++-0.2.0.ebuild,v 1.3 2006/03/04 04:26:31 vapier Exp $
4
5 inherit eutils toolchain-funcs
6
7 export CTARGET=${CTARGET:-${CHOST}}
8 if [[ ${CTARGET} == ${CHOST} ]] ; then
9 if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
10 export CTARGET=${CATEGORY/cross-}
11 fi
12 fi
13
14 DESCRIPTION="embedded C++ library"
15 HOMEPAGE="http://cxx.uclibc.org/"
16 SRC_URI="http://cxx.uclibc.org/src/uClibc++-${PV}.tbz"
17
18 LICENSE="GPL-2"
19 [[ ${CTARGET} != ${CHOST} ]] \
20 && SLOT="${CTARGET}" \
21 || SLOT="0"
22 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~x86"
23 IUSE="debug static"
24
25 DEPEND=""
26
27 S=${WORKDIR}/uClibc++-${PV}
28
29 src_unpack() {
30 cp "${DISTDIR}"/${A} ${A}2
31 unpack ./${A}2
32 cd "${S}"
33 make -s defconfig || die "defconfig failed"
34
35 local target
36 case $(tc-arch ${CTARGET}) in
37 alpha) target="alpha";;
38 amd64) target="x86_64";;
39 arm) target="arm";;
40 hppa) target="hppa";;
41 mips) target="mips";;
42 ppc) target="powerpc";;
43 x86) target="i386";;
44 *) die "$(tc-arch ${CTARGET}) lists no defaults :/";;
45 esac
46
47 sed -i \
48 -e '/^UCLIBCXX_RUNTIME_PREFIX=/d' \
49 -e '/^TARGET_'${target}'/d' \
50 .config
51
52 echo "UCLIBCXX_RUNTIME_PREFIX=\"/usr/${CTARGET}\"" >> .config
53 echo "TARGET_${target}=y" >> .config
54 use debug && echo "CONFIG_DODEBUG=y" >> .config
55
56 yes "" | make -s oldconfig || die "oldconfig failed"
57
58 # has to come after make oldconfig, else it will be disabled
59 echo "BUILD_STATIC_LIB=y" >> .config
60 if use static ; then
61 echo "BUILD_ONLY_STATIC_LIB=y" >> .config
62 fi
63 }
64
65 src_compile() {
66 emake -j1 ARCH_CFLAGS="${CFLAGS}" CROSS=${CTARGET}- || die "make failed"
67 }
68
69 src_test() {
70 make test || die "test failed"
71 }
72
73 src_install() {
74 make install PREFIX="${D}" || die
75 dodir /usr/bin
76 dosym /usr/${CTARGET}/bin/g++-uc /usr/bin/g++-uc
77 dodoc ChangeLog README TODO
78 }

  ViewVC Help
Powered by ViewVC 1.1.20