commit 7a69f91d66e3a6a14a8861cfff0ba587f6c98564f7e59ec726898d101aa4af03 Author: Adrian Schröter Date: Fri May 3 15:04:33 2024 +0200 Sync from SUSE:SLFO:Main libhubbub revision 028419082bc1edf10414d39c4ea70c74 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/0001-do-not-use-deprecated-is_error.patch b/0001-do-not-use-deprecated-is_error.patch new file mode 100644 index 0000000..1cd3ea2 --- /dev/null +++ b/0001-do-not-use-deprecated-is_error.patch @@ -0,0 +1,39 @@ +From 2a7157c319d4de41af31f5ce08723a9ead09e53f Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Wed, 14 Feb 2018 08:49:32 +0100 +Subject: [PATCH] do not use deprecated is_error() + +--- + test/tokeniser2.c | 2 +- + test/tokeniser3.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/tokeniser2.c b/test/tokeniser2.c +index c8ab9c0..c077276 100644 +--- a/test/tokeniser2.c ++++ b/test/tokeniser2.c +@@ -48,7 +48,7 @@ int main(int argc, char **argv) + } + + json = json_object_from_file(argv[1]); +- assert(!is_error(json)); ++ assert(json); + + assert(strcmp((char *) ((json_object_get_object(json)->head)->k), + "tests") == 0); +diff --git a/test/tokeniser3.c b/test/tokeniser3.c +index 949ddd0..db5686e 100644 +--- a/test/tokeniser3.c ++++ b/test/tokeniser3.c +@@ -46,7 +46,7 @@ int main(int argc, char **argv) + } + + json = json_object_from_file(argv[1]); +- assert(!is_error(json)); ++ assert(json); + + assert(strcmp((char *) ((json_object_get_object(json)->head)->k), + "tests") == 0); +-- +2.14.3 + diff --git a/libhubbub-0.3.7-src.tar.gz b/libhubbub-0.3.7-src.tar.gz new file mode 100644 index 0000000..606f95e --- /dev/null +++ b/libhubbub-0.3.7-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e7ae253e6c9069e757eb9ad4e4846f38b4db52c0ca0151446a9fa4a977735b6 +size 784780 diff --git a/libhubbub.changes b/libhubbub.changes new file mode 100644 index 0000000..e992c55 --- /dev/null +++ b/libhubbub.changes @@ -0,0 +1,57 @@ +------------------------------------------------------------------- +Wed May 19 14:54:12 UTC 2021 - Fridrich Strba + +- Define conditionally make_build to fix build on systems that do + not have that macro + +------------------------------------------------------------------- +Wed Sep 2 09:19:47 UTC 2020 - Tomáš Chvátal + +- Update to 0.3.7: + * Fixes build with new netsurf-buildsystem pkg +- Remove non applicable patches: + * 0001-workaround-fail-on-ppc64.patch +- Do not bother with doxygen as the docu is online: + * libhubbub-0.3.0-notimestamp.patch + +------------------------------------------------------------------- +Mon Jul 6 05:52:15 UTC 2020 - Fridrich Strba + +- Removed patch: + * libhubbub-0.3.0-is_error.patch + + json-c/bits.h does not exist in newer json-c versions + * 0001-do-not-use-deprecated-is_error.patch + + Do not use deprecated is_error + + Fixes build of tests + +------------------------------------------------------------------- +Fri Jan 12 13:48:17 UTC 2018 - fstrba@suse.com + +- Added patch: + * libhubbub-0.3.0-is_error.patch + + Avoid implicit declaration and undefined symbol "is_error" + +------------------------------------------------------------------- +Tue Aug 8 19:41:39 UTC 2017 - jengelh@inai.de + +- Fix RPM groups. + +------------------------------------------------------------------- +Thu Jul 31 14:55:34 UTC 2014 - dvaleev@suse.com + +- Workaround false positive on powerpc64 (bnc#889740) + +- added patches: + * 0001-workaround-fail-on-ppc64.patch +------------------------------------------------------------------- +Fri May 23 11:27:44 UTC 2014 - tchvatal@suse.com + +- Cleanup with spec-cleaner + +------------------------------------------------------------------- +Fri May 23 11:06:45 UTC 2014 - fstrba@suse.com + +- Initial import of libhubbub, inspired by Fedora package +- Add patch to not store timestamp in package: + * libhubbub-0.3.0-notimestamp.patch + diff --git a/libhubbub.spec b/libhubbub.spec new file mode 100644 index 0000000..a0f5e87 --- /dev/null +++ b/libhubbub.spec @@ -0,0 +1,94 @@ +# +# spec file for package libhubbub +# +# Copyright (c) 2021 SUSE LLC +# +# 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/ +# + + +%{!?make_build:%global make_build make %{?_smp_mflags}} +%global make_vars COMPONENT_TYPE=lib-shared PREFIX=%{_prefix} LIBDIR=%{_lib} CC=cc Q= +%global build_vars OPTCFLAGS='%{optflags}' OPTLDFLAGS="$RPM_LD_FLAGS" +Name: libhubbub +Version: 0.3.7 +Release: 0 +Summary: An HTML5 compliant parsing library +License: MIT +URL: https://www.netsurf-browser.org/projects/hubbub/ +Source: http://download.netsurf-browser.org/libs/releases/%{name}-%{version}-src.tar.gz +Patch0: 0001-do-not-use-deprecated-is_error.patch +BuildRequires: netsurf-buildsystem >= 1.1 +BuildRequires: pkgconfig +BuildRequires: pkgconfig(check) +BuildRequires: pkgconfig(json-c) >= 0.11 +BuildRequires: pkgconfig(libparserutils) >= 0.2.0 + +%description +Hubbub is an HTML5 compliant parsing library, written in C. It was +developed as part of the NetSurf project. + +%package -n libhubbub0 +Summary: An HTML5 compliant parsing library + +%description -n libhubbub0 +Hubbub is an HTML5 compliant parsing library, written in C. It was +developed as part of the NetSurf project. + +The HTML5 specification defines a parsing algorithm, based on the +behaviour of mainstream browsers, which provides instructions for how to +parse all markup, both valid and invalid. As a result, Hubbub parses web +content well. + +Features: +* Parses HTML, good and bad +* Simple C API +* Fast +* Character encoding detection +* Well-tested (~90% test coverage) +* Portable + +%package devel +Summary: Development files for %{name} +Requires: libhubbub0 = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%autosetup -p1 + +sed -i -e s@-Werror@@ Makefile + +%build +%make_build %{make_vars} %{build_vars} + +%install +%make_install %{make_vars} + +%post -n libhubbub0 -p /sbin/ldconfig +%postun -n libhubbub0 -p /sbin/ldconfig + +%check +%make_build test %{make_vars} %{build_vars} + +%files -n libhubbub0 +%license COPYING +%{_libdir}/%{name}.so.* + +%files devel +%{_includedir}/hubbub +%{_libdir}/%{name}.so +%{_libdir}/pkgconfig/%{name}.pc + +%changelog