1 | # $Id: Portfile 22478 2007-03-02 05:16:40Z pipping@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name mipsel-linux-uclib |
---|
6 | version 0.9.27 |
---|
7 | categories cross |
---|
8 | platforms darwin |
---|
9 | maintainers nomaintainer@macports.org |
---|
10 | description uClib library for mipsel-linux cross development |
---|
11 | long_description ${description} |
---|
12 | |
---|
13 | homepage http://www.uclibc.org/ |
---|
14 | master_sites http://www.uclibc.org/downloads/ |
---|
15 | distname uClibc-${version} |
---|
16 | checksums sha1 e0de53949998253e25e6b946b564062babb723b4 |
---|
17 | use_bzip2 yes |
---|
18 | |
---|
19 | patchfiles patch-Makefile 100-gcc4_fix.patch \ |
---|
20 | 110-inet6_hosts_resolve.patch 120-more_standard_math.patch |
---|
21 | |
---|
22 | dist_subdir uclib |
---|
23 | |
---|
24 | depends_build port:coreutils |
---|
25 | depends_lib port:mipsel-linux-binutils port:mipsel-linux-gcc34 |
---|
26 | |
---|
27 | set target mipsel-linux-uclibc |
---|
28 | set htarget mipsel-linux |
---|
29 | set cprefix ${prefix}/cross/${target} |
---|
30 | |
---|
31 | extract.post_args "| tar -xf - --exclude '.cvsignore'" |
---|
32 | |
---|
33 | post-extract { |
---|
34 | file copy ${filespath}/config.mips ${worksrcpath}/.config |
---|
35 | } |
---|
36 | |
---|
37 | patch.pre_args -p1 |
---|
38 | post-patch { |
---|
39 | reinplace "s|.*UCLIBC_HAS_LFS.*|UCLIBC_HAS_LFS=n|g" ${worksrcpath}/.config |
---|
40 | reinplace "s|.*UCLIBC_HAS_WCHAR.*|UCLIBC_HAS_WCHAR=y|g" ${worksrcpath}/.config |
---|
41 | reinplace "s|^KERNEL_SOURCE=.*|KERNEL_SOURCE=${prefix}/cross/mipsel-linux-uclibc/include/linux/|g" \ |
---|
42 | ${worksrcpath}/.config |
---|
43 | } |
---|
44 | |
---|
45 | use_configure no |
---|
46 | |
---|
47 | build.env PATH=${cprefix}/bin:$env(PATH) |
---|
48 | build.args PREFIX= DEVEL_PREFIX=/ RUNTIME_PREFIX=/ \ |
---|
49 | HOSTCC=/usr/bin/gcc CROSS=${target}- |
---|
50 | build.target all |
---|
51 | |
---|
52 | pre-destroot { |
---|
53 | xinstall -m 755 -d ${destroot}${cprefix}/uclibc/usr/lib |
---|
54 | } |
---|
55 | destroot.target install_runtime install_dev |
---|
56 | destroot.args PREFIX=${destroot}${cprefix}/uclibc DEVEL_PREFIX=/usr/ \ |
---|
57 | RUNTIME_PREFIX=/ HOSTCC=gcc |
---|
58 | destroot.destdir |
---|
59 | post-destroot { |
---|
60 | file delete -force ${destroot}${cprefix}/uclibc/usr/include |
---|
61 | } |
---|
62 | |
---|