calibre is a free and open source e-book library management application

developed by users of e-books for users of e-books. It has a cornucopia
of features divided into the following main categories:
 * Library Management
 * E-book conversion
 * Syncing to e-book reader devices
 * Downloading news from the web and converting it into e-book form
 * Comprehensive e-book viewer
 * Content server for online access to your book collection

OK laurent@, jasper@
This commit is contained in:
phessler 2011-04-17 18:39:21 +00:00
parent 4cdcc0554e
commit ed103c971c
10 changed files with 3065 additions and 0 deletions

71
textproc/calibre/Makefile Normal file
View File

@ -0,0 +1,71 @@
# $OpenBSD: Makefile,v 1.1.1.1 2011/04/17 18:39:21 phessler Exp $
COMMENT = ebook management application
# 0.7.46 and higher have problems repainting their windows..
DISTNAME = calibre-0.7.45
CATEGORIES = textproc
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=calibre/}
# GPLv3
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
MODULES = lang/python \
x11/qt4
LIB_DEPENDS= devel/chmlib \
graphics/ImageMagick \
graphics/libwmf \
print/poppler,-qt4 \
textproc/icu4c
RUN_DEPENDS = devel/py-dateutil \
devel/xdg-utils \
graphics/py-Imaging \
net/py-dnspython \
textproc/py-cssutils>=0.9.7 \
textproc/py-lxml>=2.2.8 \
textproc/py-pdf \
www/py-beautifulsoup \
www/py-cherrypy2 \
www/py-mechanize \
x11/py-qt4>=4.8.2p1 \
www/py-mechanize
BUILD_DEPENDS = ${RUN_DEPENDS}
CFLAGS += "-I${LOCALBASE}/include"
LDFLAGS += "-L${LOCALBASE}/lib"
MAKE_ENV += QMAKE="${LOCALBASE}/bin/qmake4" \
LDFLAGS="${LDFLAGS}" \
FC_INC_DIR="${X11BASE}/include" \
FC_LIB_DIR="${X11BASE}/lib" \
PNG_INC_DIR="`pkg-config --cflags libpng`" \
PNG_LIB_DIR="`pkg-config --libs libpng`"
# Requires /sys filesystem for HW detection
MAKE_ENV += WITH_USB=no
WRKDIST = ${WRKDIR}/calibre
PORTHOME = ${WRKDIR}
NO_REGRESS = Yes
MODPY_SETUPTOOLS = Yes
## setup.py doesn't like the options in our python module
MODPY_DISTUTILS_BUILD = build
MODPY_DISTUTILS_INSTALL = install --prefix=${LOCALBASE} \
--root=${PREFIX}
# There are 901 files that hard-code the python bin name
# Remove bundled cherrypy and pyPdf so it uses the system versions
pre-configure:
cd ${WRKSRC} && (rm -rf src/cherrypy src/pyPdf ; \
find . -name '*.py' -exec \
perl -pi -e 's,#!/usr/bin/env python,#!${MODPY_BIN},' {} \; )
do-install:
${_MODPY_CMD} ${MODPY_DISTUTILS_INSTALL} ${MODPY_DISTUTILS_INSTALLARGS}
${CHMOD} 755 ${PREFIX}/bin/calibre-mount-helper
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (calibre-0.7.45.tar.gz) = idrNunkOUBjzxmXOHPWCbA==
RMD160 (calibre-0.7.45.tar.gz) = 5kavUhEDBN9zvjGcE95+3ySHdJE=
SHA1 (calibre-0.7.45.tar.gz) = aReeWsR1IHcMXU1Jnfv+tW3F+Ek=
SHA256 (calibre-0.7.45.tar.gz) = 46wCuT0b5CG8FvHPpWy/vSOUmolNOfOa65LnOieucec=
SIZE (calibre-0.7.45.tar.gz) = 21646602

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-setup_build_environment_py,v 1.1.1.1 2011/04/17 18:39:21 phessler Exp $
--- setup/build_environment.py.orig Fri Jan 21 23:22:10 2011
+++ setup/build_environment.py Thu Jan 27 09:46:09 2011
@@ -170,7 +170,7 @@ else:
fc_inc = os.environ.get('FC_INC_DIR', fc_inc)
fc_lib = os.environ.get('FC_LIB_DIR', fc_lib)
-fc_error = None if os.path.exists(os.path.join(fc_inc, 'fontconfig.h')) else \
+fc_error = None if os.path.exists(os.path.join(fc_inc, 'fontconfig/fontconfig.h')) else \
('fontconfig header files not found on your system. '
'Try setting the FC_INC_DIR and FC_LIB_DIR environment '
'variables.')

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-setup_extensions_py,v 1.1.1.1 2011/04/17 18:39:21 phessler Exp $
--- setup/extensions.py.orig Fri Jan 21 23:22:10 2011
+++ setup/extensions.py Thu Jan 27 09:46:09 2011
@@ -107,8 +107,8 @@ extensions = [
reflow_sources,
headers=reflow_headers,
libraries=poppler_libs+magick_libs+png_libs+ft_libs+jpg_libs+pdfreflow_libs,
- lib_dirs=poppler_lib_dirs+magick_lib_dirs+png_lib_dirs+ft_lib_dirs+jpg_lib_dirs,
- inc_dirs=poppler_inc_dirs+magick_inc_dirs+png_inc_dirs,
+ lib_dirs=poppler_lib_dirs+magick_lib_dirs+png_lib_dirs+ft_lib_dirs+jpg_lib_dirs+[fc_lib],
+ inc_dirs=poppler_inc_dirs+magick_inc_dirs+png_inc_dirs+[fc_inc],
error=reflow_error,
cflags=['-DPNG_SKIP_SETJMP_CHECK'] if islinux else []
),
@@ -187,7 +187,7 @@ if isunix:
cc = os.environ.get('CC', 'gcc')
cxx = os.environ.get('CXX', 'g++')
cflags = os.environ.get('OVERRIDE_CFLAGS',
- '-O3 -Wall -DNDEBUG -fno-strict-aliasing -pipe')
+ '-Wall -DNDEBUG -fno-strict-aliasing -pipe')
cflags = shlex.split(cflags) + ['-fPIC']
ldflags = os.environ.get('OVERRIDE_LDFLAGS', '-Wall')
ldflags = shlex.split(ldflags)

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-setup_install_py,v 1.1.1.1 2011/04/17 18:39:21 phessler Exp $
--- setup/install.py.orig Thu Jan 27 09:50:17 2011
+++ setup/install.py Thu Jan 27 09:50:20 2011
@@ -269,7 +269,7 @@ class Install(Develop):
reldir = os.path.relpath(x[0], self.SRC)
destdir = os.path.join(dest, reldir)
for f in x[-1]:
- if os.path.splitext(f)[1] in ('.py', '.so'):
+ if os.path.splitext(f)[1] in ('.py', '.pyc', '.so'):
if not os.path.exists(destdir):
os.makedirs(destdir)
shutil.copy2(self.j(x[0], f), destdir)

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-src_calibre_devices_scanner_py,v 1.1.1.1 2011/04/17 18:39:21 phessler Exp $
--- src/calibre/devices/scanner.py.orig Fri Jan 21 23:22:10 2011
+++ src/calibre/devices/scanner.py Thu Jan 27 10:50:42 2011
@@ -10,6 +10,8 @@ from threading import RLock
from calibre import iswindows, isosx, plugins, islinux
+isopenbsd = 'openbsd' in sys.platform.lower()
+
osx_scanner = win_scanner = linux_scanner = None
if iswindows:
@@ -157,12 +159,18 @@ linux_scanner = None
if islinux:
linux_scanner = LinuxScanner()
+openbsd_scanner = None
+
+''' OpenBSD support currently not written yet '''
+if isopenbsd:
+ openbsd_scanner = None
+
class DeviceScanner(object):
def __init__(self, *args):
if isosx and osx_scanner is None:
raise RuntimeError('The Python extension usbobserver must be available on OS X.')
- self.scanner = win_scanner if iswindows else osx_scanner if isosx else linux_scanner
+ self.scanner = win_scanner if iswindows else osx_scanner if isosx else openbsd_scanner if isopenbsd else linux_scanner
self.devices = []
def scan(self):

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_calibre_gui2_pictureflow_pictureflow_h,v 1.1.1.1 2011/04/17 18:39:21 phessler Exp $
--- src/calibre/gui2/pictureflow/pictureflow.h.orig Sat Jan 15 21:15:22 2011
+++ src/calibre/gui2/pictureflow/pictureflow.h Sat Jan 15 21:16:11 2011
@@ -57,7 +57,7 @@
#pragma once
-#include <QWidget>
+#include <QtGui/QWidget>
class FlowImages : public QObject
{

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_calibre_utils_fonts_fontconfig_c,v 1.1.1.1 2011/04/17 18:39:21 phessler Exp $
--- src/calibre/utils/fonts/fontconfig.c.orig Sat Jan 15 21:10:37 2011
+++ src/calibre/utils/fonts/fontconfig.c Sat Jan 15 21:10:47 2011
@@ -14,7 +14,7 @@
#include <Python.h>
#include <stdio.h>
#include <string.h>
-#include <fontconfig.h>
+#include <fontconfig/fontconfig.h>
static PyObject *
fontconfig_initialize(PyObject *self, PyObject *args) {

View File

@ -0,0 +1,9 @@
calibre is a free and open source e-book library management application
developed by users of e-books for users of e-books. It has a cornucopia
of features divided into the following main categories:
* Library Management
* E-book conversion
* Syncing to e-book reader devices
* Downloading news from the web and converting it into e-book form
* Comprehensive e-book viewer
* Content server for online access to your book collection

2877
textproc/calibre/pkg/PLIST Normal file

File diff suppressed because it is too large Load Diff