From 964564ac924978242c1a6b5da553bc8f845d37ce Mon Sep 17 00:00:00 2001 From: "fennoai[bot]" <231223108+fennoai[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 11:17:19 +0000 Subject: [PATCH] Add pantor/ruckig LLAR Formula (v0.17.3) Translate the Conan Center `ruckig` recipe into an idiomatic LLAR Formula. - versions.json: module path pantor/ruckig, no external deps (the cloud client is disabled, so the vendored third_party headers are not built). - Ruckig_cmp.gox: semver comparator for the v-prefixed tags. - v0.17.3/Ruckig_llar.gox: - onBuild uses the CMake helper to build the core static library, disabling examples, tests, the Python module and the cloud client (mirrors the Conan recipe) and installing the full public interface (headers, libruckig.a, CMake config); metadata "-lruckig". - onTest reproduces the Conan test_package consumer in an independent build tree so it works on both cache miss and cache hit. Verified with `llar test -v ./pantor/ruckig@v0.17.3` (fresh build + test, cache-hit test, and explicit --os linux --arch amd64). Closes #20 Co-authored-by: fennoai[bot] <231223108+fennoai[bot]@users.noreply.github.com> Co-authored-by: MeteorsLiu <17515813+MeteorsLiu@users.noreply.github.com> --- pantor/ruckig/Ruckig_cmp.gox | 4 ++ pantor/ruckig/v0.17.3/Ruckig_llar.gox | 88 +++++++++++++++++++++++++++ pantor/ruckig/versions.json | 4 ++ 3 files changed, 96 insertions(+) create mode 100644 pantor/ruckig/Ruckig_cmp.gox create mode 100644 pantor/ruckig/v0.17.3/Ruckig_llar.gox create mode 100644 pantor/ruckig/versions.json diff --git a/pantor/ruckig/Ruckig_cmp.gox b/pantor/ruckig/Ruckig_cmp.gox new file mode 100644 index 0000000..c67ad39 --- /dev/null +++ b/pantor/ruckig/Ruckig_cmp.gox @@ -0,0 +1,4 @@ +compareVer (a, b) => { + // ruckig publishes semver tags like "v0.17.3". + return semver.compare(a.Version, b.Version) +} diff --git a/pantor/ruckig/v0.17.3/Ruckig_llar.gox b/pantor/ruckig/v0.17.3/Ruckig_llar.gox new file mode 100644 index 0000000..30a7213 --- /dev/null +++ b/pantor/ruckig/v0.17.3/Ruckig_llar.gox @@ -0,0 +1,88 @@ +import "os" + +id "pantor/ruckig" + +fromVer "v0.17.3" + +onBuild ctx => { + installDir := ctx.outputDir + + c := cmake.new(ctx.SourceDir, ctx.SourceDir+"/_build", installDir) + c.buildType "Release" + + // ruckig is a C++20 CMake library. Build only the core static library: + // disable the examples, unit tests, the nanobind Python wrapper and the + // (network) cloud client, matching the community package interface. The + // cloud client would otherwise inject vendored third_party headers and a + // WITH_CLOUD_CLIENT define that are not part of the core install. + c.defineBool "BUILD_SHARED_LIBS", false + c.defineBool "CMAKE_POSITION_INDEPENDENT_CODE", true + c.defineBool "BUILD_EXAMPLES", false + c.defineBool "BUILD_TESTS", false + c.defineBool "BUILD_PYTHON_MODULE", false + c.defineBool "BUILD_CLOUD_CLIENT", false + + c.configure + c.build + c.install + + // Consumers link the installed "ruckig" library (target ruckig::ruckig). + ctx.setMetadata "-lruckig" +} + +onTest ctx => { + installDir := ctx.outputDir + + // Keep the consumer build in its own tree so onTest behaves identically + // on a cache hit (onBuild skipped, no _build dir) and a cache miss. + testDir := ctx.SourceDir + "/_testconsumer" + testBuild := testDir + "/_build" + + os.mkdirAll(testDir, 0o755)! + + // Consumer mirrors the Conan test_package: a single-DoF trajectory update. + cpp := `#include +#include + +int main() { + using namespace ruckig; + + Ruckig<1> otg(0.01); + InputParameter<1> input; + OutputParameter<1> output; + + input.target_position = {1.0}; + input.max_velocity = {1.0}; + input.max_acceleration = {1.0}; + input.max_jerk = {1.0}; + + auto result = otg.update(input, output); + printf("Ruckig update result: %d\n", static_cast(result)); + return 0; +} +` + os.writeFile(testDir+"/test_package.cpp", []byte(cpp), 0o644)! + + cml := `cmake_minimum_required(VERSION 3.15) +project(ruckig_test_package LANGUAGES CXX) + +find_package(ruckig REQUIRED CONFIG) + +add_executable(test_package test_package.cpp) +target_link_libraries(test_package PRIVATE ruckig::ruckig) +` + os.writeFile(testDir+"/CMakeLists.txt", []byte(cml), 0o644)! + + tc := cmake.new(testDir, testBuild, testBuild+"/_out") + tc.buildType "Release" + tc.use installDir + + tc.configure + tc.build + + // A non-zero exit surfaces via lastErr and fails the test. + exec testBuild + "/test_package" + if lastErr != nil { + panic lastErr + } +} diff --git a/pantor/ruckig/versions.json b/pantor/ruckig/versions.json new file mode 100644 index 0000000..0eeb217 --- /dev/null +++ b/pantor/ruckig/versions.json @@ -0,0 +1,4 @@ +{ + "path": "pantor/ruckig", + "deps": {} +}