Annotation of /trunk/toolchain/toolchain-nano/toolchain-nano-1.3.2-r3.smage2
Parent Directory | Revision Log
Revision 153 -
(hide annotations)
(download)
Mon Jul 4 00:41:38 2005 UTC (19 years, 2 months ago) by niro
File size: 1465 byte(s)
Mon Jul 4 00:41:38 2005 UTC (19 years, 2 months ago) by niro
File size: 1465 byte(s)
new toolchain create utilities and smages
1 | niro | 153 | # $Header: /home/cvsd/magellan-cvs/magellan-src/toolchain/toolchain-nano/toolchain-nano-1.3.2-r3.smage2,v 1.1 2005-07-04 00:41:38 niro Exp $ |
2 | |||
3 | PNAME="toolchain-nano" | ||
4 | PVER="1.3.2" | ||
5 | PBUILD="r3" | ||
6 | |||
7 | SRCFILE="nano-${PVER}.tar.gz" | ||
8 | SRCDIR="$BUILDDIR/nano-${PVER}" | ||
9 | |||
10 | SRC_URI=( | ||
11 | mirror://nano/${SRCFILE} | ||
12 | mirror://nano/1.3-nanopermsfix.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 | |||
47 | src_prepare() { | ||
48 | munpack ${SRCFILE} || die | ||
49 | cd ${SRCDIR} || die | ||
50 | |||
51 | # fixes some umask issues with nano-1.3.2 | ||
52 | mpatch -Np1 1.3-nanopermsfix.patch || die | ||
53 | } | ||
54 | |||
55 | src_compile() { | ||
56 | cd ${SRCDIR} || die | ||
57 | |||
58 | ./configure \ | ||
59 | --host=${CHOST} \ | ||
60 | --prefix=${TOOLCHAIN_PREFIX} \ | ||
61 | --enable-color \ | ||
62 | --enable-multibuffer \ | ||
63 | --enable-nano-rc \ | ||
64 | --disable-nls \ | ||
65 | || die | ||
66 | |||
67 | mmake || die | ||
68 | } | ||
69 | |||
70 | src_install() { | ||
71 | cd ${SRCDIR} || die | ||
72 | make DESTDIR=${BINDIR} install || die | ||
73 | } |