blob: d9f905b42e210f3db14033e2fe3f6921b750281f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Copyright 1999-2010 Gentoo Foundation
# Copyright 2010 Nokia Corporation and/or its subsidiary(-ies)
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=2
inherit eutils
DESCRIPTION="Symbian ADT Sourcery G++ Lite for ARM SymbianOS"
HOMEPAGE="http://www.codesourcery.com/sgpp/lite/arm/portal/release1258"
SRC_URI="http://www.codesourcery.com/sgpp/lite/arm/portal/package6321/arm-none-symbianelf/symbian-adt-4.4-172-arm-none-symbianelf.bin"
LICENSE="sourcery-g++"
RESTRICT="binchecks mirror strip"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""
DEPEND="amd64? (
app-emulation/emul-linux-x86-baselibs
sys-libs/glibc[multilib]
)"
RDEPEND="$DEPEND"
src_unpack() {
mkdir ${S}
cp ${DISTDIR}/${A} ${S}
}
src_compile() {
true
}
src_install() {
# Try to use hardlinks for libraries if possible, but fall back if not.
link_flag=-l
chroot_dev=`stat -c %d ${S}`
for link_dir in /bin /usr/bin /lib* /usr/lib*; do
[ `stat -c %d $link_dir` -ne $chroot_dev ] && link_flag=
done
mkdir ${S}/bin
cp $link_flag /bin/* ${S}/bin
cp $link_flag -r /lib* ${S}
mkdir -p usr/bin
cp $link_flag /usr/bin/awk usr/bin
cp $link_flag /usr/bin/cksum usr/bin
cp $link_flag /usr/bin/which usr/bin
cp $link_flag -r /usr/lib* ${S}/usr
mkdir -p proc tmp
cp -dr /dev .
cp ${FILESDIR}/install-script.sh .
chmod ugo+x install-script.sh
# addwrite is for chroot to work.
addwrite /
einfo "Launching installer..."
chroot ${S} /bin/bash install-script.sh || die "chroot failed"
mkdir -p ${D}/usr
cp -r usr/arm-none-symbianelf ${D}/usr
einfo "Fixing file permissions..."
find ${D}usr/arm-none-symbianelf -print0 | xargs -0 chmod o-w
einfo "Adding symlinks..."
mkdir ${D}usr/bin
pushd ${D}usr/bin
ln -s ../arm-none-symbianelf/bin/* .
popd
einfo "Removing unneeded files..."
rm -rf ${D}usr/arm-none-symbianelf/[Uu]ninstall*
rm -rf ${D}usr/arm-none-symbianelf/jre
}
|