<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">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.<div><div><br></div><div>I used <a href="https://github.com/macports/macports-ports/commit/deda3fd1e70de298a34782f2401d72d75cd536e8">this</a> code to force stack-based builds on macOS versions that predate Apple Silicon. After Apple Silicon, we need cabal-based builds for native binaries.</div><div><br></div><div><div><blockquote type="cite"><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="Tcl" data-tagsearch-path="textproc/pandoc/Portfile" style="border-spacing: 0px; border-collapse: collapse; tab-size: 8; caret-color: rgb(36, 41, 47); color: rgb(36, 41, 47); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px;"><tbody style="box-sizing: border-box;"><tr style="box-sizing: border-box;"></tr><tr style="box-sizing: border-box;"><td id="LC41" class="blob-code blob-code-inner js-file-line highlighted" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; color: var(--color-fg-default); overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: inset 2px 0 0 var(--color-attention-muted);"><span class="pl-k" style="box-sizing: border-box; color: var(--color-prettylights-syntax-keyword);">set</span> arm64_minimum_supported_major_version 20</td></tr><tr style="box-sizing: border-box;"><td id="L42" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="42" style="box-sizing: border-box; padding: 0px 10px; position: relative; width: 50px; min-width: 50px; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 20px; color: var(--color-fg-subtle); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC42" class="blob-code blob-code-inner js-file-line highlighted" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; color: var(--color-fg-default); overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: inset 2px 0 0 var(--color-attention-muted);"><span class="pl-k" style="box-sizing: border-box; color: var(--color-prettylights-syntax-keyword);">if</span> {<span class="pl-smi" style="box-sizing: border-box; color: var(--color-prettylights-syntax-storage-modifier-import);">${os.platform}</span> eq {darwin}</td></tr><tr style="box-sizing: border-box;"><td id="L43" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="43" style="box-sizing: border-box; padding: 0px 10px; position: relative; width: 50px; min-width: 50px; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 20px; color: var(--color-fg-subtle); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC43" class="blob-code blob-code-inner js-file-line highlighted" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; color: var(--color-fg-default); overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: inset 2px 0 0 var(--color-attention-muted);">    && <span class="pl-smi" style="box-sizing: border-box; color: var(--color-prettylights-syntax-storage-modifier-import);">${os.major}</span> < <span class="pl-smi" style="box-sizing: border-box; color: var(--color-prettylights-syntax-storage-modifier-import);">${arm64_minimum_supported_major_version}</span>} {</td></tr><tr style="box-sizing: border-box;"><td id="L44" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="44" style="box-sizing: border-box; padding: 0px 10px; position: relative; width: 50px; min-width: 50px; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 20px; color: var(--color-fg-subtle); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC44" class="blob-code blob-code-inner js-file-line highlighted" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; color: var(--color-fg-default); overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: inset 2px 0 0 var(--color-attention-muted);">    <span class="pl-c" style="box-sizing: border-box; color: var(--color-prettylights-syntax-comment);"><span class="pl-c" style="box-sizing: border-box; color: var(--color-prettylights-syntax-comment);">#</span> use stack to build x86_64 binaries</span></td></tr><tr style="box-sizing: border-box;"><td id="L45" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="45" style="box-sizing: border-box; padding: 0px 10px; position: relative; width: 50px; min-width: 50px; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 20px; color: var(--color-fg-subtle); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC45" class="blob-code blob-code-inner js-file-line highlighted" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; color: var(--color-fg-default); overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: inset 2px 0 0 var(--color-attention-muted);">    default_variants-append <span class="pl-cce" style="box-sizing: border-box;">\</span></td></tr><tr style="box-sizing: border-box;"><td id="L46" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="46" style="box-sizing: border-box; padding: 0px 10px; position: relative; width: 50px; min-width: 50px; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 20px; color: var(--color-fg-subtle); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC46" class="blob-code blob-code-inner js-file-line highlighted" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; color: var(--color-fg-default); overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: inset 2px 0 0 var(--color-attention-muted);">                    +stack</td></tr><tr style="box-sizing: border-box;"><td id="L47" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="47" style="box-sizing: border-box; padding: 0px 10px; position: relative; width: 50px; min-width: 50px; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 20px; color: var(--color-fg-subtle); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC47" class="blob-code blob-code-inner js-file-line highlighted" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; color: var(--color-fg-default); overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: inset 2px 0 0 var(--color-attention-muted);">}</td></tr></tbody></table></blockquote><br></div><div>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: <a href="https://ports.macports.org/port/pandoc/details/">https://ports.macports.org/port/pandoc/details/</a></div></div></div><div><br></div><div>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?</div></body></html>