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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Dec 11 16:45:50 2005 UTC (14 years, 1 month ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
old

1 # Copyright 1999-2005 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.1.9.ebuild,v 1.1 2005/01/22 05:21:29 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}.tbz2"
17
18 LICENSE="GPL-2"
19 [[ ${CTARGET} != ${CHOST} ]] \
20 && SLOT="${CTARGET}" \
21 || SLOT="0"
22 KEYWORDS="~arm ~ppc ~x86"
23 IUSE="debug static"
24
25 DEPEND=""
26
27 S=${WORKDIR}/uClibc++
28
29 src_unpack() {
30 unpack ${A}
31 cd ${S}
32 make defconfig || die "defconfig failed"
33
34 local target
35 case $(tc-arch ${CTARGET}) in
36 arm) target="arm";;
37 mips) target="mips";;
38 ppc) target="powerpc";;
39 x86) target="i386";;
40 *) die "$(tc-arch ${CTARGET}) lists no defaults :/";;
41 esac
42
43 sed -i \
44 -e '/^UCLIBCXX_RUNTIME_PREFIX=/d' \
45 -e '/^TARGET_'${target}'/d' \
46 .config
47
48 echo "UCLIBCXX_RUNTIME_PREFIX=\"/usr/${CTARGET}\"" >> .config
49 echo "TARGET_${target}=y" >> .config
50 use debug && echo "CONFIG_DODEBUG=y" >> .config
51
52 yes "" | make oldconfig || die "oldconfig failed"
53
54 # has to come after make oldconfig, else it will be disabled
55 echo "BUILD_STATIC_LIB=y" >> .config
56 if use static ; then
57 echo "BUILD_ONLY_STATIC_LIB=y" >> .config
58 fi
59 }
60
61 src_compile() {
62 emake -j1 ARCH_CFLAGS="${CFLAGS}" CROSS=${CTARGET}- || die "make failed"
63 }
64
65 src_test() {
66 make test || die "test failed"
67 }
68
69 src_install() {
70 make install PREFIX="${D}" || die
71 dodir /usr/bin
72 dosym /usr/${CTARGET}/bin/g++-uc /usr/bin/g++-uc
73 dodoc ChangeLog README TODO
74 }

  ViewVC Help
Powered by ViewVC 1.1.20