File xbyak.spec of Package xbyak
#
# spec file for package xbyak
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: xbyak
Version: 7.28
Release: 0
Summary: Tiny SVG rendering library in C
License: MIT
Group: Development/Libraries/C and C++
URL: https://github.com/herumi/xbyak
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkg-config
# it's either one of the other
#BuildRequires: pkgconfig(plutovg)
%description
PlutoSVG is a compact and efficient SVG rendering library written in C.
It is specifically designed for parsing and rendering SVG documents embedded in OpenType fonts,
providing an optimal balance between speed and minimal memory usage.
It is also suitable for rendering scalable icons.
%package devel
Summary: Development files for %{name}, an SVG rendering library in C
%description devel
The %{name}-devel package contains header files for
developing application that use %{name}.
PlutoSVG is an SVG rendering library written in C.
%prep
%autosetup -p1
%build
export CFLAGS="%{optflags} -fPIC -O3 -ftree-parallelize-loops=4 -ftree-vectorize -fpredictive-commoning"
export CXXFLAGS="%{optflags}"
export LDFLAGS="${LDFLAGS} -Wl,-lm"
%cmake \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_MODULE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}"
%cmake_build
%install
%cmake_install
%files devel
%license COPYRIGHT
%{_includedir}/*
%{_libdir}/cmake
%changelog