[packages/libfyaml] - new
qboosh
qboosh at pld-linux.org
Mon Aug 31 20:03:28 CEST 2026
commit a69ce9d63523941c8d798276e22b07ba9bb88c5e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Aug 31 20:03:18 2026 +0200
- new
libfyaml-32bit.patch | 33 +++++++++++++++
libfyaml.spec | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 150 insertions(+)
---
diff --git a/libfyaml.spec b/libfyaml.spec
new file mode 100644
index 0000000..c83a449
--- /dev/null
+++ b/libfyaml.spec
@@ -0,0 +1,117 @@
+#
+# Conditional build:
+%bcond_without static_libs # static libraries
+#
+Summary: Fully-featured YAML 1.2 and JSON parser/writer with zero-copy operation and no artificial limits
+Summary(pl.UTF-8): W pełni funkcjalna biblioteka do odczytu/zapisu YAML 1.2 i JSON bez kopiowania i sztucznych limitów
+Name: libfyaml
+Version: 0.9.6
+Release: 1
+License: MIT
+Group: Libraries
+#Source0Download: https://github.com/pantoniou/libfyaml/releases
+Source0: https://github.com/pantoniou/libfyaml/releases/download/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: f6d3756a80cb1ff99714e510cf4ce13d
+Patch0: %{name}-32bit.patch
+URL: https://github.com/pantoniou/libfyaml/
+BuildRequires: pkgconfig
+BuildRequires: yaml-devel >= 0.1
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libfyaml is designed for high performance with zero content
+duplication, supporting arbitrarily large documents without the
+1024-character limit on implicit keys found in other parsers. It
+passes the complete YAML test suite and provides both event-based
+(streaming) and document tree APIs for maximum flexibility.
+
+%description -l pl.UTF-8
+Biblioteka libfyaml jest zaprojektowana z myślą o dużej wydajności,
+bez duplikacji zawartości, obsłudze dużych dokumentów bez limitu
+długości klucza do 1024 znaków, jaki występuje w innych parserach.
+Biblioteka przechodzi kompletny zestaw testów YAML i dla możliwie
+dużej elastyczności zapewnia API zarówno oparte na zdarzeniach
+(strumieniowe), jak i oparte na drzewie dokumentów.
+
+%package devel
+Summary: Header files for libfyaml library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libfyaml
+Group: Development/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+Header files for libfyaml library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libfyaml.
+
+%package static
+Summary: Static libfyaml library
+Summary(pl.UTF-8): Statyczna biblioteka libfyaml
+Group: Development/Libraries
+Requires: %{name}-devel%{?_isa} = %{version}-%{release}
+
+%description static
+Static libfyaml library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libfyaml.
+
+%prep
+%setup -q
+%patch -P0 -p1
+
+%build
+# PIP3: give non-working tool so that prebuilt man pages are used
+%configure \
+ PIP3=/bin/false \
+ --disable-network \
+ --disable-shave \
+ %{!?with_static_libs:--disable-static} \
+ --without-libclang
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libfyaml.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS CHANGELOG.md LICENSE README.md
+%attr(755,root,root) %{_bindir}/fy-tool
+# symlinks
+%{_bindir}/fy-compose
+%{_bindir}/fy-dump
+%{_bindir}/fy-filter
+%{_bindir}/fy-join
+%{_bindir}/fy-testsuite
+%{_bindir}/fy-ypath
+%{_libdir}/libfyaml.so.*.*.*
+%ghost %{_libdir}/libfyaml.so.0
+%{_mandir}/man1/fy-*.1*
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/libfyaml.so
+%{_includedir}/libfyaml.h
+%{_includedir}/libfyaml
+%{_pkgconfigdir}/libfyaml.pc
+%{_mandir}/man3/libfyaml*.3*
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libfyaml.a
+%endif
diff --git a/libfyaml-32bit.patch b/libfyaml-32bit.patch
new file mode 100644
index 0000000..7c9bb16
--- /dev/null
+++ b/libfyaml-32bit.patch
@@ -0,0 +1,33 @@
+--- libfyaml-0.9.6/include/libfyaml/libfyaml-vlsize.h.orig 2026-03-15 14:48:50.000000000 +0100
++++ libfyaml-0.9.6/include/libfyaml/libfyaml-vlsize.h 2026-08-31 14:23:04.720471335 +0200
+@@ -801,8 +801,10 @@ fy_decode_size(const uint8_t *start, siz
+ const uint8_t *ret;
+
+ ret = fy_decode_size32(start, bufsz, &sz);
+- if (!ret)
++ if (!ret) {
++ *sizep = 0;
+ return NULL;
++ }
+ *sizep = sz;
+ return ret;
+ }
+@@ -810,13 +812,16 @@ fy_decode_size(const uint8_t *start, siz
+ static inline const uint8_t *
+ fy_decode_size_nocheck(const uint8_t *start, size_t *sizep)
+ {
+- return fy_decode_size32_nocheck(start, sizep);
++ uint64_t sz;
++ const uint8_t *ret= fy_decode_size32_nocheck(start, &sz);
++ *sizep = sz;
++ return ret;
+ }
+
+ static inline const uint8_t *
+ fy_skip_size(const uint8_t *start, size_t bufsz)
+ {
+- return fy_skip_size32(start, bufsz, &sz);
++ return fy_skip_size32(start, bufsz);
+ }
+
+ static inline const uint8_t *
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libfyaml.git/commitdiff/a69ce9d63523941c8d798276e22b07ba9bb88c5e
More information about the pld-cvs-commit
mailing list