html-tidy: unify with its drop-in replacement tidy-html5

- the original project has been unmaintained for years
- some dependants needed to be patched due to renamed headers
  https://github.com/htacg/tidy-html5/issues/326#issuecomment-160329114
- separate tidy-html5 package was removed, as since the 5.0.0 version
  it's meant as a successor to both, and library name got back
  from libtidy5.so to libtidy.so
  https://github.com/htacg/tidy-html5/issues/326#issuecomment-160314666

/cc committers to tidy-html5: @edwjto and @zimbatm.
This commit is contained in:
Vladimír Čunát 2015-11-29 09:33:50 +01:00
parent f2ad4a47e8
commit 81b9cc6f54
7 changed files with 46 additions and 68 deletions

View file

@ -2,6 +2,11 @@
, nepomuk_core, nepomuk_widgets, libXt }:
kde {
postPatch = ''
substituteInPlace konq-plugins/validators/tidy_validator.cpp \
--replace buffio.h tidybuffio.h
'';
buildInputs = [ kdelibs nepomuk_core nepomuk_widgets html-tidy kactivities libXt ];
meta = {

View file

@ -4,6 +4,11 @@ kde {
# todo: ruby19 is not found by the build system. not linking against ruby18 due to it being too old
postPatch = ''
substituteInPlace klinkstatus/src/tidy/tidyx.h \
--replace buffio.h tidybuffio.h
'';
buildInputs = [ kdelibs kdepimlibs html-tidy boost ];
meta = {

View file

@ -23,7 +23,9 @@ stdenv.mkDerivation rec {
substituteInPlace CMakeLists.txt \
--replace "tidy/tidy.h" "tidy.h" \
--replace "/usr/include/tidy" "${libtidy}/include" \
--replace "/usr/include/libxml2" "${libxml2}/include/libxml2" \
--replace "/usr/include/libxml2" "${libxml2}/include/libxml2"
substituteInPlace src/core/basetypes/MCHTMLCleaner.cpp \
--replace buffio.h tidybuffio.h
'';
cmakeFlags = [

View file

@ -12,11 +12,6 @@ stdenv.mkDerivation rec {
sha256 = "135fjbxjn385b6cjys6qhbwfw61mdcl2akkll4jfpdzfvhbxlyda";
};
buildInputs = [ openssl db zlib uwimap html-tidy pam ];
nativeBuildInputs = [ perl ];
NIX_LDFLAGS = "-lpam";
patches = [ ./install.patch ];
postPatch = ''
sed -i -e s/gmake/make/ -e 's/LDAP_ENABLE.*= true/LDAP_ENABLE=false/' \
@ -26,8 +21,16 @@ stdenv.mkDerivation rec {
Config
sed -i -e s,/usr/bin/perl,${perl}/bin/perl, \
templates/src/*.pl
'' + /* html-tidy updates */ ''
substituteInPlace ./session/html_secure_tidy.c \
--replace buffio.h tidybuffio.h
'';
buildInputs = [ openssl db zlib uwimap html-tidy pam ];
nativeBuildInputs = [ perl ];
NIX_LDFLAGS = "-lpam";
meta = {
homepage = http://www-uxsup.csx.cam.ac.uk/~dpc22/prayer/;
description = "Yet another Webmail interface for IMAP servers on Unix systems written in C";

View file

@ -1,41 +1,31 @@
{ fetchcvs, stdenv, autoconf, automake, libtool }:
{ stdenv, fetchurl, cmake, libxslt }:
let date = "2009-07-04"; in
stdenv.mkDerivation rec {
name = "html-tidy-20090704";
let
version = "5.0.0";
in
stdenv.mkDerivation rec {
name = "html-tidy-${version}";
# According to http://tidy.sourceforge.net/, there are no new
# release tarballs, so one has to either get the code from CVS or
# use a decade-old tarball.
src = fetchurl {
url = "https://github.com/htacg/tidy-html5/archive/${version}.tar.gz";
sha256 = "1qz7hgk482496agngp9grz4jqkyxrp29r2ywbccc9i5198yspca4";
};
src = fetchcvs {
inherit date;
cvsRoot = ":pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy";
module = "tidy";
sha256 = "d2e68b4335ebfde65ef66d5684f7693675c98bdd50b7a63c0b04f61db673aa6d";
};
nativeBuildInputs = [ cmake libxslt/*manpage*/ ];
buildInputs = [ autoconf automake libtool ];
# ATM bin/tidy is statically linked, as upstream provides no other option yet.
# https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107
preConfigure = ''
cp -rv build/gnuauto/* .
AUTOMAKE="automake --foreign" autoreconf -vfi
meta = with stdenv.lib; {
description = "A HTML validator and `tidier'";
longDescription = ''
HTML Tidy is a command-line tool and C library that can be
used to validate and fix HTML data.
'';
license = licenses.libpng; # very close to it - the 3 clauses are identical
homepage = http://html-tidy.org;
platforms = platforms.all;
maintainers = with maintainers; [ edwtjo ];
};
}
doCheck = true;
meta = {
description = "HTML Tidy, an HTML validator and `tidier'";
longDescription = ''
HTML Tidy is a command-line tool and C library that can be
used to validate and fix HTML data.
'';
license = stdenv.lib.licenses.mit;
homepage = http://tidy.sourceforge.net/;
maintainers = [ ];
};
}

View file

@ -1,25 +0,0 @@
{ stdenv, lib, cmake, fetchFromGitHub, libxslt, ... }:
stdenv.mkDerivation rec {
name = "tidy-html5";
version = "4.9.30";
src = fetchFromGitHub {
owner = "htacg";
repo = "tidy-html5";
rev = version;
sha256 = "0hd4c23352r5lnh23mx137wb4mkxcjdrl1dy8kgghszik5fprs3s";
};
buildInputs = [ cmake libxslt ];
meta = with stdenv.lib; {
description = "The granddaddy of HTML tools, with support for modern standards";
homepage = "http://www.html-tidy.org/";
license = licenses.w3c;
platforms = platforms.all;
maintainers = with maintainers; [ edwtjo ];
};
}

View file

@ -3397,8 +3397,6 @@ let
tftp-hpa = callPackage ../tools/networking/tftp-hpa {};
tidy-html5 = callPackage ../tools/text/tidy-html5 { };
tigervnc = callPackage ../tools/admin/tigervnc {
fontDirectories = [ xorg.fontadobe75dpi xorg.fontmiscmisc xorg.fontcursormisc
xorg.fontbhlucidatypewriter75dpi ];