pkgsrc/misc/calibre/Makefile
wiz 2d22c58777 calibre: update to 3.21.0.
- version: 3.21.0
  date: 2018-04-06

  new features:
    - title: "Browser viewer: Allow showing the time left in the current chapter/book in the header and footer areas of the book."
      description: "To use go to the preferences of the browser viewer and customize the headers and footers to display the time left. Note that time left in chapter only works correctly if chapters are in separate HTML files in the book."

    - title: "Manage tags dialog: Searching now shows all matching tags and there is an undo button to undo changes."

    - title: "Add an output profile for the Kindle Oasis 2017"

  bug fixes:
    - title: "Content server: Fix adding/deleting books and editing metadata not updating the main calibre book list automatically."

    - title: "Viewer: When doing a dictionary lookup, remove soft hyphens from the word, if any are present."

    - title: "Edit metadata dialog: Fix tab order for buttons to the left of the title and author"

    - title: "Trim cover dialog: Remove the redundant Trim & OK button, instead have the OK button trim automatically if there is a selection."

    - title: "Update Amazon metadata plugin for a website change"

    - title: "Content server: Fix translations not being updated without clearing the browser cache"

    - title: "Content server: Fix switching from translations to no translations not working"

    - title: "Content server: When updating interface data do not transmit translations if they have not been changed. Saves ~30-60KB bandwidth when using non-English interface language."

- version: 3.20.0
  date: 2018-03-23

  new features:
    - title: "Content server: Allow editing the metadata of books from the book details page"
      type: major
      description: "On the book details page, you can now edit any metadata and change covers by clicking the edit metadata icon in the right area of the top bar. Note that only users that have write permissions for the library can edit metadata."

    - title: "Kobo driver: Recognize Kobo Aura 2 with new firmware (4.6.10188)"

  bug fixes:
    - title: 'When reading metadata from HTML also recognize <meta name="dc.description"> as being comments'
2018-04-17 09:03:27 +00:00

132 lines
5.4 KiB
Makefile

