<pre style='margin:0'>
Herby Gillot (herbygillot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/91d7c423073a6abbae1c761c061b365ab87dae9d">https://github.com/macports/macports-ports/commit/91d7c423073a6abbae1c761c061b365ab87dae9d</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 91d7c423073a6abbae1c761c061b365ab87dae9d
</span>Author: Kirill A. Korinsky <kirill@korins.ky>
AuthorDate: Sun May 21 04:12:14 2023 +0200
<span style='display:block; white-space:pre;color:#404040;'> codeberg: new port group
</span>---
_resources/port1.0/group/codeberg-1.0.tcl | 75 +++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/codeberg-1.0.tcl b/_resources/port1.0/group/codeberg-1.0.tcl
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..52be087cac1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/codeberg-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,75 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This PortGroup accommodates projects hosted in Gitea
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Usage:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# PortGroup codeberg 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# codeberg.setup author project 1.0.0 v
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This portgroup works very similarly to the gitea-1.0 portgroup.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# For any port that is hosted on codeberg.org this portgroup can be used to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# automatically setup details like project name, master_sites, livecheck options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# and more.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Using codeberg.setup, the format is:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# codeberg.setup <author> <project_name> <version> <version_prefix> <version_suffix>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+options codeberg.author codeberg.project codeberg.version codeberg.tag_prefix codeberg.tag_suffix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+options codeberg.homepage
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default codeberg.homepage {https://codeberg.org/${codeberg.author}/${codeberg.project}}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+options codeberg.master_sites
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default codeberg.master_sites {${codeberg.homepage}/archive}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+options codeberg.livecheck.branch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default codeberg.livecheck.branch master
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+options codeberg.livecheck.regex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default codeberg.livecheck.regex {(\[0-9]\[^<]+)}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc codeberg.setup {codeberg_author codeberg_project codeberg_version {codeberg_tag_prefix ""} {codeberg_tag_suffix ""}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global codeberg.author codeberg.project codeberg.version codeberg.tag_prefix codeberg.tag_suffix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global codeberg.homepage codeberg.master_sites codeberg.livecheck.branch codeberg.livecheck.regex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global PortInfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ codeberg.author ${codeberg_author}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ codeberg.project ${codeberg_project}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ codeberg.version ${codeberg_version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ codeberg.tag_prefix ${codeberg_tag_prefix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ codeberg.tag_suffix ${codeberg_tag_suffix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists PortInfo(name)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ name ${codeberg.project}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dist_subdir ${codeberg.project}
</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;'>+ version ${codeberg.version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default homepage ${codeberg.homepage}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ git.url ${codeberg.homepage}.git
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set _codeberg_branch [join ${codeberg.tag_prefix}]${codeberg.version}[join ${codeberg.tag_suffix}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ git.branch ${_codeberg_branch}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default master_sites ${codeberg.master_sites}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ distname ${_codeberg_branch}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</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;'>+ if {[join ${codeberg.tag_prefix}] eq "" && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [join ${codeberg.tag_suffix}] eq "" && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [regexp "^\[0-9a-f\]{7,}\$" ${codeberg.version}] && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ![regexp "^\[0-9\]{8}\$" ${codeberg.version}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ livecheck.type regexm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default livecheck.url {${codeberg.homepage}/commits/branch/${codeberg.livecheck.branch}}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ livecheck.regex commit/(\[0-9a-f\]{[string length ${codeberg.version}]})\[0-9a-f\]*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ livecheck.type regex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default livecheck.url {${codeberg.homepage}/tags.atom}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default livecheck.regex {[list tag/[join ${codeberg.tag_prefix}][join ${codeberg.livecheck.regex}][join ${codeberg.tag_suffix}]</id>]}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ livecheck.version ${codeberg.version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span></pre><pre style='margin:0'>
</pre>