Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jun 2015 18:06:07 +0000 (UTC)
From:      Thierry Thomas <thierry@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r388849 - in head/www/tidy-devel: . files
Message-ID:  <201506081806.t58I67Fu054503@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thierry
Date: Mon Jun  8 18:06:06 2015
New Revision: 388849
URL: https://svnweb.freebsd.org/changeset/ports/388849

Log:
  Backport the fix from www/tidy-html5.
  
  PR:		ports/200631
  Submitted by:	Walter Hop
  Security:	VuXML: bd1ab7a5-0e01-11e5-9976-a0f3c100ae18

Added:
  head/www/tidy-devel/files/patch-src_lexer.c   (contents, props changed)
Modified:
  head/www/tidy-devel/Makefile
  head/www/tidy-devel/files/patch-build_gmake_Makefile
  head/www/tidy-devel/files/patch-build_gnuauto_configure.in
  head/www/tidy-devel/files/patch-build_gnuauto_include_Makefile.am
  head/www/tidy-devel/files/patch-console__tidy.c
  head/www/tidy-devel/files/patch-include_platform.h
  head/www/tidy-devel/pkg-plist

Modified: head/www/tidy-devel/Makefile
==============================================================================
--- head/www/tidy-devel/Makefile	Mon Jun  8 17:47:45 2015	(r388848)
+++ head/www/tidy-devel/Makefile	Mon Jun  8 18:06:06 2015	(r388849)
@@ -3,7 +3,7 @@
 
 PORTNAME?=	tidy
 DISTVERSION=	090315-cvs
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	www
 MASTER_SITES=	LOCAL/thierry
 #MASTER_SITES=	http://tidy.sourceforge.net/src/%SUBDIR%/	\

Modified: head/www/tidy-devel/files/patch-build_gmake_Makefile
==============================================================================
--- head/www/tidy-devel/files/patch-build_gmake_Makefile	Mon Jun  8 17:47:45 2015	(r388848)
+++ head/www/tidy-devel/files/patch-build_gmake_Makefile	Mon Jun  8 18:06:06 2015	(r388849)
@@ -1,6 +1,6 @@
---- build/gmake/Makefile.orig	2008-03-22 22:13:38.000000000 +0100
-+++ build/gmake/Makefile	2008-06-21 15:52:41.000000000 +0200
-@@ -58,8 +58,8 @@
+--- build/gmake/Makefile.orig	2008-03-22 21:13:38 UTC
++++ build/gmake/Makefile
+@@ -58,8 +58,8 @@ SHELL=/bin/sh
  PROJECT=tidy
  
  # Installation variables.  Spaces OK, only dir create and file copy operations.
@@ -11,7 +11,7 @@
  
  bininst = ${runinst_prefix}/bin
  libinst = ${devinst_prefix}/lib
