apotocki/lunasvg
LunaSVG, an SVG rendering library in C++.
- Library
- lunasvg
- Newest
- 3.5.0 (r1, linux)
- Targets
- linux, windows
- License
- MIT
- Homepage
- https://github.com/sammycage/lunasvg
- Keywords
- svg, graphics, rendering
Use it
In otok.toml:
[deps.lunasvg]
recipe = "apotocki/lunasvg"
version = "~> 3.5.0"
Versions
| Version | Target | Channel | Published | Status |
|---|---|---|---|---|
| 3.5.0 (r1, linux) | linux | stable | 2026-11-07 | |
| 3.5.0 (r1, windows) | windows | stable | 2026-11-07 |
3.5.0 (r1, linux)
Platforms
linux
Dependencies
| Library | Version | Recipe | Details |
|---|---|---|---|
| plutovg | >= 1.3 |
apotocki/plutovg |
Toolchains
cmake { default-recipe = "apotocki/cmake", version = ">= 3.20" }ninja { default-recipe = "apotocki/ninja", version = ">= 1.10" }
Recipe files
build.lua
-- LunaSVG's CMake project without its examples, with the plutovg of the dependency: CMake fails rather
-- than build the copy in the tree. What it installs: liblunasvg.a, or liblunasvg.so with its
-- links; the header in include/lunasvg/.
function build(slice, options, deps)
otok.cmake{ defines = { USE_SYSTEM_PLUTOVG = true, CMAKE_REQUIRE_FIND_PACKAGE_plutovg = true, LUNASVG_BUILD_EXAMPLES = false } }
local p = slice.prefix
-- a static library is told by LUNASVG_BUILD_STATIC, which its CMake config gives its consumers: the
-- header says so itself, as the others have no config
if slice.linkage == "static" then
local header = p .. "/include/lunasvg/lunasvg.h"
local text, n = otok.read(header):gsub("defined%(LUNASVG_BUILD_STATIC%)", "1")
assert(n > 0, "lunasvg.h no longer tests LUNASVG_BUILD_STATIC")
otok.write(header, text)
end
local lib = otok.glob(slice.linkage == "static" and "lib/liblunasvg.a" or "lib/liblunasvg.so", p)[1]
return { libraries = { lunasvg = lib }, headers = p .. "/include" }
end
recipe.toml
# The otok recipe of LunaSVG (https://github.com/apotocki/otok): liblunasvg for Linux, from the release tag, with
# PlutoVG of its own recipe instead of the copy in its tree; static or dynamic.
[recipe]
api = 1
library = "lunasvg"
name = "lunasvg"
version = "3.5.0"
revision = 1
license = "MIT"
license-files = ["LICENSE"]
homepage = "https://github.com/sammycage/lunasvg"
description = "LunaSVG, an SVG rendering library in C++."
keywords = ["svg", "graphics", "rendering"]
linkage = ["static", "dynamic"]
cxx-standard = ">= 17"
[source]
git = "https://github.com/sammycage/lunasvg"
commit = "83c58df8103dc7dca423dfd824992af94d49bed6"
tag = "v3.5.0"
[platforms]
supported = ["linux"]
build-on = ["linux/gcc", "linux/clang"]
[deps.plutovg]
version = ">= 1.3"
default-recipe = "apotocki/plutovg"
[toolchains]
cmake = { version = ">= 3.20", default-recipe = "apotocki/cmake" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }
[[product]]
name = "LunaSVG"
libraries = ["lunasvg"]
link = { runtime = "c++" }