diff options
author | wiz <wiz@pkgsrc.org> | 2011-05-21 15:07:48 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2011-05-21 15:07:48 +0000 |
commit | 0471c1f0885fa069683cc19558c4947400820324 (patch) | |
tree | 62122a1698b44924246e0612dd04b3702bf4d3b5 /misc/calibre/patches | |
parent | 5ac7a7a8638e8305feb2beef9a5fc4265d5c0f37 (diff) | |
download | pkgsrc-0471c1f0885fa069683cc19558c4947400820324.tar.gz |
Update to 0.8.2 provided by Rhialto in PR 44868.
Changes since 0.6.x: many too many to list here.
Now comes with its own store.
Diffstat (limited to 'misc/calibre/patches')
-rw-r--r-- | misc/calibre/patches/patch-aa | 31 | ||||
-rw-r--r-- | misc/calibre/patches/patch-ac | 21 | ||||
-rw-r--r-- | misc/calibre/patches/patch-setup_____init____.py | 15 | ||||
-rw-r--r-- | misc/calibre/patches/patch-setup_extensions.py | 31 | ||||
-rw-r--r-- | misc/calibre/patches/patch-setup_install.py | 40 | ||||
-rw-r--r-- | misc/calibre/patches/patch-src_calibre_____init____.py | 12 | ||||
-rw-r--r-- | misc/calibre/patches/patch-src_calibre_constants.py | 15 | ||||
-rw-r--r-- | misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp | 23 | ||||
-rw-r--r-- | misc/calibre/patches/patch-src_calibre_linux.py | 64 | ||||
-rw-r--r-- | misc/calibre/patches/patch-src_calibre_utils_help2man.py | 22 |
10 files changed, 205 insertions, 69 deletions
diff --git a/misc/calibre/patches/patch-aa b/misc/calibre/patches/patch-aa deleted file mode 100644 index 395ee132a4b..00000000000 --- a/misc/calibre/patches/patch-aa +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-aa,v 1.2 2009/11/18 17:41:20 wiz Exp $ - ---- src/calibre/linux.py.orig 2009-09-28 23:23:41.000000000 +0000 -+++ src/calibre/linux.py -@@ -184,7 +184,7 @@ class PostInstall: - if os.path.exists(bc): - f = os.path.join(bc, 'calibre') - else: -- f = os.path.join(self.opts.staging_etc, 'bash_completion.d/calibre') -+ f = os.path.join(self.opts.staging_root, 'share/bash_completion.d/calibre') - if not os.path.exists(os.path.dirname(f)): - os.makedirs(os.path.dirname(f)) - self.manifest.append(f) -@@ -319,7 +319,7 @@ class PostInstall: - def install_man_pages(self): - try: - from calibre.utils.help2man import create_man_page -- manpath = os.path.join(self.opts.staging_sharedir, 'man/man1') -+ manpath = os.path.join(self.opts.staging_root, 'man/man1') - if not os.path.exists(manpath): - os.makedirs(manpath) - self.info('Installing MAN pages...') -@@ -332,7 +332,7 @@ class PostInstall: - continue - parser = parser() - raw = create_man_page(prog, parser) -- manfile = os.path.join(manpath, prog+'.1'+__appname__+'.bz2') -+ manfile = os.path.join(manpath, prog+'.1') - self.info('\tInstalling MAN page for', prog) - open(manfile, 'wb').write(raw) - self.manifest.append(manfile) diff --git a/misc/calibre/patches/patch-ac b/misc/calibre/patches/patch-ac deleted file mode 100644 index 4a45f4e8a63..00000000000 --- a/misc/calibre/patches/patch-ac +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-ac,v 1.1 2009/11/18 17:41:20 wiz Exp $ - ---- src/calibre/utils/help2man.py.orig 2009-09-28 23:23:41.000000000 +0000 -+++ src/calibre/utils/help2man.py -@@ -3,7 +3,7 @@ __license__ = 'GPL 3' - __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' - __docformat__ = 'restructuredtext en' - --import time, bz2 -+import time - - from calibre.constants import __version__, __appname__, __author__ - -@@ -57,6 +57,6 @@ def create_man_page(prog, parser): - lines = [x if isinstance(x, unicode) else unicode(x, 'utf-8', 'replace') for - x in lines] - -- return bz2.compress((u'\n'.join(lines)).encode('utf-8')) -+ return (u'\n'.join(lines)).encode('utf-8') - - diff --git a/misc/calibre/patches/patch-setup_____init____.py b/misc/calibre/patches/patch-setup_____init____.py new file mode 100644 index 00000000000..a3eb9f9c37e --- /dev/null +++ b/misc/calibre/patches/patch-setup_____init____.py @@ -0,0 +1,15 @@ +$NetBSD: patch-setup_____init____.py,v 1.1 2011/05/21 15:07:48 wiz Exp $ + +--- setup/__init__.py.orig 2011-05-20 14:41:31.000000000 +0000 ++++ setup/__init__.py +@@ -12,7 +12,9 @@ is64bit = platform.architecture()[0] == + iswindows = re.search('win(32|64)', sys.platform) + isosx = 'darwin' in sys.platform + isfreebsd = 'freebsd' in sys.platform +-islinux = not isosx and not iswindows and not isfreebsd ++isnetbsd = 'netbsd' in sys.platform ++isbsd = isnetbsd or isfreebsd ++islinux = not isosx and not iswindows and not isbsd + SRC = os.path.abspath('src') + sys.path.insert(0, SRC) + sys.resources_location = os.path.join(os.path.dirname(SRC), 'resources') diff --git a/misc/calibre/patches/patch-setup_extensions.py b/misc/calibre/patches/patch-setup_extensions.py new file mode 100644 index 00000000000..a419c3c5dd7 --- /dev/null +++ b/misc/calibre/patches/patch-setup_extensions.py @@ -0,0 +1,31 @@ +$NetBSD: patch-setup_extensions.py,v 1.1 2011/05/21 15:07:48 wiz Exp $ + +--- setup/extensions.py.orig 2011-05-20 14:36:29.000000000 +0000 ++++ setup/extensions.py +@@ -11,7 +11,7 @@ from distutils import sysconfig + + from PyQt4.pyqtconfig import QtGuiModuleMakefile + +-from setup import Command, islinux, isfreebsd, isosx, SRC, iswindows ++from setup import Command, islinux, isfreebsd, isbsd, isosx, SRC, iswindows + from setup.build_environment import fc_inc, fc_lib, chmlib_inc_dirs, \ + fc_error, poppler_libs, poppler_lib_dirs, poppler_inc_dirs, podofo_inc, \ + podofo_lib, podofo_error, poppler_error, pyqt, OSX_SDK, NMAKE, \ +@@ -21,7 +21,7 @@ from setup.build_environment import fc_i + jpg_lib_dirs, chmlib_lib_dirs, sqlite_inc_dirs, icu_inc_dirs, \ + icu_lib_dirs + MT +-isunix = islinux or isosx or isfreebsd ++isunix = islinux or isosx or isbsd + + make = 'make' if isunix else NMAKE + +@@ -205,7 +205,7 @@ if islinux: + ldflags.append('-lpython'+sysconfig.get_python_version()) + + +-if isfreebsd: ++if isbsd: + cflags.append('-pthread') + ldflags.append('-shared') + cflags.append('-I'+sysconfig.get_python_inc()) diff --git a/misc/calibre/patches/patch-setup_install.py b/misc/calibre/patches/patch-setup_install.py new file mode 100644 index 00000000000..ff05547f5cb --- /dev/null +++ b/misc/calibre/patches/patch-setup_install.py @@ -0,0 +1,40 @@ +$NetBSD: patch-setup_install.py,v 1.1 2011/05/21 15:07:48 wiz Exp $ + +--- setup/install.py.orig 2011-05-20 13:49:07.000000000 +0000 ++++ setup/install.py +@@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en' + + import sys, os, textwrap, subprocess, shutil, tempfile, atexit, stat, shlex + +-from setup import Command, islinux, isfreebsd, basenames, modules, functions, \ ++from setup import Command, islinux, isfreebsd, isbsd, basenames, modules, functions, \ + __appname__, __version__ + + HEADER = '''\ +@@ -116,7 +116,7 @@ class Develop(Command): + + + def pre_sub_commands(self, opts): +- if not (islinux or isfreebsd): ++ if not (islinux or isbsd): + self.info('\nSetting up a source based development environment is only ' + 'supported on linux. On other platforms, see the User Manual' + ' for help with setting up a development environment.') +@@ -156,7 +156,7 @@ class Develop(Command): + self.warn('Failed to compile mount helper. Auto mounting of', + ' devices will not work') + +- if not isfreebsd and os.geteuid() != 0: ++ if not isbsd and os.geteuid() != 0: + return self.warn('Must be run as root to compile mount helper. Auto ' + 'mounting of devices will not work.') + src = os.path.join(self.SRC, 'calibre', 'devices', 'linux_mount_helper.c') +@@ -168,7 +168,7 @@ class Develop(Command): + ret = p.wait() + if ret != 0: + return warn() +- if not isfreebsd: ++ if not isbsd: + os.chown(dest, 0, 0) + os.chmod(dest, stat.S_ISUID|stat.S_ISGID|stat.S_IRUSR|stat.S_IWUSR|\ + stat.S_IXUSR|stat.S_IXGRP|stat.S_IXOTH) diff --git a/misc/calibre/patches/patch-src_calibre_____init____.py b/misc/calibre/patches/patch-src_calibre_____init____.py new file mode 100644 index 00000000000..b09cec24529 --- /dev/null +++ b/misc/calibre/patches/patch-src_calibre_____init____.py @@ -0,0 +1,12 @@ +$NetBSD: patch-src_calibre_____init____.py,v 1.1 2011/05/21 15:07:48 wiz Exp $ + +--- src/calibre/__init__.py.orig 2011-05-13 17:49:55.000000000 +0000 ++++ src/calibre/__init__.py +@@ -13,6 +13,7 @@ warnings.simplefilter('ignore', Deprecat + + + from calibre.constants import (iswindows, isosx, islinux, isfreebsd, isfrozen, ++ isnetbsd, isbsd, + preferred_encoding, __appname__, __version__, __author__, + win32event, win32api, winerror, fcntl, + filesystem_encoding, plugins, config_dir) diff --git a/misc/calibre/patches/patch-src_calibre_constants.py b/misc/calibre/patches/patch-src_calibre_constants.py new file mode 100644 index 00000000000..94407a50542 --- /dev/null +++ b/misc/calibre/patches/patch-src_calibre_constants.py @@ -0,0 +1,15 @@ +$NetBSD: patch-src_calibre_constants.py,v 1.1 2011/05/21 15:07:48 wiz Exp $ + +--- src/calibre/constants.py.orig 2011-05-13 17:49:55.000000000 +0000 ++++ src/calibre/constants.py +@@ -27,7 +27,9 @@ iswindows = 'win32' in _plat or 'win64' + isosx = 'darwin' in _plat + isnewosx = isosx and getattr(sys, 'new_app_bundle', False) + isfreebsd = 'freebsd' in _plat +-islinux = not(iswindows or isosx or isfreebsd) ++isnetbsd = 'netbsd' in _plat ++isbsd = isfreebsd or isnetbsd ++islinux = not(iswindows or isosx or isbsd) + isfrozen = hasattr(sys, 'frozen') + isunix = isosx or islinux + diff --git a/misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp b/misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp index f079da4f136..0c28d265e5b 100644 --- a/misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp +++ b/misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp @@ -1,23 +1,12 @@ -$NetBSD: patch-src_calibre_ebooks_pdf_images.cpp,v 1.1 2011/04/12 21:48:01 wiz Exp $ +$NetBSD: patch-src_calibre_ebooks_pdf_images.cpp,v 1.2 2011/05/21 15:07:48 wiz Exp $ -Fix build with png-1.5. - ---- src/calibre/ebooks/pdf/images.cpp.orig 2009-11-16 19:41:31.000000000 +0000 +--- src/calibre/ebooks/pdf/images.cpp.orig 2011-04-08 17:20:30.000000000 +0000 +++ src/calibre/ebooks/pdf/images.cpp -@@ -6,6 +6,7 @@ - #include <math.h> - #include <iostream> - #include <wand/MagickWand.h> -+#include <zlib.h> +@@ -16,6 +16,7 @@ #include "images.h" #include "utils.h" -@@ -294,7 +295,7 @@ void PNGWriter::write_splash_bitmap(Spla ++#include "zlib.h" - void calibre_png_mem_write(png_structp png_ptr, png_bytep data, png_size_t length) { - if (!png_ptr || length < 1) return; -- vector<char> *buf = static_cast< vector<char>* >(png_ptr->io_ptr); -+ vector<char> *buf = static_cast< vector<char>* >(png_get_io_ptr(png_ptr)); - buf->reserve(buf->capacity() + length); - do { - buf->push_back(static_cast<char>(*data)); + #ifdef _WIN32 + inline double round(double x) { return (x-floor(x))>0.5 ? ceil(x) : floor(x); } diff --git a/misc/calibre/patches/patch-src_calibre_linux.py b/misc/calibre/patches/patch-src_calibre_linux.py new file mode 100644 index 00000000000..8b1aeec4f49 --- /dev/null +++ b/misc/calibre/patches/patch-src_calibre_linux.py @@ -0,0 +1,64 @@ +$NetBSD: patch-src_calibre_linux.py,v 1.1 2011/05/21 15:07:48 wiz Exp $ + +--- src/calibre/linux.py.orig 2011-05-13 17:49:55.000000000 +0000 ++++ src/calibre/linux.py +@@ -7,7 +7,7 @@ import sys, os, cPickle, textwrap, stat, + from subprocess import check_call + + from calibre import __appname__, prints, guess_type +-from calibre.constants import islinux, isfreebsd ++from calibre.constants import islinux, isfreebsd, isnetbsd, isbsd + from calibre.customize.ui import all_input_formats + from calibre.ptempfile import TemporaryDirectory + from calibre import CurrentDir +@@ -136,17 +136,17 @@ class PostInstall: + self.icon_resources = [] + self.menu_resources = [] + self.mime_resources = [] +- if islinux or isfreebsd: ++ if islinux or isbsd: + self.setup_completion() + self.install_man_pages() +- if islinux or isfreebsd: ++ if islinux or isbsd: + self.setup_desktop_integration() + self.create_uninstaller() + + from calibre.utils.config import config_dir + if os.path.exists(config_dir): + os.chdir(config_dir) +- if islinux or isfreebsd: ++ if islinux or isbsd: + for f in os.listdir('.'): + if os.stat(f).st_uid == 0: + import shutil +@@ -196,7 +196,10 @@ class PostInstall: + if os.path.exists(bc): + f = os.path.join(bc, 'calibre') + else: +- f = os.path.join(self.opts.staging_etc, 'bash_completion.d/calibre') ++ if isnetbsd: ++ f = os.path.join(self.opts.staging_root, 'share/bash_completion.d/calibre') ++ else: ++ f = os.path.join(self.opts.staging_etc, 'bash_completion.d/calibre') + if not os.path.exists(os.path.dirname(f)): + os.makedirs(os.path.dirname(f)) + self.manifest.append(f) +@@ -300,7 +303,7 @@ class PostInstall: + def install_man_pages(self): # {{{ + try: + from calibre.utils.help2man import create_man_page +- if isfreebsd: ++ if isbsd: + manpath = os.path.join(self.opts.staging_root, 'man/man1') + else: + manpath = os.path.join(self.opts.staging_sharedir, 'man/man1') +@@ -316,7 +319,7 @@ class PostInstall: + continue + parser = parser() + raw = create_man_page(prog, parser) +- if isfreebsd: ++ if isbsd: + manfile = os.path.join(manpath, prog+'.1') + else: + manfile = os.path.join(manpath, prog+'.1'+__appname__+'.bz2') diff --git a/misc/calibre/patches/patch-src_calibre_utils_help2man.py b/misc/calibre/patches/patch-src_calibre_utils_help2man.py new file mode 100644 index 00000000000..650ad93adea --- /dev/null +++ b/misc/calibre/patches/patch-src_calibre_utils_help2man.py @@ -0,0 +1,22 @@ +$NetBSD: patch-src_calibre_utils_help2man.py,v 1.1 2011/05/21 15:07:48 wiz Exp $ + +--- src/calibre/utils/help2man.py.orig 2011-04-08 17:20:30.000000000 +0000 ++++ src/calibre/utils/help2man.py +@@ -4,7 +4,7 @@ __copyright__ = '2009, Kovid Goyal <kovi + __docformat__ = 'restructuredtext en' + + import time, bz2 +-from calibre.constants import isfreebsd ++from calibre.constants import isbsd + + from calibre.constants import __version__, __appname__, __author__ + +@@ -58,7 +58,7 @@ def create_man_page(prog, parser): + lines = [x if isinstance(x, unicode) else unicode(x, 'utf-8', 'replace') for + x in lines] + +- if not isfreebsd: ++ if not isbsd: + return bz2.compress((u'\n'.join(lines)).encode('utf-8')) + else: + return (u'\n'.join(lines)).encode('utf-8') |