RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/portdestroot.tcl,v
retrieving revision 1.14
diff -u -r1.14 portdestroot.tcl
|
|
|
39 | 39 | target_postrun ${com.apple.destroot} destroot_finish |
40 | 40 | |
41 | 41 | # define options |
42 | | options destroot.target destroot.destdir destroot.clean |
| 42 | options destroot.target destroot.destdir destroot.clean destroot.keepdirs |
43 | 43 | commands destroot |
44 | 44 | |
45 | 45 | # Set defaults |
… |
… |
|
50 | 50 | default destroot.post_args {${destroot.destdir}} |
51 | 51 | default destroot.destdir {DESTDIR=${destroot}} |
52 | 52 | default destroot.clean no |
| 53 | default destroot.keepdirs "" |
53 | 54 | |
54 | 55 | set_ui_prefix |
55 | 56 | |
… |
… |
|
79 | 80 | global UI_PREFIX destroot prefix portname |
80 | 81 | |
81 | 82 | # Prune empty directories in ${destroot} |
82 | | catch {system "find \"${destroot}\" -depth -type d -exec rmdir -- \{\} \\; 2>/dev/null"} |
| 83 | set exclude_dirs [list] |
| 84 | set exclude_phrase "" |
| 85 | foreach path [option destroot.keepdirs] { |
| 86 | lappend exclude_dirs "-path \"${path}\"" |
| 87 | } |
| 88 | if { [llength ${exclude_dirs}] > 0 } { |
| 89 | set exclude_phrase "! \\( [join ${exclude_dirs} " -or "] \\)" |
| 90 | } |
| 91 | catch {system "find \"${destroot}\" -depth -type d ${exclude_phrase} -exec rmdir -- \{\} \\; 2>/dev/null"} |
83 | 92 | |
84 | 93 | # Compress all manpages with gzip (instead) |
85 | 94 | set manpath "${destroot}${prefix}/share/man" |