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.
This commit is contained in:
wiz 2011-05-21 15:07:48 +00:00
parent 30e08cdcdd
commit 1197c5e12f
13 changed files with 1591 additions and 1088 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,13 @@
$NetBSD: distinfo,v 1.3 2011/04/12 21:48:01 wiz Exp $
$NetBSD: distinfo,v 1.4 2011/05/21 15:07:48 wiz Exp $
SHA1 (calibre-0.6.24.tar.gz) = 8484746cb058d7719225b02a843d29bd7626ffa0
RMD160 (calibre-0.6.24.tar.gz) = a7833156b635bfd14842b055e3b44debe64e4752
Size (calibre-0.6.24.tar.gz) = 10953557 bytes
SHA1 (patch-aa) = cf794f388d8193c3384f7f36208bef606c14dc6d
SHA1 (patch-ac) = da8fedb745ebb29ea7df0a5b7a642384273ae324
SHA1 (patch-src_calibre_ebooks_pdf_images.cpp) = 31deac71af1f8d6f04978df26104ccd91229950c
SHA1 (calibre-0.8.2.tar.gz) = 4e5a19b063aa3f8a7af3fcbdd6c4bad5cfb28ca0
RMD160 (calibre-0.8.2.tar.gz) = 05ef243ee65405f3243c74cd444278411b949b7c
Size (calibre-0.8.2.tar.gz) = 28195417 bytes
SHA1 (patch-setup_____init____.py) = 6ffa50a3a6e5d433da1f40de59d9306fe5b7c0fb
SHA1 (patch-setup_extensions.py) = 6c2e584e6293bea1f160bc3361251785218a54d3
SHA1 (patch-setup_install.py) = 254490c558a62a6130767c808cf732ad0b6e22ae
SHA1 (patch-src_calibre_____init____.py) = a37dacbc90bc8333362c876100732ceef9c08173
SHA1 (patch-src_calibre_constants.py) = 288c5346a63dba967473b31a3b637d6cfa67b5cd
SHA1 (patch-src_calibre_ebooks_pdf_images.cpp) = 950f0302f3c387fb9b4ee41cd96d7c5103b7ad45
SHA1 (patch-src_calibre_linux.py) = bb9ae0099faf84a73ccbc0a876ff340d5be82963
SHA1 (patch-src_calibre_utils_help2man.py) = d53a0522082793a7cd94fd97589c39bf24803bf7

View file

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

View file

@ -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')

View file

@ -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')

View file

@ -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())

View file

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

View file

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

View file

@ -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

View file

@ -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); }

View file

@ -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')

View file

@ -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')