# $NetBSD: Makefile,v 1.199 2018/04/17 09:03:27 wiz Exp $
DISTNAME= calibre-3.21.0
CATEGORIES= misc
#MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=calibre/}
MASTER_SITES= http://download.calibre-ebook.com/${PKGVERSION_NOREV}/
EXTRACT_SUFX= .tar.xz
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.calibre-ebook.com/
COMMENT= E-book library management application
LICENSE= gnu-gpl-v3
DEPENDS+= ${PYPKGPREFIX}-apsw>=3.7.17:../../databases/py-apsw
DEPENDS+= ${PYPKGPREFIX}-cssutils>=0.9.9:../../textproc/py-cssutils
DEPENDS+= ${PYPKGPREFIX}-dateutil>=1.4.1:../../time/py-dateutil
DEPENDS+= ${PYPKGPREFIX}-dns>=1.6.0:../../net/py-dns
DEPENDS+= ${PYPKGPREFIX}-elementtree-[0-9]*:../../textproc/py-elementtree
DEPENDS+= ${PYPKGPREFIX}-html5-parser-[0-9]*:../../textproc/py-html5-parser
DEPENDS+= ${PYPKGPREFIX}-mechanize>=0.1.11nb1:../../www/py-mechanize
DEPENDS+= ${PYPKGPREFIX}-msgpack-[0-9]*:../../devel/py-msgpack
DEPENDS+= ${PYPKGPREFIX}-netifaces>=0.8:../../net/py-netifaces
DEPENDS+= ${PYPKGPREFIX}-Pillow>=2.7.0:../../graphics/py-Pillow
DEPENDS+= ${PYPKGPREFIX}-psutil>=0.6.1:../../sysutils/py-psutil
DEPENDS+= ${PYPKGPREFIX}-regex-[0-9]*:../../textproc/py-regex
DEPENDS+= ${PYPKGPREFIX}-sqlite3-[0-9]*:../../databases/py-sqlite3
# for installation
BUILD_DEPENDS+= xdg-utils>=1.0.2:../../misc/xdg-utils
EXTRACT_USING= bsdtar
PYTHON_VERSIONS_ACCEPTED= 27 # as of 3.16.0
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config pax
PYSETUPOPTARGS= # empty
PYSETUPINSTALLARGS= --prefix=${PREFIX} --root=${DESTDIR:Q}${PREFIX}
INSTALLATION_DIRS= share/applications
INSTALLATION_DIRS= share/icons
INSTALLATION_DIRS= share/calibre/recipes
FIX_PYTHON_FILES+= *.py
FIX_PYTHON_FILES+= recipes/*.recipe
FIX_PYTHON_FILES+= */*.py
FIX_PYTHON_FILES+= */*/*.py
FIX_PYTHON_FILES+= */*/*/*.py
FIX_PYTHON_FILES+= */*/*/*/*.py
FIX_PYTHON_FILES+= */*/*/*/*/*.py
FIX_PYTHON_FILES+= */*/*/*/*/*/*.py
SUBST_CLASSES+= prefix
SUBST_SED.prefix= -e "s,^QMAKE =.*,QMAKE = '${PREFIX}/qt5/bin/qmake',"
SUBST_MESSAGE.prefix= Fixing path to QMAKE
SUBST_STAGE.prefix= post-patch
SUBST_FILES.prefix= setup/build_environment.py
# This one is for /usr/bin/env python (or even /usr/bin/env Python or /usr/bin/python2)
SUBST_CLASSES+= path
SUBST_SED.path= -e "s,\#! */usr/bin/env *[Pp]ython[0-9.]*,\#!${PYTHONBIN},"
SUBST_MESSAGE.path= Fixing path to python.
SUBST_STAGE.path= post-patch
SUBST_FILES.path= ${FIX_PYTHON_FILES}
REPLACE_BASH+= resources/calibre-portable.sh
# These ones are for replacing python[0-9*] with PYTHONBIN
REPLACE_PYTHON+= recipes/animal_politico.recipe
REPLACE_PYTHON+= recipes/respekt_magazine.recipe
REPLACE_PYTHON+= recipes/kompiutierra.recipe
REPLACE_PYTHON+= recipes/trouw.recipe
REPLACE_PYTHON+= src/calibre/ebooks/markdown/extensions/*.py
REPLACE_PYTHON+= src/calibre/ebooks/metadata/odt.py
REPLACE_PYTHON+= src/calibre/utils/*.py
REPLACE_PYTHON+= src/odf/*.py
MAKE_ENV+= FC_INC_DIR=${BUILDLINK_PREFIX.fontconfig}/include/fontconfig
MAKE_ENV+= FC_LIB_DIR=${BUILDLINK_PREFIX.fontconfig}/lib
MAKE_ENV+= PODOFO_INC_DIR=${BUILDLINK_PREFIX.podofo}/include/podofo
MAKE_ENV+= PODOFO_LIB_DIR=${BUILDLINK_PREFIX.podofo}/lib
MAKE_ENV+= SIP_BIN=${BUILDLINK_PREFIX.py-sip}/bin/sip${PYVERSSUFFIX}
MAKE_ENV+= LFLAGS=${LDFLAGS:Q}
# Turn off x bits on non-executable files.
post-extract:
find ${WRKSRC}/src/calibre/devices ${WRKSRC}/src/calibre/ebooks ${WRKSRC}/src/calibre/web -name '*.py' -exec chmod a-x \{} \;
find ${WRKSRC}/resources/images/mimetypes -name '*.png' -exec chmod a-x \{} \;
chmod a-x ${WRKSRC}/src/calibre/utils/Zeroconf.py
chmod a-x ${WRKSRC}/src/calibre/utils/smtplib.py
post-install:
cd ${WRKSRC}/recipes && pax -wr -pma *.recipe \
${DESTDIR}${PREFIX}/share/calibre/recipes
cd ${WRKSRC} && pax -wr -pma Changelog* README.md \
COPYRIGHT INSTALL LICENSE.* \
${DESTDIR}${PREFIX}/share/doc/calibre
${RM} ${DESTDIR}${PREFIX}/bin/calibre-uninstall
.include "../../lang/python/application.mk"
.include "../../databases/sqlite3/buildlink3.mk"
BUILDLINK_API_DEPENDS.chmlib+= chmlib>=0.40
.include "../../devel/chmlib/buildlink3.mk"
BUILDLINK_API_DEPENDS.libmtp+= libmtp>=1.1.5
.include "../../devel/libmtp/buildlink3.mk"
BUILDLINK_API_DEPENDS.libusb+= libusb>=0.1.12
.include "../../mk/libusb.buildlink3.mk"
.include "../../fonts/fontconfig/buildlink3.mk"
BUILDLINK_API_DEPENDS.libwmf+= libwmf>=0.2.8
.include "../../graphics/libwmf/buildlink3.mk"
.include "../../lang/python/egg.mk"
_PYSETUPTOOLSINSTALLARGS= # empty
# Get rid of --root=${DESTDIR}, use our own version from above instead.
# because the setup.py is not the standard one and behaves differently.
_PYSETUPINSTALLARGS= ${PYSETUPINSTALLARGS} ${PYSETUPOPTARGS} ${_PYSETUPTOOLSINSTALLARGS}
BUILDLINK_API_DEPENDS.podofo+= podofo>=0.8.2
.include "../../print/podofo/buildlink3.mk"
BUILDLINK_API_DEPENDS.poppler+= poppler>=0.20.2
.include "../../print/poppler-includes/buildlink3.mk"
.include "../../print/poppler/buildlink3.mk"
.include "../../print/poppler-qt5/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../sysutils/hal/buildlink3.mk"
BUILDLINK_API_DEPENDS.py-dbus+= ${PYPKGPREFIX}-dbus>=0.82.2
.include "../../sysutils/py-dbus/buildlink3.mk"
.include "../../textproc/icu/buildlink3.mk"
.include "../../databases/shared-mime-info/mimedb.mk"
.include "../../x11/py-sip/buildlink3.mk"
.include "../../x11/qt5-qtbase/buildlink3.mk"
.include "../../x11/py-qt5/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"