Updated tidy to 5.2.0.

This is the currently maintained version of tidy.
No concise changelog compared to the 2009 version available though,
sorry.
This commit is contained in:
wiz 2017-02-20 09:31:53 +00:00
parent 829ec9db50
commit fbf5d1dcea
8 changed files with 41 additions and 234 deletions

View file

@ -1,15 +1,16 @@
When editing HTML it's easy to make mistakes. Wouldn't it be nice if
there was a simple way to fix these mistakes automatically and tidy up
sloppy editing into nicely layed out markup? Well now there is thanks
to Hewlett Packard's Dave Raggett. HTML TIDY is a free utility for
doing just that. It also works great on the attrociously hard to read
markup generated by specialized HTML editors and conversion tools, and
can help you identify where you need to pay further attention on
making your pages more accessible to people with disabilities.
When editing HTML it's easy to make mistakes. Wouldn't it be nice
if there was a simple way to fix these mistakes automatically and
tidy up sloppy editing into nicely layed out markup? Well now
there is thanks to Hewlett Packard's Dave Raggett. HTML TIDY is a
free utility for doing just that. It also works great on the
attrociously hard to read markup generated by specialized HTML
editors and conversion tools, and can help you identify where you
need to pay further attention on making your pages more accessible
to people with disabilities.
Tidy is able to fix up a wide range of problems and to bring to your
attention things that you need to work on yourself. Each item found is
listed with the line number and column so that you can see where the
problem lies in your markup. Tidy won't generate a cleaned up version
when there are problems that it can't be sure of how to handle. These
are logged as "errors" rather than "warnings".
Tidy is able to fix up a wide range of problems and to bring to
your attention things that you need to work on yourself. Each item
found is listed with the line number and column so that you can
see where the problem lies in your markup. Tidy won't generate a
cleaned up version when there are problems that it can't be sure
of how to handle. These are logged as "errors" rather than "warnings".

View file

