Contents of /trunk/toolchain/toolchain-perl/toolchain-perl-5.8.6-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: 1485 byte(s)
Mon Jul 4 00:41:38 2005 UTC (19 years, 2 months ago) by niro
File size: 1485 byte(s)
new toolchain create utilities and smages
1 | # $Header: /home/cvsd/magellan-cvs/magellan-src/toolchain/toolchain-perl/toolchain-perl-5.8.6-r1.smage2,v 1.1 2005-07-04 00:41:38 niro Exp $ |
2 | |
3 | PNAME="toolchain-perl" |
4 | PVER="5.8.6" |
5 | PBUILD="r1" |
6 | |
7 | SRCFILE="perl-${PVER}.tar.bz2" |
8 | SRCDIR="${BUILDDIR}/perl-${PVER}" |
9 | |
10 | SRC_URI=( |
11 | mirror://perl/${SRCFILE} |
12 | mirror://perl/perl-5.8.0-libc-3.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 | } |
50 | |
51 | src_compile() { |
52 | cd ${SRCDIR} |
53 | |
54 | # minimal static extensions: -Dstatic_ext='IO Fcntl POSIX' |
55 | ./configure.gnu \ |
56 | -Dhost=${CHOST} \ |
57 | -Dtarget=${CHOST} \ |
58 | -Darchname=${CHOST} \ |
59 | -Doptimize="${CFLAGS}" \ |
60 | -Dpager="/bin/less -isR" \ |
61 | -Dcf_by='Magellan' \ |
62 | --prefix=${TOOLCHAIN_PREFIX} \ |
63 | -Dstatic_ext='IO Fcntl POSIX' \ |
64 | || die |
65 | |
66 | make || die |
67 | } |
68 | |
69 | src_install() { |
70 | cd ${SRCDIR} |
71 | make DESTDIR=${BINDIR} install || die |
72 | } |