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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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} {
Note: See TracChangeset for help on using the changeset viewer.