pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/foliate Import of foliate 1.5.3 as print/foliate.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1c8073bcc31b
branches:  trunk
changeset: 402579:1c8073bcc31b
user:      fox <fox%pkgsrc.org@localhost>
date:      Sat Oct 12 13:45:20 2019 +0000

description:
Import of foliate 1.5.3 as print/foliate.

Foliate is a simple and modern GTK eBook viewer, built with GJS and
Epub.js.

diffstat:

 print/foliate/DESCR                                                 |   2 +
 print/foliate/Makefile                                              |  47 ++++++++++
 print/foliate/PLIST                                                 |  47 ++++++++++
 print/foliate/distinfo                                              |   8 +
 print/foliate/patches/patch-src_assets_KindleUnpack_kindleunpack.py |  18 +++
 print/foliate/patches/patch-src_main.js                             |  15 +++
 6 files changed, 137 insertions(+), 0 deletions(-)

diffs (161 lines):

diff -r 862eadc676c3 -r 1c8073bcc31b print/foliate/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/foliate/DESCR       Sat Oct 12 13:45:20 2019 +0000
@@ -0,0 +1,2 @@
+Foliate is a simple and modern GTK eBook viewer, built with GJS and
+Epub.js.
diff -r 862eadc676c3 -r 1c8073bcc31b print/foliate/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/foliate/Makefile    Sat Oct 12 13:45:20 2019 +0000
@@ -0,0 +1,47 @@
+# $NetBSD: Makefile,v 1.1 2019/10/12 13:45:20 fox Exp $
+
+DISTNAME=      foliate-1.5.3
+CATEGORIES=    print
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=johnfactotum/}
+EXTRACT_USING= bsdtar
+
+MAINTAINER=    fox%NetBSD.org@localhost
+COMMENT=       Simple and modern GTK eBook viewer
+HOMEPAGE=      https://johnfactotum.github.io/foliate/
+LICENSE=       gnu-gpl-v3
+
+USE_TOOLS+=    pkg-config msgfmt xgettext
+
+BUILD_DEPENDS+=        gjs>=1.52.0:../../lang/gjs
+
+SUBST_CLASSES+=                pyvers
+SUBST_MESSAGE.pyvers=  Substitute the correct python version.
+SUBST_STAGE.pyvers=    pre-configure
+SUBST_FILES.pyvers=    src/main.js
+SUBST_VARS.pyvers+=    PYVERSSUFFIX
+
+# Fails without GNU msgfmt
+USE_BUILTIN.gettext=   no
+
+REPLACE_PYTHON+=       build-aux/meson/postinstall.py
+REPLACE_PYTHON+=       src/assets/KindleUnpack/*.py
+
+INSTALLATION_DIRS+=    libexec/foliate
+
+pre-install:
+       ${RM} -f ${WRKSRC}/src/assets/KindleUnpack/*.orig
+
+post-install:
+       ${MV} ${DESTDIR}${PREFIX}/bin/com.github.johnfactotum.Foliate \
+               ${DESTDIR}${PREFIX}/libexec/foliate/com.github.johnfactotum.Foliate
+       ${LN} -s -f ${DESTDIR}${PREFIX}/libexec/foliate/com.github.johnfactotum.Foliate \
+               ${DESTDIR}${PREFIX}/bin/foliate
+
+.include "../../devel/meson/build.mk"
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../devel/glib2/schemas.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../lang/python/application.mk"
+BUILDLINK_API_DEPENDS.webkit-gtk+=     webkit-gtk>=2.24.0
+.include "../../www/webkit-gtk/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 862eadc676c3 -r 1c8073bcc31b print/foliate/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/foliate/PLIST       Sat Oct 12 13:45:20 2019 +0000
@@ -0,0 +1,47 @@
+@comment $NetBSD: PLIST,v 1.1 2019/10/12 13:45:20 fox Exp $
+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
+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
+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/pt_BR/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
+share/locale/ru_RU/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
diff -r 862eadc676c3 -r 1c8073bcc31b print/foliate/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/foliate/distinfo    Sat Oct 12 13:45:20 2019 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2019/10/12 13:45:20 fox Exp $
+
+SHA1 (foliate-1.5.3.tar.gz) = 04303d725550409259417ba563f2e363a13c8b3f
+RMD160 (foliate-1.5.3.tar.gz) = 77c0e8bfb0f641bb2ca90b5b06278ebd66d61579
+SHA512 (foliate-1.5.3.tar.gz) = 806640ab78794208d344145bad22c668cf17454194707f06caacc368d7f440bfdce6b3801cf8a9320d10b2a441fe4ad43e87a869107c3ed5c0af48e958638c7b
+Size (foliate-1.5.3.tar.gz) = 1486573 bytes
+SHA1 (patch-src_assets_KindleUnpack_kindleunpack.py) = 2b558fe842669982aec6087e9ce1c72f1fc52315
+SHA1 (patch-src_main.js) = 0d5f5be182af898bbe64d25a71f05fdf00a626d5
diff -r 862eadc676c3 -r 1c8073bcc31b print/foliate/patches/patch-src_assets_KindleUnpack_kindleunpack.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/foliate/patches/patch-src_assets_KindleUnpack_kindleunpack.py       Sat Oct 12 13:45:20 2019 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_assets_KindleUnpack_kindleunpack.py,v 1.1 2019/10/12 13:45:20 fox Exp $
+
+Fixes unicode display correctly, this prevents crashing on opening
+(kindle format files).
+
+--- src/assets/KindleUnpack/kindleunpack.py.orig       2019-10-07 20:49:16.446537408 +0000
++++ src/assets/KindleUnpack/kindleunpack.py
+@@ -952,8 +952,8 @@ def main(argv=unicode_argv()):
+     global SPLIT_COMBO_MOBIS
+ 
+     print("KindleUnpack v0.82")
+-    print("   Based on initial mobipocket version Copyright © 2009 Charles M. Hannum <root%ihack.net@localhost>")
+-    print("   Extensive Extensions and Improvements Copyright © 2009-2014 ")
++    print("   Based on initial mobipocket version Copyright © 2009 Charles M. Hannum <root%ihack.net@localhost>".encode("utf-8"))
++    print("   Extensive Extensions and Improvements Copyright © 2009-2014 ".encode("utf-8"))
+     print("       by:  P. Durrant, K. Hendricks, S. Siebert, fandrieu, DiapDealer, nickredding, tkeo.")
+     print("   This program is free software: you can redistribute it and/or modify")
+     print("   it under the terms of the GNU General Public License as published by")
diff -r 862eadc676c3 -r 1c8073bcc31b print/foliate/patches/patch-src_main.js
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/foliate/patches/patch-src_main.js   Sat Oct 12 13:45:20 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_main.js,v 1.1 2019/10/12 13:45:20 fox Exp $
+
+Adds variable to help substitute the correct python version suffix.
+
+--- src/main.js.orig   2019-10-07 20:50:20.174655390 +0000
++++ 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@PYVERSSUFFIX@')
+             const kindleUnpack = pkg.pkgdatadir + '/assets/KindleUnpack/kindleunpack.py'
+ 
+             const dir = GLib.dir_make_tmp(null)



Home | Main Index | Thread Index | Old Index