Page MenuHomeFreeBSD

Infrastructure for Common Lisp Ports: Overhaul
ClosedPublic

Authored by jrm on Dec 8 2024, 12:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 7, 4:05 PM
Unknown Object (File)
Tue, Jan 7, 9:46 AM
Unknown Object (File)
Tue, Jan 7, 9:37 AM
Unknown Object (File)
Tue, Jan 7, 7:10 AM
Unknown Object (File)
Tue, Jan 7, 6:03 AM
Unknown Object (File)
Tue, Jan 7, 5:26 AM
Unknown Object (File)
Tue, Jan 7, 4:30 AM
Unknown Object (File)
Tue, Jan 7, 3:49 AM

Details

Summary
  • Decouple ASDF initialization from devel/cl-asdf by creating a dedicated port: devel/freebsd-cl-asdf-init.
  • Convert devel/cl-asdf/bsd.cl-asdf.mk to USES=cl.
  • Add devel/cl-asdf-sbcl
  • Update ASDF configuration:
    • Prefer newer ASDF versions, but only if the fasl is available.
    • Replace license text with an SPDX license identifier.
    • Simplify and clarify documentation.
    • Remove the assumption that ${PREFIX} is /usr/local.
    • Use uiop:getenv instead of a custom getenv function.
    • Remove asdf:output-files customization to resolve output translation issues.
    • Improve output translations:
      • Prevent writing fasls to ${PREFIX}/lib/common-lisp/ when the corresponding fasl port is not installed.
      • Fall back to ASDF's default caching mechanism of writing fasl to a cache under ${HOME} when users install a Common Lisp port without its fasl port.
    • Improve interoperability with Common Lisp code from sources outside of ports, such as Quicklisp.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jrm requested review of this revision.Dec 8 2024, 12:05 AM
jrm created this revision.

@olgeni, @krion: Another thought about improving our CL ports infrastructure: Decouple asdf-init.lisp from devel/cl-asdf to create devel/freebsd-asdf-init and have lang/sbcl depend on it instead.

The main reason lang/sbcl depends on devel/cl-asdf is to pull in our ASDF initialization script so SBCL can work seamlessly with our CL ports infrastructure. It's almost a side effect that we get a newer ASDF, but it's suboptimal to do this because it forces users (by default, anyway) to build the ADSF binary at run-time. This is because lang/sbcl cannot also depend on devel/cl-asdf-sbcl since it would introduce an unavoidable circular dependency. By decoupling asdf-init.lisp from devel/cl-asdf, we can have lang/sbcl use its bundled ASDF which includes the ADSF fasl and then depend only on devel/freebsd-asdf-init. The only downside is that SBCL's bundled ASDF lags a bit behind the latest release. I'll try testing this out tomorrow. Any thoughts or comments are welcome.

Also, I see there are a couple of unnecessary whitespace changes here. That's the Emacs default lisp-mode having strong opinions. Hopefully it's minimal enough that it doesn't affect things.

jrm retitled this revision from devel/cl-asdf: Update ASDF initialization to Infrastructure for Common Lisp Ports: Overhaul.Sun, Dec 15, 7:13 AM
jrm edited the summary of this revision. (Show Details)
jrm edited the summary of this revision. (Show Details)

See updated description

Fix devel/cl-freebsd-asdf-init/pkg-descr

Add support for CCL and tweak dependency logic

Minor changes to Mk/Uses/cl.mk to pull in deve/cl-asdf-<fasl> when FASL_TARGET is defined.

Update somme comments and one no-op change

Add ASDF to lang/clisp's OPTIONS_DEFAULT, so we are not required to pull devel/cl-asdf and devel/cl-asdf-clisp.

lang/sbcl: Remove files/pkg-message.in. There is no need to warn users about Quicklisp incompatibilites now.

  • Remove FASL_BUILD as it's redundant with FASL_TARGET
  • Update comments
  • Remove devel/cl-freebsd-asdf-init/files/pkg-message.in; a similar message is displayed for each CL implementation port

Mk/Uses/cl.mk: Tweak comments; only set FASL_PATHNAME when FASL_TARGET is defined

This revision was not accepted when it landed; it landed in state Needs Review.Fri, Dec 20, 2:48 AM
This revision was automatically updated to reflect the committed changes.