<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/2a876bda04bd8dc5c1b68b04c9d608aec439c748">https://github.com/macports/macports-ports/commit/2a876bda04bd8dc5c1b68b04c9d608aec439c748</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 2a876bda04bd8dc5c1b68b04c9d608aec439c748
</span>Author: Sergey Fedorov <vital.had@gmail.com>
AuthorDate: Sun May 14 02:05:05 2023 +0800
<span style='display:block; white-space:pre;color:#404040;'> fpm: use earlier version of install.sh
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Current one is prone to fails: https://github.com/fortran-lang/fpm/issues/909
</span>---
devel/fpm/Portfile | 1 +
devel/fpm/files/patch-install.diff | 31 ++++++++++++++++++++++++++-----
2 files changed, 27 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/fpm/Portfile b/devel/fpm/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index e82a3a6f9c4..af88440e712 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/fpm/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/fpm/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -44,6 +44,7 @@ patchfiles patch-install.diff
</span> post-patch {
reinplace "s,@FC@,${configure.fc}," ${worksrcpath}/install.sh
reinplace "s,@PREFIX@,${worksrcpath}${prefix}," ${worksrcpath}/install.sh
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s,@VERSION@,${version},g" ${worksrcpath}/install.sh
</span>
file attributes ${worksrcpath}/install.sh -permissions +x
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/fpm/files/patch-install.diff b/devel/fpm/files/patch-install.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 0341d113436..e4ee431d838 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/fpm/files/patch-install.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/fpm/files/patch-install.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,15 +1,36 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- install.sh.orig 2023-04-12 21:20:20.000000000 +0800
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ install.sh 2023-04-15 16:46:33.000000000 +0800
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -40,7 +40,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sed -E 's/^v//' # Remove heading "v" if present
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- install.sh.orig 2023-05-11 23:59:51.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ install.sh 2023-05-14 01:49:41.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -31,16 +31,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+-# Return value of the latest published release on GitHub, with no heading "v" (e.g., "0.7.0")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-get_latest_release()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- $2 "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- grep '"tag_name":' | # Get tag line
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sed -E 's/.*"([^"]+)".*/\1/' | # Pluck JSON value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sed -E 's/^v//' # Remove heading "v" if present
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span> -PREFIX="$HOME/.local"
+PREFIX="@PREFIX@"
while [ "$1" != "" ]; do
PARAM=$(echo "$1" | awk -F= '{print $1}')
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -82,7 +82,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -71,18 +62,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-LATEST_RELEASE=$(get_latest_release "fortran-lang/fpm" "$FETCH")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-if [ -z "$LATEST_RELEASE" ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- echo "Could not fetch the latest release from GitHub. Install curl or wget, and ensure network connectivity."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- exit 3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-SOURCE_URL="https://github.com/fortran-lang/fpm/releases/download/v${LATEST_RELEASE}/fpm-${LATEST_RELEASE}.F90"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SOURCE_URL="https://github.com/fortran-lang/fpm/releases/download/v@VERSION@/fpm-@VERSION@.F90"
</span> BOOTSTRAP_DIR="build/bootstrap"
if [ -z ${FC+x} ]; then
</pre><pre style='margin:0'>
</pre>