Browse Source

science/gramps: Optional dependency on py-bsddb3

databases/py-bsddb3 is deprecated. Make science/gramps use py-bsddb3 as an
option to facilitate the migration and remove the DEPRECATE note since it does
not apply anymore.

Add UPDATING note with instructions for the migration.

While here pet linters.

PR:	264529
Reported by:	nimaje+fbz@bureaucracy.de
2022Q3
Benjamin Takacs 2 weeks ago committed by Fernando Apesteguía
parent
commit
f8c049d638
  1. 10
      UPDATING
  2. 14
      science/gramps/Makefile
  3. 20
      science/gramps/files/patch-gramps_gen_utils_grampslocale.py

10
UPDATING

@ -5,6 +5,16 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20220623:
AFFECTS: users of science/gramps
AUTHOR: fernape@FreeBSD.org
databases/py-bsddb3 is deprecated and will be removed in the future. With that
gramps will lose the ability to load family trees using Berkeley DB.
It is suggested to migrate all family trees using Berkeley DB by exporting
them to gramps xml and import that gramps xml into a family tree using sqlite
as database.
20220620:
AFFECTS: users of www/selenium
AUTHOR: fernape@FreeBSD.org

14
science/gramps/Makefile

@ -2,8 +2,8 @@
PORTNAME= gramps
PORTVERSION= 5.1.5
PORTREVISION= 1
DISTVERSIONPREFIX= v
PORTREVISION= 2
CATEGORIES= science gnome python
MAINTAINER= ports@FreeBSD.org
@ -12,14 +12,10 @@ COMMENT= GTK3-based genealogy program
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
DEPRECATED= Requires py-bsddb3 which requires upstream EOLd db5
EXPIRATION_DATE= 2022-06-30
LIB_DEPENDS= libgeocode-glib.so:net/geocode-glib \
libosmgpsmap-1.0.so:x11-toolkits/osm-gps-map
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bsddb3>0:databases/py-bsddb3@${PY_FLAVOR} \
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pygraphviz>=0:graphics/py-pygraphviz@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyicu>=1.8:devel/py-pyicu@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pygraphviz>=0:graphics/py-pygraphviz@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR} \
xdg-open:devel/xdg-utils
@ -33,14 +29,16 @@ CONFIGURE_ARGS= --disable-mime-install
NO_ARCH= yes
OPTIONS_DEFINE= GEXIV GTKSPELL PIL RCS TTFFREEFONT
OPTIONS_DEFAULT= GEXIV GTKSPELL
OPTIONS_DEFINE= BDB GEXIV GTKSPELL PIL RCS TTFFREEFONT
OPTIONS_DEFAULT= BDB GEXIV GTKSPELL
BDB_DESC= Install py-bsddb3 to support family trees using Berkeley DB (DEPRECATED)
GEXIV_DESC= Manage Exif metadata embedded in media
GTKSPELL_DESC= Spell checking support via gtkspell
PIL_DESC= Crop/convert images with Python Imaging Library (Pillow)
RCS_DESC= Manage revisions of family trees with with GNU RCS
TTFFREEFONT_DESC= More font support in reports
BDB_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bsddb3>0:databases/py-bsddb3@${PY_FLAVOR}
GEXIV_LIB_DEPENDS= libgexiv2.so:graphics/gexiv2
GTKSPELL_LIB_DEPENDS= libgtkspell3-3.so:textproc/gtkspell3
PIL_RUN_DEPENDS= ${PY_PILLOW}

20
science/gramps/files/patch-gramps_gen_utils_grampslocale.py

@ -0,0 +1,20 @@
--- gramps/gen/utils/grampslocale.py.orig 2022-06-08 13:02:30.116272000 +0200
+++ gramps/gen/utils/grampslocale.py 2022-06-08 12:40:34.253581000 +0200
@@ -527,9 +527,14 @@
# with locale instead of gettext. Win32 doesn't support bindtextdomain.
if self.localedir:
if not sys.platform == 'win32':
- # bug12278, _build_popup_ui() under linux and macOS
- locale.textdomain(self.localedomain)
- locale.bindtextdomain(self.localedomain, self.localedir)
+ if hasattr(locale, 'textdomain'):
+ # bug12278, _build_popup_ui() under linux and macOS
+ locale.textdomain(self.localedomain)
+ locale.bindtextdomain(self.localedomain, self.localedir)
+ else:
+ import gettext
+ gettext.textdomain(self.localedomain)
+ gettext.bindtextdomain(self.localedomain, self.localedir)
else:
self._win_bindtextdomain(self.localedomain.encode('utf-8'),
self.localedir.encode('utf-8'))
Loading…
Cancel
Save