diff --git a/media-gfx/hvif_tools/hvif_tools-1.0.recipe b/media-gfx/hvif_tools/hvif_tools-1.0.recipe new file mode 100644 index 000000000..7a098ba18 --- /dev/null +++ b/media-gfx/hvif_tools/hvif_tools-1.0.recipe @@ -0,0 +1,56 @@ +SUMMARY="A toolkit for converting Haiku Vector Icon Format (HVIF) icons to SVG and back" +DESCRIPTION="A small set of command‑line tools to work with the Haiku Vector Icon Format (HVIF). + +hvif2svg: + Parses .hvif with header validation. + Renders paths (points/curves), shapes, and styles (solid colors and gradients). + Supports fills and strokes (via HVIF transformers STROKE/CONTOUR). + Linear and radial gradients with gradientTransform; proper stop opacity. + Uses HVIF’s internal grid (viewBox 0 0 6528 6528 = 64 × 102 units). + +svg2hvif: + SVG parsing via NanoSVG (header‑only). + Normalizes coordinates to HVIF’s 64 × 64 space and centers content. + Converts fill and stroke (caps/joins/miter limit), stroke widths, and opacity. + Linear and radial gradients with calculated HVIF gradient transforms. + CLI and buffer‑to‑buffer example for embedding into apps/pipelines. + +Cross‑platform: Linux, macOS, Windows and Haiku" +HOMEPAGE="https://github.com/threedeyes/hvif-tools/" +COPYRIGHT="2005 Gerasim Troeglazov" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/threedeyes/hvif-tools/releases/download/$portVersion/hvif-tools-$portVersion.tar.gz" +CHECKSUM_SHA256="5388262c4aeb046fe17795c551bed1adacdbfb869750add42f84022f622c9b8e" +SOURCE_DIR="hvif-tools-$portVersion" + +ARCHITECTURES="all" + +PROVIDES=" + hvif_tools = $portVersion + cmd:hvif2svg = $portVersion + cmd:svg2hvif = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc + cmd:make + " + +BUILD() +{ + cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release $cmakeDirArgs + make -C build $jobArgs +} + +INSTALL() +{ + make -C build install +}