Contents of /smage/trunk/core/klibc/klibc-1.5.15-r4.smage2
Parent Directory | Revision Log
Revision 117 -
(show annotations)
(download)
Thu Jan 7 09:28:35 2010 UTC (14 years, 8 months ago) by niro
File size: 2923 byte(s)
Thu Jan 7 09:28:35 2010 UTC (14 years, 8 months ago) by niro
File size: 2923 byte(s)
auto added: ver bump to 1.5.15-r4
1 | # $Id$ |
2 | |
3 | PNAME="klibc" |
4 | PVER="1.5.15" |
5 | PBUILD="r4" |
6 | |
7 | PCATEGORIE="dev-libs" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="A minimal libc subset for use with initramfs." |
11 | HOMEPAGE="http://www.kernel.org/pub/linux/libs/klibc/" |
12 | |
13 | DEPEND=">= dev-lang/perl-5" |
14 | SDEPEND=">= virtual/kernel-sources" |
15 | |
16 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
17 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
18 | |
19 | # global var: ${LINUX_SOURCES} |
20 | # location where they are |
21 | [[ -z ${LINUX_SOURCES} ]] && LINUX_SOURCES="/usr/src/linux" |
22 | |
23 | sminclude mtools |
24 | |
25 | SRC_URI=( |
26 | http://www.kernel.org/pub/linux/libs/${PNAME}/Testing/${SRCFILE} |
27 | mirror://${PNAME}/${SRCFILE} |
28 | mirror://${PNAME}/${PNAME}-1.5.14-x86_64-fix-io.h.patch |
29 | mirror://${PNAME}/${PNAME}-${PVER}-fix-2.6.29-includes.patch |
30 | mirror://${PNAME}/${PNAME}-${PVER}-signal-cleanup.patch |
31 | mirror://${PNAME}/${PNAME}-${PVER}-mntproc-definitions.patch |
32 | ) |
33 | |
34 | UP2DATE="updatecmd ${HOMEPAGE}/Testing/ | lasttarball" |
35 | |
36 | src_prepare() |
37 | { |
38 | munpack ${SRCFILE} || die |
39 | cd ${SRCDIR} |
40 | |
41 | # fix errors in io.h header |
42 | mpatch ${PNAME}-1.5.14-x86_64-fix-io.h.patch || die |
43 | |
44 | # new include-layout in 2.6.29 |
45 | mpatch ${PNAME}-${PVER}-fix-2.6.29-includes.patch || die |
46 | |
47 | # fix header changes with linux-2.6.30 |
48 | mpatch ${PNAME}-${PVER}-signal-cleanup.patch || die |
49 | |
50 | # mntproc definitions are missing in newer kernels (>=2.6.31) |
51 | mpatch ${PNAME}-${PVER}-mntproc-definitions.patch || die |
52 | |
53 | ln -snf ${LINUX_SOURCES} ${SRCDIR}/linux || die |
54 | } |
55 | |
56 | src_compile() |
57 | { |
58 | cd ${SRCDIR} |
59 | |
60 | mmake \ |
61 | ARCH=${ARCH/i*86/i386} \ |
62 | KLIBCARCH=${ARCH/i*86/i386} \ |
63 | KLIBCASMARCH=${ARCH/i*86/x86} \ |
64 | mandir=/usr/share/man \ |
65 | libdir=/usr/$(mlibdir) \ |
66 | INSTALLDIR=/usr/$(mlibdir)/klibc \ |
67 | SHLIBDIR=/$(mlibdir) \ |
68 | || die |
69 | } |
70 | |
71 | src_install() |
72 | { |
73 | cd ${SRCDIR} |
74 | |
75 | # needed directories |
76 | minstalldir /usr/share/aclocal || die |
77 | |
78 | mmake \ |
79 | ARCH=${ARCH/i*86/i386} \ |
80 | KLIBCARCH=${ARCH/i*86/i386} \ |
81 | KLIBCASMARCH=${ARCH/[i|x]*86*/x86} \ |
82 | INSTALLROOT=${BINDIR} \ |
83 | mandir=/usr/share/man \ |
84 | libdir=/usr/$(mlibdir) \ |
85 | INSTALLDIR=/usr/$(mlibdir)/klibc \ |
86 | SHLIBDIR=/$(mlibdir) \ |
87 | install || die |
88 | |
89 | # remove hardlinks; use symlinks |
90 | rm ${BINDIR}/usr/$(mlibdir)/klibc/bin/{gunzip,zcat} || die |
91 | mlink gzip /usr/$(mlibdir)/klibc/bin/gunzip || die |
92 | mlink gzip /usr/$(mlibdir)/klibc/bin/zcat || die |
93 | |
94 | # missing ac-includes |
95 | minstallfile contrib/klibc.m4 /usr/share/aclocal || die |
96 | |
97 | # # broken due the patch |
98 | # mlink asm-x86 /usr/$(mlibdir)/klibc/include/asm || die |
99 | |
100 | # remove broken symlinks |
101 | if [[ -L ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/x86} ]] |
102 | then |
103 | rm ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/x86} || die |
104 | fi |
105 | if [[ -L ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/i386} ]] |
106 | then |
107 | rm ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/i386} || die |
108 | fi |
109 | |
110 | # copy missing adm includes |
111 | cp -a linux/arch/x86/include/asm/* ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/ || die |
112 | |
113 | # docs |
114 | minstalldocs README usr/klibc/{CAVEATS,LICENSE} usr/dash/README.klibc || die |
115 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |