Ticket #38119: Portfile

File Portfile, 2.4 KB (added by cooljeanius (Eric Gallager), 12 years ago)

My fork of the kernel-tools portfile (I call it "kernel-tools-slim")

Line 
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
4PortSystem        1.0
5
6name              kernel-tools-slim
7version           8J2135
8categories        sysutils
9maintainers       sfiera gwmail.gwu.edu:egall openmaintainer
10license           BSD
11description       Tools required to build xnu for Darwin 8 on Intel
12long_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
16homepage          http://kernel.macosforge.org/
17master_sites      http://www.macosforge.org/files
18distfiles         kernel-tools-${version}.root.tar.gz
19checksums         md5  e47e75b43211a9094875d60502cc4e35 \
20                  sha1 c91733821d9bb2420c228099fa85437b347fbe2c
21
22platforms         darwin
23
24default_variants  universal
25
26configure {
27  system -W ${worksrcpath} "uname -a"
28}
29
30build {
31  ui_msg "Running ls -R..."
32  system -W ${worksrcpath} "ls -R"
33}
34
35pre-extract {
36  xinstall -d ${worksrcpath}
37}
38
39extract.dir ${worksrcpath}
40
41destroot {
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
67post-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
77livecheck.type  none