Opened 20 years ago

Last modified 8 years ago

#2064 closed enhancement

vim port (dports/editors/vim/Portfile — at Initial Version

Reported by: jq@… Owned by: darwinports-bugs@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port: vim

Description

The current implementation fetches 1 file per patch level. The patches are also available in chunks of 100 (e.g. 6.2.001-100.gz, 6.2.101-200.gz,...) Thus O(N) is used where O((N/100) +(N%100)) is available. At the current patch level 532 this fetches 532 files when 37 would suffice.

I was not sure what is kosher in Portfiles, so did not complete the work by uncompressing the gzipped patchfiles or modifying patch_checksums. I merely tested by confirming that port -d configure, fetched all sources and patches.

Included find a diff -u of a Portfile illustrating the general form of a fix. --- Portfile.orig Wed Jun 2 19:30:37 2004 +++ Portfile Fri Jul 16 13:19:08 2004 @@ -46,9 +46,30 @@

set vim_badpatches {}

-eval patchfiles [split [exec /usr/bin/jot -s " " -w \

  • [strsed $version {s/\.[0-9]*$}].%03d \
  • $vim_patchlevel 1 $vim_patchlevel] " "]

+proc list_patches {version patchnum} { + set low 1 + set patch_list [] + while { $low <= $patchnum } { + set high [expr $low + 99]; + if { $high < $patchnum } { + patchfiles-append [ format "%s.%03d-%03d.gz" $version $low $high] + incr low 100 + } { + patchfiles-append [ format "%s.%03d" $version $low] + incr low 1 + } + } +} +list_patches [strsed $version {s/\.[0-9]*$}] $vim_patchlevel + +#eval patchfiles [list_patches [strsed $version {s/\.[0-9]*$}] 534] + + + +#eval patchfiles [split [exec /usr/bin/jot -s " " -w \ +# [strsed $version {s/\.[0-9]*$}].%03d \ +# $vim_patchlevel 1 $vim_patchlevel] " "] +

foreach p ${vim_badpatches} {

patchfiles-delete 6.2.${p}

Change History (1)

Changed 20 years ago by jq@…

Attachment: vimport.patch added

Just the patch in a separate file

Note: See TracTickets for help on using tickets.