Contents of /trunk/toolchain/toolchain-tar/toolchain-tar-1.15.1-r1.smage2
Parent Directory | Revision Log
Revision 153 -
(show annotations)
(download)
Mon Jul 4 00:41:38 2005 UTC (19 years, 2 months ago) by niro
File size: 1527 byte(s)
Mon Jul 4 00:41:38 2005 UTC (19 years, 2 months ago) by niro
File size: 1527 byte(s)
new toolchain create utilities and smages
1 | # $Header: /home/cvsd/magellan-cvs/magellan-src/toolchain/toolchain-tar/toolchain-tar-1.15.1-r1.smage2,v 1.1 2005-07-04 00:41:38 niro Exp $ |
2 | |
3 | PNAME="toolchain-tar" |
4 | PVER="1.15.1" |
5 | PBUILD="r1" |
6 | |
7 | SRCFILE="tar-${PVER}.tar.bz2" |
8 | SRCDIR="${BUILDDIR}/tar-${PVER}" |
9 | |
10 | SRC_URI=( |
11 | mirror://tar/${SRCFILE} |
12 | mirror://tar/tar-${PVER}-sparse_fix-1.patch |
13 | ) |
14 | |
15 | ## global toolchain var ## |
16 | # export CFLAGS, CHOST, TOOLCHAIN_PREFIX |
17 | export CFLAGS="-mtune=i486 -Os -pipe" |
18 | export CXXFLAGS="${CFLAGS}" |
19 | export TOOLCHAIN_PREFIX="/tools" |
20 | |
21 | zapmost() { |
22 | local rootdir |
23 | rootdir="${1}/" |
24 | [ ! -e "$rootdir" ] && echo "zapmost: $rootdir not found; skipping..." && return 1 |
25 | install -d ${BUILDDIR}/zap |
26 | local dirs |
27 | shift |
28 | local x |
29 | for x in ${*} |
30 | do |
31 | if [ "${x##*/}" = "${x}" ] |
32 | then |
33 | #one deep |
34 | mv ${rootdir}${x} ${BUILDDIR}/zap |
35 | else |
36 | #more than one deep; create intermediate directories |
37 | dirs=${x%/*} |
38 | install -d ${BUILDDIR}/zap/${dirs} |
39 | mv ${rootdir}${x} ${BUILDDIR}/zap/${x} |
40 | fi |
41 | done |
42 | rm -rf ${rootdir}* |
43 | mv ${BUILDDIR}/zap/* ${rootdir} |
44 | } |
45 | |
46 | src_prepare() { |
47 | munpack ${SRCFILE} || die |
48 | cd ${SRCDIR} |
49 | |
50 | # fixes the -S bug with files > 4GB |
51 | mpatch -Np1 tar-${PVER}-sparse_fix-1.patch || die |
52 | } |
53 | |
54 | src_compile() { |
55 | cd ${SRCDIR} |
56 | |
57 | ./configure \ |
58 | --host=${CHOST} \ |
59 | --prefix=${TOOLCHAIN_PREFIX} \ |
60 | --disable-dependency-tracking \ |
61 | --disable-nls \ |
62 | || die |
63 | |
64 | mmake || die |
65 | } |
66 | |
67 | src_install() { |
68 | cd ${SRCDIR} |
69 | |
70 | make DESTDIR=${BINDIR} install || die |
71 | |
72 | # remove unwanted stuff |
73 | KEEPFILES="bin/tar" |
74 | zapmost ${BINDIR}/${TOOLCHAIN_PREFIX} ${KEEPFILES} || die |
75 | } |