From mboxrd@z Thu Jan 1 00:00:00 1970 From: contact.ng0@cryptolab.net Subject: [PATCH 2/5] gnu: Add tidy-html. Date: Tue, 31 Jan 2017 13:34:58 +0000 Message-ID: <20170131133501.30273-3-contact.ng0@cryptolab.net> References: <20170131133501.30273-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]:34065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYYZl-0004Nq-K4 for guix-devel@gnu.org; Tue, 31 Jan 2017 08:34:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYYZi-0004VL-FX for guix-devel@gnu.org; Tue, 31 Jan 2017 08:34:25 -0500 Received: from aibo.runbox.com ([91.220.196.211]:36744) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cYYZi-0004VC-8A for guix-devel@gnu.org; Tue, 31 Jan 2017 08:34:22 -0500 Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1cYYZh-0000D7-16 for guix-devel@gnu.org; Tue, 31 Jan 2017 14:34:21 +0100 In-Reply-To: <20170131133501.30273-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 | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 67b9797bb..8a29eead1 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 @@ -3995,3 +3995,52 @@ programs' code. Its architecture is optimized for security, portability, and scalability (including load-balancing), making it suitable for large deployments.") (license l:gpl2+))) + +(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 for Mac OS X, Linux, Windows, +UNIX, and more. It corrects and cleans up HTML and XML documents by +fixing markup errors and upgrading legacy code to modern standards. + +libtidy is a C static and dynamic library that developers can integrate +into their applications in order to bring all of Tidy’s power to your +favorite tools. libtidy is used today in desktop applications, +web servers, and more.") + (license l:bsd-3))) -- 2.11.0