mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
hvif_tools: bump version
This commit is contained in:
@@ -1,61 +0,0 @@
|
||||
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.
|
||||
|
||||
Inkscape extensions:
|
||||
* Import from HVIF
|
||||
* Export to HVIF
|
||||
"
|
||||
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="d32d4cbe5e4b938dc22835b8fd2da9aea140315b0707af21554a92680f4a4bd4"
|
||||
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
|
||||
mkdir -p $dataDir/inkscape/extensions
|
||||
cp inkscape/*.{py,inx} $dataDir/inkscape/extensions
|
||||
}
|
||||
138
media-gfx/hvif_tools/hvif_tools-2.1.3.recipe
Normal file
138
media-gfx/hvif_tools/hvif_tools-2.1.3.recipe
Normal file
@@ -0,0 +1,138 @@
|
||||
SUMMARY="Tools for converting between HVIF, IOM, SVG and PNG icon formats"
|
||||
DESCRIPTION="A comprehensive set of command-line tools for working with Haiku Vector Icon Format (HVIF) and Icon-O-Matic (IOM) files.
|
||||
|
||||
icon2icon:
|
||||
- Converts between HVIF, IOM, SVG and PNG.
|
||||
- Full HVIF format support with coordinate transformation.
|
||||
- Solid colors and gradients (linear, radial, diamond, conic, XY, sqrt-XY).
|
||||
- Fill and stroke rendering via transformers.
|
||||
- BMessage-based IOM format parsing.
|
||||
- SVG parsing via NanoSVG library.
|
||||
|
||||
iom2hvif:
|
||||
- Convert Icon-O-Matic files to HVIF format.
|
||||
- Native Haiku implementation using Haiku API.
|
||||
- Direct IOM to HVIF conversion without intermediate formats.
|
||||
- Write icons to HVIF files or file/folder attributes.
|
||||
- Batch processing support for multiple files.
|
||||
- Based on Haiku Icon-O-Matic implementation.
|
||||
|
||||
img2svg:
|
||||
- Advanced bitmap to SVG vectorization.
|
||||
- Color quantization with adaptive palettes.
|
||||
- Multiple simplification algorithms (Douglas-Peucker, Visvalingam-Whyatt).
|
||||
- Geometric shape detection.
|
||||
- Background removal with auto-detection.
|
||||
- Gradient detection and region merging.
|
||||
|
||||
Inkscape extensions:
|
||||
- Import/export for HVIF and IOM formats
|
||||
"
|
||||
HOMEPAGE="https://github.com/threedeyes/hvif-tools/"
|
||||
COPYRIGHT="2025 Gerasim Troeglazov"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/threedeyes/hvif-tools/releases/download/$portVersion/hvif-tools-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="8d32bd425666ca2c9e572799ac3d718c8ff65eeae955e3859c2f79a4d4f6ddfd"
|
||||
SOURCE_DIR="hvif-tools-$portVersion"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandBinDir=$binDir
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
|
||||
|
||||
PROVIDES="
|
||||
hvif_tools$secondaryArchSuffix = $portVersion
|
||||
cmd:icon2icon$commandSuffix
|
||||
cmd:iom2hvif$commandSuffix
|
||||
cmd:img2svg$commandSuffix
|
||||
cmd:msgdump$commandSuffix
|
||||
lib:libhviftools$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libimagetracer$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libagg$secondaryArchSuffix
|
||||
"
|
||||
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
REPLACES="
|
||||
hvif_tools
|
||||
"
|
||||
fi
|
||||
|
||||
PROVIDES_devel="
|
||||
hvif_tools${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libhviftools$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libimagetracer$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
hvif_tools$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix
|
||||
devel:libagg$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_inkscape="
|
||||
hvif_tools${secondaryArchSuffix}_inkscape = $portVersion
|
||||
"
|
||||
REQUIRES_inkscape="
|
||||
haiku$secondaryArchSuffix
|
||||
hvif_tools$secondaryArchSuffix == $portVersion base
|
||||
cssselect_python310
|
||||
lxml_python310
|
||||
numpy_python310
|
||||
tinycss2_python310
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libagg$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -Bbuild -S. \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
||||
-DINKSCAPE_EXT_DIR=$dataDir/inkscape/extensions \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_IOM2HVIF=ON \
|
||||
-DBUILD_MSGDUMP=ON \
|
||||
-DBUILD_INKSCAPE_EXTENSIONS=ON
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libhviftools \
|
||||
libimagetracer
|
||||
|
||||
# inkscape extensions package
|
||||
packageEntries inkscape \
|
||||
$dataDir
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
Reference in New Issue
Block a user