* [gentoo-commits] repo/gentoo:master commit in: profiles/base/, www-apps/venus/, www-apps/venus/files/
@ 2017-02-21 20:32 Michał Górny
0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2017-02-21 20:32 UTC (permalink / raw
To: gentoo-commits
commit: f2f3dc2be23b20a233d56ec9e0cde96c1dd5a0b5
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 21 20:25:34 2017 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 20:32:02 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2f3dc2b
www-apps/venus: python-single-r1, EAPI=6, use bsddb3 for berkdb
profiles/base/package.use.mask | 1 -
www-apps/venus/files/venus-bsddb3.patch | 39 ++++++++++++++
...us-20100911.ebuild => venus-20100911-r1.ebuild} | 60 ++++++++++------------
3 files changed, 67 insertions(+), 33 deletions(-)
diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask
index 69d768385b..28a7918f75 100644
--- a/profiles/base/package.use.mask
+++ b/profiles/base/package.use.mask
@@ -330,7 +330,6 @@ app-text/cmigemo emacs
# dev-lang/python[berkdb] fails with recent multilib sys-libs/db (bug 519584).
dev-lang/python berkdb
net-nds/nsscache nssdb
-www-apps/venus test
# Jason Zaman <perfinion@gentoo.org> (08 May 2015)
# java wrappers fail to build (bug #548858)
diff --git a/www-apps/venus/files/venus-bsddb3.patch b/www-apps/venus/files/venus-bsddb3.patch
new file mode 100644
index 0000000000..b57499c236
--- /dev/null
+++ b/www-apps/venus/files/venus-bsddb3.patch
@@ -0,0 +1,39 @@
+Use bsddb3 instead of deprecated python[berkdb]. Patch by Arfrever.
+
+--- a/planet/idindex.py
++++ b/planet/idindex.py
+@@ -13,8 +13,8 @@
+ cache = config.cache_directory()
+ index=os.path.join(cache,'index')
+ if not os.path.exists(index): return None
+- import dbhash
+- return dbhash.open(filename(index, 'id'),'w')
++ import bsddb3
++ return bsddb3.hashopen(filename(index, 'id'),'w')
+ except Exception, e:
+ if e.__class__.__name__ == 'DBError': e = e.args[-1]
+ from planet import logger as log
+@@ -35,8 +35,8 @@
+ cache = config.cache_directory()
+ index=os.path.join(cache,'index')
+ if not os.path.exists(index): os.makedirs(index)
+- import dbhash
+- index = dbhash.open(filename(index, 'id'),'c')
++ import bsddb3
++ index = bsddb3.hashopen(filename(index, 'id'),'c')
+
+ try:
+ import libxml2
+--- a/tests/test_idindex.py
++++ b/tests/test_idindex.py
+@@ -67,8 +67,8 @@
+ self.assertEqual(12,len(doc.getElementsByTagName('planet:name')))
+
+ try:
+- module = 'dbhash'
++ import bsddb3
+ except ImportError:
+- planet.logger.warn("dbhash is not available => can't test id index")
++ planet.logger.warn("bsddb3 is not available => can't test id index")
+ for method in dir(idIndexTest):
+ if method.startswith('test_'): delattr(idIndexTest,method)
diff --git a/www-apps/venus/venus-20100911.ebuild b/www-apps/venus/venus-20100911-r1.ebuild
similarity index 51%
rename from www-apps/venus/venus-20100911.ebuild
rename to www-apps/venus/venus-20100911-r1.ebuild
index 6e173ba21a..a3841462f3 100644
--- a/www-apps/venus/venus-20100911.ebuild
+++ b/www-apps/venus/venus-20100911-r1.ebuild
@@ -1,12 +1,11 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="3"
-PYTHON_DEPEND="2:2.5"
-SUPPORT_PYTHON_ABIS="1"
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
-inherit webapp python
+inherit webapp python-single-r1
WEBAPP_MANUAL_SLOT="yes"
@@ -19,42 +18,44 @@ KEYWORDS="amd64 x86"
IUSE="django genshi redland test"
SLOT="0"
-DEPEND="
- test? ( =dev-lang/python-2*[berkdb] )
- "
-RDEPEND="django? ( dev-python/django )
- genshi? ( dev-python/genshi )
- redland? ( dev-python/rdflib[redland] )
- dev-python/chardet
- dev-python/httplib2
- dev-python/utidylib
-"
-RESTRICT_PYTHON_ABIS="3.*"
+RDEPEND="
+ dev-python/bsddb3[${PYTHON_USEDEP}]
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/httplib2[${PYTHON_USEDEP}]
+ dev-python/utidylib[${PYTHON_USEDEP}]
+ django? ( dev-python/django[${PYTHON_USEDEP}] )
+ genshi? ( dev-python/genshi[${PYTHON_USEDEP}] )
+ redland? ( dev-python/rdflib[redland,${PYTHON_USEDEP}] )
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
S="${WORKDIR}"/${PN}
+pkg_setup() {
+ python-single-r1_pkg_setup
+ webapp_pkg_setup
+}
+
src_prepare() {
- python_convert_shebangs -r 2 .
+ eapply "${FILESDIR}"/venus-bsddb3.patch
+ eapply_user
+ python_fix_shebang .
}
src_test() {
- testing() {
- PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" runtests.py
- }
- python_execute_function testing
+ "${PYTHON}" runtests.py || die
}
src_install() {
webapp_src_preinst
dodoc AUTHORS README TODO
- dohtml -r docs/*
+ dodoc -r docs
- installation() {
- insinto "$(python_get_sitedir)/${PN}"
- doins -r *py {filters,planet}
- }
- python_execute_function installation
+ python_moduleinto venus
+ python_domodule *.py filters planet
insinto "${MY_APPDIR}"
doins -r themes
@@ -68,12 +69,7 @@ src_install() {
}
pkg_postinst() {
- python_mod_optimize venus
webapp_pkg_postinst
elog "Installation instructions can be found at /usr/share/doc/${PF}/html/
or http://intertwingly.net/code/venus/docs/index.html"
}
-
-pkg_postrm() {
- python_mod_cleanup venus
-}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-21 20:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-21 20:32 [gentoo-commits] repo/gentoo:master commit in: profiles/base/, www-apps/venus/, www-apps/venus/files/ Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox