<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/2f9ae24dc6469c416792fbe2945a1712a681eb65">https://github.com/macports/macports-ports/commit/2f9ae24dc6469c416792fbe2945a1712a681eb65</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 2f9ae24dc64 github pg: use extract.rename if available
</span>2f9ae24dc64 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 2f9ae24dc6469c416792fbe2945a1712a681eb65
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Jan 7 07:21:34 2023 +1100
<span style='display:block; white-space:pre;color:#404040;'> github pg: use extract.rename if available
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> See: https://github.com/macports/macports-ports/pull/17230
</span>---
_resources/port1.0/group/github-1.0.tcl | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/github-1.0.tcl b/_resources/port1.0/group/github-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index ac09ce6a126..c0f29c229c7 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/github-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/github-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -31,15 +31,28 @@ proc handle_tarball_from {option action args} {
</span> switch ${args} {
downloads {
github.master_sites https://github.com/downloads/${github.author}/${github.project}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[exists extract.rename]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default extract.rename no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
releases {
github.master_sites ${github.homepage}/releases/download/${git.branch}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[exists extract.rename]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default extract.rename no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
archive {
github.master_sites ${github.homepage}/archive/${git.branch}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[exists extract.rename]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default extract.rename no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default worksrcdir {${github.project}-${git.branch}}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
tarball {
github.master_sites https://codeload.github.com/${github.author}/${github.project}/legacy.tar.gz/${git.branch}?dummy=
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[exists extract.rename]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default extract.rename yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
tags {
return -code error "the value \"tags\" is deprecated for github.tarball_from. Please use \"tarball\" instead."
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -58,8 +71,8 @@ options github.livecheck.regex
</span> default github.livecheck.regex {(\[^"]+)}
proc github.setup {gh_author gh_project gh_version {gh_tag_prefix ""} {gh_tag_suffix ""}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global extract.suffix github.author github.project github.version github.tag_prefix github.tag_suffix
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global github.homepage github.master_sites github.livecheck.branch PortInfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global extract.suffix github.author github.project github.version github.tag_prefix github.tag_suffix \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ github.homepage github.master_sites github.livecheck.branch PortInfo
</span>
github.author ${gh_author}
github.project ${gh_project}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -78,6 +91,11 @@ proc github.setup {gh_author gh_project gh_version {gh_tag_prefix ""} {gh_tag_su
</span> default master_sites {${github.master_sites}}
distname ${github.project}-${github.version}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[exists extract.rename]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default extract.rename yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # This can be removed when extract.rename has been in a release for 2 weeks.
</span> post-extract {
# When fetching from a tag, the extracted directory name will contain a
# truncated commit hash. So that the port author need not specify what
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -86,7 +104,7 @@ proc github.setup {gh_author gh_project gh_version {gh_tag_prefix ""} {gh_tag_su
</span> # set worksrcdir to a subdirectory of the extracted directory).
# It is assumed that github.master_sites is a simple string, not a list.
# Here be dragons.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![file exists ${worksrcpath}] && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![exists extract.rename] && ![file exists ${worksrcpath}] && \
</span> ${github.tarball_from} eq "tarball" && \
${fetch.type} eq "standard" && \
${github.master_sites} in ${master_sites} && \
</pre><pre style='margin:0'>
</pre>