unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#28235] [PATCH] Update calibre to 3.6.0.
@ 2017-08-25 18:22 Roel Janssen
  2017-08-25 18:25 ` [bug#28235] [PATCH 1/3] gnu: Update python-lxml to 3.8.0 Roel Janssen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Roel Janssen @ 2017-08-25 18:22 UTC (permalink / raw)
  To: 28235

Dear Guix,

The following patches update calibre to 3.6.0.  This version doesn't
include the unrar code anymore.  Instead, it uses a python library
called "unrardll", which is not included in these patches.  We removed
the unrar code before, so there's no lost functionality to the current
recipe.

I had to add 'python2-html5-parser' as a new input.  It seems that it is
used in favor of 'python2-html5lib', but that input hadn't been added in
the current recipe.

Thanks for your time!

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#28235] [PATCH 1/3] gnu: Update python-lxml to 3.8.0.
  2017-08-25 18:22 [bug#28235] [PATCH] Update calibre to 3.6.0 Roel Janssen
@ 2017-08-25 18:25 ` Roel Janssen
  2017-08-25 18:26 ` [bug#28235] [PATCH 2/3] gnu: Add python-html5-parser, python2-html5-parser Roel Janssen
  2017-08-25 18:27 ` [bug#28235] [PATCH 3/3] gnu: Update calibre to 3.6.0 Roel Janssen
  2 siblings, 0 replies; 7+ messages in thread
From: Roel Janssen @ 2017-08-25 18:25 UTC (permalink / raw)
  To: 28235


* gnu/packages/python.scm (python-lxml): Update to 3.8.0.
---
 gnu/packages/python.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 4bd777c09..9bf46fb6f 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -6117,14 +6117,14 @@ translate the complete SQLite API into Python.")
 (define-public python-lxml
   (package
     (name "python-lxml")
-    (version "3.6.0")
+    (version "3.8.0")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "lxml" version))
         (sha256
          (base32
-          "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
+          "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
     (build-system python-build-system)
     (inputs
       `(("libxml2" ,libxml2)
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#28235] [PATCH 2/3] gnu: Add python-html5-parser, python2-html5-parser
  2017-08-25 18:22 [bug#28235] [PATCH] Update calibre to 3.6.0 Roel Janssen
  2017-08-25 18:25 ` [bug#28235] [PATCH 1/3] gnu: Update python-lxml to 3.8.0 Roel Janssen
@ 2017-08-25 18:26 ` Roel Janssen
  2017-09-02 11:30   ` Marius Bakke
  2017-08-25 18:27 ` [bug#28235] [PATCH 3/3] gnu: Update calibre to 3.6.0 Roel Janssen
  2 siblings, 1 reply; 7+ messages in thread
From: Roel Janssen @ 2017-08-25 18:26 UTC (permalink / raw)
  To: 28235

* gnu/packages/python.scm (python-html5-parser): New variable.
  (python2-html5-parser: New variable.
---
 gnu/packages/python.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 9bf46fb6f..8629228db 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5868,6 +5868,35 @@ and written in Python.")
 (define-public python2-html5lib-0.9
   (package-with-python2 python-html5lib-0.9))
 
+(define-public python-html5-parser
+  (package
+    (name "python-html5-parser")
+    (version "0.4.4")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "html5-parser" version))
+              (sha256
+               (base32
+                "1d8sxhl41ffh7qlk7wlsy17xw6slzx5v1yna9s72wx5qrpaa3wxr"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libxml2" ,libxml2)))
+    (propagated-inputs
+     `(("python-lxml" ,python-lxml)
+       ("python-beautifulsoup4" ,python-beautifulsoup4)))
+    (home-page "https://html5-parser.readthedocs.io")
+    (synopsis "Fast C-based HTML5 parsing for Python")
+    (description "This package provides a fast implementation of the HTML5
+parsing spec for Python.  Parsing is done in C using a variant of the gumbo
+parser.  The gumbo parse tree is then transformed into an lxml tree, also in
+C, yielding parse times that can be a thirtieth of the html5lib parse times.")
+    (license license:asl2.0)))
+
+(define-public python2-html5-parser
+  (package-with-python2 python-html5-parser))
+
 (define-public python-webencodings
   (package
     (name "python-webencodings")
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#28235] [PATCH 3/3] gnu: Update calibre to 3.6.0.
  2017-08-25 18:22 [bug#28235] [PATCH] Update calibre to 3.6.0 Roel Janssen
  2017-08-25 18:25 ` [bug#28235] [PATCH 1/3] gnu: Update python-lxml to 3.8.0 Roel Janssen
  2017-08-25 18:26 ` [bug#28235] [PATCH 2/3] gnu: Add python-html5-parser, python2-html5-parser Roel Janssen
@ 2017-08-25 18:27 ` Roel Janssen
  2 siblings, 0 replies; 7+ messages in thread
From: Roel Janssen @ 2017-08-25 18:27 UTC (permalink / raw)
  To: 28235

* gnu/local.mk: Remove calibre-drop-unrar.patch
* gnu/packages/ebook.scm (calibre): Update to 3.6.0.
  Add python-html5-parser input.
* gnu/packages/patches/calibre-drop-unrar.patch: Remove file.
---
 gnu/local.mk                                  |  1 -
 gnu/packages/ebook.scm                        | 12 ++++---
 gnu/packages/patches/calibre-drop-unrar.patch | 49 ---------------------------
 3 files changed, 7 insertions(+), 55 deletions(-)
 delete mode 100644 gnu/packages/patches/calibre-drop-unrar.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 71f1cb244..631ab0b95 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -537,7 +537,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/blast+-fix-makefile.patch		\
   %D%/packages/patches/byobu-writable-status.patch		\
   %D%/packages/patches/cairo-CVE-2016-9082.patch			\
-  %D%/packages/patches/calibre-drop-unrar.patch			\
   %D%/packages/patches/calibre-no-updates-dialog.patch		\
   %D%/packages/patches/calibre-use-packaged-feedparser.patch	\
   %D%/packages/patches/catdoc-CVE-2017-11110.patch		\
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index 38abf47c8..4bcaa0abf 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -72,7 +72,7 @@
 (define-public calibre
   (package
     (name "calibre")
-    (version "3.0.0")
+    (version "3.6.0")
     (source
       (origin
         (method url-fetch)
@@ -81,21 +81,19 @@
                             version ".tar.xz"))
         (sha256
          (base32
-          "1zhk7bvgr973dd18x4wp48kzai29qqqi5qcy72sxc4wcbk2sbnkw"))
+          "0vp2nds4b5xbchsh1rpc1q7093gd26dnw7mgbnax97dcchvlc4sc"))
         ;; Remove non-free or doubtful code, see
         ;; https://lists.gnu.org/archive/html/guix-devel/2015-02/msg00478.html
         (modules '((guix build utils)))
         (snippet
           '(begin
             (delete-file-recursively "src/calibre/ebooks/markdown")
-            (delete-file-recursively "src/unrar")
             (delete-file "src/odf/thumbnail.py")
             (delete-file-recursively "resources/fonts/liberation")
             (substitute* (find-files "." "\\.py")
               (("calibre\\.ebooks\\.markdown") "markdown"))
             #t))
-        (patches (search-patches "calibre-drop-unrar.patch"
-                                 "calibre-use-packaged-feedparser.patch"
+        (patches (search-patches "calibre-use-packaged-feedparser.patch"
                                  "calibre-no-updates-dialog.patch"))))
     (build-system python-build-system)
     (native-inputs
@@ -129,6 +127,7 @@
        ("python2-dbus" ,python2-dbus)
        ("python2-dnspython" ,python2-dnspython)
        ("python2-feedparser" ,python2-feedparser)
+       ("python2-html5-parser" ,python2-html5-parser)
        ("python2-lxml" ,python2-lxml)
        ("python2-markdown" ,python2-markdown)
        ("python2-mechanize" ,python2-mechanize)
@@ -140,6 +139,9 @@
        ("python2-pyqt" ,python2-pyqt)
        ("python2-sip" ,python2-sip)
        ("python2-regex" ,python2-regex)
+       ;; python2-unrardll is needed for decompressing RAR files.
+       ;; A program called 'pdf2html' is needed for reading PDF books
+       ;; in the web interface.
        ("sqlite" ,sqlite)))
     (arguments
      `(#:python ,python-2
diff --git a/gnu/packages/patches/calibre-drop-unrar.patch b/gnu/packages/patches/calibre-drop-unrar.patch
deleted file mode 100644
index adf977b18..000000000
--- a/gnu/packages/patches/calibre-drop-unrar.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Recreated old debian patch on the latest calibre version
-
-From 6764e4c211e50d4f4633dbabfba7cbc3089c51dc Mon Sep 17 00:00:00 2001
-From: Brendan Tildesley <brendan.tildesley@openmailbox.org>
-Date: Sat, 13 May 2017 21:12:12 +1000
-Subject: [PATCH] Remove unrar extension
-
----
- setup/extensions.json                  | 11 -----------
- src/calibre/ebooks/metadata/archive.py |  2 +-
- 2 files changed, 1 insertion(+), 12 deletions(-)
-
-diff --git a/setup/extensions.json b/setup/extensions.json
-index 1f6d1fb5fd..127390450f 100644
---- a/setup/extensions.json
-+++ b/setup/extensions.json
-@@ -211,16 +211,5 @@
-         "sources": "calibre/devices/mtp/unix/devices.c calibre/devices/mtp/unix/libmtp.c",
-         "headers": "calibre/devices/mtp/unix/devices.h calibre/devices/mtp/unix/upstream/music-players.h calibre/devices/mtp/unix/upstream/device-flags.h",
-         "libraries": "mtp"
--    },
--    {
--        "name": "unrar",
--        "sources": "unrar/rar.cpp unrar/strlist.cpp unrar/strfn.cpp unrar/pathfn.cpp unrar/savepos.cpp unrar/smallfn.cpp unrar/global.cpp unrar/file.cpp unrar/filefn.cpp unrar/filcreat.cpp unrar/archive.cpp unrar/arcread.cpp unrar/unicode.cpp unrar/system.cpp unrar/isnt.cpp unrar/crypt.cpp unrar/crc.cpp unrar/rawread.cpp unrar/encname.cpp unrar/resource.cpp unrar/match.cpp unrar/timefn.cpp unrar/rdwrfn.cpp unrar/consio.cpp unrar/options.cpp unrar/ulinks.cpp unrar/errhnd.cpp unrar/rarvm.cpp unrar/secpassword.cpp unrar/rijndael.cpp unrar/getbits.cpp unrar/sha1.cpp unrar/extinfo.cpp unrar/extract.cpp unrar/volume.cpp unrar/list.cpp unrar/find.cpp unrar/unpack.cpp unrar/cmddata.cpp unrar/filestr.cpp unrar/scantree.cpp calibre/utils/unrar.cpp",
--        "inc_dirs": "unrar",
--        "defines": "SILENT RARDLL UNRAR _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE",
--        "windows_defines": "SILENT RARDLL UNRAR",
--        "haiku_defines": "LITTLE_ENDIAN SILENT RARDLL UNRAR _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE _BSD_SOURCE",
--        "haiku_libraries": "bsd",
--        "optimize_level": 2,
--        "windows_libraries": "User32 Advapi32 kernel32 Shell32"
-     }
- ]
-diff --git a/src/calibre/ebooks/metadata/archive.py b/src/calibre/ebooks/metadata/archive.py
-index f5c0b7bed3..32257dcdae 100644
---- a/src/calibre/ebooks/metadata/archive.py
-+++ b/src/calibre/ebooks/metadata/archive.py
-@@ -44,7 +44,7 @@ class ArchiveExtract(FileTypePlugin):
-     description = _('Extract common e-book formats from archive files '
-         '(ZIP/RAR). Also try to autodetect if they are actually '
-         'CBZ/CBR files.')
--    file_types = set(['zip', 'rar'])
-+    file_types = set(['zip'])
-     supported_platforms = ['windows', 'osx', 'linux']
-     on_import = True
- 
--- 
-2.12.2
-
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#28235] [PATCH 2/3] gnu: Add python-html5-parser, python2-html5-parser
  2017-08-25 18:26 ` [bug#28235] [PATCH 2/3] gnu: Add python-html5-parser, python2-html5-parser Roel Janssen
@ 2017-09-02 11:30   ` Marius Bakke
  2017-09-06 10:32     ` Roel Janssen
  0 siblings, 1 reply; 7+ messages in thread
From: Marius Bakke @ 2017-09-02 11:30 UTC (permalink / raw)
  To: Roel Janssen, 28235

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

Roel Janssen <roel@gnu.org> writes:

> * gnu/packages/python.scm (python-html5-parser): New variable.
>   (python2-html5-parser: New variable.
> ---
>  gnu/packages/python.scm | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 9bf46fb6f..8629228db 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -5868,6 +5868,35 @@ and written in Python.")
>  (define-public python2-html5lib-0.9
>    (package-with-python2 python-html5lib-0.9))
>  
> +(define-public python-html5-parser
> +  (package
> +    (name "python-html5-parser")
> +    (version "0.4.4")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "html5-parser" version))
> +              (sha256
> +               (base32
> +                "1d8sxhl41ffh7qlk7wlsy17xw6slzx5v1yna9s72wx5qrpaa3wxr"))))
> +    (build-system python-build-system)
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
> +    (inputs
> +     `(("libxml2" ,libxml2)))
> +    (propagated-inputs
> +     `(("python-lxml" ,python-lxml)
> +       ("python-beautifulsoup4" ,python-beautifulsoup4)))
> +    (home-page "https://html5-parser.readthedocs.io")
> +    (synopsis "Fast C-based HTML5 parsing for Python")
> +    (description "This package provides a fast implementation of the HTML5
> +parsing spec for Python.  Parsing is done in C using a variant of the gumbo
> +parser.  The gumbo parse tree is then transformed into an lxml tree, also in
> +C, yielding parse times that can be a thirtieth of the html5lib parse times.")
> +    (license license:asl2.0)))

The files 'src/as-libxml.[ch]' are GPL3.  Everything else in this series LGTM!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#28235] [PATCH 2/3] gnu: Add python-html5-parser, python2-html5-parser
  2017-09-02 11:30   ` Marius Bakke
@ 2017-09-06 10:32     ` Roel Janssen
  2017-09-06 10:45       ` bug#28235: " Roel Janssen
  0 siblings, 1 reply; 7+ messages in thread
From: Roel Janssen @ 2017-09-06 10:32 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 28235


Marius Bakke writes:

> Roel Janssen <roel@gnu.org> writes:
>
>> * gnu/packages/python.scm (python-html5-parser): New variable.
>>   (python2-html5-parser: New variable.
>> ---
>>  gnu/packages/python.scm | 29 +++++++++++++++++++++++++++++
>>  1 file changed, 29 insertions(+)
>>
>> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
>> index 9bf46fb6f..8629228db 100644
>> --- a/gnu/packages/python.scm
>> +++ b/gnu/packages/python.scm
>> @@ -5868,6 +5868,35 @@ and written in Python.")
>>  (define-public python2-html5lib-0.9
>>    (package-with-python2 python-html5lib-0.9))
>>  
>> +(define-public python-html5-parser
>> +  (package
>> +    (name "python-html5-parser")
>> +    (version "0.4.4")
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (pypi-uri "html5-parser" version))
>> +              (sha256
>> +               (base32
>> +                "1d8sxhl41ffh7qlk7wlsy17xw6slzx5v1yna9s72wx5qrpaa3wxr"))))
>> +    (build-system python-build-system)
>> +    (native-inputs
>> +     `(("pkg-config" ,pkg-config)))
>> +    (inputs
>> +     `(("libxml2" ,libxml2)))
>> +    (propagated-inputs
>> +     `(("python-lxml" ,python-lxml)
>> +       ("python-beautifulsoup4" ,python-beautifulsoup4)))
>> +    (home-page "https://html5-parser.readthedocs.io")
>> +    (synopsis "Fast C-based HTML5 parsing for Python")
>> +    (description "This package provides a fast implementation of the HTML5
>> +parsing spec for Python.  Parsing is done in C using a variant of the gumbo
>> +parser.  The gumbo parse tree is then transformed into an lxml tree, also in
>> +C, yielding parse times that can be a thirtieth of the html5lib parse times.")
>> +    (license license:asl2.0)))
>
> The files 'src/as-libxml.[ch]' are GPL3.  Everything else in this series LGTM!

Oh, it seems this is the case for as-python-tree.[ch], not as-libxml.[ch].

Good catch!  I'll update the license list and push this patch series.

Thanks for your time.

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#28235: [PATCH 2/3] gnu: Add python-html5-parser, python2-html5-parser
  2017-09-06 10:32     ` Roel Janssen
@ 2017-09-06 10:45       ` Roel Janssen
  0 siblings, 0 replies; 7+ messages in thread
From: Roel Janssen @ 2017-09-06 10:45 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 28235-done


Roel Janssen writes:

> Marius Bakke writes:
>
>> Roel Janssen <roel@gnu.org> writes:
>>
>>> * gnu/packages/python.scm (python-html5-parser): New variable.
>>>   (python2-html5-parser: New variable.
>>> ---
>>>  gnu/packages/python.scm | 29 +++++++++++++++++++++++++++++
>>>  1 file changed, 29 insertions(+)
>>>
>>> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
>>> index 9bf46fb6f..8629228db 100644
>>> --- a/gnu/packages/python.scm
>>> +++ b/gnu/packages/python.scm
>>> @@ -5868,6 +5868,35 @@ and written in Python.")
>>>  (define-public python2-html5lib-0.9
>>>    (package-with-python2 python-html5lib-0.9))
>>>  
>>> +(define-public python-html5-parser
>>> +  (package
>>> +    (name "python-html5-parser")
>>> +    (version "0.4.4")
>>> +    (source (origin
>>> +              (method url-fetch)
>>> +              (uri (pypi-uri "html5-parser" version))
>>> +              (sha256
>>> +               (base32
>>> +                "1d8sxhl41ffh7qlk7wlsy17xw6slzx5v1yna9s72wx5qrpaa3wxr"))))
>>> +    (build-system python-build-system)
>>> +    (native-inputs
>>> +     `(("pkg-config" ,pkg-config)))
>>> +    (inputs
>>> +     `(("libxml2" ,libxml2)))
>>> +    (propagated-inputs
>>> +     `(("python-lxml" ,python-lxml)
>>> +       ("python-beautifulsoup4" ,python-beautifulsoup4)))
>>> +    (home-page "https://html5-parser.readthedocs.io")
>>> +    (synopsis "Fast C-based HTML5 parsing for Python")
>>> +    (description "This package provides a fast implementation of the HTML5
>>> +parsing spec for Python.  Parsing is done in C using a variant of the gumbo
>>> +parser.  The gumbo parse tree is then transformed into an lxml tree, also in
>>> +C, yielding parse times that can be a thirtieth of the html5lib parse times.")
>>> +    (license license:asl2.0)))
>>
>> The files 'src/as-libxml.[ch]' are GPL3.  Everything else in this series LGTM!
>
> Oh, it seems this is the case for as-python-tree.[ch], not as-libxml.[ch].
>
> Good catch!  I'll update the license list and push this patch series.
>
> Thanks for your time.
>
> Kind regards,
> Roel Janssen

I pushed the three patches with the above license indication changes.

Thanks!

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-09-06 10:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 18:22 [bug#28235] [PATCH] Update calibre to 3.6.0 Roel Janssen
2017-08-25 18:25 ` [bug#28235] [PATCH 1/3] gnu: Update python-lxml to 3.8.0 Roel Janssen
2017-08-25 18:26 ` [bug#28235] [PATCH 2/3] gnu: Add python-html5-parser, python2-html5-parser Roel Janssen
2017-09-02 11:30   ` Marius Bakke
2017-09-06 10:32     ` Roel Janssen
2017-09-06 10:45       ` bug#28235: " Roel Janssen
2017-08-25 18:27 ` [bug#28235] [PATCH 3/3] gnu: Update calibre to 3.6.0 Roel Janssen

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).