diff options
author | Marek Szuba <marecki@gentoo.org> | 2023-10-22 11:34:57 +0100 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2023-10-22 12:03:35 +0100 |
commit | 31a4b6c93cc97cc69ee8c73120f09ceb4cebb786 (patch) | |
tree | 72476f2450d1406351cc83e83e22f48814e3be6f /app-text/htmltidy | |
parent | app-backup/borgmatic: drop 1.7.15 (diff) | |
download | gentoo-31a4b6c93cc97cc69ee8c73120f09ceb4cebb786.tar.gz gentoo-31a4b6c93cc97cc69ee8c73120f09ceb4cebb786.tar.bz2 gentoo-31a4b6c93cc97cc69ee8c73120f09ceb4cebb786.zip |
app-text/htmltidy: add upstream fix for <ol> attribute "type" in HTML5
Closes: https://bugs.gentoo.org/916074
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'app-text/htmltidy')
-rw-r--r-- | app-text/htmltidy/files/htmltidy-5.8.0-ol_type.patch | 29 | ||||
-rw-r--r-- | app-text/htmltidy/htmltidy-5.8.0-r2.ebuild | 74 |
2 files changed, 103 insertions, 0 deletions
diff --git a/app-text/htmltidy/files/htmltidy-5.8.0-ol_type.patch b/app-text/htmltidy/files/htmltidy-5.8.0-ol_type.patch new file mode 100644 index 000000000000..22d716f01561 --- /dev/null +++ b/app-text/htmltidy/files/htmltidy-5.8.0-ol_type.patch @@ -0,0 +1,29 @@ +https://github.com/htacg/tidy-html5/issues/1012 +https://bugs.gentoo.org/916074 + +commit e411ad0d2582471fe0961900b2789ee8b5b9cc4c +Author: Markus Pister <pister@absint.com> +Date: Wed Jan 5 08:30:10 2022 +0100 + + Attribute 'type' in tag 'ol' allowed for (X)HTML5 + + Mark the attribute 'type' as allowed for tag 'ol' in (X)HTML5. + + The attribute type was deprecated in HTML4. This decision was reverted + for HTML5, see + + https://www.w3.org/TR/2014/NOTE-html5-diff-20141209/#changed-attributes + + This fixes htacg#1012. + +--- a/src/attrdict.c ++++ b/src/attrdict.c +@@ -2321,7 +2321,7 @@ const AttrVersion TY_(W3CAttrsFor_OL)[] = + { TidyAttr_START, xxxx|HT32|H40T|H41T|X10T|H40F|H41F|X10F|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, + { TidyAttr_STYLE, xxxx|xxxx|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|xxxx|HT50|XH50 }, /* CORE override */ + { TidyAttr_TITLE, xxxx|xxxx|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50 }, /* CORE override */ +- { TidyAttr_TYPE, xxxx|HT32|H40T|H41T|X10T|H40F|H41F|X10F|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx }, ++ { TidyAttr_TYPE, xxxx|HT32|H40T|H41T|X10T|H40F|H41F|X10F|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, + { TidyAttr_XMLNS, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|XH11|XB10|HT50|XH50 }, /* CORE override */ + { TidyAttr_XML_LANG, xxxx|xxxx|xxxx|xxxx|X10T|xxxx|xxxx|X10F|xxxx|xxxx|X10S|XH11|XB10|xxxx|XH50 }, /* CORE override */ + INCLUDE_CORE_ATTRIBS diff --git a/app-text/htmltidy/htmltidy-5.8.0-r2.ebuild b/app-text/htmltidy/htmltidy-5.8.0-r2.ebuild new file mode 100644 index 000000000000..74031ae33649 --- /dev/null +++ b/app-text/htmltidy/htmltidy-5.8.0-r2.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +USE_RUBY="ruby26 ruby27 ruby30 ruby31 ruby32" +RUBY_OPTIONAL="yes" + +inherit cmake ruby-ng + +MY_PN="tidy-html5" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Tidy the layout and correct errors in HTML and XML documents" +HOMEPAGE="https://www.html-tidy.org/" +SRC_URI="https://github.com/htacg/${MY_PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/58" # subslot is SOVERSION +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="deprecated test" + +RESTRICT="!test? ( test )" +ruby_add_bdepend "test? ( dev-ruby/thor dev-ruby/tty-editor )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.8.0-no_static_lib.patch + "${FILESDIR}"/${PN}-5.8.0-ol_type.patch +) + +DOCS=( README.md README/CHANGELOG.md ) + +S="${WORKDIR}"/${MY_P} + +pkg_setup() { + use test && ruby-ng_pkg_setup +} + +src_unpack() { + # suppress ruby-ng export + default +} + +src_prepare() { + # suppress ruby-ng export + cmake_src_prepare +} + +src_compile() { + # suppress ruby-ng export + cmake_src_compile +} + +src_configure() { + local mycmakeargs=( + -DTIDY_CONSOLE_SHARED=ON + ) + use deprecated && mycmakeargs+=( + -DBUILD_TAB2SPACE=ON + -DTIDY_COMPAT_HEADERS=ON + ) + cmake_src_configure +} + +src_test() { + cd regression_testing || die + rm -f Gemfile.lock + ${RUBY} ./test.rb test -t "${BUILD_DIR}/tidy" || die "Test execution failed" +} + +src_install() { + cmake_src_install + use deprecated && dobin "${BUILD_DIR}"/tab2space +} |