diff --git a/app-text/htmltidy/patches/tidy-5.1.25.patchset b/app-text/htmltidy/patches/tidy-5.1.25.patchset
deleted file mode 100644
index 14aa95916..000000000
--- a/app-text/htmltidy/patches/tidy-5.1.25.patchset
+++ /dev/null
@@ -1,44 +0,0 @@
-From 3794d4db987bff122b942190999a789f6e9c641d Mon Sep 17 00:00:00 2001
-From: Adrien Destugues
-Date: Sun, 17 Jan 2016 10:47:10 +0100
-Subject: Port to Haiku.
-
-
-diff --git a/include/tidyplatform.h b/include/tidyplatform.h
-index a40e0a0..f1a68e7 100644
---- a/include/tidyplatform.h
-+++ b/include/tidyplatform.h
-@@ -411,7 +411,7 @@ extern "C" {
- #if PRESERVE_FILE_TIMES
-
- #ifndef HAS_FUTIME
--#if defined(CYGWIN_OS) || defined(BE_OS) || defined(OS2_OS) || defined(HPUX_OS) || defined(SOLARIS_OS) || defined(LINUX_OS) || defined(BSD_BASED_OS) || defined(MAC_OS) || defined(__MSL__) || defined(IRIX_OS) || defined(AIX_OS) || defined(__BORLANDC__)
-+#if defined(CYGWIN_OS) || defined(BE_OS) || defined(OS2_OS) || defined(HPUX_OS) || defined(SOLARIS_OS) || defined(LINUX_OS) || defined(BSD_BASED_OS) || defined(MAC_OS) || defined(__MSL__) || defined(IRIX_OS) || defined(AIX_OS) || defined(__BORLANDC__) || defined(__HAIKU__)
- #define HAS_FUTIME 0
- #else
- #define HAS_FUTIME 1
-@@ -460,6 +460,12 @@ extern "C" {
-
- #endif /* PRESERVE_FILE_TIMES */
-
-+#if defined(__HAIKU__)
-+#ifndef va_copy
-+#define va_copy(dest, src) (dest = src)
-+#endif
-+#endif
-+
- /*
- MS Windows needs _ prefix for Unix file functions.
- Not required by Metrowerks Standard Library (MSL).
-@@ -520,7 +526,7 @@ extern "C" {
- #if defined(BE_OS) || defined(SOLARIS_OS) || defined(BSD_BASED_OS) || defined(OSF_OS) || defined(IRIX_OS) || defined(AIX_OS)
- #include
- #endif
--#if !defined(HPUX_OS) && !defined(CYGWIN_OS) && !defined(MAC_OS_X) && !defined(BE_OS) && !defined(SOLARIS_OS) && !defined(BSD_BASED_OS) && !defined(OSF_OS) && !defined(IRIX_OS) && !defined(AIX_OS) && !defined(LINUX_OS)
-+#if !defined(HPUX_OS) && !defined(CYGWIN_OS) && !defined(MAC_OS_X) && !defined(BE_OS) && !defined(SOLARIS_OS) && !defined(BSD_BASED_OS) && !defined(OSF_OS) && !defined(IRIX_OS) && !defined(AIX_OS) && !defined(LINUX_OS) && !defined(__HAIKU__)
- # undef uint
- typedef unsigned int uint;
- #endif
---
-2.7.0
-
diff --git a/app-text/htmltidy/tidy-5.1.25.recipe b/app-text/htmltidy/tidy-5.1.25.recipe
deleted file mode 100644
index c4779fcf5..000000000
--- a/app-text/htmltidy/tidy-5.1.25.recipe
+++ /dev/null
@@ -1,57 +0,0 @@
-# Haikuporter does not want the summary to start with "Tidy". How nice.
-SUMMARY="(stupid) Tidy the layout and correct errors in HTML and XML documents"
-DESCRIPTION="Tidy tidies HTML and XML. It can tidy your documents by itself, \
-and developers can easily integrate its features into even more powerful tools."
-HOMEPAGE="http://www.html-tidy.org/"
-SOURCE_URI="https://github.com/htacg/tidy-html5/archive/$portVersion.tar.gz"
-CHECKSUM_SHA256="be81e967537984fbd207b4b19d02e7be73cbf201f07bf55aa5560c9b1d19b106"
-SOURCE_DIR="tidy-html5-$portVersion"
-PATCHES="tidy-$portVersion.patchset"
-REVISION="3"
-LICENSE="MIT"
-COPYRIGHT="1998-2015 World Wide Web Consortium"
-ARCHITECTURES="all"
-SECONDARY_ARCHITECTURES="x86_gcc2 x86"
-
-PROVIDES="
- tidy$secondaryArchSuffix = $portVersion
- cmd:tidy$secondaryArchSuffix = $portVersion
- lib:libtidy$secondaryArchSuffix = 5.1.25 compat >= 5
- "
-REQUIRES="
- haiku$secondaryArchSuffix
- "
-PROVIDES_devel="
- devel:libtidy$secondaryArchSuffix = 5.1.25 compat >= 5
- devel:libtidys$secondaryArchSuffix
- "
-REQUIRES_devel="
- tidy$secondaryArchSuffix == $portVersion base
- "
-BUILD_REQUIRES="
- haiku${secondaryArchSuffix}_devel
- "
-BUILD_PREREQUIRES="
- cmd:gcc$secondaryArchSuffix
- cmd:cmake
- cmd:make
- "
-
-BUILD()
-{
- cd build/cmake
- cmake ../.. $cmakeDirArgs -DINCLUDE_INSTALL_DIR=develop/headers
- make $jobArgs
-}
-INSTALL()
-{
- cd build/cmake
- make install
- prepareInstalledDevelLibs libtidy libtidys
- packageEntries devel $developDir
-}
-TEST()
-{
- cd test
- sh testall.sh
-}
diff --git a/app-text/htmltidy/tidy-5.8.0.recipe b/app-text/htmltidy/tidy-5.8.0.recipe
new file mode 100644
index 000000000..835c8fd7b
--- /dev/null
+++ b/app-text/htmltidy/tidy-5.8.0.recipe
@@ -0,0 +1,69 @@
+SUMMARY="Tidies the layout and correct errors in HTML and XML documents"
+DESCRIPTION="Tidy tidies HTML and XML. It can tidy your documents by itself, \
+and developers can easily integrate its features into even more powerful tools."
+HOMEPAGE="http://www.html-tidy.org/"
+COPYRIGHT="1998-2022 World Wide Web Consortium"
+LICENSE="MIT"
+REVISION="1"
+SOURCE_URI="https://github.com/htacg/tidy-html5/archive/$portVersion.tar.gz"
+CHECKSUM_SHA256="59c86d5b2e452f63c5cdb29c866a12a4c55b1741d7025cf2f3ce0cde99b0660e"
+SOURCE_DIR="tidy-html5-$portVersion"
+
+ARCHITECTURES="all !x86_gcc2"
+SECONDARY_ARCHITECTURES="x86"
+
+libVersion="$portVersion"
+libVersionCompat="$libVersion compat >= 58"
+
+PROVIDES="
+ tidy$secondaryArchSuffix = $portVersion
+ cmd:tidy = $portVersion
+ lib:libtidy$secondaryArchSuffix = $libVersionCompat
+ "
+REQUIRES="
+ haiku$secondaryArchSuffix
+ "
+
+PROVIDES_devel="
+ tidy${secondaryArchSuffix}_devel = $portVersion
+ devel:libtidy$secondaryArchSuffix = $libVersionCompat
+ "
+REQUIRES_devel="
+ tidy$secondaryArchSuffix == $portVersion base
+ "
+
+BUILD_REQUIRES="
+ haiku${secondaryArchSuffix}_devel
+ "
+BUILD_PREREQUIRES="
+ cmd:gcc$secondaryArchSuffix
+ cmd:cmake
+ cmd:make
+ "
+
+defineDebugInfoPackage tidy$secondaryArchSuffix \
+ $libDir/libtidy.so.$libVersion
+
+BUILD()
+{
+ cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=$prefix \
+ -DLIB_INSTALL_DIR=$libDir \
+ -DINCLUDE_INSTALL_DIR=$includeDir \
+ -DMAN_INSTALL_DIR=$manDir/man1
+ make -C build $jobArgs
+}
+INSTALL()
+{
+ make -C build install
+
+ prepareInstalledDevelLib libtidy
+ fixPkgconfig
+
+ packageEntries devel \
+ $developDir
+}
+TEST()
+{
+ ./build/tidy --version
+}
diff --git a/app-text/htmltidy/tidy57-5.7.0~git.recipe b/app-text/htmltidy/tidy57-5.7.0~git.recipe
deleted file mode 100644
index 62f4e4c53..000000000
--- a/app-text/htmltidy/tidy57-5.7.0~git.recipe
+++ /dev/null
@@ -1,90 +0,0 @@
-SUMMARY="The granddaddy of HTML tools, with support for modern standards"
-DESCRIPTION="Tidy tidies HTML and XML. It can tidy your documents by itself, \
-and developers can easily integrate its features into even more powerful tools."
-HOMEPAGE="http://www.html-tidy.org/"
-COPYRIGHT="1998-2015 World Wide Web Consortium"
-LICENSE="MIT"
-REVISION="1"
-srcGitRev="28be79db50d2ecf6730068167d8ed23987fa8d59"
-SOURCE_URI="https://github.com/htacg/tidy-html5/archive/$srcGitRev.tar.gz"
-CHECKSUM_SHA256="5fddac299a385203e06a2158df3acd68aa83ffd10d5bdf73b9e7f2913dee1a88"
-SOURCE_FILENAME="tidy-html5-$portVersion-$srcGitRev.tar.gz"
-SOURCE_DIR="tidy-html5-$srcGitRev"
-
-ARCHITECTURES="all"
-SECONDARY_ARCHITECTURES="x86"
-
-libVersion=5.7.0
-libVersionCompat="$libVersion compat >= 5"
-
-PROVIDES="
- tidy57$secondaryArchSuffix = $portVersion
- lib:libtidy$secondaryArchSuffix = $libVersionCompat
- "
-if [ -z "$secondaryArchSuffix" ]; then
-PROVIDES="$PROVIDES
- cmd:tidy = $portVersion
- "
-fi
-REQUIRES="
- haiku$secondaryArchSuffix
- "
-CONFLICTS="
- tidy$secondaryArchSuffix
- "
-
-PROVIDES_devel="
- tidy57${secondaryArchSuffix}_devel = $portVersion
- devel:libtidy$secondaryArchSuffix = $libVersion
- devel:libtidys$secondaryArchSuffix
- "
-REQUIRES_devel="
- tidy57$secondaryArchSuffix == $portVersion base
- "
-CONFLICTS_devel="
- tidy${secondaryArchSuffix}_devel
- "
-
-BUILD_REQUIRES="
- haiku${secondaryArchSuffix}_devel
- "
-BUILD_PREREQUIRES="
- cmd:cmake
- cmd:gcc$secondaryArchSuffix
- cmd:make
- cmd:xsltproc$secondaryArchSuffix
- "
-
-defineDebugInfoPackage tidy57$secondaryArchSuffix \
- $libDir/libtidy.so.$libVersion
-
-BUILD()
-{
- cd build/cmake
-
- cmake ../.. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
- -DLIB_INSTALL_DIR=$libDir \
- -DINCLUDE_INSTALL_DIR=$includeDir \
- -DMAN_INSTALL_DIR=$manDir/man1 \
- -DBIN_INSTALL_DIR=$binDir
-
- make $jobArgs
-}
-
-INSTALL()
-{
- make -C build/cmake install
-
- prepareInstalledDevelLibs libtidy libtidys
- fixPkgconfig
-
- if [ -n "$secondaryArchSuffix" ]; then
- rm -rf $prefix/bin
- rm -rf $manDir
- fi
-
- # devel package
- packageEntries devel \
- $developDir
-}