From mboxrd@z Thu Jan 1 00:00:00 1970 From: contact.ng0@cryptolab.net Subject: [PATCH 2/5] gnu: Add tidy-html. Date: Thu, 9 Feb 2017 13:37:01 +0000 Message-ID: <20170209133704.4654-3-contact.ng0@cryptolab.net> References: <87h945iva7.fsf@openmailbox.org> <20170209133704.4654-1-contact.ng0@cryptolab.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cboss-0001Ks-15 for guix-devel@gnu.org; Thu, 09 Feb 2017 08:35:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbosq-0005Nn-PQ for guix-devel@gnu.org; Thu, 09 Feb 2017 08:35:38 -0500 Received: from aibo.runbox.com ([91.220.196.211]:36554) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cbosq-0005NL-I2 for guix-devel@gnu.org; Thu, 09 Feb 2017 08:35:36 -0500 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1cbosp-00054R-99 for guix-devel@gnu.org; Thu, 09 Feb 2017 14:35:35 +0100 In-Reply-To: <20170209133704.4654-1-contact.ng0@cryptolab.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Cc: ng0 From: ng0 * gnu/packages/web.scm (tidy-html): New variable. --- gnu/packages/web.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 8cc80a2c4..4d138b79f 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2016 Rene Saavedra ;;; Copyright © 2016 Ben Woodcroft ;;; Copyright © 2016 Clément Lassieur -;;; Copyright © 2016 ng0 +;;; Copyright © 2016, 2017 ng0 ;;; Copyright © 2016 Arun Isaac ;;; Copyright © 2016 Tobias Geerinckx-Rice ;;; Copyright © 2016 Bake Timmons @@ -4018,3 +4018,51 @@ service for that request. Requests are made using port numbers as identifiers and xinetd usually launches another daemon to handle the request. It can be used to start services with both privileged and non-privileged port numbers.") (license (l:fsf-free "file://COPYRIGHT")))) + +(define-public tidy-html + (package + (name "tidy-html") + (version "5.2.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/htacg/tidy-html5/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0kbwzh15dlapp3s3vff2qgz0yfcf8hwsnx5q4igwa6pimhak8lw0")))) + (build-system cmake-build-system) + (outputs '("out" + "static")) ; 1.0MiB of .a files + (arguments + `(#:tests? #f ; No tests available + #:configure-flags (list "-DCMAKE_BUILD_TYPE=Release") + #:phases + (modify-phases %standard-phases + (add-after 'install 'move-static-libraries + (lambda* (#:key outputs #:allow-other-keys) + ;; Move static libraries to the "static" output. + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (static (assoc-ref outputs "static")) + (slib (string-append static "/lib"))) + (mkdir-p slib) + (for-each (lambda (file) + (install-file file slib) + (delete-file file)) + (find-files lib "\\.a$")) + #t)))))) + (native-inputs + `(("libxslt" ,libxslt))) + (home-page "http://www.html-tidy.org/") + (synopsis "HTML Tidy with HTML5 support") + (description + "Tidy is a console application which corrects and cleans up +HTML and XML documents by fixing markup errors and upgrading +legacy code to modern standards. + +Tidy also provides @code{libtidy}, a C static and dynamic library that +developers can integrate into their applications to make use of the +functions of Tidy.") + (license l:bsd-3))) -- 2.11.1