[Midnightbsd-cvs] [MidnightBSD/mports] cd69b6: Mk/extensions/cabal.mk: sync with FreeBSD Mk/Uses/...
Lucas Holt
noreply at github.com
Fri Oct 2 09:13:44 EDT 2026
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/mports
Commit: cd69b640ea49316cdd683f3a59bee5eb3e6c99ef
https://github.com/MidnightBSD/mports/commit/cd69b640ea49316cdd683f3a59bee5eb3e6c99ef
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-10-02 (Fri, 02 Oct 2026)
Changed paths:
M Mk/extensions/cabal.mk
M devel/hs-cabal-install/Makefile
Log Message:
-----------
Mk/extensions/cabal.mk: sync with FreeBSD Mk/Uses/cabal.mk (#1665)
Syncs `Mk/extensions/cabal.mk` with FreeBSD's current
`Mk/Uses/cabal.mk`, and adapts `devel/hs-cabal-install` in the same PR
because the two must land together.
Our copy predates features current Haskell ports rely on:
`CABAL_EXECUTABLES` (replaces `EXECUTABLES`), `CABAL_WRAPPER_SCRIPTS`,
`SKIP_CABAL_EXTRACT` (replaces `CABAL_BOOTSTRAP`), `HACKAGE_DISTNAME`,
`CABAL_REVISION`, `.sinclude Makefile.cabal`, `cabal.project.local`
handling, and plain `cabal build`/`update` (instead of `new-*`) run
under `WRK_ENV` with XDG paths.
### mports adaptations in cabal.mk
- Hook `cabal-post-install-script` via `_USES_install+=`. mports has no
stage phase, so the old `_USES_stage` hook never ran and executables
were never added to the plist automatically.
- `PREFIX` is already staged in `do-install`, so it is used directly;
wrapper scripts get runtime paths (`TRUE_PREFIX`, `DATADIR` with
`FAKE_DESTDIR` stripped).
- Default `USE_LOCALE=en_US.UTF-8`: FreeBSD builds the whole tree under
C.UTF-8, mports under C, and GHC needs UTF-8.
### devel/hs-cabal-install (second commit)
The 3.16.1.0 port merged in #1663 uses `CABAL_BOOTSTRAP`, which the new
cabal.mk drops. Switched to `SKIP_CABAL_EXTRACT` + `EXTRACT_ONLY` +
`CABAL_EXECUTABLES` (FreeBSD style) and moved `do-build`/`do-install`
before `.include <bsd.port.mk>`. `ONLY_FOR_ARCHS` from f05157fd46 is
kept.
### Follow-up PRs (merge after this)
print/hs-hscolour, textproc/hs-pandoc, cad/hs-verismith.
`devel/hs-haddock` (already BROKEN) still uses the old `EXECUTABLES`
name and is untouched.
### Verification (amd64, 4.0.6, ghc 9.12.4)
With this cabal.mk, built/faked/packaged and smoke-tested:
hs-cabal-install 3.16.1.0 (this exact Makefile minus `ONLY_FOR_ARCHS`),
hs-hscolour 1.25, hs-pandoc 3.12 (wrapper script + data dir, lua),
hs-verismith 1.1.0. Wrapper scripts contain no staging paths;
executables land in the plist via the fake hook.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
## Summary by Sourcery
Synchronize the Cabal port framework with FreeBSD and update
cabal-install to use its revised interface.
New Features:
- Add support for Cabal revisions, custom Hackage package names,
executable wrappers, generated Makefile.cabal metadata, and Cabal
project-local configuration.
- Use the updated Cabal workflow for dependency extraction,
configuration, building, and packaging, including environment and locale
handling.
Bug Fixes:
- Ensure Cabal executables are automatically included in the package
plist by running the post-install hook during installation.
- Prevent staging paths from leaking into generated executable wrapper
scripts.
Enhancements:
- Align the Cabal extension with the current FreeBSD port framework
while preserving mports-specific staging and installation behavior.
- Update hs-cabal-install to use the revised Cabal interface and
bootstrap configuration.
---------
Signed-off-by: Lucas Holt <luke at foolishgames.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications
More information about the Midnightbsd-cvs
mailing list