Repository navigation
Fix build on macOS - #31
Open
zeddapuras wants to merge 1 commit into
Open
zeddapuras wants to merge 1 commit into
zeddapuras wants to merge 1 commit into
Conversation
macOS has no cups.pc, so the pkg-config calls in module.mk expand to nothing and the build fails (see OpenPrinting#3). The raster API also lives in libcups itself, so -lcupsimage is not needed. On Darwin: - use cups-config for compiler/linker flags and CUPS directories - look for jbigkit in Homebrew (Apple Silicon and Intel) and MacPorts, overridable with JBIGDIR - honour ARCHFLAGS, e.g. ARCHFLAGS="-arch arm64 -arch x86_64" for a universal binary Other platforms are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building on macOS currently fails. macOS ships no
cups.pc, so thepkg-configcalls inmodule.mkexpand to nothing, and the jbigkit headers are not found (see #3).This adds a Darwin branch to
module.mk:cups-configfor compiler/linker flags and CUPS directorieslibcupsonly: on macOS the raster API is in libcups, so-lcupsimageis not needed/opt/homebrew,/usr/local) and MacPorts (/opt/local), overridable withJBIGDIRARCHFLAGS, e.g.ARCHFLAGS="-arch arm64 -arch x86_64"for a universal binaryLinux and other platforms are unchanged.
Testing
makebuilds a native arm64rastertoqpdllinked only against system libraries. WithARCHFLAGS="-arch arm64 -arch x86_64"it builds a universal binary, and both slices produce identical output.Notes
make installis unchanged: on macOS the default filter directory/usr/libexec/cups/filteris protected by SIP, so a packaged install has to use another directory and an absolute*cupsFilterpath in the PPDs. For reference, I packaged this as an installer here: https://github.com/zeddapuras/splix-macosmodule.mk. Happy to rebase if either is merged first.🤖 Generated with Claude Code