mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
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:
parent
f2ad4a47e8
commit
81b9cc6f54
7 changed files with 46 additions and 68 deletions
|
@ -2,6 +2,11 @@
|
||||||
, nepomuk_core, nepomuk_widgets, libXt }:
|
, nepomuk_core, nepomuk_widgets, libXt }:
|
||||||
|
|
||||||
kde {
|
kde {
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace konq-plugins/validators/tidy_validator.cpp \
|
||||||
|
--replace buffio.h tidybuffio.h
|
||||||
|
'';
|
||||||
|
|
||||||
buildInputs = [ kdelibs nepomuk_core nepomuk_widgets html-tidy kactivities libXt ];
|
buildInputs = [ kdelibs nepomuk_core nepomuk_widgets html-tidy kactivities libXt ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -4,6 +4,11 @@ kde {
|
||||||
|
|
||||||
# todo: ruby19 is not found by the build system. not linking against ruby18 due to it being too old
|
# 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 ];
|
buildInputs = [ kdelibs kdepimlibs html-tidy boost ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -23,7 +23,9 @@ stdenv.mkDerivation rec {
|
||||||
substituteInPlace CMakeLists.txt \
|
substituteInPlace CMakeLists.txt \
|
||||||
--replace "tidy/tidy.h" "tidy.h" \
|
--replace "tidy/tidy.h" "tidy.h" \
|
||||||
--replace "/usr/include/tidy" "${libtidy}/include" \
|
--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 = [
|
cmakeFlags = [
|
||||||
|
|
|
@ -12,11 +12,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "135fjbxjn385b6cjys6qhbwfw61mdcl2akkll4jfpdzfvhbxlyda";
|
sha256 = "135fjbxjn385b6cjys6qhbwfw61mdcl2akkll4jfpdzfvhbxlyda";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ openssl db zlib uwimap html-tidy pam ];
|
|
||||||
nativeBuildInputs = [ perl ];
|
|
||||||
|
|
||||||
NIX_LDFLAGS = "-lpam";
|
|
||||||
|
|
||||||
patches = [ ./install.patch ];
|
patches = [ ./install.patch ];
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i -e s/gmake/make/ -e 's/LDAP_ENABLE.*= true/LDAP_ENABLE=false/' \
|
sed -i -e s/gmake/make/ -e 's/LDAP_ENABLE.*= true/LDAP_ENABLE=false/' \
|
||||||
|
@ -26,8 +21,16 @@ stdenv.mkDerivation rec {
|
||||||
Config
|
Config
|
||||||
sed -i -e s,/usr/bin/perl,${perl}/bin/perl, \
|
sed -i -e s,/usr/bin/perl,${perl}/bin/perl, \
|
||||||
templates/src/*.pl
|
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 = {
|
meta = {
|
||||||
homepage = http://www-uxsup.csx.cam.ac.uk/~dpc22/prayer/;
|
homepage = http://www-uxsup.csx.cam.ac.uk/~dpc22/prayer/;
|
||||||
description = "Yet another Webmail interface for IMAP servers on Unix systems written in C";
|
description = "Yet another Webmail interface for IMAP servers on Unix systems written in C";
|
||||||
|
|
|
@ -1,41 +1,31 @@
|
||||||
{ fetchcvs, stdenv, autoconf, automake, libtool }:
|
{ stdenv, fetchurl, cmake, libxslt }:
|
||||||
|
|
||||||
let date = "2009-07-04"; in
|
let
|
||||||
stdenv.mkDerivation rec {
|
version = "5.0.0";
|
||||||
name = "html-tidy-20090704";
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "html-tidy-${version}";
|
||||||
|
|
||||||
# According to http://tidy.sourceforge.net/, there are no new
|
src = fetchurl {
|
||||||
# release tarballs, so one has to either get the code from CVS or
|
url = "https://github.com/htacg/tidy-html5/archive/${version}.tar.gz";
|
||||||
# use a decade-old tarball.
|
sha256 = "1qz7hgk482496agngp9grz4jqkyxrp29r2ywbccc9i5198yspca4";
|
||||||
|
};
|
||||||
|
|
||||||
src = fetchcvs {
|
nativeBuildInputs = [ cmake libxslt/*manpage*/ ];
|
||||||
inherit date;
|
|
||||||
cvsRoot = ":pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy";
|
|
||||||
module = "tidy";
|
|
||||||
sha256 = "d2e68b4335ebfde65ef66d5684f7693675c98bdd50b7a63c0b04f61db673aa6d";
|
|
||||||
};
|
|
||||||
|
|
||||||
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 = ''
|
meta = with stdenv.lib; {
|
||||||
cp -rv build/gnuauto/* .
|
description = "A HTML validator and `tidier'";
|
||||||
AUTOMAKE="automake --foreign" autoreconf -vfi
|
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 = [ ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
@ -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 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
|
@ -3397,8 +3397,6 @@ let
|
||||||
|
|
||||||
tftp-hpa = callPackage ../tools/networking/tftp-hpa {};
|
tftp-hpa = callPackage ../tools/networking/tftp-hpa {};
|
||||||
|
|
||||||
tidy-html5 = callPackage ../tools/text/tidy-html5 { };
|
|
||||||
|
|
||||||
tigervnc = callPackage ../tools/admin/tigervnc {
|
tigervnc = callPackage ../tools/admin/tigervnc {
|
||||||
fontDirectories = [ xorg.fontadobe75dpi xorg.fontmiscmisc xorg.fontcursormisc
|
fontDirectories = [ xorg.fontadobe75dpi xorg.fontmiscmisc xorg.fontcursormisc
|
||||||
xorg.fontbhlucidatypewriter75dpi ];
|
xorg.fontbhlucidatypewriter75dpi ];
|
||||||
|
|
Loading…
Reference in a new issue