summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Martins <rafaelmartins@gentoo.org>2020-03-10 23:16:32 +0100
committerRafael Martins <rafaelmartins@gentoo.org>2020-03-10 23:16:55 +0100
commit995c8c25b4f3d9cd488e744b9b6b99d019facb13 (patch)
treee503e1f30dcca3466ffcc36f44c19cc62845e6c9 /www-apps
parentsci-mathematics/alt-ergo: fix build with ocaml-4.09 (diff)
downloadgentoo-995c8c25b4f3d9cd488e744b9b6b99d019facb13.tar.gz
gentoo-995c8c25b4f3d9cd488e744b9b6b99d019facb13.tar.bz2
gentoo-995c8c25b4f3d9cd488e744b9b6b99d019facb13.zip
www-apps/blohg: port to python 3 (bug #702226)
Package-Manager: Portage-2.3.79, Repoman-2.3.16 Signed-off-by: Rafael Martins <rafaelmartins@gentoo.org>
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/blohg/Manifest1
-rw-r--r--www-apps/blohg/blohg-0.13-r4.ebuild (renamed from www-apps/blohg/blohg-0.13-r3.ebuild)48
-rw-r--r--www-apps/blohg/blohg-9999.ebuild46
-rw-r--r--www-apps/blohg/files/use-recent-libgit2.patch17
4 files changed, 43 insertions, 69 deletions
diff --git a/www-apps/blohg/Manifest b/www-apps/blohg/Manifest
index fa6fb11b357a..8d8bcd4e9d73 100644
--- a/www-apps/blohg/Manifest
+++ b/www-apps/blohg/Manifest
@@ -1 +1,2 @@
DIST blohg-0.13.tar.gz 75003 BLAKE2B 6b9760ffa99ca85a40e35c81341e395fdfc00256f5e80091c6883e54f050d4cf3f345c4752b635b1297d15e0055c182e00e74165451d695bb396c869c285646f SHA512 de8643e85e3f72827408d726bbe2f8674dcc6dcf1efdc47d33a934892071f8365cb54e63a6adb803361c7fd04032b2ac4e786c442676e8a8132b6d3221696865
+DIST blohg-patches-0.13-r4.tar.xz 14960 BLAKE2B 31458f412395000a05b359db25e8af648c54e554a3b3216f6c62355fd7203fc19c4452defe7692d0382653563f7b0565395af4ceb2177cc8e6de1d7e1a3c7b41 SHA512 3f709880bdd1826b74982866931f5002fdda451a205b6c278a9869979314413f37c8bf6400e3064a463f2fd34810e22d0d4cd5dfc89786f9e276dd9bd9fe5ec2
diff --git a/www-apps/blohg/blohg-0.13-r3.ebuild b/www-apps/blohg/blohg-0.13-r4.ebuild
index f30c7c0ad0b4..6a4abc9a54f5 100644
--- a/www-apps/blohg/blohg-0.13-r3.ebuild
+++ b/www-apps/blohg/blohg-0.13-r4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python3_6 )
GIT_ECLASS=""
if [[ ${PV} = *9999* ]]; then
@@ -16,7 +16,8 @@ inherit distutils-r1 ${GIT_ECLASS}
DESCRIPTION="A Mercurial (or Git) based blogging engine"
HOMEPAGE="https://github.com/rafaelmartins/blohg"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
+ https://dev.gentoo.org/~rafaelmartins/distfiles/${PN}-patches-${PVR}.tar.xz"
KEYWORDS="~amd64 ~x86"
if [[ ${PV} = *9999* ]]; then
SRC_URI=""
@@ -32,27 +33,28 @@ REQUIRED_USE="|| ( git mercurial )
test? ( git mercurial )"
RDEPEND="
- >=dev-python/click-2.0
- >=dev-python/docutils-0.11
- >=dev-python/flask-0.10.1
- >=dev-python/flask-babel-0.7
- >=dev-python/frozen-flask-0.7
- >=dev-python/jinja-2.5.2
- dev-python/pyyaml
- dev-python/setuptools
- dev-python/pygments
- git? ( >=dev-python/pygit2-0.21.3 )
- mercurial? ( >=dev-vcs/mercurial-1.6 )"
+ dev-python/click[${PYTHON_USEDEP}]
+ dev-python/docutils[${PYTHON_USEDEP}]
+ dev-python/feedgenerator[${PYTHON_USEDEP}]
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/flask-babel[${PYTHON_USEDEP}]
+ dev-python/frozen-flask[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ git? ( dev-python/pygit2[${PYTHON_USEDEP}] )
+ mercurial? ( >=dev-vcs/mercurial-5.2[${PYTHON_USEDEP}] )"
DEPEND="${RDEPEND}
- doc? ( dev-python/sphinx )
- test? ( dev-python/mock )"
+ doc? ( dev-python/sphinx )"
python_prepare_all() {
+ if [[ ${PV} != *9999* ]]; then
+ eapply "${WORKDIR}/${PN}-patches-${PVR}"
+ fi
+
if ! use git; then
rm -rf blohg/vcs_backends/git || die 'rm failed'
- else
- local PATCHES=( "${FILESDIR}/use-recent-libgit2.patch" )
fi
if ! use mercurial; then
@@ -74,11 +76,3 @@ python_install_all() {
python_test() {
esetup.py test
}
-
-pkg_postinst() {
- local ver="${PV}"
- [[ ${PV} = *9999* ]] && ver="latest"
-
- elog "You may want to check the upgrade notes:"
- elog "http://docs.blohg.org/en/${ver}/upgrade/"
-}
diff --git a/www-apps/blohg/blohg-9999.ebuild b/www-apps/blohg/blohg-9999.ebuild
index 03b42c18276f..6a4abc9a54f5 100644
--- a/www-apps/blohg/blohg-9999.ebuild
+++ b/www-apps/blohg/blohg-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python3_6 )
GIT_ECLASS=""
if [[ ${PV} = *9999* ]]; then
@@ -16,7 +16,8 @@ inherit distutils-r1 ${GIT_ECLASS}
DESCRIPTION="A Mercurial (or Git) based blogging engine"
HOMEPAGE="https://github.com/rafaelmartins/blohg"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
+ https://dev.gentoo.org/~rafaelmartins/distfiles/${PN}-patches-${PVR}.tar.xz"
KEYWORDS="~amd64 ~x86"
if [[ ${PV} = *9999* ]]; then
SRC_URI=""
@@ -32,23 +33,26 @@ REQUIRED_USE="|| ( git mercurial )
test? ( git mercurial )"
RDEPEND="
- >=dev-python/click-2.0
- >=dev-python/docutils-0.11
- >=dev-python/flask-0.10.1
- >=dev-python/flask-babel-0.7
- >=dev-python/frozen-flask-0.7
- >=dev-python/jinja-2.5.2
- dev-python/pyyaml
- dev-python/setuptools
- dev-python/pygments
- git? ( >=dev-python/pygit2-0.21.3 )
- mercurial? ( >=dev-vcs/mercurial-1.6 )"
+ dev-python/click[${PYTHON_USEDEP}]
+ dev-python/docutils[${PYTHON_USEDEP}]
+ dev-python/feedgenerator[${PYTHON_USEDEP}]
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/flask-babel[${PYTHON_USEDEP}]
+ dev-python/frozen-flask[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ git? ( dev-python/pygit2[${PYTHON_USEDEP}] )
+ mercurial? ( >=dev-vcs/mercurial-5.2[${PYTHON_USEDEP}] )"
DEPEND="${RDEPEND}
- doc? ( dev-python/sphinx )
- test? ( dev-python/mock )"
+ doc? ( dev-python/sphinx )"
python_prepare_all() {
+ if [[ ${PV} != *9999* ]]; then
+ eapply "${WORKDIR}/${PN}-patches-${PVR}"
+ fi
+
if ! use git; then
rm -rf blohg/vcs_backends/git || die 'rm failed'
fi
@@ -72,11 +76,3 @@ python_install_all() {
python_test() {
esetup.py test
}
-
-pkg_postinst() {
- local ver="${PV}"
- [[ ${PV} = *9999* ]] && ver="latest"
-
- elog "You may want to check the upgrade notes:"
- elog "http://docs.blohg.org/en/${ver}/upgrade/"
-}
diff --git a/www-apps/blohg/files/use-recent-libgit2.patch b/www-apps/blohg/files/use-recent-libgit2.patch
deleted file mode 100644
index decd01b78fb5..000000000000
--- a/www-apps/blohg/files/use-recent-libgit2.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/blohg/vcs_backends/git/filectx.py b/blohg/vcs_backends/git/filectx.py
-index 84f7aa3..5e20762 100644
---- a/blohg/vcs_backends/git/filectx.py
-+++ b/blohg/vcs_backends/git/filectx.py
-@@ -73,7 +73,11 @@ def _last_changeset(self):
- GIT_SORT_TIME):
- diff = self._repo.diff(head, commit)
- for patch in diff:
-- if patch.new_file_path == self._path:
-+ try:
-+ new_file_path = patch.delta.new_file.path
-+ except AttributeError:
-+ new_file_path = patch.new_file_path
-+ if new_file_path == self._path:
- return head
- head = commit
-