From 6b338f1f6aa78d44d89c975326be381bebaab2da Mon Sep 17 00:00:00 2001 From: fox Date: Mon, 6 Apr 2020 18:42:05 +0000 Subject: [PATCH] deskutils/foliate: Updates to 2.0.0 Changes since 1.5.3: Interface: * A redesigned interface that works better for smaller screens (#176) * Improved fullscreen mode with an overlaid headerbar (#4) * The headerbar and the progress bar now auto-hide, for a distraction-free reading experience * Various location information, as well as a clock, can now be displayed in the footer (#175, #233) * A new location popover (Ctrl + L) that shows reading time estimates and allows skipping to locations (#155) * E-reader style navigation: go to the previous or next page by tapping on the left or right part of the view; tap on the middle to toggle header bar and progress bar * Annotations, bookmarks, and find results now show chapter titles (#162) * When looking up words in dictionaries, the query can now be edited (#156) * New shortcut for viewing metadata (Ctrl + I) and preferences (Ctrl + ,) * A new traditional menubar, which may be displayed depending on the desktop environment * Option to use a traditional titlebar and menubar instead of a headerbar (experimental) Reading: * Continuous scrolling layout * Option to show decorative shadows that mimic the appearance of a real book * Ability to zoom in and zoom out (#117) * Improved image viewer with "save as" option * Open copies of a book in new windows (Ctrl + N) * Reload book (Ctrl + R) * New built-in themes: Gray, Solarized, Gruvbox, Nord Text selection: * Ability to select text across pages * Find selected text in book * Speak selected text or from the selected location (#141) Annotations: * Spellcheck notes (requires new optional dependency "gspell") * Export annotations to Markdown (#180) * Options to use custom colors for highlights For publishers and developers: * Support for Apple Books theme attribute, which allows books to detect themes without JavaScript (#178) * WebKit's developer tools can be enabled Breaking changes: * The settings schemas has been reorganized * The format for custom themes has changed * Locations are now 1024 characters in size Bug fixes: * Fixed not restoring exact last location * Fixed navigation not working with scrolled layout * Fixed font size not changing when the book uses absolute-size keywords (#173) * Fixed text cut off at margin edge (#177) * Fixed unable to open books with "#" or "?" in the file name --- deskutils/foliate/Makefile | 4 +- deskutils/foliate/distinfo | 6 +- deskutils/foliate/files/patch-src_epubView.js | 11 +++ deskutils/foliate/files/patch-src_main.js | 13 ---- deskutils/foliate/pkg-plist | 67 ++++++++++--------- 5 files changed, 52 insertions(+), 49 deletions(-) create mode 100644 deskutils/foliate/files/patch-src_epubView.js delete mode 100644 deskutils/foliate/files/patch-src_main.js diff --git a/deskutils/foliate/Makefile b/deskutils/foliate/Makefile index 318e2dc9a2d46..24671ca08c7bc 100644 --- a/deskutils/foliate/Makefile +++ b/deskutils/foliate/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= foliate -PORTVERSION= 1.5.3 +PORTVERSION= 2.0.0 CATEGORIES= deskutils MAINTAINER= fox@FreeBSD.org @@ -35,7 +35,7 @@ GLIB_SCHEMAS= com.github.johnfactotum.Foliate.gschema.xml post-patch: @${REINPLACE_CMD} -e 's/@PYTHON_VERSION@/${PYTHON_VERSION}/g' \ - ${WRKSRC}/src/main.js + ${WRKSRC}/src/epubView.js post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/foliate diff --git a/deskutils/foliate/distinfo b/deskutils/foliate/distinfo index 9fa7155209dc5..e00e57bff956a 100644 --- a/deskutils/foliate/distinfo +++ b/deskutils/foliate/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1570210540 -SHA256 (johnfactotum-foliate-1.5.3_GH0.tar.gz) = 95f45c0511493a3c732f9a199ddc2b5851a220d74d93e6d14976f29f243ee2d7 -SIZE (johnfactotum-foliate-1.5.3_GH0.tar.gz) = 1486573 +TIMESTAMP = 1586179297 +SHA256 (johnfactotum-foliate-2.0.0_GH0.tar.gz) = e3f7ab5242aa6d936b66d6a41147bf17c0334d7675b5e38e64829d204fd3712a +SIZE (johnfactotum-foliate-2.0.0_GH0.tar.gz) = 3098652 diff --git a/deskutils/foliate/files/patch-src_epubView.js b/deskutils/foliate/files/patch-src_epubView.js new file mode 100644 index 0000000000000..9a2a94c13a55e --- /dev/null +++ b/deskutils/foliate/files/patch-src_epubView.js @@ -0,0 +1,11 @@ +--- src/epubView.js.orig 2020-04-06 13:22:39 UTC ++++ src/epubView.js +@@ -21,7 +21,7 @@ const { + mimetypes, execCommand, recursivelyDeleteDir + } = imports.utils + +-const python = GLib.find_program_in_path('python') || GLib.find_program_in_path('python3') ++const python = GLib.find_program_in_path('@PYTHON_VERSION@') + const kindleUnpack = pkg.pkgdatadir + '/assets/KindleUnpack/kindleunpack.py' + + const settings = new Gio.Settings({ schema_id: pkg.name + '.view' }) diff --git a/deskutils/foliate/files/patch-src_main.js b/deskutils/foliate/files/patch-src_main.js deleted file mode 100644 index 9f8897e271eeb..0000000000000 --- a/deskutils/foliate/files/patch-src_main.js +++ /dev/null @@ -1,13 +0,0 @@ -Adds variable to help substitute the correct python version suffix. - ---- src/main.js.orig 2019-10-07 20:11:48 UTC -+++ src/main.js -@@ -1796,7 +1796,7 @@ class BookViewerWindow { - } - open(fileName, realFileName, inputType = 'epub') { - if (kindleExts.some(x => fileName.endsWith(x))) { -- const python = GLib.find_program_in_path('python') || GLib.find_program_in_path('python3') -+ const python = GLib.find_program_in_path('@PYTHON_VERSION@') - const kindleUnpack = pkg.pkgdatadir + '/assets/KindleUnpack/kindleunpack.py' - - const dir = GLib.dir_make_tmp(null) diff --git a/deskutils/foliate/pkg-plist b/deskutils/foliate/pkg-plist index eb534563a8487..eaca5fd46f935 100644 --- a/deskutils/foliate/pkg-plist +++ b/deskutils/foliate/pkg-plist @@ -1,36 +1,40 @@ bin/foliate libexec/foliate/com.github.johnfactotum.Foliate share/applications/com.github.johnfactotum.Foliate.desktop -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/__init__.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/compatibility_utils.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/kindleunpack.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_cover.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_dict.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_header.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_html.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_index.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_k8proc.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_k8resc.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_nav.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_ncx.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_opf.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_pagemap.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_sectioner.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_split.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_uncompress.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobi_utils.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/mobiml2xhtml.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/unipath.py -share/com.github.johnfactotum.Foliate/assets/KindleUnpack/unpack_structure.py -share/com.github.johnfactotum.Foliate/assets/epub.js -share/com.github.johnfactotum.Foliate/assets/jszip.min.js -share/com.github.johnfactotum.Foliate/assets/lookup.html -share/com.github.johnfactotum.Foliate/assets/utils.js -share/com.github.johnfactotum.Foliate/assets/viewer-nocsp.html -share/com.github.johnfactotum.Foliate/assets/viewer.css -share/com.github.johnfactotum.Foliate/assets/viewer.html -share/com.github.johnfactotum.Foliate/assets/viewer.js -share/com.github.johnfactotum.Foliate/com.github.johnfactotum.Foliate.src.gresource +%%DATADIR%%/assets/.eslintrc.json +%%DATADIR%%/assets/KindleUnpack/__init__.py +%%DATADIR%%/assets/KindleUnpack/compatibility_utils.py +%%DATADIR%%/assets/KindleUnpack/kindleunpack.py +%%DATADIR%%/assets/KindleUnpack/kindleunpack.py.orig +%%DATADIR%%/assets/KindleUnpack/mobi_cover.py +%%DATADIR%%/assets/KindleUnpack/mobi_dict.py +%%DATADIR%%/assets/KindleUnpack/mobi_header.py +%%DATADIR%%/assets/KindleUnpack/mobi_html.py +%%DATADIR%%/assets/KindleUnpack/mobi_index.py +%%DATADIR%%/assets/KindleUnpack/mobi_k8proc.py +%%DATADIR%%/assets/KindleUnpack/mobi_k8resc.py +%%DATADIR%%/assets/KindleUnpack/mobi_nav.py +%%DATADIR%%/assets/KindleUnpack/mobi_ncx.py +%%DATADIR%%/assets/KindleUnpack/mobi_opf.py +%%DATADIR%%/assets/KindleUnpack/mobi_pagemap.py +%%DATADIR%%/assets/KindleUnpack/mobi_sectioner.py +%%DATADIR%%/assets/KindleUnpack/mobi_split.py +%%DATADIR%%/assets/KindleUnpack/mobi_uncompress.py +%%DATADIR%%/assets/KindleUnpack/mobi_utils.py +%%DATADIR%%/assets/KindleUnpack/mobiml2xhtml.py +%%DATADIR%%/assets/KindleUnpack/unipath.py +%%DATADIR%%/assets/KindleUnpack/unpack_structure.py +%%DATADIR%%/assets/epub-viewer-nocsp.html +%%DATADIR%%/assets/epub-viewer.css +%%DATADIR%%/assets/epub-viewer.html +%%DATADIR%%/assets/epub-viewer.js +%%DATADIR%%/assets/epub.js +%%DATADIR%%/assets/jszip.min.js +%%DATADIR%%/assets/lookup.html +%%DATADIR%%/assets/utils.js +%%DATADIR%%/com.github.johnfactotum.Foliate.data.gresource +%%DATADIR%%/com.github.johnfactotum.Foliate.src.gresource +share/glib-2.0/schemas/com.github.johnfactotum.Foliate.gschema.xml share/icons/hicolor/scalable/apps/com.github.johnfactotum.Foliate.svg share/icons/hicolor/symbolic/apps/com.github.johnfactotum.Foliate-symbolic.svg share/locale/cs_CS/LC_MESSAGES/com.github.johnfactotum.Foliate.mo @@ -38,8 +42,9 @@ share/locale/es/LC_MESSAGES/com.github.johnfactotum.Foliate.mo share/locale/fr_FR/LC_MESSAGES/com.github.johnfactotum.Foliate.mo share/locale/id_ID/LC_MESSAGES/com.github.johnfactotum.Foliate.mo share/locale/it/LC_MESSAGES/com.github.johnfactotum.Foliate.mo -share/locale/nl_NL/LC_MESSAGES/com.github.johnfactotum.Foliate.mo +share/locale/nl/LC_MESSAGES/com.github.johnfactotum.Foliate.mo share/locale/pt_BR/LC_MESSAGES/com.github.johnfactotum.Foliate.mo share/locale/ru_RU/LC_MESSAGES/com.github.johnfactotum.Foliate.mo +share/locale/sv/LC_MESSAGES/com.github.johnfactotum.Foliate.mo share/locale/zh_TW/LC_MESSAGES/com.github.johnfactotum.Foliate.mo share/metainfo/com.github.johnfactotum.Foliate.appdata.xml