summaryrefslogtreecommitdiff
path: root/app-text/htmltidy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-text/htmltidy
reinit the tree, so we can have metadata
Diffstat (limited to 'app-text/htmltidy')
-rw-r--r--app-text/htmltidy/Manifest9
-rw-r--r--app-text/htmltidy/files/11CVE-2015-5522.patch34
-rw-r--r--app-text/htmltidy/files/htmltidy-20090325-tidyrc.patch31
-rw-r--r--app-text/htmltidy/files/htmltidy-5.10.26-strip-O2-flag.patch12
-rw-r--r--app-text/htmltidy/htmltidy-20090325-r2.ebuild79
-rw-r--r--app-text/htmltidy/metadata.xml8
6 files changed, 173 insertions, 0 deletions
diff --git a/app-text/htmltidy/Manifest b/app-text/htmltidy/Manifest
new file mode 100644
index 000000000000..f3d5a3e2fff3
--- /dev/null
+++ b/app-text/htmltidy/Manifest
@@ -0,0 +1,9 @@
+AUX 11CVE-2015-5522.patch 1387 SHA256 23676aaf6f619009965ad5b4440789ef9ae53715b8f5bab77a018b87ed39a7a1 SHA512 d543dcf963fca7eaf644033a6f0252ec16b628984e1acd86fdb6d4657f01a2b3010c4c5f41b48126ce91cd38b5902349289ae4e11376cdc827813aac84b83f2c WHIRLPOOL 9856d43aa8e50b7adcb05c22b18e422fcaf6330bf861b8dd05e97de752d14d4b4e8831b047c5356cafec7b38bffc1549ed8bfa468e35a6f98d5f2c364a8b71b4
+AUX htmltidy-20090325-tidyrc.patch 923 SHA256 2953cab71d0363b3c53798e8405cef560a2026a4f4a044a9b21def11ab682811 SHA512 2acef36a990196c4c995a4678988f5f4bc51b87c17a01843b1f7cefc4ff1062425d366b29ace0839ea8b6b64a8923c5f56ac4048106825b946059eae8951e326 WHIRLPOOL cebe5a7147dc5dc80f2265beabf143b0717135d6217fb98cb4e231667d2c499230a6535b587ebb2d256ab1659dfff8b1035388cfbc35c996acf380ef5f6b39a6
+AUX htmltidy-5.10.26-strip-O2-flag.patch 370 SHA256 6acd356327faa4043a0b4cf5f242a5249d32c136fc39594701aca67ad70f353b SHA512 671a0ef17388fb39d5623e0dd2b8aa6c55c22d9f3ba8eea093ddea1234a2786ef983cbe9dd7002fe04b2986ae888458f4f44120c47aa34dc145d34d9db2f81d7 WHIRLPOOL 5eba3729929b61d5f36bd5dbe7316f755722087d40d791d6699ccae24d57711e440a7de1db3299690d7103412cb0b8a590c75574ce2f79ed9abdf802a447dd1b
+DIST tidy-20090325-doc.tar.bz2 13319 SHA256 be018829d24d5477556f3b72a426335ca21f62ca103b50a5d17c0e16ffd97956 SHA512 0224d1f839f3829a9c879eba8a98ceee3b0c9f8bfe1721076859714428d534f492acd11e49992fccc2e45afd64d79067793c90f7af06d623ef89e7c16dfee35b WHIRLPOOL ff8a127b28f9a1b3b4d65a0955e2e5253fd208f4eb723d884d7c06390b75ba1c191556def64d5f39ff671b15d165c294ffa3c102f3d574ee65b14eafd6ea1554
+DIST tidy-20090325.tar.bz2 382016 SHA256 58099898f326eff209a97509d1879cee19812a8a7048e2143b39821d35d7b6bd SHA512 daeab2c3dd7f1248a5dbc1585267a8fdb0be09a940b79c3e53c97051f692cf85ea9f0a267f37e1c877054b77efb836d422a1e7ff61b22b383a2d2ac08939b970 WHIRLPOOL b9dcc9561acebe02812f717a8b2dae95c3360db08701e45164a68e4216641282f277e3434c1a2365f021fbc91e467f2c863e237753f5ed3d5f7a76e6e3217c61
+EBUILD htmltidy-20090325-r2.ebuild 2004 SHA256 0bc627a6f33b80cac96b42618255ddf7f4b0c27c3b4602598f0bd5d040e701a2 SHA512 1ed2082e5c4c4df5e13f4febc7d65de8a6b0b18580660fd0ee09ff45973f41cfd7f92a80ae0f6fa7ea544c9632e1cf3c89e3bcc398658b937c6f7d116c5c5c5e WHIRLPOOL 2e0c4a964b2e29c6064759b9d9d41ff206129ea7d5d246aa9dff2e93af03818b5efb12ffa2f9957e4258460d287e6b3dd7297a8cc0104a622ba4871d3b727ab8
+MISC ChangeLog 5430 SHA256 80b78db97b9003fdc8544fe101d0a43a83880c29f137452ab318eba0f0b29b29 SHA512 906ef037a865b7b2445c1aee91c9aa8afe8baa8915d02c7dcb49a2865b945e8457268ff98af321c2ce4ba4d0abe6dc3b418635a13044f897abaedc19745f2e83 WHIRLPOOL 34cfd2a1b2f0648ed3e01f77ede6c8f3659ce844554983576bc5698c2172fef4a4c027cb797988da1c5f71c30e97853f604c2e2a039bded7b127a94b16bf9811
+MISC ChangeLog-2015 8899 SHA256 73f32dd9c06b7887099daf1f97c33813a588b51d4c9cdb8a24f20cfa9a8e9a07 SHA512 a4efcd5edfe0385bddc407604a70e05bb7fd39eb82eb5a666ba2e466fba80cdbb937cb002776fbf8d62451b7aca4850bf6a3e38961a60a04696a27447752ba15 WHIRLPOOL 20d7256d1b3779c7c74ebdc81cf314a232a67503debdf73708038e7a72b2a125a5e58e8f171a321c81465adf515edd475b18fd51c699b61cfaa9c56cf387d2d1
+MISC metadata.xml 241 SHA256 2c5ca5ac1d346383778a871af2456baf8ae270465d255063855a7a5f9de1a697 SHA512 3f74e1d47cf7af59d7255fbb4e6f04fc372447cc101a524779ac59bdc4acba08d53756350575e377f2ccf0ebf309f499ec81fda9d7cd93d234e53dd06cf504ba WHIRLPOOL f5c4d96a16689a42a05d95f5c7016432cc5a244145bfaffa7768dee17b73a2e656f22ef40fce3f1da5a809ef776d0b9cdea200c6c23a9ebc7a6d8c26e24db3c7
diff --git a/app-text/htmltidy/files/11CVE-2015-5522.patch b/app-text/htmltidy/files/11CVE-2015-5522.patch
new file mode 100644
index 000000000000..b4d6158ea04a
--- /dev/null
+++ b/app-text/htmltidy/files/11CVE-2015-5522.patch
@@ -0,0 +1,34 @@
+From c18f27a58792f7fbd0b30a0ff50d6b40a82f940d Mon Sep 17 00:00:00 2001
+From: Geoff McLane <ubuntu@geoffair.info>
+Date: Wed, 3 Jun 2015 20:26:03 +0200
+Subject: [PATCH] Issue #217 - avoid len going negative, ever...
+
+---
+ src/lexer.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/lexer.c b/src/lexer.c
+index 376a3d8..664f806 100644
+--- a/src/lexer.c
++++ b/src/lexer.c
+@@ -3739,16 +3740,17 @@ static tmbstr ParseValue( TidyDocImpl* doc, ctmbstr name,
+ /* and prompts attributes unless --literal-attributes is set to yes */
+ /* #994841 - Whitespace is removed from value attributes */
+
+- if (munge &&
++ /* Issue #217 - 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/app-text/htmltidy/files/htmltidy-20090325-tidyrc.patch b/app-text/htmltidy/files/htmltidy-20090325-tidyrc.patch
new file mode 100644
index 000000000000..942a61e1464c
--- /dev/null
+++ b/app-text/htmltidy/files/htmltidy-20090325-tidyrc.patch
@@ -0,0 +1,31 @@
+Index: tidy-20090325/include/platform.h
+===================================================================
+--- tidy-20090325.orig/include/platform.h
++++ tidy-20090325/include/platform.h
+@@ -24,7 +24,7 @@ extern "C" {
+ */
+
+ /* #define TIDY_CONFIG_FILE "/etc/tidy_config.txt" */ /* original */
+-/* #define TIDY_CONFIG_FILE "/etc/tidyrc" */
++#define TIDY_CONFIG_FILE "/etc/tidyrc"
+ /* #define TIDY_CONFIG_FILE "/etc/tidy.conf" */
+
+ /*
+@@ -33,7 +33,7 @@ extern "C" {
+ It enables tidy to find config files named ~/.tidyrc if
+ the HTML_TIDY environment variable is not set.
+ */
+-/* #define TIDY_USER_CONFIG_FILE "~/.tidyrc" */
++#define TIDY_USER_CONFIG_FILE "~/.tidyrc"
+
+ /*
+ Uncomment the following #define if your
+@@ -48,7 +48,7 @@ extern "C" {
+ Contributed by Todd Lewis.
+ */
+
+-/* #define SUPPORT_GETPWNAM */
++#define SUPPORT_GETPWNAM
+
+
+ /* Enable/disable support for Big5 and Shift_JIS character encodings */
diff --git a/app-text/htmltidy/files/htmltidy-5.10.26-strip-O2-flag.patch b/app-text/htmltidy/files/htmltidy-5.10.26-strip-O2-flag.patch
new file mode 100644
index 000000000000..4c805cf2226f
--- /dev/null
+++ b/app-text/htmltidy/files/htmltidy-5.10.26-strip-O2-flag.patch
@@ -0,0 +1,12 @@
+diff -urN tidy.old/configure.in tidy-26/configure.in
+--- tidy.old/configure.in 2006-02-13 17:17:49.000000000 +0100
++++ tidy-26/configure.in 2006-02-13 17:17:20.000000000 +0100
+@@ -72,7 +72,7 @@
+ if test $debug_build = yes; then
+ CFLAGS="$save_cflags -g"
+ else
+- CFLAGS="-O2 $save_cflags"
++ CFLAGS="$save_cflags"
+ fi
+ #
+ # =============================================
diff --git a/app-text/htmltidy/htmltidy-20090325-r2.ebuild b/app-text/htmltidy/htmltidy-20090325-r2.ebuild
new file mode 100644
index 000000000000..660b01c8fe4d
--- /dev/null
+++ b/app-text/htmltidy/htmltidy-20090325-r2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_PN="tidy"
+MY_P="${MY_PN}-${PV}"
+
+inherit eutils autotools
+
+DESCRIPTION="Tidy the layout and correct errors in HTML and XML documents"
+HOMEPAGE="http://tidy.sourceforge.net/"
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
+ mirror://gentoo/${MY_P}-doc.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="debug doc static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )"
+RDEPEND=""
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ # Required to setup the source dist for autotools
+ einfo "Setting up autotools for source build"
+ cp -R ./build/gnuauto/* . || die "could not prepare autotools environment"
+
+ # Stop tidy from appending -O2 to our CFLAGS
+ epatch "${FILESDIR}"/htmltidy-5.10.26-strip-O2-flag.patch
+
+ # Define /etc/tidyrc for system wide config, bug 154834
+ epatch "${FILESDIR}"/htmltidy-20090325-tidyrc.patch
+
+ # Fix security bug 561452
+ epatch "${FILESDIR}"/11CVE-2015-5522.patch
+
+ eautoreconf
+}
+
+src_compile() {
+ default
+
+ if use doc ; then
+ doxygen htmldoc/doxygen.cfg || die "error making apidocs"
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+
+ # Now the man page is provided as an xsl file, which
+ # we can't use until htmltidy is merged.
+ # I have generated the man page and quickref which is on
+ # the mirrors. (bug #132429)
+ doman "${WORKDIR}"/"${MY_P}"-doc/tidy.1
+
+ # Fix name before installing
+ mv "${WORKDIR}"/"${MY_P}"-doc/quickref-html \
+ "${WORKDIR}"/"${MY_P}"-doc/quickref.html
+
+ cd "${S}"/htmldoc
+ # Install basic html documentation
+ dohtml *.html *.css *.gif "${WORKDIR}"/"${MY_P}"-doc/quickref.html
+
+ # If use 'doc' is set, then we also want to install the
+ # api documentation
+ use doc && dohtml -r api
+}
diff --git a/app-text/htmltidy/metadata.xml b/app-text/htmltidy/metadata.xml
new file mode 100644
index 000000000000..3fbef354e7d1
--- /dev/null
+++ b/app-text/htmltidy/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">tidy</remote-id>
+ </upstream>
+</pkgmetadata>