Annotation of /trunk/toolchain/toolchain-util-linux/toolchain-util-linux-2.12q-r2.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: 2923 byte(s)
Mon Jul 4 00:41:38 2005 UTC (19 years, 2 months ago) by niro
File size: 2923 byte(s)
new toolchain create utilities and smages
1 | niro | 153 | # $Header: /home/cvsd/magellan-cvs/magellan-src/toolchain/toolchain-util-linux/toolchain-util-linux-2.12q-r2.smage2,v 1.1 2005-07-04 00:41:38 niro Exp $ |
2 | |||
3 | PNAME="toolchain-util-linux" | ||
4 | PVER="2.12q" | ||
5 | PBUILD="r2" | ||
6 | |||
7 | SRCFILE="util-linux-${PVER}.tar.bz2" | ||
8 | SRCDIR="${BUILDDIR}/util-linux-${PVER}" | ||
9 | |||
10 | SRC_URI=( | ||
11 | mirror://util-linux/${SRCFILE} | ||
12 | mirror://util-linux/util-linux-2.11z-parallel-make.patch | ||
13 | mirror://util-linux/no-symlink-resolve.patch | ||
14 | mirror://util-linux/util-linux-2.11z-agetty-domainname-option.patch | ||
15 | mirror://util-linux/util-linux-${PVER}-i18n-update.patch | ||
16 | mirror://util-linux/util-linux-2.12i-nfsv4.patch | ||
17 | mirror://util-linux/util-linux-2.12i-ignore-managed.patch | ||
18 | mirror://util-linux/util-linux-2.12i-pic.patch | ||
19 | mirror://util-linux/util-linux-2.12p-swapon-check-symlinks.patch | ||
20 | mirror://util-linux/util-linux-${PVER}-cramfs-1.patch | ||
21 | ) | ||
22 | |||
23 | # needs: glibc, ncurses-5.2-r2 | ||
24 | # build: sed, perl, gettext, kernel-headers | ||
25 | #compile time: 0m58.893s (Athlon XP 1900+, 512mb DDR400) | ||
26 | |||
27 | ## global toolchain var ## | ||
28 | # export CFLAGS, CHOST, TOOLCHAIN_PREFIX | ||
29 | export CFLAGS="-mtune=i486 -Os -pipe" | ||
30 | export CXXFLAGS="${CFLAGS}" | ||
31 | export TOOLCHAIN_PREFIX="/tools" | ||
32 | |||
33 | src_prepare() { | ||
34 | munpack ${SRCFILE} || die | ||
35 | cd ${SRCDIR} | ||
36 | |||
37 | # fixes parallel makes | ||
38 | mpatch -Np1 util-linux-2.11z-parallel-make.patch || die | ||
39 | # fixes some issues with devfs | ||
40 | mpatch -Np1 no-symlink-resolve.patch || die | ||
41 | # adds the -O option | ||
42 | mpatch -Np1 util-linux-2.11z-agetty-domainname-option.patch || die | ||
43 | # fix some typos in the french locale | ||
44 | mpatch -Np0 util-linux-${PVER}-i18n-update.patch || die | ||
45 | # add nfs4 support | ||
46 | mpatch -Np1 util-linux-2.12i-nfsv4.patch || die | ||
47 | # no kudzu manages (-> hal) | ||
48 | mpatch -Np1 util-linux-2.12i-ignore-managed.patch || die | ||
49 | # allows build with -fPIC | ||
50 | mpatch -Np1 util-linux-2.12i-pic.patch || die | ||
51 | # swap has issues with symlinks | ||
52 | mpatch -Np1 util-linux-2.12p-swapon-check-symlinks.patch || die | ||
53 | # fixes some compile issues with cramfs and >= linux-libc-headers-2.6.9 | ||
54 | # note: will never be upstream | ||
55 | mpatch -Np1 util-linux-${PVER}-cramfs-1.patch || die | ||
56 | |||
57 | # fhs compatibility | ||
58 | sed -i -e 's%etc/adjtime%var/lib/hwclock/adjtime%' hwclock/hwclock.c || die | ||
59 | |||
60 | # force use of our ${CLFAGS} and man/info path fix | ||
61 | sed -i \ | ||
62 | -e "s:-pipe -O2 \$(CPUOPT) -fomit-frame-pointer:${CFLAGS}:" \ | ||
63 | -e "s:CPU=.*:CPU=${CHOST%%-*}:" \ | ||
64 | -e "s:usr/man:usr/share/man:" \ | ||
65 | -e "s:usr/info:usr/share/info:" \ | ||
66 | MCONFIG || die | ||
67 | |||
68 | # disable build of nls | ||
69 | sed -i -e 's/DISABLE_NLS=no/DISABLE_NLS=yes/' MCONFIG || die | ||
70 | } | ||
71 | |||
72 | src_compile() { | ||
73 | cd ${SRCDIR} | ||
74 | |||
75 | ./configure --host=${CHOST} || die | ||
76 | |||
77 | # libs are needed to compile mount & more | ||
78 | make -C lib || die | ||
79 | |||
80 | # compile mount && more only | ||
81 | make -C mount mount umount || die | ||
82 | make -C text-utils more || die | ||
83 | } | ||
84 | |||
85 | src_install() { | ||
86 | cd ${SRCDIR} | ||
87 | |||
88 | # needed directories | ||
89 | install -d ${BINDIR}${TOOLCHAIN_PREFIX}/bin || die | ||
90 | |||
91 | install -m 0755 -o root -g root \ | ||
92 | mount/{,u}mount text-utils/more \ | ||
93 | ${BINDIR}${TOOLCHAIN_PREFIX}/bin || die | ||
94 | } |