Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2019 15:04:13 +0000 (UTC)
From:      Santhosh Raju <fox@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r514535 - in head/deskutils: . foliate foliate/files
Message-ID:  <201910151504.x9FF4D6n030940@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fox
Date: Tue Oct 15 15:04:13 2019
New Revision: 514535
URL: https://svnweb.freebsd.org/changeset/ports/514535

Log:
  Add deskutils/foliate 1.5.3.
  
  Foliate is a simple and modern GTK eBook viewer, built with GJS and
  Epub.js.
  
  WWW: https://johnfactotum.github.io/foliate/
  
  Approved by:	philip (mentor)

Added:
  head/deskutils/foliate/
  head/deskutils/foliate/Makefile   (contents, props changed)
  head/deskutils/foliate/distinfo   (contents, props changed)
  head/deskutils/foliate/files/
  head/deskutils/foliate/files/patch-src_assets_KindleUnpack_kindleunpack.py   (contents, props changed)
  head/deskutils/foliate/files/patch-src_main.js   (contents, props changed)
  head/deskutils/foliate/pkg-descr   (contents, props changed)
  head/deskutils/foliate/pkg-plist   (contents, props changed)
Modified:
  head/deskutils/Makefile

Modified: head/deskutils/Makefile
==============================================================================
--- head/deskutils/Makefile	Tue Oct 15 14:43:01 2019	(r514534)
+++ head/deskutils/Makefile	Tue Oct 15 15:04:13 2019	(r514535)
@@ -52,6 +52,7 @@
     SUBDIR += fbreader
     SUBDIR += fet
     SUBDIR += flameshot
+    SUBDIR += foliate
     SUBDIR += freemind
     SUBDIR += freeplane
     SUBDIR += ganttproject

Added: head/deskutils/foliate/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/foliate/Makefile	Tue Oct 15 15:04:13 2019	(r514535)
@@ -0,0 +1,49 @@
+# $FreeBSD$
+
+PORTNAME=	foliate
+PORTVERSION=	1.5.3
+CATEGORIES=	deskutils
+
+MAINTAINER=	fox@FreeBSD.org
+COMMENT=	Simple and modern GTK eBook viewer
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+BUILD_DEPENDS=	appstream-util:devel/appstream-glib \
+		gjs-console:lang/gjs
+LIB_DEPENDS=	libwebkit2gtk-4.0.so:www/webkit2-gtk3
+RUN_DEPENDS=	gjs-console:lang/gjs
+
+USES=		desktop-file-utils gnome localbase meson python:3.6+ shebangfix
+USE_GNOME=	cairo gtk30 introspection
+
+INSTALLS_ICONS=	yes
+
+SHEBANG_FILES=	${WRKSRC}/build-aux/meson/postinstall.py \
+		${WRKSRC}/src/assets/KindleUnpack/*.py
+
+OPTIONS_DEFINE=	NLS
+OPTIONS_SUB=	yes
+
+NLS_USES=	gettext
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	johnfactotum
+
+GLIB_SCHEMAS=	com.github.johnfactotum.Foliate.gschema.xml
+
+INSTALLATION_DIRS+=	libexec/foliate
+
+post-patch:
+	@${REINPLACE_CMD} -e 's/@PYTHON_VERSION@/${PYTHON_VERSION}/g' \
+		${WRKSRC}/src/main.js
+
+post-install:
+	@${MKDIR} ${STAGEDIR}${PREFIX}/libexec/foliate
+	@${MV} ${STAGEDIR}${PREFIX}/bin/com.github.johnfactotum.Foliate \
+		${STAGEDIR}${PREFIX}/libexec/foliate/com.github.johnfactotum.Foliate
+	@${RLN} ${STAGEDIR}${PREFIX}/libexec/foliate/com.github.johnfactotum.Foliate \
+		${STAGEDIR}${PREFIX}/bin/foliate
+
+.include <bsd.port.mk>

Added: head/deskutils/foliate/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/foliate/distinfo	Tue Oct 15 15:04:13 2019	(r514535)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1570210540
+SHA256 (johnfactotum-foliate-1.5.3_GH0.tar.gz) = 95f45c0511493a3c732f9a199ddc2b5851a220d74d93e6d14976f29f243ee2d7
+SIZE (johnfactotum-foliate-1.5.3_GH0.tar.gz) = 1486573

Added: head/deskutils/foliate/files/patch-src_assets_KindleUnpack_kindleunpack.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/foliate/files/patch-src_assets_KindleUnpack_kindleunpack.py	Tue Oct 15 15:04:13 2019	(r514535)
@@ -0,0 +1,16 @@
+Fixes unicode display correctly, this prevents crashing on opening
+(kindle format files).
+
+--- src/assets/KindleUnpack/kindleunpack.py.orig	2019-10-07 19:55:37 UTC
++++ 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>")
+-    print("   Extensive Extensions and Improvements Copyright © 2009-2014 ")
++    print("   Based on initial mobipocket version Copyright © 2009 Charles M. Hannum <root@ihack.net>".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")

Added: head/deskutils/foliate/files/patch-src_main.js
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/foliate/files/patch-src_main.js	Tue Oct 15 15:04:13 2019	(r514535)
@@ -0,0 +1,13 @@
+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)

Added: head/deskutils/foliate/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/foliate/pkg-descr	Tue Oct 15 15:04:13 2019	(r514535)
@@ -0,0 +1,4 @@
+Foliate is a simple and modern GTK eBook viewer, built with GJS and
+Epub.js.
+
+WWW: https://johnfactotum.github.io/foliate/

Added: head/deskutils/foliate/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/foliate/pkg-plist	Tue Oct 15 15:04:13 2019	(r514535)
@@ -0,0 +1,46 @@
+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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910151504.x9FF4D6n030940>