Skip to content

flux-markdown: new port#32298

Open
xykong wants to merge 2 commits intomacports:masterfrom
xykong:flux-markdown-new-port
Open

flux-markdown: new port#32298
xykong wants to merge 2 commits intomacports:masterfrom
xykong:flux-markdown-new-port

Conversation

@xykong
Copy link
Copy Markdown

@xykong xykong commented Apr 18, 2026

New port: aqua/flux-markdown

Description

FluxMarkdown is a macOS QuickLook extension for Markdown files. It provides rich previews directly in Finder (press Space) with support for:

  • Mermaid diagrams (flowcharts, sequence, class, Gantt...)
  • KaTeX math (inline and block)
  • GitHub Flavored Markdown including Alerts
  • Syntax-highlighted code blocks (40+ languages)
  • Vega / Vega-Lite charts and Graphviz DOT diagrams
  • Interactive table of contents
  • YAML frontmatter display
  • PDF and HTML export (Cmd+Shift+P / Cmd+Shift+E)
  • Light / Dark / System themes
  • Scroll position memory across files

Homepage: https://github.com/xykong/flux-markdown
License: GPL-3
Stars: 600+
Platforms: macOS 12+ (Monterey and later, darwin >= 21)
Architectures: Universal (x86_64 + arm64)

Port details

  • Distributed as a signed and notarized DMG via GitHub Releases
  • Uses use_dmg yes — no compilation required
  • post-activate removes quarantine attribute, registers the QuickLook extension via pluginkit, and refreshes the QL daemon cache
  • Livecheck via the github PortGroup (GitHub Releases tags)

Checklist

  • Portfile follows MacPorts conventions (header, indentation, stanza order)
  • platforms {darwin >= 21} (requires macOS 12 Monterey for App Extensions)
  • supported_archs x86_64 arm64
  • Checksums verified against the published DMG
  • Livecheck handled by github PortGroup

Copy link
Copy Markdown
Contributor

@reneeotten reneeotten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MacPorts is a build-from-source package manager and strongly prefers not to install pre-build binaries.

Please change the port such that it builds the source instead of downloading a .dmg file.

@reneeotten
Copy link
Copy Markdown
Contributor

ping @xykong - can this be changed to build from source?

Replace pre-built DMG installation with a proper build-from-source approach:

- Download a MacPorts-specific source tarball (uploaded to GitHub Releases)
  that includes pre-generated FluxMarkdown.xcodeproj and pre-built
  web-renderer/dist, eliminating the need for xcodegen or npm at build time
- Build with xcodebuild using ad-hoc signing (CODE_SIGN_IDENTITY='',
  CODE_SIGNING_REQUIRED=NO)
- Sparkle auto-updater is removed from this build; MacPorts manages updates
  via port upgrade
- Remove use_dmg in favor of use_xcode yes + standard build/destroot phases
- Bump version to 1.31.402
@xykong
Copy link
Copy Markdown
Author

xykong commented Apr 28, 2026

Thank you for the review! I've updated the port to build from source.

What changed:

  • Replaced use_dmg yes with a proper build {} phase using xcodebuild
  • Uses use_xcode yes with ad-hoc signing (CODE_SIGN_IDENTITY='', CODE_SIGNING_REQUIRED=NO)
  • Sparkle auto-updater is removed from this build — MacPorts manages updates via `port upgrade`

Why a custom source tarball instead of the GitHub auto-generated one:

The project uses XcodeGen to generate `.xcodeproj` from `project.yml` (xcodegen is not currently in MacPorts — see ticket #69285), and Vite/npm to build the TypeScript web renderer. Since neither tool is available in the MacPorts build sandbox, I publish a MacPorts-specific tarball alongside the DMG on each release:

  • `FluxMarkdown-${version}-macports-source.tar.gz` — pre-generated `.xcodeproj` (Sparkle removed from `project.yml`), pre-built `web-renderer/dist`, and Sparkle stripped from Swift sources

This tarball is generated by scripts/create_macports_tarball.sh and automatically uploaded to each GitHub Release. The only dependency at install time is xcodebuild (via use_xcode yes).

Let me know if there are any other issues!

Copy link
Copy Markdown
Contributor

@reneeotten reneeotten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes @xykong !

Instead of manually specifying the build and destroot phase and use_configure, can one use the xcode PortGroup instead? That PortGroup is intended to support xcode-based projects with setting sensible defaults.
See: https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/xcode-1.0.tcl

# MacPorts-specific source tarball: pre-generated .xcodeproj, pre-built
# web-renderer/dist, and Sparkle removed (MacPorts manages updates).
# Generated by scripts/create_macports_tarball.sh during the release process.
distname FluxMarkdown-1.31.402-macports-source
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
distname FluxMarkdown-1.31.402-macports-source
distname FluxMarkdown-${version}-macports-source

use ${version} to avoid the need to change this line upon each update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants