commit:     80fcab05e40d3f94629f049d173ca2aba6ff8fbe
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sat May 15 14:12:09 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sat May 15 14:22:05 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80fcab05

app-misc/gramps: make BerkeleyDB support optional

Some of the tests still fail when bsddb3 is absent but in spite of what
the README says, it is not a mandatory dependency any more and the BSDDB
family-tree backend has been deprecated since 5.1.0 in favour of SQLite.

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 app-misc/gramps/gramps-5.1.3.ebuild | 11 +++++++++--
 app-misc/gramps/metadata.xml        |  1 +
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/app-misc/gramps/gramps-5.1.3.ebuild 
b/app-misc/gramps/gramps-5.1.3.ebuild
index 0c5ddbf8781..b02679ec1bc 100644
--- a/app-misc/gramps/gramps-5.1.3.ebuild
+++ b/app-misc/gramps/gramps-5.1.3.ebuild
@@ -17,15 +17,15 @@ 
SRC_URI="https://github.com/gramps-project/${PN}/archive/v${PV}.tar.gz
 LICENSE="GPL-2+"
 SLOT="0"
 KEYWORDS="amd64 x86"
-IUSE="+rcs +reports exif geo postscript spell test"
+IUSE="berkdb exif geo postscript +rcs +reports spell test"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
        $(python_gen_cond_dep '
-               dev-python/bsddb3[${PYTHON_USEDEP}]
                dev-python/pycairo[${PYTHON_USEDEP}]
                >=dev-python/pygobject-3.12:3[cairo,${PYTHON_USEDEP}]
                dev-python/pyicu[${PYTHON_USEDEP}]
+               berkdb? ( dev-python/bsddb3[${PYTHON_USEDEP}] )
                exif? ( >=media-libs/gexiv2-0.5[${PYTHON_USEDEP},introspection] 
)
        ')
        gnome-base/librsvg:2
@@ -95,6 +95,13 @@ python_install() {
 pkg_postinst() {
        xdg_desktop_database_update
        xdg_mimeinfo_database_update
+
+       if use berkdb; then
+               ewarn "The BSDDB back-end in ${PN} has got known stability and 
data-corruption issues. It has been deprecated since version 5.1.0 and might be 
removed in 5.2.0."
+               ewarn "If you have any family trees in this format you are 
highly advised to convert them to SQLite, as described here:"
+               ewarn
+               ewarn 
"https://gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-_Manage_Family_Trees#Converting_a_BSDDB_Family_Tree_to_SQLite";
+       fi
 }
 
 pkg_postrm() {

diff --git a/app-misc/gramps/metadata.xml b/app-misc/gramps/metadata.xml
index 676ea64bf00..c6c84d61a5b 100644
--- a/app-misc/gramps/metadata.xml
+++ b/app-misc/gramps/metadata.xml
@@ -88,6 +88,7 @@
                zapolnjevanju vrzeli v rodoslovnih podatkih.
        </longdescription>
        <use>
+               <flag name="berkdb">Support BerkeleyDB-based family trees 
produced by older versions of Gramps</flag>
                <flag name="geo">Enable rendering of geographical data using 
<pkg>sci-geosciences/osm-gps-map</pkg></flag>
                <flag name="reports">All external software that is needed for 
graphical reports will be installed</flag>
                <flag name="rcs">Adds support for family tree archives via 
<pkg>dev-vcs/rcs</pkg></flag>

Reply via email to