From b719b414d9b8be35d3548442c8f562000ee71516 Mon Sep 17 00:00:00 2001 From: Steven Thomas Smith Date: Fri, 17 Jan 2025 17:18:04 -0500 Subject: [PATCH] cabal: Update to version 3.14.1.1; Fix build issue in PG haskell_cabal Fixes: * https://trac.macports.org/ticket/71821 * https://github.com/macports/macports-ports/pull/27341 * See: https://github.com/haskell/cabal/issues/10755 --- .../port1.0/group/haskell_cabal-1.0.tcl | 18 ++++++---- lang/cabal/Portfile | 35 ++++++++++--------- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/_resources/port1.0/group/haskell_cabal-1.0.tcl b/_resources/port1.0/group/haskell_cabal-1.0.tcl index ca0ab57cf6fc0..14d0b50afb23e 100644 --- a/_resources/port1.0/group/haskell_cabal-1.0.tcl +++ b/_resources/port1.0/group/haskell_cabal-1.0.tcl @@ -86,6 +86,9 @@ proc haskell_cabal.get_env {} { options haskell_cabal.cabal_root default haskell_cabal.cabal_root {${workpath}/.home/.cabal} +# https://github.com/haskell/cabal/issues/10755 +# disable --enable-relocatable until this issue is addressed + post-patch { xinstall -m 0755 -d [option haskell_cabal.cabal_root] set cabal_config_fd [open ${haskell_cabal.cabal_root}/config w+] @@ -121,22 +124,22 @@ post-patch { "jobs: \$ncpus" \ "documentation: True" \ "doc-index-file: \$htmldir/html/${subport}/index.html" \ - "relocatable: True" \ + "relocatable: False" \ "install-method: copy" \ - "installdir: ${prefix}/bin" \ "logs-dir: [option haskell_cabal.cabal_root]/logs" \ "store-dir: [option haskell_cabal.cabal_root]/store" \ "" \ + "installdir: ${prefix}/bin" \ "install-dirs global" \ " prefix: ${prefix}" \ " bindir: ${prefix}/bin" \ " libdir: ${prefix}/lib" \ - " libsubdir: ${subport}" \ " dynlibdir: ${prefix}/lib" \ " libexecdir: ${prefix}/libexec" \ - " libexecsubdir: ${subport}" \ + " includedir: ${prefix}/include" \ " datadir: ${prefix}/${haskell_cabal.datadir}" \ " docdir: ${prefix}/${haskell_cabal.docdir}" \ + " mandir: ${prefix}/${haskell_cabal.mandir}" \ " htmldir: ${prefix}/${haskell_cabal.htmldir}" \ " haddockdir: \$htmldir" \ " sysconfdir: ${prefix}/${haskell_cabal.sysconfdir}" \ @@ -149,6 +152,7 @@ post-patch { close ${cabal_config_fd} } + # cabal builds arm64 and x86_64 binaries supported_archs arm64 x86_64 @@ -160,6 +164,7 @@ options haskell_cabal.bin \ haskell_cabal.installsubdir \ haskell_cabal.datadir \ haskell_cabal.docdir \ + haskell_cabal.mandir \ haskell_cabal.htmldir \ haskell_cabal.haddockdir \ haskell_cabal.sysconfdir \ @@ -188,6 +193,7 @@ default haskell_cabal.use_prebuilt {no} default haskell_cabal.installsubdir {${subport}} default haskell_cabal.datadir {share/${haskell_cabal.installsubdir}} default haskell_cabal.docdir {share/doc/${haskell_cabal.installsubdir}} +default haskell_cabal.mandir {man} default haskell_cabal.htmldir {share/doc/${haskell_cabal.installsubdir}} default haskell_cabal.haddockdir {share/doc/${haskell_cabal.installsubdir}} default haskell_cabal.sysconfdir {etc/${haskell_cabal.installsubdir}} @@ -257,8 +263,8 @@ default build.post_args {\ --builddir=${haskell_cabal.build_dir}\ --prefix=${prefix}\ ${haskell_cabal.installdir_args}\ - --enable-relocatable\ } +# --enable-relocatable default build.env {${haskell_cabal.env}} default destroot.cmd {${haskell_cabal.bin}\ @@ -271,9 +277,9 @@ default destroot.post_args {\ --builddir=${haskell_cabal.build_dir}\ --installdir=${destroot}${prefix}/bin\ --install-method=copy\ - --enable-relocatable\ --overwrite-policy=always\ } +# --enable-relocatable default destroot.env {${haskell_cabal.env}} default test.cmd {${haskell_cabal.bin}\ diff --git a/lang/cabal/Portfile b/lang/cabal/Portfile index 8ca09c768b36e..61ae801cd8177 100644 --- a/lang/cabal/Portfile +++ b/lang/cabal/Portfile @@ -3,10 +3,9 @@ PortSystem 1.0 name cabal -version 3.10.3.0 +version 3.14.1.1 revision 0 categories lang haskell devel -platforms darwin license BSD maintainers {ieee.org:s.t.smith @essandess} openmaintainer @@ -59,18 +58,19 @@ set distfile_haskell ${cabal_distname}.tar.xz distfiles ${distfile_haskell}:haskell # set build_arch by hand on arm64/x86_64 systems to get x86_64/arm64 checksums +# sudo port -d checksum cabal-prebuilt os.arch=i386 build_arch=x86_64 # sudo port -d checksum cabal-prebuilt os.arch=arm build_arch=arm64 # run `port clean --all cabal-prebuilt` afterwards if {${build_arch} eq {arm64}} { checksums ${distfile_haskell} \ - rmd160 2ba95f233a0ec06d6a2fcef1783fa6bbef7d4066 \ - sha256 f4f606b1488a4b24c238f7e09619959eed89c550ed8f8478b350643f652dc08c \ - size 11676488 + rmd160 65b2c1d87a22c59da3e58d6f9e03f91671f83a8b \ + sha256 bd40920fb3d5bcf3d78ce93445039ba43bc5edf769c52234223f25b83e3cc682 \ + size 12728880 } elseif {${build_arch} eq {x86_64}} { checksums ${distfile_haskell} \ - rmd160 4b44b2fea41b91cd08e94957a414ecc8e5ed7778 \ - sha256 3aed78619b2164dd61eb61afb024073ae2c50f6655fa60fcc1080980693e3220 \ - size 5623520 + rmd160 d4b3a14b37d0b56964354550cfb48a1848be6e3c \ + sha256 3690d8f7aa368141574f9eaf8e75bc26932ed7b422f5ade107d6972b3b72532f \ + size 6065364 } # cabal may use these MacPorts build tools: @@ -94,15 +94,15 @@ if {${name} eq ${subport}} { master_sites https://github.com/haskell/${name}/archive/refs/tags:github distfiles ${distfile_github}:github checksums ${distfile_github} \ - rmd160 d72a00040f2b717de39e1b2386e81d86cc44c06f \ - sha256 29d622886624f72f1c5be1fb385b1eb612a72e487c2c91ca8cbefb84abdbf352 \ - size 2285154 + rmd160 667727335b6372a7b927d3bdf016cd2db631a339 \ + sha256 c5d3e5bdf78c2fce9f6b48d31d4561ef151587fc3c102e57a3c4b341578a836a \ + size 3638559 extract.only-append \ ${distfile_github} -if {[exists extract.rename]} { - extract.rename yes -} + if {[exists extract.rename]} { + extract.rename yes + } variant prebuilt \ description {This variant is deprecated.} { ui_error "Please install the port ${name}-prebuilt." @@ -111,7 +111,7 @@ if {[exists extract.rename]} { # use these to specify python versions, python3 required # use ${prefix}/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/python-1.0.tcl - set python3_version 312 + set python3_version 313 set python3_branch [string index ${python3_version} 0].[string range ${python3_version} 1 end] set python3_prefix ${frameworks_dir}/Python.framework/Versions/${python3_branch} set python3_bin ${python3_prefix}/bin/python${python3_branch} @@ -156,7 +156,7 @@ if {[exists extract.rename]} { "GHC=${prefix}/bin/ghc" build.target ${name}-install \ - --project-file=cabal.project.release + --project-file=cabal.release.project build.post_args-append \ --bindir=${prefix}/bin \ --datadir=${prefix}/share/${subport} @@ -203,3 +203,6 @@ subport cabal-prebuilt { It is intended to be used to bootstrap ghc and other Haskell-based tools. " } + +livecheck.url https://github.com/haskell/${name}/tags +livecheck.regex "archive/refs/tags/${name}\-install\-v(\[^\"\]+)\.tar\.gz"