Sync from SUSE:ALP:Source:Standard:1.0 libhubbub revision 028419082bc1edf10414d39c4ea70c74

This commit is contained in:
Adrian Schröter 2024-02-13 13:38:59 +01:00
commit 2d2ffa818a
5 changed files with 216 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

View File

@ -0,0 +1,39 @@
From 2a7157c319d4de41af31f5ce08723a9ead09e53f Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
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

BIN
libhubbub-0.3.7-src.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

57
libhubbub.changes Normal file
View File

@ -0,0 +1,57 @@
-------------------------------------------------------------------
Wed May 19 14:54:12 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- 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 <tchvatal@suse.com>
- 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 <fstrba@suse.com>
- 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

94
libhubbub.spec Normal file
View File

@ -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