formula: SpartanJ/efsw - #466
MeteorsLiu wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
[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.
| if target.options["shared"][0] == "ON" { | ||
| os.setenv("LD_LIBRARY_PATH", filepath.join(installDir, "lib"))! | ||
| os.setenv("DYLD_LIBRARY_PATH", filepath.join(installDir, "lib"))! |
There was a problem hiding this comment.
[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.
Add the
SpartanJ/efswLLAR Formula from the pinned Conan Center recipe.The implementation includes:
SpartanJ/efsw/versions.jsonand the lowercase1.4.0/efsw_llar.goxFormula.1.4.0–1.4.1range and rejects1.3.1belowfromVer.sharedandfPICbehavior through the upstream CMake build.efsw.pcmetadata and validates the complete pkg-config consumer interface.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