From 8e506d5abc42013fd8a6a5c94937e35c1e681281 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Jul 16 2019 18:21:11 +0000 Subject: 5.7.28 (#1728023) enable -DTIDY_COMPAT_HEADERS link console app against shared lib --- diff --git a/.gitignore b/.gitignore index 7fa1f3e..47bb8b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /tidy-html5-5.6.0.tar.gz +/tidy-html5-5.7.28.tar.gz diff --git a/0002-Issue-656-protect-against-NULL-node-set-in-loop.patch b/0002-Issue-656-protect-against-NULL-node-set-in-loop.patch deleted file mode 100644 index 2b87ed9..0000000 --- a/0002-Issue-656-protect-against-NULL-node-set-in-loop.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a0414d65a69927808240e41c1235145413978c43 Mon Sep 17 00:00:00 2001 -From: Geoff McLane -Date: Sat, 16 Dec 2017 20:54:29 +0100 -Subject: [PATCH 02/12] Issue #656 - protect against NULL node set in loop - ---- - src/clean.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/clean.c b/src/clean.c -index de4caf5..e96dd3f 100644 ---- a/src/clean.c -+++ b/src/clean.c -@@ -2211,8 +2211,10 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc) - tidyBufAppend(&charsetString, "charset=", 8); - tidyBufAppend(&charsetString, (char*)enc, TY_(tmbstrlen)(enc)); - tidyBufAppend(&charsetString, "\0", 1); /* zero terminate the buffer */ -- /* process the children of the head */ -- for (currentNode = head->content; currentNode; currentNode = currentNode->next) -+ /* process the children of the head */ -+ /* Issue #656 - guard against 'currentNode' being set NULL in loop */ -+ for (currentNode = head->content; currentNode; -+ currentNode = (currentNode ? currentNode->next : NULL)) - { - if (!nodeIsMETA(currentNode)) - continue; /* not a meta node */ --- -2.14.3 - diff --git a/sources b/sources index e6db9bf..e4fbd9f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tidy-html5-5.6.0.tar.gz) = 179088a6dbd29bb0e4f0219222f755b186145495f7414f6d0e178803ab67140391283d35352d946f9790c6b1b5b462ee6e24f1cc84f19391cb9b65e73979ffd1 +SHA512 (tidy-html5-5.7.28.tar.gz) = 557cae0c00d581c9272649e0b3c143b70bc1941a59c497dd0b7266d70b3b2ff652dea075a855737d2d02ea58bb57d9403d61287c1ae40ec0281e7801991b57d7 diff --git a/tidy.spec b/tidy.spec index e9094c4..a12642d 100644 --- a/tidy.spec +++ b/tidy.spec @@ -1,20 +1,20 @@ %global libname libtidy %global upname tidy-html5 +%global tidy_compat_headers 1 Name: tidy Summary: Utility to clean up and pretty print HTML/XHTML/XML -Version: 5.6.0 -Release: 5%{?dist} +Version: 5.7.28 +Release: 1%{?dist} License: W3C URL: http://www.html-tidy.org/ Source0: https://github.com/htacg/%{upname}/archive/%{version}.tar.gz#/%{upname}-%{version}.tar.gz ## upstream patches -Patch2: 0002-Issue-656-protect-against-NULL-node-set-in-loop.patch -BuildRequires: gcc-c++ +BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: gcc BuildRequires: libxslt @@ -55,24 +55,19 @@ Requires: %{libname}%{?_isa} = %{version}-%{release} # FIXME: to do properly, s|tidy5|tidy| references everwhere ln -s tidy build/cmake/tidy5 - %build pushd build/cmake %cmake ../../ \ - -DCMAKE_BUILD_TYPE:STRING=Release + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DTIDY_CONSOLE_SHARED:BOOL=ON \ + %{?tidy_compat_headers:-DTIDY_COMPAT_HEADERS:BOOL=ON} popd -make %{?_smp_mflags} -C build/cmake +%make_build -C build/cmake %install -make install DESTDIR=$RPM_BUILD_ROOT -C build/cmake - - -# compat symlinks for header renames -# until apps are adapted for the new api -ln -s tidybuffio.h $RPM_BUILD_ROOT%{_includedir}/buffio.h -ln -s tidyplatform.h $RPM_BUILD_ROOT%{_includedir}/platform.h +make install/fast DESTDIR=%{buildroot} -C build/cmake ## unpackaged files # omit static lib @@ -91,14 +86,20 @@ rm -fv $RPM_BUILD_ROOT%{_libdir}/libtidys.a %files -n %{libname}-devel %{_includedir}/tidy*.h -# compat api +%if 0%{?tidy_compat_headers} %{_includedir}/buffio.h %{_includedir}/platform.h +%endif %{_libdir}/libtidy.so %{_libdir}/pkgconfig/tidy.pc %changelog +* Tue Jul 16 2019 Rex Dieter - 5.7.28-1 +- 5.7.28 (#1728023) +- enable -DTIDY_COMPAT_HEADERS +- link console app against shared lib + * Sun Feb 03 2019 Fedora Release Engineering - 5.6.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild