summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2015-02-17 23:15:18 +0100
committerAndreas Enge <andreas@enge.fr>2015-03-07 00:57:59 +0100
commitb8ac8c282d9a70949d3f603313b643bfd23b1e32 (patch)
tree80ba5823150f53576afb4504cadbe771719e2dea /gnu/packages/patches
parent516277cb146b528a3686c5d7d5ce0bd349095af3 (diff)
downloadguix-b8ac8c282d9a70949d3f603313b643bfd23b1e32.tar.gz
gnu: Add calibre.
* gnu/packages/ebook.scm (calibre): New variable.
* gnu/packages/patches/calibre-drop-unrar.patch: New file.
* gnu-system.am (dist_patch_DATA): Register patch.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/calibre-drop-unrar.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/patches/calibre-drop-unrar.patch b/gnu/packages/patches/calibre-drop-unrar.patch
new file mode 100644
index 0000000000..6b7a9f454c
--- /dev/null
+++ b/gnu/packages/patches/calibre-drop-unrar.patch
@@ -0,0 +1,49 @@
+Taken from Debian.
+
+Author: Dmitry Shachnev <mitya57@gmail.com>
+Description: do not build unrar extension as we strip unrar from the tarball
+Forwarded: not-needed
+Last-Update: 2013-04-04
+
+Index: calibre/setup/extensions.py
+===================================================================
+--- calibre.orig/setup/extensions.py	2014-02-02 10:42:14.510954007 +0100
++++ calibre/setup/extensions.py	2014-02-02 10:42:14.502954007 +0100
+@@ -209,24 +209,6 @@
+                 sip_files=['calibre/ebooks/pdf/render/qt_hack.sip']
+                 ),
+ 
+-    Extension('unrar',
+-              ['unrar/%s.cpp'%(x.partition('.')[0]) for x in '''
+-               rar.o strlist.o strfn.o pathfn.o savepos.o smallfn.o global.o file.o
+-               filefn.o filcreat.o archive.o arcread.o unicode.o system.o
+-               isnt.o crypt.o crc.o rawread.o encname.o resource.o match.o
+-               timefn.o rdwrfn.o consio.o options.o ulinks.o errhnd.o rarvm.o
+-               secpassword.o rijndael.o getbits.o sha1.o extinfo.o extract.o
+-               volume.o list.o find.o unpack.o cmddata.o filestr.o scantree.o
+-               '''.split()] + ['calibre/utils/unrar.cpp'],
+-              inc_dirs=['unrar'],
+-              cflags=[('/' if iswindows else '-') + x for x in (
+-                  'DSILENT', 'DRARDLL', 'DUNRAR')] + (
+-                  [] if iswindows else ['-D_FILE_OFFSET_BITS=64',
+-                                        '-D_LARGEFILE_SOURCE']),
+-              optimize_level=2,
+-              libraries=['User32', 'Advapi32', 'kernel32', 'Shell32'] if iswindows else []
+-              ),
+-
+     ]
+ 
+ 
+Index: calibre/src/calibre/ebooks/metadata/archive.py
+===================================================================
+--- calibre.orig/src/calibre/ebooks/metadata/archive.py	2014-02-02 10:42:14.510954007 +0100
++++ calibre/src/calibre/ebooks/metadata/archive.py	2014-02-02 10:42:14.502954007 +0100
+@@ -42,7 +42,7 @@
+     description = _('Extract common e-book formats from archives '
+         '(zip/rar) files. 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
+