summaryrefslogtreecommitdiff
path: root/app-misc/gramps
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-22 07:31:18 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-22 07:31:18 +0100
commit908778078736bd36f7a60a2d576d415cb8e000fa (patch)
treec6a4796c48b608c14dc7e9674cdbd38f905e3c15 /app-misc/gramps
parent185fa19bbf68a4d4dca534d2b46729207a177f16 (diff)
gentoo resync : 22.05.2021
Diffstat (limited to 'app-misc/gramps')
-rw-r--r--app-misc/gramps/Manifest5
-rw-r--r--app-misc/gramps/files/gramps-5.1.3-test_locale.patch30
-rw-r--r--app-misc/gramps/gramps-5.1.3.ebuild27
-rw-r--r--app-misc/gramps/metadata.xml1
4 files changed, 55 insertions, 8 deletions
diff --git a/app-misc/gramps/Manifest b/app-misc/gramps/Manifest
index 23e5978a76f0..bf254aff5c86 100644
--- a/app-misc/gramps/Manifest
+++ b/app-misc/gramps/Manifest
@@ -1,3 +1,4 @@
+AUX gramps-5.1.3-test_locale.patch 1195 BLAKE2B 1b1aeb08b90bff9db9d028499428efa60a16b48597bcf466c07a77e3f658c8550eca84b899047d1bc6e20eb26e8dfab9637ae7aced1b99167466ea6c51707132 SHA512 70daee9afdce0f939ad3cec094fb4004f5c162e6b49849f83486db5baec074a8673d7a6096a367279019712a11f0b40e827f6cb3019e7dc3cc6bad327fee35ec
DIST gramps-5.1.3.tar.gz 17352457 BLAKE2B 8356e29d4e9e2ee78f0f09e54db8f77b2db991652f2c6b2fdc742b8f2e160a2c9c2b7df1a43c34e5d05b12b540e88cd8572fe89cfbb3a1ecb6df650a39ac0651 SHA512 045d5dd6aac4745ce527624657bbee25b9130e63b1b66bdd6a8409cdc876f1f3a4a6c0435d433a62bfffb723f6ac66d93829b79fc12c8768694c266b7a3b82cc
-EBUILD gramps-5.1.3.ebuild 2744 BLAKE2B 83a2fa0bdd02c61f839c52e7706b236867998d395672c12a6ee66492c53f72f75cf8ee383d76f7efae3856f8325d35505b27d686ca3088ef18b8c0e0bdee9db2 SHA512 25796d3defb7c8c6a82ee283521acb8dc20a75cf5c161ba8748fb8b87ee24f9d97e30cc8665d63725ef5f3e8a593ba90c770ba01c69d1e42374317ac9d78cf53
-MISC metadata.xml 5598 BLAKE2B 4516bb11bb4fa57403d9b86409a073021dc9372b4d6d53af2c90cb31d5988b960ce4ab9f190b7e82948c1118f1fb0581bef1f8e1e4bbc9da8c294541eabbeda5 SHA512 74b37ffecc01f6c140f349d822ceedf20eb36af2c7a09faca53abaacede12d916cae4b514d066026600bd46d04943c4948dda7fe8c85e7e01714ebd24e428359
+EBUILD gramps-5.1.3.ebuild 3423 BLAKE2B 50c35c845943c62d32179ca86971636e459f2224ebb81f23d342242d682f8ac040fbd6d2b65bfecb2a280496161cd2c379c9cc11f9d64df11efc1f1769961e1f SHA512 4ae9b62f164d9ffc977751cefd8d96d4e1987c05bb384b9fd73bfb23a56f82ffae630468000881c24dfdf975165ad420bcb4c7d05ad189dad780be7437d66919
+MISC metadata.xml 5702 BLAKE2B 21c6b024222b3d4cc29ea388a8f16cbc158850ac5bb0ac32bd55205abfeb91d48d400be992f4f50c2af7e05b1c768e7916b7ff3db16eeea2b33dd294c27f7637 SHA512 e95b67c7b179bfd9bf280d9c8dfd69cc533562abf8b07a433a5c945cc76468f8f7d2097a218a406c71afe4a97ff8e8a790feec8b097c82ad24eed9b6ac8ec99e
diff --git a/app-misc/gramps/files/gramps-5.1.3-test_locale.patch b/app-misc/gramps/files/gramps-5.1.3-test_locale.patch
new file mode 100644
index 000000000000..40eba66dd216
--- /dev/null
+++ b/app-misc/gramps/files/gramps-5.1.3-test_locale.patch
@@ -0,0 +1,30 @@
+GEDCOM-import tests explicitly set the locale to en_US.UTF8 because they
+assume a US date and time format. That locale is not guaranteed to be
+present and checking that in ebuild is a hassle, therefore use C.UTF8
+instead - it's similar enough.
+
+--- a/data/tests/imp_sample.gramps
++++ b/data/tests/imp_sample.gramps
+@@ -1706,7 +1706,7 @@
+ </style>
+ </note>
+ <note handle="_000000f9000000f9" change="1591544255" id="N0036" type="General">
+- <text>Objects referenced by this note were missing in a file imported on 12/25/1999 12:00:00 AM.</text>
++ <text>Objects referenced by this note were missing in a file imported on 12/25/99 00:00:00.</text>
+ </note>
+ </notes>
+ </database>
+--- a/gramps/plugins/test/imports_test.py
++++ b/gramps/plugins/test/imports_test.py
+@@ -51,10 +51,7 @@
+ # ------------------------------------------------------------------
+
+ # These tests assume a US date and time format.
+-try:
+- locale.setlocale(locale.LC_ALL, 'en_US.utf8')
+-except locale.Error: # seems to fail on Windows system for some reason
+- locale.setlocale(locale.LC_ALL, 'English_United States')
++locale.setlocale(locale.LC_ALL, 'C.utf8')
+
+
+ def mock_time(*args):
diff --git a/app-misc/gramps/gramps-5.1.3.ebuild b/app-misc/gramps/gramps-5.1.3.ebuild
index 9908893b3c33..b02679ec1bcc 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
@@ -44,6 +44,10 @@ BDEPEND="test? ( ${RDEPEND}
')
)"
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.1.3-test_locale.patch
+)
+
python_prepare_all() {
# Install documentation to the proper location. This can't be done
# easily with a patch because we substitute in the ${PF} variable,
@@ -67,10 +71,14 @@ python_test_all() {
rm -rf "${S}/build" && ln -s "${BUILD_DIR}" "${S}"/build || \
die "Failed to symlink build directory to source directory"
- # FIXME: some of the tests fail if the locale 'en_US.UTF-8' is absent,
- # at least as of 5.1.2 this failure does not propagate back to this
- # function but we should still handle this properly somehow.
- esetup.py test
+ # Set a sane default locale for the tests which do not explicitly set one.
+ local -x LC_ALL=C.UTF-8
+
+ # Note that as of 5.1.3, test failures do not actually propagate back
+ # to this function. For now this is fortunate because the test suite
+ # does not handle the absence of bsddb3 well, in the long run however
+ # this should be fixed.
+ esetup.py test || die
}
# Ugly hack to work around Bug #717922
@@ -87,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 676ea64bf000..c6c84d61a5b2 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>