aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2015-06-09 02:06:06 +0800
committerthierry <thierry@FreeBSD.org>2015-06-09 02:06:06 +0800
commit14c6bcc42731c241a2118c7ab43f62b873a9d77a (patch)
tree3e7588a1f59cd406ac191cd7e730d0d45de3dbb9
parentc2f95dc0318921f92c781d788147b3b41680a7b8 (diff)
downloadfreebsd-ports-gnome-14c6bcc42731c241a2118c7ab43f62b873a9d77a.tar.gz
freebsd-ports-gnome-14c6bcc42731c241a2118c7ab43f62b873a9d77a.tar.zst
freebsd-ports-gnome-14c6bcc42731c241a2118c7ab43f62b873a9d77a.zip
Backport the fix from www/tidy-html5.
PR: ports/200631 Submitted by: Walter Hop Security: VuXML: bd1ab7a5-0e01-11e5-9976-a0f3c100ae18
-rw-r--r--www/tidy-devel/Makefile2
-rw-r--r--www/tidy-devel/files/patch-build_gmake_Makefile10
-rw-r--r--www/tidy-devel/files/patch-build_gnuauto_configure.in6
-rw-r--r--www/tidy-devel/files/patch-build_gnuauto_include_Makefile.am4
-rw-r--r--www/tidy-devel/files/patch-console__tidy.c6
-rw-r--r--www/tidy-devel/files/patch-include_platform.h8
-rw-r--r--www/tidy-devel/files/patch-src_lexer.c23
-rw-r--r--www/tidy-devel/pkg-plist2
8 files changed, 41 insertions, 20 deletions
diff --git a/www/tidy-devel/Makefile b/www/tidy-devel/Makefile
index 9f2a53eb7f44..9f6767d1ffe4 100644
--- a/www/tidy-devel/Makefile
+++ b/www/tidy-devel/Makefile
@@ -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%/ \
diff --git a/www/tidy-devel/files/patch-build_gmake_Makefile b/www/tidy-devel/files/patch-build_gmake_Makefile
index 75e577f4f12e..86e3364c89d7 100644
--- a/www/tidy-devel/files/patch-build_gmake_Makefile
+++ b/www/tidy-devel/files/patch-build_gmake_Makefile
@@ -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.
diff --git a/www/tidy-devel/files/patch-build_gnuauto_configure.in b/www/tidy-devel/files/patch-build_gnuauto_configure.in
index ca0db615b441..2898c512e4ba 100644
--- a/www/tidy-devel/files/patch-build_gnuauto_configure.in
+++ b/www/tidy-devel/files/patch-build_gnuauto_configure.in
@@ -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
diff --git a/www/tidy-devel/files/patch-build_gnuauto_include_Makefile.am b/www/tidy-devel/files/patch-build_gnuauto_include_Makefile.am
index 3b6dac467ef6..2b3d31827735 100644
--- a/www/tidy-devel/files/patch-build_gnuauto_include_Makefile.am
+++ b/www/tidy-devel/files/patch-build_gnuauto_include_Makefile.am
@@ -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.
#
diff --git a/www/tidy-devel/files/patch-console__tidy.c b/www/tidy-devel/files/patch-console__tidy.c
index f3cc84f4d257..740cc772b942 100644
--- a/www/tidy-devel/files/patch-console__tidy.c
+++ b/www/tidy-devel/files/patch-console__tidy.c
@@ -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 );
diff --git a/www/tidy-devel/files/patch-include_platform.h b/www/tidy-devel/files/patch-include_platform.h
index a49840924eed..1fd20533bbeb 100644
--- a/www/tidy-devel/files/patch-include_platform.h
+++ b/www/tidy-devel/files/patch-include_platform.h
@@ -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.
*/
diff --git a/www/tidy-devel/files/patch-src_lexer.c b/www/tidy-devel/files/patch-src_lexer.c
new file mode 100644
index 000000000000..a34e4bdf6a60
--- /dev/null
+++ b/www/tidy-devel/files/patch-src_lexer.c
@@ -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;
diff --git a/www/tidy-devel/pkg-plist b/www/tidy-devel/pkg-plist
index b0f815ce6b60..34b066cd5f49 100644
--- a/www/tidy-devel/pkg-plist
+++ b/www/tidy-devel/pkg-plist
@@ -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%%