diff options
Diffstat (limited to 'app-text/htmltidy')
-rw-r--r-- | app-text/htmltidy/Manifest | 2 | ||||
-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 |
3 files changed, 105 insertions, 0 deletions
diff --git a/app-text/htmltidy/Manifest b/app-text/htmltidy/Manifest index 292bdacc514c..ee34d6cc0755 100644 --- a/app-text/htmltidy/Manifest +++ b/app-text/htmltidy/Manifest @@ -1,4 +1,6 @@ AUX htmltidy-5.8.0-no_static_lib.patch 1282 BLAKE2B 6c5dd8ce16b0e05ce0cca9ea268b85bffa371f99e20d909f606c20c5fb6d06464f65daf7a297989966656f3eda0d5cc920a8f9e60dbbbba21927aab180567f9b SHA512 8742a0db922098f46d377861d56c6202144ed02c9603e3899817c9d1b5a903bc10e729066c2bc95b0a9c9b63603c6ed42a3b8486264d3560b78255b096b62000 +AUX htmltidy-5.8.0-ol_type.patch 1567 BLAKE2B fa07da261116af1d3634f8670da0c53b47621323bea883d989225a9b309399003a9a93f0b869550e28f1f655feabf1927d715a139833a00117f4a4f647c7d9f5 SHA512 4a83df6a594f49f7a6e739876e4e874c908ae9d1f92c2291a530950de44dd22313681662ce48fe13cddd0847c664bbd27375ee41e899b82888ccffaa84371e2f DIST htmltidy-5.8.0.tar.gz 1015303 BLAKE2B e8e48cfdcfffb7c7ac494f71ba709361e21fcbe5cfbd56c29d9d67ffe11fcdc20aa03aace65e6dc5315988dc0dd1fc148be616549f4f84f37928e662633bd7ec SHA512 f352165bdda5d1fca7bba3365560b64d6f70a4e010821cd246cde43bed5c23cea3408d461d3f889110fd35ec9b68aa2b4e95412b07775eb852b7ee1745007a44 EBUILD htmltidy-5.8.0-r1.ebuild 1523 BLAKE2B 0515e8f8e8852cea83db2f3bbf10c03da3a59771948485d870f9bb388d4175fc849a07919aa8a27d1d545c8aadc952253d867bf736059b4a52a6dbcf799c62b7 SHA512 18e42cd736ad7a26a2aa5c663490e0893523909888b4204faad1ec354e5f5be27d7ad3d7eb28d2fd7cc99b63f5ecae3930cc63a9019fd2fa463dc683bfa02a52 +EBUILD htmltidy-5.8.0-r2.ebuild 1572 BLAKE2B b85d40a9a8221212d5441634ce38999c092d35ed3ad7a1ab243edd6b212b3d59b27a6d904624efe3dca6c9b7e1daef1f7ec710071089541c9bfd828cf8e800dc SHA512 b4efcd5d117a66957ce82c010ef0ffd54e324464a4b24189761a3f570dcb863c3c19a8b8a42cd0f7865f84265ceacc34eb99f16bfa3b605fbc616bb0c1624433 MISC metadata.xml 608 BLAKE2B 7fcc3eaa3f24191606776cc3a92f97d58f1ba27c3ebeea50727bc334d504ef09ff4387208222080574856db1e6d1d8689a9b22f1ef0f0347f3bb82d9a38a6afc SHA512 adc1857b273dc8bb8fd7215cd733e56dd41eb7e9eaf82ccf183f001afeeaafd2ba4cde4f9b75c2882427ebed7cfcb60a16408d19f9f6c6ad91b6beacc9edefeb 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 +} |