1 | # -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name kernel-tools-slim |
---|
7 | version 8J2135 |
---|
8 | categories sysutils |
---|
9 | maintainers sfiera gwmail.gwu.edu:egall openmaintainer |
---|
10 | license BSD |
---|
11 | description Tools required to build xnu for Darwin 8 on Intel |
---|
12 | long_description \ |
---|
13 | Installs a number of tools needed to build the xnu kernel for Darwin 8 on Intel, \ |
---|
14 | including (but not limited to) relpath, decomment, and seg_hack |
---|
15 | |
---|
16 | homepage http://kernel.macosforge.org/ |
---|
17 | master_sites http://www.macosforge.org/files |
---|
18 | distfiles kernel-tools-${version}.root.tar.gz |
---|
19 | checksums md5 e47e75b43211a9094875d60502cc4e35 \ |
---|
20 | sha1 c91733821d9bb2420c228099fa85437b347fbe2c |
---|
21 | |
---|
22 | platforms darwin |
---|
23 | |
---|
24 | default_variants universal |
---|
25 | |
---|
26 | configure { |
---|
27 | system -W ${worksrcpath} "uname -a" |
---|
28 | } |
---|
29 | |
---|
30 | build { |
---|
31 | ui_msg "Running ls -R..." |
---|
32 | system -W ${worksrcpath} "ls -R" |
---|
33 | } |
---|
34 | |
---|
35 | pre-extract { |
---|
36 | xinstall -d ${worksrcpath} |
---|
37 | } |
---|
38 | |
---|
39 | extract.dir ${worksrcpath} |
---|
40 | |
---|
41 | destroot { |
---|
42 | foreach top {include lib man} { |
---|
43 | fs-traverse file ${worksrcpath}/usr/local/${top} { |
---|
44 | set dest [string range $file [string length $worksrcpath/usr/local] end] |
---|
45 | if {$top == "man"} { |
---|
46 | set dest share/$dest |
---|
47 | } |
---|
48 | switch -exact [file type ${file}] { |
---|
49 | file { xinstall -m 644 ${file} ${destroot}${prefix}/${dest} } |
---|
50 | directory { xinstall -d -m 755 ${destroot}${prefix}/${dest} } |
---|
51 | link { system "ln -sf [file readlink ${file}] ${destroot}${prefix}/${dest}" } |
---|
52 | } |
---|
53 | } |
---|
54 | } |
---|
55 | foreach top {bin libexec} { |
---|
56 | fs-traverse file ${worksrcpath}/usr/local/${top} { |
---|
57 | set dest [string range $file [string length $worksrcpath/usr/local] end] |
---|
58 | switch -exact [file type ${file}] { |
---|
59 | file { xinstall -m 755 ${file} ${destroot}${prefix}/${dest} } |
---|
60 | directory { xinstall -d -m 755 ${destroot}${prefix}/${dest} } |
---|
61 | link { system "ln -sf [file readlink ${file}] ${destroot}${prefix}/${dest}" } |
---|
62 | } |
---|
63 | } |
---|
64 | } |
---|
65 | } |
---|
66 | # remove stuff supplied by cctools |
---|
67 | post-destroot { |
---|
68 | foreach bin {check_dylib checksyms indr nmedit seg_addr_table seg_hack} { |
---|
69 | delete ${destroot}${prefix}/bin/${bin} |
---|
70 | } |
---|
71 | foreach man1 {check_dylib checksyms indr seg_addr_table} { |
---|
72 | delete ${destroot}${prefix}/share/man/man1/${man1}.1 |
---|
73 | } |
---|
74 | delete ${destroot}${prefix}/share/man/man3 |
---|
75 | } |
---|
76 | |
---|
77 | livecheck.type none |
---|