From mboxrd@z Thu Jan 1 00:00:00 1970 From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Subject: Re: [PATCHES] Various Date: Wed, 25 Mar 2015 12:07:43 +0100 Message-ID: <87384t2v40.fsf@taylan.uni.cx> References: <87sicx2qqz.fsf@taylan.uni.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YajA9-0007OT-4o for guix-devel@gnu.org; Wed, 25 Mar 2015 07:07:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YajA7-0007MY-5V for guix-devel@gnu.org; Wed, 25 Mar 2015 07:07:53 -0400 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:37095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YajA6-0007MH-RH for guix-devel@gnu.org; Wed, 25 Mar 2015 07:07:51 -0400 Received: by wixw10 with SMTP id w10so33187556wix.0 for ; Wed, 25 Mar 2015 04:07:48 -0700 (PDT) Received: from taylan.uni.cx (p200300514A4AC8380213E8FFFEED36FB.dip0.t-ipconnect.de. [2003:51:4a4a:c838:213:e8ff:feed:36fb]) by mx.google.com with ESMTPSA id l10sm3162977wje.15.2015.03.25.04.07.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Mar 2015 04:07:47 -0700 (PDT) In-Reply-To: <87sicx2qqz.fsf@taylan.uni.cx> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Sun, 22 Mar 2015 12:52:52 +0100") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer") writes: > Here's a series of patches from tracking libva's and VapourSynth's > recursive dependencies. (They themselves are optional dependencies to > mpv, to whose review-awaiting patch I added them, which shouldn't > change the review result.) I made a few changes to the patches on the meanwhile. The description of VapourSynth was incomplete (apologies, working on too many things made me sloppy). The synopsis and description of Leptonica has been improved. More importantly, I found out it's not Tesseract that should propagate zlib and openjpg; it's Leptonica. And Tesseract should propagate Leptonica as per a commented-out Requires line in its pkg-config file. So I patched the pkg-config files of Leptonica (to move zlib and openjpeg from Libs.private to Libs) and Tesseract (to enable the Requires field, since Leptonica provides lept.pc on the meanwhile). The relevant Tesseract bug report is at: https://code.google.com/p/tesseract-ocr/issues/detail?id=3D1436 I will send a bug report to the Leptonica author privately since I couldn't find a bug tracker or mailing list. Updated patches attached. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0004-gnu-Add-leptonica.patch >From 41e485e47749119afc039796e88fcf8f787eeabc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Sat, 21 Mar 2015 19:41:54 +0100 Subject: [PATCH 4/8] gnu: Add leptonica. * gnu/packages/image.scm (leptonica): New variable. --- gnu/packages/image.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 9c7e504..4dd3090 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -24,6 +24,7 @@ (define-module (gnu packages image) #:use-module (gnu packages) #:use-module (gnu packages algebra) + #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages compression) #:use-module (gnu packages doxygen) @@ -164,6 +165,66 @@ the W3C's XML-based Scaleable Vector Graphic (SVG) format.") ;; 'COPYING' is the GPLv2, but file headers say LGPLv2.0+. (license license:lgpl2.0+))) +(define-public leptonica + (package + (name "leptonica") + (version "1.71") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.leptonica.com/source/leptonica-" + version ".tar.gz")) + (sha256 + (base32 "0j5qgrff6im5n9waflbi7w643q1p6mahyf2z35gb4vj9h5p76pfc")) + (modules '((guix build utils))) + ;; zlib and openjpg should be under Libs, not Libs.private. + (snippet + '(substitute* "lept.pc.in" + (("^(Libs\\.private: .*)@ZLIB_LIBS@(.*)" all pre post) + (string-append pre post)) + (("^(Libs\\.private: .*)@JPEG_LIBS@(.*)" all pre post) + (string-append pre post)) + (("^Libs: .*" all) + (string-append all " @ZLIB_LIBS@ @JPEG_LIBS@")))))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("gnuplot" ,gnuplot) ;needed for test suite + ("libtool" ,libtool))) + (inputs + `(("giflib" ,giflib) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libtiff" ,libtiff) + ("libwebp" ,libwebp))) + (propagated-inputs + `(("openjpeg" ,openjpeg) + ("zlib" ,zlib))) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after + unpack autoreconf + (lambda _ + (zero? (system* "autoreconf" "-vif")))) + (add-after + autoreconf patch-reg-wrapper + (lambda _ + (substitute* "prog/reg_wrapper.sh" + ((" /bin/sh ") + (string-append " " (which "sh") " ")))))))) + (home-page "http://www.leptonica.com/") + (synopsis "Library and tools for image processing and analysis") + (description + "Leptonica is a C library and set of command-line tools for efficient +image processing and image analysis operations. It supports rasterop, affine +transformations, binary and grayscale morphology, rank order, and convolution, +seedfill and connected components, image transformations combining changes in +scale and pixel depth, and pixelwise masking, blending, enhancement, and +arithmetic ops.") + (license license:bsd-2))) + (define-public jbig2dec (package (name "jbig2dec") -- 2.2.1 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0006-gnu-Add-tesseract-ocr.patch >From d12b1999a228d34e76cb93cba1a75cf7d18176bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Sat, 21 Mar 2015 20:11:56 +0100 Subject: [PATCH 6/8] gnu: Add tesseract-ocr. * gnu/packages/ocr.scm (tesseract-ocr): New variable. --- gnu/packages/ocr.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/gnu/packages/ocr.scm b/gnu/packages/ocr.scm index 8408b43..157c1ca 100644 --- a/gnu/packages/ocr.scm +++ b/gnu/packages/ocr.scm @@ -17,12 +17,14 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages ocr) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module ((gnu packages compression) - #:select (lzip))) + #:use-module (gnu packages autotools) + #:use-module (gnu packages compression) + #:use-module (gnu packages image) + #:use-module (gnu packages pkg-config)) (define-public ocrad (package @@ -43,4 +45,49 @@ "GNU Ocrad is an optical character recognition program based on a feature extraction method. It can read images in PBM, PGM or PPM formats and it produces text in 8-bit or UTF-8 formats.") - (license gpl3+))) + (license license:gpl3+))) + +(define-public tesseract-ocr + (package + (name "tesseract-ocr") + (version "3.02.02") + (source + (origin + (method url-fetch) + (uri (string-append + "https://tesseract-ocr.googlecode.com/files/tesseract-ocr-" + version ".tar.gz")) + (sha256 + (base32 "0g81m9y4iydp7kgr56mlkvjdwpp3mb01q385yhdnyvra7z5kkk96")) + (modules '((guix build utils))) + ;; Leptonica provides a pkg-config file on the meanwhile. + (snippet + '(substitute* "tesseract.pc.in" + (("^# Requires: lept ## .*") + "Requires: lept\n"))))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) + (propagated-inputs + `(("leptonica" ,leptonica))) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after + unpack autogen + (lambda _ + (zero? (system* "sh" "autogen.sh"))))) + #:configure-flags + (let ((leptonica (assoc-ref %build-inputs "leptonica"))) + (list (string-append "LIBLEPT_HEADERSDIR=" leptonica "/include"))))) + (home-page "https://code.google.com/p/tesseract-ocr/") + (synopsis "Optical character recognition engine") + (description + "Tesseract is an optical character recognition (OCR) engine with very +high accuracy. It supports many languages, output text formatting, hOCR +positional information and page layout analysis. Several image formats are +supported through the Leptonica library. It can also detect whether text is +monospaced or proportional.") + (license license:asl2.0))) -- 2.2.1 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0007-gnu-Add-vapoursynth.patch >From 4c8af1741208f2d65e8ca9f3a37df38eb93a4b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Sat, 21 Mar 2015 23:09:11 +0100 Subject: [PATCH 7/8] gnu: Add vapoursynth. * gnu/packages/video.scm (vapoursynth): New variable. --- gnu/packages/video.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index c3ab772..1029c2f 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -56,6 +56,7 @@ #:use-module (gnu packages lua) #:use-module (gnu packages mp3) #:use-module (gnu packages ncurses) + #:use-module (gnu packages ocr) #:use-module (gnu packages openssl) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -1095,6 +1096,47 @@ capabilities.") (alist-delete 'install %standard-phases))))))))) +(define-public vapoursynth + (package + (name "vapoursynth") + (version "26") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/vapoursynth/vapoursynth/archive/R" + version ".tar.gz")) + (sha256 + (base32 + "1qbg5kg0kgrxldd0ckn1s7vy7vx2ig8nqzv6djp38fxccpzw3x9k")))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("cython" ,python-cython) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config) + ("python" ,python) + ("yasm" ,yasm))) + (inputs + `(("ffmpeg" ,ffmpeg) + ("libass" ,libass) + ("tesseract-ocr" ,tesseract-ocr))) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after + unpack autogen + (lambda _ + (zero? (system* "sh" "autogen.sh"))))))) + (home-page "http://www.vapoursynth.com/") + (synopsis "Video processing framework") + (description "VapourSynth is a C++ library and Python module for video +manipulation. It aims to be a modern rewrite of Avisynth, supporting +multithreading, generalized colorspaces, per frame properties, and videos with +format changes.") + ;; As seen from the source files. + (license lgpl2.1+))) + (define-public xvid (package (name "xvid") -- 2.2.1 --=-=-=--