@ -1,69 +1,23 @@
# $NetBSD: Makefile,v 1.49 2016/11/25 16:05:23 leot Exp $
# $NetBSD: Makefile,v 1.50 2017/02/20 09:31:53 wiz Exp $
DISTNAME= tidy-20091027
PKGREVISION= 8
CATEGORIES= www
MASTER_SITES= # manually created tarballs on ftp.NetBSD.org only
DISTNAME= tidy-html5-5.2.0
PKGNAME= ${DISTNAME:S/-html5//}
CATEGORIES= www textproc
MASTER_SITES= ${MASTER_SITE_GITHUB:=htacg/}
GITHUB_PROJECT= tidy-html5
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.html-tidy.org/
COMMENT= Fixes and tidies up HTML files
LICENSE= mit
BUILD_DEPENDS+= libxslt>=1.1.0:../../textproc/libxslt
# for man page
BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
PKG_OPTIONS_VAR= PKG_OPTIONS.tidy
PKG_SUPPORTED_OPTIONS= doc
PKG_SUGGESTED_OPTIONS= doc
USE_LANGUAGES= c c++
.include "../../mk/bsd.options.mk"
WRKSRC= ${WRKDIR}/tidy
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_TOOLS+= aclocal autoconf automake gmake
CPPFLAGS+= -DSUPPORT_ACCESSIBILITY_CHECKS=1 -DSUPPORT_UTF16_ENCODINGS=1
CPPFLAGS+= -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_GETPWNAM=1
INSTALLATION_DIRS= ${PKGMANDIR}/man1
PLIST_SRC+= ${PKGDIR}/PLIST
.if !empty(PKG_OPTIONS:Mdoc)
BUILD_DEPENDS+= doxygen>=1.8.12:../../devel/doxygen
HTML_DOCFILES= Overview.html doxygen.cfg grid.gif tidy.css faq.html \
license.html pending.html release-notes.html tidy.gif
HTML_DOCDIR= ${PREFIX}/share/doc/tidy
INSTALLATION_DIRS+= ${HTML_DOCDIR} ${HTML_DOCDIR}/api
PLIST_SRC+= ${PKGDIR}/PLIST.doc
.endif
pre-configure:
cd ${WRKSRC}/build/gnuauto && cp -R -f * ${WRKSRC}
cd ${WRKSRC} && \
touch NEWS README AUTHORS ChangeLog; \
libtoolize --force --copy; \
aclocal; \
autoconf; \
automake -acf
post-build:
cd ${WRKSRC}/htmldoc && \
${WRKSRC}/console/tidy -xml-help > tidy.xml && \
${WRKSRC}/console/tidy -xml-config > tidy-config.xml && \
xsltproc tidy1.xsl tidy.xml > tidy.1
.if !empty(PKG_OPTIONS:Mdoc)
cd ${WRKSRC} && \
doxygen htmldoc/doxygen.cfg
.endif
post-install:
${INSTALL_MAN} ${WRKSRC}/htmldoc/tidy.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.if !empty(PKG_OPTIONS:Mdoc)
for doc in ${HTML_DOCFILES}; do \
${INSTALL_DATA} ${WRKSRC}/htmldoc/$$doc ${DESTDIR}${HTML_DOCDIR} ; \
done
${INSTALL_DATA} ${WRKSRC}/htmldoc/api/* ${DESTDIR}${HTML_DOCDIR}/api
.endif
USE_CMAKE= yes
CMAKE_ARGS+= -DMAN_INSTALL_DIR:PATH=${PKGMANDIR}/man1
CMAKE_ARGS+= -DINCLUDE_INSTALL_DIR:PATH=include/tidy
.include "../../mk/bsd.pkg.mk"

View file

@ -1,9 +1,11 @@
@comment $NetBSD: PLIST,v 1.7 2009/06/14 22:00:37 joerg Exp $
bin/tab2space
@comment $NetBSD: PLIST,v 1.8 2017/02/20 09:31:53 wiz Exp $
bin/tidy
include/tidy/buffio.h
include/tidy/platform.h
include/tidy/tidy.h
include/tidy/tidybuffio.h
include/tidy/tidyenum.h
lib/libtidy.la
include/tidy/tidyplatform.h
lib/libtidy.so
lib/libtidy.so.5
lib/libtidy.so.${PKGVERSION}
lib/libtidys.a
man/man1/tidy.1

View file

@ -1,104 +0,0 @@
@comment $NetBSD: PLIST.doc,v 1.11 2016/11/24 13:43:36 mef Exp $
share/doc/tidy/Overview.html
share/doc/tidy/api/annotated.html
share/doc/tidy/api/annotated_dup.js
share/doc/tidy/api/bc_s.png
share/doc/tidy/api/bdwn.png
share/doc/tidy/api/buffio_8h.html
share/doc/tidy/api/buffio_8h.js
share/doc/tidy/api/buffio_8h_source.html
share/doc/tidy/api/classes.html
share/doc/tidy/api/closed.png
share/doc/tidy/api/deprecated.html
share/doc/tidy/api/dir_000000.html
share/doc/tidy/api/doc.png
share/doc/tidy/api/doxygen.css
share/doc/tidy/api/doxygen.png
share/doc/tidy/api/dynsections.js
share/doc/tidy/api/files.html
share/doc/tidy/api/files.js
share/doc/tidy/api/folderclosed.png
share/doc/tidy/api/folderopen.png
share/doc/tidy/api/functions.html
share/doc/tidy/api/functions_func.html
share/doc/tidy/api/functions_vars.html
share/doc/tidy/api/globals.html
share/doc/tidy/api/globals_defs.html
share/doc/tidy/api/globals_func.html
share/doc/tidy/api/globals_type.html
share/doc/tidy/api/group__AttrGet.html
share/doc/tidy/api/group__AttrGet.js
share/doc/tidy/api/group__AttrGetAttributeName.html
share/doc/tidy/api/group__AttrIsAttributeName.html
share/doc/tidy/api/group__Attribute.html
share/doc/tidy/api/group__Attribute.js
share/doc/tidy/api/group__Basic.html
share/doc/tidy/api/group__Basic.js
share/doc/tidy/api/group__Clean.html
share/doc/tidy/api/group__Clean.js
share/doc/tidy/api/group__Configuration.html
share/doc/tidy/api/group__Configuration.js
share/doc/tidy/api/group__IO.html
share/doc/tidy/api/group__IO.js
share/doc/tidy/api/group__Memory.html
share/doc/tidy/api/group__Memory.js
share/doc/tidy/api/group__NodeAsk.html
share/doc/tidy/api/group__NodeAsk.js
share/doc/tidy/api/group__NodeIsElementName.html
share/doc/tidy/api/group__Opaque.html
share/doc/tidy/api/group__Opaque.js
share/doc/tidy/api/group__Parse.html
share/doc/tidy/api/group__Parse.js
share/doc/tidy/api/group__Save.html
share/doc/tidy/api/group__Save.js
share/doc/tidy/api/group__Tree.html
share/doc/tidy/api/index.html
share/doc/tidy/api/jquery.js
share/doc/tidy/api/modules.html
share/doc/tidy/api/modules.js
share/doc/tidy/api/nav_f.png
share/doc/tidy/api/nav_g.png
share/doc/tidy/api/nav_h.png
share/doc/tidy/api/navtree.css
share/doc/tidy/api/navtree.js
share/doc/tidy/api/navtreedata.js
share/doc/tidy/api/navtreeindex0.js
share/doc/tidy/api/navtreeindex1.js
share/doc/tidy/api/open.png
share/doc/tidy/api/pages.html
share/doc/tidy/api/platform_8h_source.html
share/doc/tidy/api/resize.js
share/doc/tidy/api/splitbar.png
share/doc/tidy/api/structTidyAttr.html
share/doc/tidy/api/structTidyDoc.html
share/doc/tidy/api/structTidyNode.html
share/doc/tidy/api/structTidyOption.html
share/doc/tidy/api/struct__TidyAllocator.html
share/doc/tidy/api/struct__TidyAllocator.js
share/doc/tidy/api/struct__TidyAllocatorVtbl.html
share/doc/tidy/api/struct__TidyAllocatorVtbl.js
share/doc/tidy/api/struct__TidyBuffer.html
share/doc/tidy/api/struct__TidyBuffer.js
share/doc/tidy/api/struct__TidyInputSource.html
share/doc/tidy/api/struct__TidyInputSource.js
share/doc/tidy/api/struct__TidyOutputSink.html
share/doc/tidy/api/struct__TidyOutputSink.js
share/doc/tidy/api/sync_off.png
share/doc/tidy/api/sync_on.png
share/doc/tidy/api/tab_a.png
share/doc/tidy/api/tab_b.png
share/doc/tidy/api/tab_h.png
share/doc/tidy/api/tab_s.png
share/doc/tidy/api/tabs.css
share/doc/tidy/api/tidy_8h.html
share/doc/tidy/api/tidy_8h.js
share/doc/tidy/api/tidy_8h_source.html
share/doc/tidy/api/tidyenum_8h_source.html
share/doc/tidy/doxygen.cfg
share/doc/tidy/faq.html
share/doc/tidy/grid.gif
share/doc/tidy/license.html
share/doc/tidy/pending.html
share/doc/tidy/release-notes.html
share/doc/tidy/tidy.css
share/doc/tidy/tidy.gif

View file

@ -1,11 +1,11 @@
# $NetBSD: buildlink3.mk,v 1.9 2009/03/20 19:25:38 joerg Exp $
# $NetBSD: buildlink3.mk,v 1.10 2017/02/20 09:31:53 wiz Exp $
BUILDLINK_TREE+= tidy
.if !defined(TIDY_BUILDLINK3_MK)
TIDY_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.tidy+= tidy>=20080324
BUILDLINK_API_DEPENDS.tidy+= tidy>=5.1.25<20000000
BUILDLINK_PKGSRCDIR.tidy?= ../../www/tidy
.endif # TIDY_BUILDLINK3_MK

View file

@ -1,8 +1,6 @@
$NetBSD: distinfo,v 1.21 2015/11/04 02:47:40 agc Exp $
$NetBSD: distinfo,v 1.22 2017/02/20 09:31:53 wiz Exp $
SHA1 (tidy-20091027.tar.gz) = f77203b481430fef66382dc32ae5152004dabe78
RMD160 (tidy-20091027.tar.gz) = b1e1aa3178b2e16095e1e6a532644462640b3f7f
SHA512 (tidy-20091027.tar.gz) = 6df1744a59efba4fa86c356d5ebb498f60ce458e5f946105b6b8bf6641424f04084acba55668b2d3eb11f3f3adb9e3ede9af04393f074f4bfbd311c1d3c617e9
Size (tidy-20091027.tar.gz) = 492052 bytes
SHA1 (patch-aa) = 1c9f52f2713bdab8662dd71ccecadbfe3806bda0
SHA1 (patch-src_lexer.c) = abb93b322452607e552c3c76871acf5de93c9cf5
SHA1 (tidy-html5-5.2.0.tar.gz) = c1571eafa928390feee9e03445bf806127852288
RMD160 (tidy-html5-5.2.0.tar.gz) = 60688847dcfdaa2070d3ad7274daa78392856875
SHA512 (tidy-html5-5.2.0.tar.gz) = 9ab4c085235ff01988fa86c43fdcd5870eee077e4bcbaee5ca9b9679f363f476b39243b749ea66e5eb8a08c41d7a8346166b73e71f0b3239b955d20211f3b253
Size (tidy-html5-5.2.0.tar.gz) = 529016 bytes

View file

@ -1,17 +0,0 @@
$NetBSD: patch-aa,v 1.9 2015/07/26 15:58:53 spz Exp $
Use subdirectory for include files.
--- build/gnuauto/include/Makefile.am.orig 2006-10-06 09:25:13.000000000 +0000
+++ build/gnuauto/include/Makefile.am
@@ -53,8 +53,8 @@
# acknowledgment is not required but would be appreciated.
#
-#tidyincdir = $(includedir)/tidy
-tidyincdir = $(includedir)
+tidyincdir = $(includedir)/tidy
+#tidyincdir = $(includedir)
tidyinc_HEADERS = \
platform.h \

View file

@ -1,27 +0,0 @@
$NetBSD: patch-src_lexer.c,v 1.1 2015/07/26 15:58:53 spz Exp $
Fix for CVE-2015-5522 and CVE-2015-5523 from
https://github.com/htacg/tidy-html5/commit/c18f27a58792f7fbd0b30a0ff50d6b40a82f940d
--- src/lexer.c.orig 2008-03-22 21:06:55.000000000 +0000
+++ src/lexer.c
@@ -3467,16 +3467,16 @@ static tmbstr ParseValue( TidyDocImpl* d
/* and prompts attributes unless --literal-attributes is set to yes */
/* #994841 - Whitespace is removed from value attributes */
- if (munge &&
+ if ((len > 0) && munge &&
TY_(tmbstrcasecmp)(name, "alt") &&
TY_(tmbstrcasecmp)(name, "title") &&
TY_(tmbstrcasecmp)(name, "value") &&
TY_(tmbstrcasecmp)(name, "prompt"))
{
- while (TY_(IsWhite)(lexer->lexbuf[start+len-1]))
+ while (TY_(IsWhite)(lexer->lexbuf[start+len-1]) && (len > 0))
--len;
- while (TY_(IsWhite)(lexer->lexbuf[start]) && start < len)
+ while (TY_(IsWhite)(lexer->lexbuf[start]) && (start < len) && (len > 0))
{
++start;
--len;