Legacy Support for GHC-Based Projects

Steven Smith steve.t.smith at gmail.com
Mon Jan 16 22:15:01 UTC 2023


I recently added legacy-based support to pandoc, but I’m not sure that the code I used is working. I’ll issue a revised PR based on any feedback and use a working version for other GHC-based projects.

I used this <https://github.com/macports/macports-ports/commit/deda3fd1e70de298a34782f2401d72d75cd536e8> code to force stack-based builds on macOS versions that predate Apple Silicon. After Apple Silicon, we need cabal-based builds for native binaries.

> set arm64_minimum_supported_major_version 20
> if {${os.platform} eq {darwin}
>     && ${os.major} < ${arm64_minimum_supported_major_version}} {
>     # use stack to build x86_64 binaries
>     default_variants-append \
>                     +stack
> }

stack-based stack builds work all the way back to Snow Leopard: https://ports.macports.org/port/stack/details/. I’d expect the same of pandoc, but it only builds back to Sierra: https://ports.macports.org/port/pandoc/details/

Is anyone able to suggest profile code that will accomplish this? Is this related to the design choice to use a the port variant +stack to specify the build tool?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20230116/b677fd3f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4420 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20230116/b677fd3f/attachment.bin>


More information about the macports-dev mailing list