commit:     cf6ae8cb36539de6f8a341e23653b4e3ddb95049
Author:     Erwin Kaats <mailgentoo <AT> kaats <DOT> ch>
AuthorDate: Tue Jun 25 20:57:58 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Tue Jun 25 20:59:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cf6ae8cb

app-text/jrnl: new package, add 4.1, 9999
Bug: https://bugs.gentoo.org/911682

Signed-off-by: Erwin Kaats <mailgentoo <AT> kaats.ch>

 app-text/jrnl/Manifest               |  2 ++
 app-text/jrnl/files/test_fixes.patch | 11 ++++++++++
 app-text/jrnl/files/tomli.patch      | 20 +++++++++++++++++
 app-text/jrnl/jrnl-4.1.ebuild        | 42 ++++++++++++++++++++++++++++++++++++
 app-text/jrnl/jrnl-9999.ebuild       | 42 ++++++++++++++++++++++++++++++++++++
 app-text/jrnl/metadata.xml           | 11 ++++++++++
 6 files changed, 128 insertions(+)

diff --git a/app-text/jrnl/Manifest b/app-text/jrnl/Manifest
new file mode 100644
index 000000000..c25695e7b
--- /dev/null
+++ b/app-text/jrnl/Manifest
@@ -0,0 +1,2 @@
+DIST jrnl-4.1.tar.gz 671439 BLAKE2B 
f5781f1dd042e89779e8437765abedb76ab71cfe48ea14d5f8ff1b8a32d5d1d73a78b125615cf868964f8fab21833d3b923ad07b7893b652938963339c6db2b0
 SHA512 
c5e17b8dd863cdf251f5622099e07645d65ecb27a4b765df6b6c6f89a482e73b800e4906f14ffffc9567b3f9620f87f98fcc0b5ae355a22368f90a3279718252
+DIST jrnl-9999.tar.gz 672471 BLAKE2B 
ad5403f4ffa3e89baece625e9b247517b5413eea2eb4f4aff68404309309a25bd718da9f8cacb05241de84619530a36e67d03a10c3cd291fd991f45a10261e95
 SHA512 
007eb5289b453c524aa538ec3ff4ccc9fde2a94b0564cba073ead30b509867b11d2bef34867a1c50e43fd8c41c6077ed0d2cbee434468b5757e223f10e50d1ec

diff --git a/app-text/jrnl/files/test_fixes.patch 
b/app-text/jrnl/files/test_fixes.patch
new file mode 100644
index 000000000..6cafd907f
--- /dev/null
+++ b/app-text/jrnl/files/test_fixes.patch
@@ -0,0 +1,11 @@
+--- a/tests/lib/when_steps.py
++++ b/tests/lib/when_steps.py
+@@ -7,7 +7,7 @@
+ from pytest_bdd import when
+ from pytest_bdd.parsers import parse
+ from pytest_bdd.parsers import re
+-from pytest_bdd.steps import inject_fixture
++from pytest_bdd.compat import inject_fixture
+ 
+ from jrnl.main import run
+

diff --git a/app-text/jrnl/files/tomli.patch b/app-text/jrnl/files/tomli.patch
new file mode 100644
index 000000000..c522f4384
--- /dev/null
+++ b/app-text/jrnl/files/tomli.patch
@@ -0,0 +1,20 @@
+Patching out toml in favor for tomli as the latter is already included in the 
Gentoo repo
+
+--- a/tests/lib/fixtures.py
++++ b/tests/lib/fixtures.py
+@@ -9,7 +9,7 @@
+ from unittest.mock import Mock
+ from unittest.mock import patch
+ 
+-import toml
++import tomli
+ from keyring import backend
+ from keyring import errors
+ from pytest import fixture
+@@ -204,7 +204,7 @@
+ @fixture
+ def toml_version(working_dir):
+     pyproject = os.path.join(working_dir, "..", "pyproject.toml")
+-    pyproject_contents = toml.load(pyproject)
++    pyproject_contents = tomli.load(pyproject)
+     return pyproject_contents["tool"]["poetry"]["version"]

diff --git a/app-text/jrnl/jrnl-4.1.ebuild b/app-text/jrnl/jrnl-4.1.ebuild
new file mode 100644
index 000000000..ffdb06f35
--- /dev/null
+++ b/app-text/jrnl/jrnl-4.1.ebuild
@@ -0,0 +1,42 @@
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+DISTUTILS_USE_PEP517=poetry
+
+inherit distutils-r1
+
+DESCRIPTION="Collect your thoughts and notes without leaving the command line"
+HOMEPAGE="https://jrnl.sh";
+SRC_URI="https://github.com/jrnl-org/jrnl/archive/refs/tags/v${PV}.tar.gz  -> 
${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+PATCHES="
+       ${FILESDIR}/tomli.patch
+       ${FILESDIR}/test_fixes.patch
+"
+
+DEPEND="
+       dev-python/rich
+       dev-python/colorama
+       dev-python/cryptography
+       dev-python/keyring
+       dev-python/parsedatetime
+       dev-python/python-dateutil
+       dev-python/pyxdg
+       dev-python/ruamel-yaml
+       dev-python/tzlocal
+       test? (
+               <dev-python/pytest-8.1
+               dev-python/pytest-bdd
+               dev-python/pytest-xdist
+               dev-python/tomli
+               )
+"
+
+RDEPEND="${DEPEND}"
+distutils_enable_tests pytest

diff --git a/app-text/jrnl/jrnl-9999.ebuild b/app-text/jrnl/jrnl-9999.ebuild
new file mode 100644
index 000000000..ee7adc6e0
--- /dev/null
+++ b/app-text/jrnl/jrnl-9999.ebuild
@@ -0,0 +1,42 @@
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+DISTUTILS_USE_PEP517=poetry
+
+inherit distutils-r1
+
+DESCRIPTION="Collect your thoughts and notes without leaving the command line"
+HOMEPAGE="https://jrnl.sh";
+SRC_URI="https://github.com/jrnl-org/jrnl/archive/refs/heads/develop.tar.gz -> 
${P}.tar.gz"
+
+S="${WORKDIR}/${PN}-develop"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+PATCHES="
+       ${FILESDIR}/tomli.patch
+"
+
+DEPEND="
+       dev-python/rich
+       dev-python/colorama
+       dev-python/cryptography
+       dev-python/keyring
+       dev-python/parsedatetime
+       dev-python/python-dateutil
+       dev-python/pyxdg
+       dev-python/ruamel-yaml
+       dev-python/tzlocal
+       test? (
+               dev-python/pytest
+               dev-python/pytest-bdd
+               dev-python/pytest-xdist
+               dev-python/tomli
+               )
+"
+RDEPEND="${DEPEND}"
+distutils_enable_tests pytest

diff --git a/app-text/jrnl/metadata.xml b/app-text/jrnl/metadata.xml
new file mode 100644
index 000000000..6780f3f97
--- /dev/null
+++ b/app-text/jrnl/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Erwin Kaats</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">jrnl-org/jrnl</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to