Skip to content
This repository was archived by the owner on Sep 20, 2026. It is now read-only.

formula: SpartanJ/efsw - #466

Open
MeteorsLiu wants to merge 2 commits into
xgo-dev:mainfrom
MeteorsLiu:issue/289-efsw-luna
Open

MeteorsLiu wants to merge 2 commits into
xgo-dev:mainfrom
MeteorsLiu:issue/289-efsw-luna

Conversation

@MeteorsLiu

@MeteorsLiu MeteorsLiu commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

Add the SpartanJ/efsw LLAR Formula from the pinned Conan Center recipe.

The implementation includes:

  • Adds SpartanJ/efsw/versions.json and the lowercase 1.4.0/efsw_llar.gox Formula.
  • Serves the verified 1.4.0–1.4.1 range and rejects 1.3.1 below fromVer.
  • Preserves the source-proven shared and fPIC behavior through the upstream CMake build.
  • Publishes relocatable efsw.pc metadata and validates the complete pkg-config consumer interface.
  • Validates default, shared, fPIC=OFF, cache-hit, installed-artifact, and Darwin arm64 paths.

This makes the verified efsw range directly consumable through LLAR without changing shared Formula infrastructure.

Closes #289

@fennoai fennoai Bot left a comment

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.

Reviewed the new SpartanJ/efsw formula across its claimed version range, option filtering, CMake build/install flow, pkg-config metadata, and consumer test. The default/static path and metadata shape are consistent, but the retained fPIC option and the Windows shared-library test path need correction.

c.defineBool "BUILD_SHARED_LIBS", shared
c.defineBool "BUILD_STATIC_LIBS", false
c.defineBool "BUILD_TEST_APP", false
c.defineBool "CMAKE_POSITION_INDEPENDENT_CODE", fPIC

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.

[P1] Make fPIC=OFF actually disable PIC

Removing only set(CMAKE_POSITION_INDEPENDENT_CODE ON) does not honor the exposed fPIC=OFF option on non-MSVC builds: upstream CMakeLists.txt also unconditionally adds -fPIC to the efsw target in target_compile_options. Because this formula builds that target for both shared modes, CMAKE_POSITION_INDEPENDENT_CODE=OFF still produces position-independent objects, so consumers cannot select the advertised non-PIC variant. Remove or conditionally rewrite that upstream compile option (or otherwise make it depend on fPIC) before configuring.

Comment on lines +118 to +120
if target.options["shared"][0] == "ON" {
os.setenv("LD_LIBRARY_PATH", filepath.join(installDir, "lib"))!
os.setenv("DYLD_LIBRARY_PATH", filepath.join(installDir, "lib"))!

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.

[P1] Add the installed DLL directory to Windows test PATH

When shared=ON on Windows, CMake installs efsw.dll under ctx.outputDir/bin (RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}), while this consumer executable is created under ctx.SourceDir/_llar_consumer. The test only sets LD_LIBRARY_PATH and DYLD_LIBRARY_PATH, neither of which affects Windows DLL lookup, so exec! binary fails with a missing efsw.dll. Set PATH to include the installed bin directory for Windows shared tests before launching the consumer.

This branch has not been deployed

No deployments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translate Conan Center efsw recipe to LLAR

1 participant