From 05945e4f88d59a8a2a1bc460fa27b63721cd5f04 Mon Sep 17 00:00:00 2001 From: Steven Thomas Smith Date: Sun, 25 Apr 2021 12:26:28 -0400 Subject: [PATCH] stack: Update to version rc/v2.7.0.1 Related: * https://trac.macports.org/ticket/61422 * commercialhaskell/stack#5456 * commercialhaskell/stack#5491 * https://github.com/macports/macports-ports/pull/10086 --- lang/stack/Portfile | 76 +++++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/lang/stack/Portfile b/lang/stack/Portfile index 7985dd5a3d6aa..504f4f1560193 100644 --- a/lang/stack/Portfile +++ b/lang/stack/Portfile @@ -5,7 +5,8 @@ PortGroup github 1.0 PortGroup gpg_verify 1.0 PortGroup haskell_stack 1.0 -github.setup commercialhaskell stack 2.5.1 v +github.setup commercialhaskell stack 2.7.0.1 rc/v +version ${github.version}.[lindex [split ${github.tag_prefix} /] 0] revision 0 name stack @@ -15,41 +16,48 @@ license BSD platforms darwin description The Haskell Tool Stack -long_description Stack is a cross-platform command line interface\ - for developing Haskell projects. It features:\ - installing GHC automatically, installing packages\ - needed for your project, building your project,\ - testing your project, benchmarking your project.\ - It is intended for Haskellers both new and\ - experienced. +long_description Stack is a cross-platform command line interface \ + for developing Haskell projects. It features: \ + installing GHC automatically, installing packages \ + needed for your project, building your project, \ + testing your project, benchmarking your project. \ + It is intended for Haskellers both new and experienced. homepage https://haskellstack.org variant prebuilt \ description {Do not bootstrap stack; install the pre-built binary.} {} +# workaround for stack bootstrap issue; remove after this issue is resolved +# https://github.com/commercialhaskell/stack/issues/5491 +default_variants +prebuilt + +supported_archs x86_64 + distname ${name}-${github.version}-osx-x86_64 worksrcdir ${name}-${github.version} -set worksrcpath_prebuilt \ - ${workpath}/${distname} +set github_tag_prefix_quote \ + {rc%2Fv} -master_sites ${github.homepage}/releases/download/v${github.version}:release \ - ${github.homepage}/archive:archive +master_sites ${github.homepage}/releases/download/${github_tag_prefix_quote}${github.version}:release \ + ${github.homepage}/archive/refs/tags/[lindex [split ${github.tag_prefix} /] 0]/:archive -distfiles ${distname}${extract.suffix}:release \ - v${github.version}${extract.suffix}:archive +distfiles ${distname}-bin:release \ + [lindex [split ${github.tag_prefix} /] 1]${github.version}${extract.suffix}:archive -checksums ${distname}${extract.suffix} \ - rmd160 3634157a25bf329370e26c76d8d8fca96f8721d4 \ - sha256 f4aedfa8fbe371f77286ee97ec5c3c553842e7ae15b2952a8b8442dccba04bf0 \ - size 8032226 \ - v${github.version}${extract.suffix} \ - rmd160 9d47c92ae94a961cdc4f35b08793c1f31df7906f \ - sha256 f29d63b91ff2bddd130b29ddee90a1f450706271a13d5d80b653b50379ffa076 \ - size 684865 \ - ${distname}${extract.suffix}.asc \ +extract.only [lindex [split ${github.tag_prefix} /] 1]${github.version}${extract.suffix} + +checksums ${distname}-bin \ + rmd160 3c858ee4ee7c1b64c59be3ef23a8d3641873dfe7 \ + sha256 813e673f63b544edcd7cb5f4772b6952c2f8df518f79b913600036bed66b3f5a \ + size 33467768 \ + [lindex [split ${github.tag_prefix} /] 1]${github.version}${extract.suffix} \ + rmd160 fcaf9e12522fe21e1369ad656079d6fdc1ba6149 \ + sha256 440fd140ad5e64aaeb3f61032f511cdb4be6e361af71f2b77445206433acd8a5 \ + size 686876 \ + ${distname}-bin.asc \ size 488 gpg_verify.use_gpg_verification \ @@ -57,7 +65,7 @@ gpg_verify.use_gpg_verification \ if {[option gpg_verify.use_gpg_verification]} { distfiles-append \ - ${distname}${extract.suffix}.asc:release + ${distname}-bin.asc:release post-checksum { # check GPG signature: https://docs.haskellstack.org/en/stable/SIGNING_KEY/ @@ -65,12 +73,15 @@ if {[option gpg_verify.use_gpg_verification]} { gpg_verify.verify_gpg_signature \ ${filespath}/keyid-${gpg_keyid}.txt \ - ${distpath}/${distname}${extract.suffix}.asc \ - ${distpath}/${distname}${extract.suffix} + ${distpath}/${distname}-bin.asc \ + ${distpath}/${distname}-bin } } -supported_archs x86_64 +post-extract { + xinstall -W ${workpath} -d ./bin + xinstall -m 0755 -W ${distpath} ./${distname}-bin ${workpath}/bin +} if { [variant_isset "prebuilt"] } { use_configure no @@ -78,8 +89,8 @@ if { [variant_isset "prebuilt"] } { build {} destroot { - xinstall -m 0755 -W ${workpath}/${distname} \ - ./${name} ${destroot}${prefix}/bin + copy ${workpath}/bin/${distname}-bin \ + ${destroot}${prefix}/bin/${name} } } else { post-extract { @@ -87,10 +98,9 @@ if { [variant_isset "prebuilt"] } { # standard stack install with 'curl | sh'; don't use # system -W ${worksrcpath} "/bin/mkdir ./bin && /usr/bin/curl -sSL https://get.haskellstack.org/ | /bin/sh -s - -d ./bin" - # copy the pre-built ./stack binary to ./bin, then bootstrap - xinstall -W ${workpath} -d ./bin - xinstall -m 0755 -W ${worksrcpath_prebuilt} \ - ./${name} ${workpath}/bin + # bootstrap using the pre-built ./stack binary + ln -s ${workpath}/bin/${distname}-bin \ + ${workpath}/bin/${name} } set haskell_stack.bin ${workpath}/bin/stack