diff --git a/app-emacs/defmacro-gensym/defmacro-gensym-99999999.ebuild b/app-emacs/defmacro-gensym/defmacro-gensym-99999999.ebuild new file mode 100644 index 0000000..4fd00a3 --- /dev/null +++ b/app-emacs/defmacro-gensym/defmacro-gensym-99999999.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +NEED_EMACS="24.1" + +inherit elisp-common git-r3 + +DESCRIPTION="Convenient gensyms for defmacro (Emacs Lisp)" +HOMEPAGE="https://gitlab.com/akater/defmacro-gensym/-/blob/master/defmacro-gensym.org" +EGIT_REPO_URI="https://gitlab.com/akater/defmacro-gensym.git" +EGIT_BRANCH="master" + +LICENSE="Unlicense" +SLOT="0" +KEYWORDS="~amd64" +DOCS="README.org" + +export ORG_IMMUTABLE_SOURCES_DIRECTORY="${SITEETC}/${PN}" + +pkg_postinst() { + elisp-site-regen + if declare -f readme.gentoo_print_elog >/dev/null; then + readme.gentoo_print_elog + fi +} + +pkg_postrm() { + elisp-site-regen +} diff --git a/app-emacs/defmacro-gensym/metadata.xml b/app-emacs/defmacro-gensym/metadata.xml new file mode 100644 index 0000000..a445070 --- /dev/null +++ b/app-emacs/defmacro-gensym/metadata.xml @@ -0,0 +1,15 @@ + + + + + nuclearspace@gmail.com + Dima Akater + + An extension of defmacro that provides more convenient +declaration/initialization of gensyms, covering both with-gensyms +and once-only functionality. + + + akater/defmacro-gensym + + diff --git a/app-emacs/ement-extras/ement-extras-99999999.ebuild b/app-emacs/ement-extras/ement-extras-99999999.ebuild new file mode 100644 index 0000000..ad42b5d --- /dev/null +++ b/app-emacs/ement-extras/ement-extras-99999999.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +NEED_EMACS="24.1" + +MY_PN="emacs-${PN}" +inherit elisp-common git-r3 + +DESCRIPTION="Extra features for Ement, Matrix client for GNU Emacs" +HOMEPAGE="https://gitlab.com/akater/emacs-ement-extras/-/blob/master/emacs-ement-extras.org" +EGIT_REPO_URI="https://gitlab.com/akater/${MY_PN}.git" +EGIT_BRANCH="release" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64" +DOCS="" # README.org is a relative symlink + +BDEPEND=" + app-emacs/defmacro-gensym + app-emacs/ement + app-emacs/plz +" + +RDEPEND=" + app-emacs/ement +" + +export ORG_IMMUTABLE_SOURCES_DIRECTORY="${SITEETC}/${PN}" + +pkg_postinst() { + elisp-site-regen + if declare -f readme.gentoo_print_elog >/dev/null; then + readme.gentoo_print_elog + fi +} + +pkg_postrm() { + elisp-site-regen +} diff --git a/app-emacs/ement-extras/metadata.xml b/app-emacs/ement-extras/metadata.xml new file mode 100644 index 0000000..0e1802d --- /dev/null +++ b/app-emacs/ement-extras/metadata.xml @@ -0,0 +1,13 @@ + + + + + nuclearspace@gmail.com + Dima Akater + + Additional features for Ement.el: - password search with auth-source - convenience functions to run pantalaimon daemon from within Emacs, including a single-command zero-config entry point to run ement via pantalaimon, and a config generator. + + + akater/emacs-ement-extras + + diff --git a/app-emacs/ement/ement-9999.ebuild b/app-emacs/ement/ement-9999.ebuild new file mode 100644 index 0000000..7b1563e --- /dev/null +++ b/app-emacs/ement/ement-9999.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +NEED_EMACS="26.3" + +inherit elisp git-r3 + +DESCRIPTION="Matrix client for GNU Emacs" +HOMEPAGE="https://github.com/alphapapa/ement.el" + +EGIT_REPO_URI="https://github.com/alphapapa/ement.el.git" +EGIT_BRANCH="master" +EGIT_CLONE_TYPE="single" + +KEYWORDS="~amd64" + +LICENSE="GPL-3" +SLOT="0" +IUSE="e2e extras" + +DOCS="README.org" + +BDEPEND=" + >=app-emacs/plz-0.1_pre + >=app-emacs/ts-0.2 + e2e? ( net-im/pantalaimon ) +" +# Pantalaimon's docs are needed at build time to annotate config + +RDEPEND=" + >=app-emacs/plz-0.1_pre + >=app-emacs/ts-0.2 + e2e? ( net-im/pantalaimon ) + extras? ( app-emacs/ement-extras ) +" +SITEFILE="50${PN}-gentoo.el" + +src_compile() { + elisp_src_compile + if use e2e ; then + einfo "Annotating suggested pantalaimon config..." + cp "${FILESDIR}"/pantalaimon.conf "${S}" + "${EMACS}" -Q -batch -l "${FILESDIR}/${PN}"-annotate-conf.el + fi +} + +src_install() { + if use e2e ; then + einfo "Installing suggested pantalaimon config to /etc/${PN}" + insinto /etc/"${PN}" + doins pantalaimon.conf + DOCS+=" ${FILESDIR}/${PN}-gentoo-pantalaimon.org" + fi + elisp_src_install +} + +pkg_postinst() { + if [ ! [ use e2e && use extras ] ] ; then + einfo "To start using Matrix from Emacs with E2EE without any manual configuration," + einfo "USE=\"e2e extras\" emerge app-emacs/ement" + fi +} diff --git a/app-emacs/ement/files/50ement-gentoo.el b/app-emacs/ement/files/50ement-gentoo.el new file mode 100644 index 0000000..3e66ed0 --- /dev/null +++ b/app-emacs/ement/files/50ement-gentoo.el @@ -0,0 +1,90 @@ +;;; ement site-lisp configuration + +(add-to-list 'load-path "/usr/share/emacs/site-lisp/ement") + + +;;; begin: forms written by `autoload-generate-file-autoloads' + + +;;;### (autoloads nil "ement" "ement.el" (0 0 0 0)) +;;; Generated autoloads from ement.el + +(autoload 'ement-connect "ement" "\ +Connect to Matrix with USER-ID and PASSWORD, or using SESSION. +Interactively, with prefix, ignore a saved session and log in +again; otherwise, use a saved session if `ement-save-session' is +enabled and a saved session is available, or prompt to log in if +not enabled or available. + +If URI-PREFIX is specified, it should be the prefix of the +server's API URI, including protocol, hostname, and optionally +the port, e.g. + + \"https://matrix-client.matrix.org\" + \"http://localhost:8080\" + +\(fn &key USER-ID PASSWORD URI-PREFIX SESSION)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ement" '("ement-"))) + +;;;*** + + +;;;### (autoloads nil "ement-room-list" "ement-room-list.el" (0 0 +;;;;;; 0 0)) +;;; Generated autoloads from ement-room-list.el + +(autoload 'ement-room-list "ement-room-list" "\ +Show buffer listing joined rooms. +Calls `pop-to-buffer-same-window'. Interactively, with prefix, +call `pop-to-buffer'. + +\(fn &rest IGNORE)" t nil) + +(defalias 'ement-list-rooms 'ement-room-list) + +(autoload 'ement-room-list-auto-update "ement-room-list" "\ +Automatically update the room list buffer. +Does so when variable `ement-room-list-auto-update' is non-nil. +To be called in `ement-sync-callback-hook'. + +\(fn SESSION)" nil nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ement-room-list" '("ement-room-list-"))) + +;;;*** + + +;;;### (autoloads nil "ement-room" "ement-room.el" (0 0 0 0)) +;;; Generated autoloads from ement-room.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ement-room" '("ement-"))) + +;;;*** + + +;;;### (autoloads nil "ement-notify" "ement-notify.el" (0 0 0 0)) +;;; Generated autoloads from ement-notify.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ement-notify" '("ement-notify"))) + +;;;*** + + +;;;### (autoloads nil "ement-api" "ement-api.el" (0 0 0 0)) +;;; Generated autoloads from ement-api.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ement-api" '("ement-api-error"))) + +;;;*** + + +;;;### (autoloads nil "ement-macros" "ement-macros.el" (0 0 0 0)) +;;; Generated autoloads from ement-macros.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ement-macros" '("ement-"))) + +;;;*** + + +;;; end: forms written by `autoload-generate-file-autoloads' diff --git a/app-emacs/ement/files/ement-annotate-conf.el b/app-emacs/ement/files/ement-annotate-conf.el new file mode 100644 index 0000000..4cbbc0d --- /dev/null +++ b/app-emacs/ement/files/ement-annotate-conf.el @@ -0,0 +1,106 @@ +;; -*- lexical-binding: t -*- + +(require 'rx) + +(defvar ement--pantalaimon-conf-verbose (member "--verbose" command-line-args)) + +(defun ement--pantalaimon-conf-message (format-string &rest args) + (when ement--pantalaimon-conf-verbose + (apply #'message format-string args))) + +(defmacro with-no-messages (&rest body) + (declare (indent 0)) + `(progn + (advice-add 'message :around #'ignore) + (unwind-protect (progn ,@body) + (advice-remove 'message #'ignore)))) + +(defun ement--pantalaimon-latest-doc-dir () + (car + (last + (directory-files "/usr/share/doc/" t (rx string-start "pantalaimon"))))) + +(defun ement--pantalaimon-annotate (pantalaimon-conf-file) + (let ((count 0) + (pantalaimon-options-help + (ignore-errors + (with-no-messages + (find-file-noselect + (nth 0 (directory-files (ement--pantalaimon-latest-doc-dir) + t (rx string-start "pantalaimon.5.md") + t))))))) + (if (not pantalaimon-options-help) (message "Can't find pantalaimon doc file to annotate pantalaimon config") + (ement--pantalaimon-conf-message + "Annotating file %s..." pantalaimon-conf-file) + (let ((annotations (get-buffer-create " *annotations*"))) + (with-current-buffer annotations (buffer-disable-undo)) + ;; annotations need to be reformatted in their own buffer + ;; because md syntax is different from conf syntax + (defun ement--pantalaimon-conf-insert-annotation (key &optional buffer) + (setq buffer (or buffer (current-buffer))) + (with-current-buffer pantalaimon-options-help + (save-excursion + (goto-char (point-min)) + (if (not (re-search-forward (rx line-start "**" (literal key) "**" + line-end) + nil t)) + (progn + (ement--pantalaimon-conf-message + "Can't find annotation for key %s" key) + nil) + (re-search-forward (rx (zero-or-more whitespace)) nil t) + (if (not (looking-at-p (rx ?\>))) + (progn (ement--pantalaimon-conf-message + "Unexpected annotation format for key %s" key) + nil) + (let ((start (point)) + (end (re-search-forward + (rx line-start + (zero-or-more whitespace) line-end) + nil t))) + (with-current-buffer annotations + (erase-buffer) + (insert-buffer-substring-no-properties + pantalaimon-options-help start end) + (goto-char (point-min)) + (while (re-search-forward (rx line-start ?\>) nil t) + (delete-backward-char 1) + (insert ?\#)))) + (with-current-buffer buffer + (insert-buffer-substring-no-properties annotations)) + t))))) + (with-current-buffer (find-file-noselect pantalaimon-conf-file) + (goto-char (point-min)) + (let ((maybe-fail-ungracefully + (let ((count 0)) + (lambda () + (when (>= (setq count (1+ count)) 10000) + (error "Annotating config failed ungracefully")))))) + (while (not (= (point-max) (point))) + ;; These loops are not very safe + ;; todo: maybe rewrite with save-restriction + (funcall maybe-fail-ungracefully) + (when (looking-at (rx line-start + (group (one-or-more alphabetic)) + (zero-or-one ?\s) ?\=)) + (let ((key (match-string-no-properties 1))) + (when ement--pantalaimon-conf-verbose + "Annotating option %s..." key) + (beginning-of-line) + (open-line 1) + (when (ement--pantalaimon-conf-insert-annotation key) + (ement--pantalaimon-conf-message "Done"))) + (while (looking-at-p (rx (or whitespace line-end))) + (funcall maybe-fail-ungracefully) + (delete-char 1))) + (next-logical-line) + (while (looking-at-p (rx line-start ?\#)) + (funcall maybe-fail-ungracefully) + (next-logical-line)) + (open-line 1) + (next-logical-line))) + (save-buffer)) + (kill-buffer annotations))))) + +(ement--pantalaimon-annotate (expand-file-name "pantalaimon.conf" + (getenv "S"))) diff --git a/app-emacs/ement/files/ement-gentoo-pantalaimon.org b/app-emacs/ement/files/ement-gentoo-pantalaimon.org new file mode 100644 index 0000000..d2da7f6 --- /dev/null +++ b/app-emacs/ement/files/ement-gentoo-pantalaimon.org @@ -0,0 +1,21 @@ +#+title: Quick start with E2E encryption in Ement.el + +* User config + +You may +#+begin_src sh +ln -s /etc/ement/pantalaimon.conf ~/.config/pantalaimon/pantalaimon.conf +#+end_src + +or do something equivalent. See [[/etc/ement/pantalaimon.conf][the config]], it's annotated. + +* Starting the server + +Start the server with e.g. +#+begin_src sh +pantalaimon --config ~/.config/pantalaimon/pantalaimon.conf +#+end_src + +* Starting Ement with Pantalaimon + +Follow [[file:README.org.bz2::*Encrypted room support through Pantalaimon][Ement's instructions]]. diff --git a/app-emacs/ement/files/pantalaimon.conf b/app-emacs/ement/files/pantalaimon.conf new file mode 100644 index 0000000..ba59caa --- /dev/null +++ b/app-emacs/ement/files/pantalaimon.conf @@ -0,0 +1,21 @@ +# This is an example config that should work with ement.el out of the box +# You may symlink ~/.config/pantalaimon/pantalaimon.conf to this file + +[Default] +LogLevel=Debug +SSL=True +Notifications=Off +DebugEncryption=True + +[local-matrix] +Homeserver=https://matrix.org +ListenAddress=127.0.0.1 +ListenPort=8009 +IgnoreVerification=False +UseKeyring=False +# UseKeyring=True does not work for me on pantalaimon restarts +# UseKeyring=No not tested +# UseKeyring=Yes not tested +DropOldKeys=False +# DropOldKeys=No not tested +# DropOldKeys=Yes not tested diff --git a/app-emacs/ement/metadata.xml b/app-emacs/ement/metadata.xml new file mode 100644 index 0000000..0705386 --- /dev/null +++ b/app-emacs/ement/metadata.xml @@ -0,0 +1,17 @@ + + + + + nuclearspace@gmail.com + Dima Akater + + Ement.el is a Matrix client for GNU Emacs. Currently in development but already useful. + + + alphapapa/ement.el + + + Enable end to end encryption support via pantalaimon + Install extra features (auth-source and proxy support) + + diff --git a/app-emacs/plz/metadata.xml b/app-emacs/plz/metadata.xml new file mode 100644 index 0000000..6aa09c4 --- /dev/null +++ b/app-emacs/plz/metadata.xml @@ -0,0 +1,11 @@ + + + + + nuclearspace@gmail.com + Dima Akater + + + alphapapa/plz.el + + diff --git a/app-emacs/plz/plz-9999.ebuild b/app-emacs/plz/plz-9999.ebuild new file mode 100644 index 0000000..fc41b2f --- /dev/null +++ b/app-emacs/plz/plz-9999.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +NEED_EMACS="26.3" + +inherit elisp git-r3 + +DESCRIPTION="An HTTP library that uses curl as a backend" +HOMEPAGE="https://github.com/alphapapa/plz.el" + +EGIT_REPO_URI="https://github.com/alphapapa/plz.el.git" +EGIT_BRANCH="master" +EGIT_CLONE_TYPE="single" + +KEYWORDS="~amd64" + +LICENSE="GPL-3" +SLOT="0" + +RDEPEND="net-misc/curl" + +src_test() { + emake test +} diff --git a/app-emacs/ts/metadata.xml b/app-emacs/ts/metadata.xml new file mode 100644 index 0000000..8dde097 --- /dev/null +++ b/app-emacs/ts/metadata.xml @@ -0,0 +1,11 @@ + + + + + nuclearspace@gmail.com + Dima Akater + + + alphapapa/ts.el + + diff --git a/app-emacs/ts/ts-9999.ebuild b/app-emacs/ts/ts-9999.ebuild new file mode 100644 index 0000000..0c6b97a --- /dev/null +++ b/app-emacs/ts/ts-9999.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +NEED_EMACS="26.1" + +inherit elisp git-r3 + +DESCRIPTION="Timestamp and date/time library" +HOMEPAGE="https://github.com/alphapapa/ts.el" + +EGIT_REPO_URI="https://github.com/alphapapa/ts.el.git" +EGIT_BRANCH="master" +EGIT_CLONE_TYPE="single" +KEYWORDS="~amd64" + +LICENSE="GPL-3" +SLOT="0" + +BDEPEND=" + >=app-emacs/dash-2.14.1 + >=app-emacs/s-1.12.0 +" + +RDEPEND="${BDEPEND}" + +src_test() { + emake test +} diff --git a/dev-python/janus/Manifest b/dev-python/janus/Manifest new file mode 100644 index 0000000..49f0cd7 --- /dev/null +++ b/dev-python/janus/Manifest @@ -0,0 +1 @@ +DIST janus-0.5.0.tar.gz 18006 BLAKE2B 9e22d63cdf5b388f22d2d9f021d289560db127f71b3f4d338affc204379ef633ad88c4cb87abb697b6fcbc839f2e0b2249b0ee4895262bf26e75f23ac4c12471 SHA512 9b220347ad29c1bf613a3db9468c41c0c5216d245a320ccaeb97f784d6a6e9ae631ccac951b18d15e706debd512e25de8c079e79a5c68d195b97cadbeba971a2 diff --git a/dev-python/janus/janus-0.5.0.ebuild b/dev-python/janus/janus-0.5.0.ebuild new file mode 100644 index 0000000..5b2f22b --- /dev/null +++ b/dev-python/janus/janus-0.5.0.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# credit goes to ebuild repository gentoo-zh + +EAPI=7 +PYTHON_COMPAT=( python3_{8,9} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Implementation of the asyncio (PEP 3156) event-loop with Qt" +HOMEPAGE="https://github.com/aio-libs/janus" +MY_P="${P/_alpha/a}" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz" +IUSE="test" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/pytest[${PYTHON_USEDEP}] + ) +" + +python_test() { + py.test -v || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all +} diff --git a/dev-python/janus/metadata.xml b/dev-python/janus/metadata.xml new file mode 100644 index 0000000..15afb04 --- /dev/null +++ b/dev-python/janus/metadata.xml @@ -0,0 +1,11 @@ + + + + + parona@protonmail.com + Alfred Wingate + + + aio-libs/janus + + diff --git a/net-im/pantalaimon/Manifest b/net-im/pantalaimon/Manifest new file mode 100644 index 0000000..f8446b4 --- /dev/null +++ b/net-im/pantalaimon/Manifest @@ -0,0 +1 @@ +DIST pantalaimon-0.10.2.tar.gz 2494924 BLAKE2B fecb33571c159d71d62477f662bf146651f496f6d28aa13a197e9b2076acc4ec2b9c89586c6bbc8fee586cd31b74086fb8dd14bf417853b35c4d3941a01f2d40 SHA512 27d887959a74469967174140f1a511a152ebe2813186cd3e8136fcc91d0726a4c0fdf46427d5bcee8401567ff88468143139b0bdc1f27a389b6fb85cf28b317b diff --git a/net-im/pantalaimon/files/pantalaimon-0.10.2-no-panctl.patch b/net-im/pantalaimon/files/pantalaimon-0.10.2-no-panctl.patch new file mode 100644 index 0000000..775517b --- /dev/null +++ b/net-im/pantalaimon/files/pantalaimon-0.10.2-no-panctl.patch @@ -0,0 +1,33 @@ +Do not install panctl + +--- + MANIFEST.in | 1 - + setup.py | 3 +-- + 2 files changed, 1 insertion(+), 3 deletions(-) + +diff --git a/MANIFEST.in b/MANIFEST.in +index 86e8433..ee8bc73 100644 +--- a/MANIFEST.in ++++ b/MANIFEST.in +@@ -1,4 +1,3 @@ + include contrib/pantalaimon.service + include doc/man/pantalaimon.8 + include doc/man/pantalaimon.5 +-include doc/man/panctl.1 +diff --git a/setup.py b/setup.py +index b13317a..e06de1a 100644 +--- a/setup.py ++++ b/setup.py +@@ -40,8 +40,7 @@ setup( + ] + }, + entry_points={ +- "console_scripts": ["pantalaimon=pantalaimon.main:main", +- "panctl=pantalaimon.panctl:main"], ++ "console_scripts": ["pantalaimon=pantalaimon.main:main"], + }, + zip_safe=False + ) +-- +2.31.1 + diff --git a/net-im/pantalaimon/metadata.xml b/net-im/pantalaimon/metadata.xml new file mode 100644 index 0000000..2e1de59 --- /dev/null +++ b/net-im/pantalaimon/metadata.xml @@ -0,0 +1,18 @@ + + + + + nuclearspace@gmail.com + Dima Akater + + Pantalaimon is an end-to-end encryption aware Matrix reverse proxy daemon that handles the encryption. Messages are transparently encrypted and decrypted for clients inside of pantalaimon. + + + Support additional features that require dbus + Install a CLI utility to control pantalaimon + Install systemd .service script + + + matrix-org/pantalaimon + + diff --git a/net-im/pantalaimon/pantalaimon-0.10.2.ebuild b/net-im/pantalaimon/pantalaimon-0.10.2.ebuild new file mode 100644 index 0000000..a732b7a --- /dev/null +++ b/net-im/pantalaimon/pantalaimon-0.10.2.ebuild @@ -0,0 +1,80 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_9 ) +inherit distutils-r1 + +DESCRIPTION="A Matrix proxy daemon that adds E2E encryption capabilities" +HOMEPAGE="https://github.com/matrix-org/pantalaimon" +SRC_URI="https://github.com/matrix-org/pantalaimon/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="dbus panctl systemd" +RESTRICT="mirror" +DOCS=( "README.md" "docs/man/pantalaimon.5.md" "docs/man/pantalaimon.8.md" ) +REQUIRED_USE="panctl? ( dbus )" + +BDEPEND="" +RDEPEND=" + >=dev-python/attrs-19.3.0 + >=dev-python/aiohttp-3.6 + >=dev-python/appdirs-1.4.4 + >=dev-python/click-7.1.2 + >=dev-python/keyring-21.2.1 + >=dev-python/logbook-1.5.3 + >=dev-python/peewee-3.13.1 + >=dev-python/cachetools-3.0.0 + >dev-python/prompt_toolkit-2 + >=dev-python/janus-0.5 + >=dev-python/matrix-nio-0.18[e2e] + dbus? ( + >=dev-python/dbus-python-1.2 + >=dev-python/pygobject-3.36 + >=dev-python/pydbus-0.6 + >=dev-python/notify2-0.3 + ) +" + +src_prepare() { + + # I don't think we should install something a priori non-functioning + + if ! use panctl ; then + rm docs/man/panctl.1 + rm docs/man/panctl.md + rm pantalaimon/panctl.py + eapply "${FILESDIR}/${PN}"-0.10.2-no-panctl.patch + fi + + default +} + +# todo: Why exactly is compilation disabled by upstream? + +src_install() { + # Remove some warnings + ln -s docs doc + # This should probably be addressed by upstream + + distutils-r1_src_install + doman docs/man/pantalaimon.{5,8} + if use panctl ; then + doman docs/man/panctl.1 + dodoc docs/man/panctl.md + fi + + # issue: contrib config could be much better + sed -i -e 's/^/# /' contrib/pantalaimon.conf + insinto /etc + doins contrib/pantalaimon.conf + + if use systemd; then + insinto /usr/lib/systemd/user + doins contrib/pantalaimon.service + fi + +}