diff --git a/_resources/port1.0/group/muniversal-1.1.tcl b/_resources/port1.0/group/muniversal-1.1.tcl
index 1a11e8005..90811fe5b 100644
a
|
b
|
proc portpatch::patch_main {args} { |
840 | 840 | set bzcat "[findBinary bzip2 $portutil::autoconf::bzip2_path] -dc" |
841 | 841 | catch {set xzcat "[findBinary xz $portutil::autoconf::xz_path] -dc"} |
842 | 842 | |
| 843 | global workpath subport |
| 844 | set statefile [file join $workpath .macports.${subport}.state] |
| 845 | set target_state_fd [open $statefile a+] |
| 846 | flush ${target_state_fd} |
843 | 847 | foreach patch $patchlist { |
844 | | ui_info "$UI_PREFIX [format [msgcat::mc "Applying %s"] [file tail $patch]]" |
845 | | switch -- [file extension $patch] { |
846 | | .Z - |
847 | | .gz {command_exec patch "$gzcat \"$patch\" | (" ")"} |
848 | | .bz2 {command_exec patch "$bzcat \"$patch\" | (" ")"} |
849 | | .xz { |
850 | | if {[info exists xzcat]} { |
851 | | command_exec patch "$xzcat \"$patch\" | (" ")" |
852 | | } else { |
853 | | return -code error [msgcat::mc "xz binary not found; port needs to add 'depends_patch bin:xz:xz'"] |
854 | | }} |
855 | | default {command_exec patch "" "< '$patch'"} |
| 848 | set pfile [file tail $patch] |
| 849 | if {![check_statefile patch $pfile $target_state_fd]} { |
| 850 | ui_info "$UI_PREFIX [format [msgcat::mc "Applying %s"] [file tail $patch]]" |
| 851 | switch -- [file extension $patch] { |
| 852 | .Z - |
| 853 | .gz {command_exec patch "$gzcat \"$patch\" | (" ")"} |
| 854 | .bz2 {command_exec patch "$bzcat \"$patch\" | (" ")"} |
| 855 | .xz { |
| 856 | if {[info exists xzcat]} { |
| 857 | command_exec patch "$xzcat \"$patch\" | (" ")" |
| 858 | } else { |
| 859 | return -code error [msgcat::mc "xz binary not found; port needs to add 'depends_patch bin:xz:xz'"] |
| 860 | }} |
| 861 | default {command_exec patch "" "< '$patch'"} |
| 862 | } |
| 863 | write_statefile patch $pfile $target_state_fd |
856 | 864 | } |
857 | 865 | } |
| 866 | close ${target_state_fd} |
858 | 867 | return 0 |
859 | 868 | } |
860 | 869 | |