unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: guix-devel@gnu.org
Subject: Re: [PATCHES] Various
Date: Wed, 25 Mar 2015 12:07:43 +0100	[thread overview]
Message-ID: <87384t2v40.fsf@taylan.uni.cx> (raw)
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")

[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/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=1436

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0004-gnu-Add-leptonica.patch --]
[-- Type: text/x-diff, Size: 3355 bytes --]

From 41e485e47749119afc039796e88fcf8f787eeabc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0006-gnu-Add-tesseract-ocr.patch --]
[-- Type: text/x-diff, Size: 3143 bytes --]

From d12b1999a228d34e76cb93cba1a75cf7d18176bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
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 <http://www.gnu.org/licenses/>.
 
 (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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0007-gnu-Add-vapoursynth.patch --]
[-- Type: text/x-diff, Size: 2411 bytes --]

From 4c8af1741208f2d65e8ca9f3a37df38eb93a4b2d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
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


  reply	other threads:[~2015-03-25 11:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-22 11:52 [PATCHES] Various Taylan Ulrich Bayırlı/Kammer
2015-03-25 11:07 ` Taylan Ulrich Bayırlı/Kammer [this message]
2015-03-25 16:47   ` Ludovic Courtès
2015-03-25 19:36     ` Taylan Ulrich Bayırlı/Kammer
2015-03-25 20:44       ` Ludovic Courtès
2015-03-25 21:22         ` Taylan Ulrich Bayırlı/Kammer
2015-03-26 12:38           ` Ludovic Courtès
2015-03-26 21:04             ` Taylan Ulrich Bayırlı/Kammer
2015-03-26 21:08               ` Ludovic Courtès
2015-03-26 21:16                 ` Taylan Ulrich Bayırlı/Kammer
2015-03-28 12:28                   ` Taylan Ulrich Bayırlı/Kammer
2015-03-29 13:12                     ` Ludovic Courtès
2015-03-25 16:50 ` Ludovic Courtès
2015-03-25 19:44   ` Taylan Ulrich Bayırlı/Kammer
  -- strict thread matches above, loose matches on Subject: below --
2015-03-07 18:24 Taylan Ulrich Bayırlı/Kammer
2015-03-09  9:14 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87384t2v40.fsf@taylan.uni.cx \
    --to=taylanbayirli@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).