Merge pull request #26834 from calvertvl/upgrade-calibre-to-3.1.1

calibre: 2.84.0 -> 3.1.1
This commit is contained in:
Jörg Thalheim 2017-06-25 10:22:50 +01:00 committed by GitHub
commit bc488d4cb5
2 changed files with 7 additions and 34 deletions

View File

@ -5,29 +5,23 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.84.0"; version = "3.1.1";
name = "calibre-${version}"; name = "calibre-${version}";
src = fetchurl { src = fetchurl {
url = "https://download.calibre-ebook.com/${version}/${name}.tar.xz"; url = "https://download.calibre-ebook.com/${version}/${name}.tar.xz";
sha256 = "1kvnmb6hsby4bdnx70bcy32f4dz1axzlr310dr6mkvnc8bqw59km"; sha256 = "1lh1gz0915r49igfhy1icz79qx36s3d8m32qlih0g3zn7jahp86g";
}; };
patches = [ patches = [
# Patches from Debian that: # Patches from Debian that:
# - disable plugin installation (very insecure) # - disable plugin installation (very insecure)
# - disables loading of web bug for privacy
# - switches the version update from enabled to disabled by default # - switches the version update from enabled to disabled by default
(fetchpatch { (fetchpatch {
name = "disable_plugins.patch"; name = "disable_plugins.patch";
url = "http://bazaar.launchpad.net/~calibre-packagers/calibre/debian/download/head:/disable_plugins.py-20111220183043-dcl08ccfagjxt1dv-1/disable_plugins.py"; url = "http://bazaar.launchpad.net/~calibre-packagers/calibre/debian/download/head:/disable_plugins.py-20111220183043-dcl08ccfagjxt1dv-1/disable_plugins.py";
sha256 = "19spdx52dhbrfn9lm084yl3cfwm6f90imd51k97sf7flmpl569pk"; sha256 = "19spdx52dhbrfn9lm084yl3cfwm6f90imd51k97sf7flmpl569pk";
}) })
(fetchpatch {
name = "links_privacy.patch";
url = "http://bazaar.launchpad.net/~calibre-packagers/calibre/debian/download/head:/linksprivacy.patch-20160417214308-6hvive72pc0r4awc-1/links-privacy.patch";
sha256 = "0f6pq2b7q56pxrq2j8yqd7bksc623q2zgq29qcli30f13vga1w60";
})
(fetchpatch { (fetchpatch {
name = "no_updates_dialog.patch"; name = "no_updates_dialog.patch";
url = "http://bazaar.launchpad.net/~calibre-packagers/calibre/debian/download/head:/no_updates_dialog.pa-20081231120426-rzzufl0zo66t3mtc-16/no_updates_dialog.patch"; url = "http://bazaar.launchpad.net/~calibre-packagers/calibre/debian/download/head:/no_updates_dialog.pa-20081231120426-rzzufl0zo66t3mtc-16/no_updates_dialog.patch";
@ -57,6 +51,7 @@ stdenv.mkDerivation rec {
] ++ (with python2Packages; [ ] ++ (with python2Packages; [
apsw cssselect cssutils dateutil lxml mechanize netifaces pillow apsw cssselect cssutils dateutil lxml mechanize netifaces pillow
python pyqt5 sip python pyqt5 sip
regex msgpack
# the following are distributed with calibre, but we use upstream instead # the following are distributed with calibre, but we use upstream instead
chardet cherrypy html5lib_0_9999999 odfpy routes chardet cherrypy html5lib_0_9999999 odfpy routes
]); ]);

View File

@ -1,34 +1,12 @@
diff --git a/setup/extensions.json b/setup/extensions.json
index 1f6d1fb..1273904 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 diff --git a/src/calibre/ebooks/metadata/archive.py b/src/calibre/ebooks/metadata/archive.py
index 938ab24..1e095f8 100644 index 938ab24..1e095f8 100644
--- a/src/calibre/ebooks/metadata/archive.py --- a/src/calibre/ebooks/metadata/archive.py
+++ b/src/calibre/ebooks/metadata/archive.py +++ b/src/calibre/ebooks/metadata/archive.py
@@ -44,7 +44,7 @@ class ArchiveExtract(FileTypePlugin): @@ -44,7 +44,7 @@
description = _('Extract common e-book formats from archives ' description = _('Extract common e-book formats from archive files '
'(zip/rar) files. Also try to autodetect if they are actually ' '(ZIP/RAR). Also try to autodetect if they are actually '
'cbz/cbr files.') 'CBZ/CBR files.')
- file_types = set(['zip', 'rar']) - file_types = set(['zip', 'rar'])
+ file_types = set(['zip']) + file_types = set(['zip'])
supported_platforms = ['windows', 'osx', 'linux'] supported_platforms = ['windows', 'osx', 'linux']
on_import = True on_import = True