-@@ -67,7 +67,7 @@
+@@ -67,7 +67,7 @@ incinst = ${devinst_prefix}/include/$(PR
  maninst = ${devinst_prefix}/man
  
  # Internal variables. - No spaces allowed: libtool chokes on spaces in directory names.
@@ -20,7 +20,7 @@
  INCDIR = ${TOPDIR}/include
  APPDIR = ${TOPDIR}/console
  SRCDIR = ${TOPDIR}/src
-@@ -90,8 +90,8 @@
+@@ -90,8 +90,8 @@ DOCDIR = ${TOPDIR}/htmldoc
  # CFLAGS etc..
  # For optimised builds, flags such as "-O2" should be added and -D_DEBUG=1
  # disabled.

Modified: head/www/tidy-devel/files/patch-build_gnuauto_configure.in
==============================================================================
--- head/www/tidy-devel/files/patch-build_gnuauto_configure.in	Mon Jun  8 17:47:45 2015	(r388848)
+++ head/www/tidy-devel/files/patch-build_gnuauto_configure.in	Mon Jun  8 18:06:06 2015	(r388849)
@@ -1,6 +1,6 @@
---- build/gnuauto/configure.in.orig	Mon Aug  2 09:14:28 2004
-+++ build/gnuauto/configure.in	Tue Aug  3 00:05:55 2004
-@@ -72,7 +72,7 @@
+--- build/gnuauto/configure.in.orig	2008-03-24 21:08:16 UTC
++++ build/gnuauto/configure.in
+@@ -72,7 +72,7 @@ AC_ARG_ENABLE(debug,[  --enable-debug   
  if test $debug_build = yes; then
  	CFLAGS="$save_cflags -g"
  else

Modified: head/www/tidy-devel/files/patch-build_gnuauto_include_Makefile.am
==============================================================================
--- head/www/tidy-devel/files/patch-build_gnuauto_include_Makefile.am	Mon Jun  8 17:47:45 2015	(r388848)
+++ head/www/tidy-devel/files/patch-build_gnuauto_include_Makefile.am	Mon Jun  8 18:06:06 2015	(r388849)
@@ -1,5 +1,5 @@
---- build/gnuauto/include/Makefile.am.orig	Sat Jan 18 15:23:43 2003
-+++ build/gnuauto/include/Makefile.am	Thu Feb 20 23:42:21 2003
+--- build/gnuauto/include/Makefile.am.orig	2006-10-06 09:25:13 UTC
++++ build/gnuauto/include/Makefile.am
 @@ -53,8 +53,8 @@
  #  acknowledgment is not required but would be appreciated.
  #

Modified: head/www/tidy-devel/files/patch-console__tidy.c
==============================================================================
--- head/www/tidy-devel/files/patch-console__tidy.c	Mon Jun  8 17:47:45 2015	(r388848)
+++ head/www/tidy-devel/files/patch-console__tidy.c	Mon Jun  8 18:06:06 2015	(r388849)
@@ -1,6 +1,6 @@
---- console/tidy.c.orig	Sat Mar  6 08:59:12 2004
-+++ console/tidy.c	Fri Mar 12 18:16:30 2004
-@@ -505,6 +505,9 @@
+--- console/tidy.c.orig	2008-03-22 20:53:08 UTC
++++ console/tidy.c
+@@ -1031,6 +1031,9 @@ int main( int argc, char** argv )
              else if ( strcasecmp(arg, "quiet") == 0 )
                  tidyOptSetBool( tdoc, TidyQuiet, yes );
  

Modified: head/www/tidy-devel/files/patch-include_platform.h
==============================================================================
--- head/www/tidy-devel/files/patch-include_platform.h	Mon Jun  8 17:47:45 2015	(r388848)
+++ head/www/tidy-devel/files/patch-include_platform.h	Mon Jun  8 18:06:06 2015	(r388849)
@@ -1,6 +1,6 @@
---- include/platform.h.orig	Sun Jan 21 21:36:21 2007
-+++ include/platform.h	Sat Feb  3 17:39:40 2007
-@@ -33,7 +33,7 @@
+--- include/platform.h.orig	2008-03-17 12:57:01 UTC
++++ include/platform.h
+@@ -33,7 +33,7 @@ extern "C" {
    It enables tidy to find config files named ~/.tidyrc if 
    the HTML_TIDY environment variable is not set.
  */
@@ -9,7 +9,7 @@
  
  /*
    Uncomment the following #define if your
-@@ -48,7 +48,7 @@
+@@ -48,7 +48,7 @@ extern "C" {
    Contributed by Todd Lewis.
  */
  

Added: head/www/tidy-devel/files/patch-src_lexer.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/tidy-devel/files/patch-src_lexer.c	Mon Jun  8 18:06:06 2015	(r388849)
@@ -0,0 +1,23 @@
+--- src/lexer.c.orig	2008-03-22 21:06:55 UTC
++++ src/lexer.c
+@@ -3467,16 +3467,17 @@ static tmbstr ParseValue( TidyDocImpl* d
+         /* and prompts attributes unless --literal-attributes is set to yes      */
+         /* #994841 - Whitespace is removed from value attributes                 */
+ 
+-        if (munge &&
++	/* Issue #217 from tidy-html5 - Also only if/while (len > 0) - MUST NEVER GO NEGATIVE! */
++        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;

Modified: head/www/tidy-devel/pkg-plist
==============================================================================
--- head/www/tidy-devel/pkg-plist	Mon Jun  8 17:47:45 2015	(r388848)
+++ head/www/tidy-devel/pkg-plist	Mon Jun  8 18:06:06 2015	(r388849)
@@ -18,5 +18,3 @@ lib/libtidy.a
 %%PORTDOCS%%%%DOCSDIR%%/release-notes.html
 %%PORTDOCS%%%%DOCSDIR%%/tidy.css
 %%PORTDOCS%%%%DOCSDIR%%/tidy.gif
-@dirrm include/tidy
-%%PORTDOCS%%@dirrm %%DOCSDIR%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506081806.t58I67Fu054503>