Changeset 129506


Ignore:
Timestamp:
Dec 15, 2014, 12:11:38 AM (3 years ago)
Author:
ionic@…
Message:

PortGroup/{github,bitbucket}: rename source archives containing a top level dir of project-name-hash instead of name-version.

This patch enables the post-extract hook for all ports appending some
distfile location to ${master_sites}, as long as the original github or
bitbucket source is left intact within the ${master_sites} list.

Remove workarounds needed in a few ports to achieve exactly this.

Location:
trunk/dports
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/bitbucket-1.0.tcl

    r126059 r129506  
    4343
    4444default bitbucket.homepage {https://bitbucket.org/${bitbucket.author}/${bitbucket.project}}
     45
     46# Later code assumes that bitbucket.master_sites is a simple string, not a list.
    4547default bitbucket.master_sites {${bitbucket.homepage}/get}
    4648default bitbucket.tarball_from {tags}
     
    9193
    9294    post-extract {
     95        # It is assumed that bitbucket.master_sites is a simple string, not a list.
     96        # Here be dragons.
    9397        if {![file exists ${worksrcpath}] && \
    9498            ${fetch.type} eq "standard" && \
    95             ${master_sites} eq ${bitbucket.master_sites} && \
     99            [lsearch -exact ${master_sites} ${bitbucket.master_sites}] != -1 && \
    96100            [llength ${distfiles}] > 0 && \
    97101            [llength [glob -nocomplain ${workpath}/*]] > 0} {
  • trunk/dports/_resources/port1.0/group/github-1.0.tcl

    r125636 r129506  
    114114default github.homepage {https://github.com/${github.author}/${github.project}}
    115115default github.raw {https://raw.githubusercontent.com/${github.author}/${github.project}}
     116
     117# Later code assumes that github.master_sites is a simple string, not a list.
    116118default github.master_sites {${github.homepage}/tarball/[join ${github.tag_prefix} ""]${github.version}}
    117119
     
    167169        # directory to the value of distname (not worksrcdir: ports may want to
    168170        # set worksrcdir to a subdirectory of the extracted directory).
     171        # It is assumed that github.master_sites is a simple string, not a list.
     172        # Here be dragons.
    169173        if {![file exists ${worksrcpath}] && \
    170174                ${fetch.type} eq "standard" && \
    171                 ${master_sites} eq ${github.master_sites} && \
     175                [lsearch -exact ${master_sites} ${github.master_sites}] != -1 && \
    172176                [llength ${distfiles}] > 0 && \
    173177                [llength [glob -nocomplain ${workpath}/*]] > 0} {
  • trunk/dports/graphics/MyPaint/Portfile

    r126531 r129506  
    151151
    152152    post-extract {
    153         eval move [glob ${workpath}/mypaint-mypaint-*] ${workpath}/mypaint-${git.branch}
    154153        delete ${workpath}/mypaint-${git.branch}/brushlib
    155154        eval move [glob ${workpath}/mypaint-libmypaint-*] ${workpath}/mypaint-${git.branch}/brushlib
  • trunk/dports/sysutils/peco/Portfile

    r125722 r129506  
    6161set gopath      ${workpath}/GOPATH
    6262post-extract {
    63     move [glob ${workpath}/peco-*] ${worksrcpath}
    6463    file mkdir ${gopath}/src/github.com/peco
    6564    ln -s ${worksrcpath} ${gopath}/src/github.com/peco/peco
Note: See TracChangeset for help on using the changeset viewer.